New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup object sources #2255
Cleanup object sources #2255
Conversation
* | ||
* @param rescan If YES, the entry will be rescanned immediately. | ||
*/ | ||
- (void)refresh:(BOOL)rescan; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this terminology, I think using what's already in QSCatalogEntry
would be best:
- (void)scanForced:(BOOL)force;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I understand more what this is trying to do. Maybe:
- (void)updateAndRescan:(BOOL)rescan;
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, my inspiration was touch
, but that's not very good either... I think I prefer the one I have to -updateAndRescan:rescan-again
, and scanForced:
makes it looks like you're in for the ride — since it's the same on entries), which is not true here. But I'm open to suggestions.
17f5671
to
a814ffc
Compare
// Check to see if the name isn't hardcoded in our info | ||
if (!_name) { | ||
_name = self.info[kItemName]; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving this up above the previous bock (that checks QSObjectSource.name
) fixes the all the incorrect catalog entry names. I feel like an explicitly defined name should have more weight anyway, and not be the last resort fallback.
This doesn’t fix names that are coming back nil
. Still investigating that one.
For the catalog entries completely missing names, it’s because |
a814ffc
to
54afed8
Compare
Also, don't compare dates as pointers, please ?
This reverts commit 6b920af.
54afed8
to
e6f9d0c
Compare
Rebased, fixed another misused method, and hacked back custom names. I don't like really the current approach, but I'll try to make it cleaner when tackling customizable presets. |
|
||
@implementation QSCatalogEntry (OldStyleSourceSupport) | ||
|
||
- (id)objectForKey:(NSString *)key { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn’t in the header.
Trying this out local for a while. Catalog names look good in the UI now. I still don’t understand why the user-defined name is checked last, though (in |
Because it's not the "user-defined" name at all. "User-defined"-ness is a hack that replaces whatever name the catalog entry had with something the user typed, by force-overriding it. |
|
This streamlines the
QSObjectSource
/QSCatalogEntry
API, the ultimate goal being asynchronous loading of objects where that makes sense. I feel like this is pretty far away still, because I'd like to tackle the librarian first.I expect this not to break anything, the things that need plugin changes will be submitted separately in PR #2256, but I need the infrastructure in there to progress (eg.
-selectedEntry
).