-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Move old RSS items to separate config file. Closes #6167. #6175
Conversation
--HG-- branch : magao-dev
Rebased on top of #6212 and uncrustified. |
} | ||
else { | ||
allOldItems = qBTRSS.value("old_items", QHash<QString, QVariant>()).toHash(); | ||
} |
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.
move the migrating code under a function called "migrateRSS()" in the file `src/app/upgrade.h".
Then call it inside main() at the appropriate position.
Wrap all that code in:
#ifndef DISABLE_GUI
// do stuff
#endif
After all this the code in this file will be much cleaner.
And in the future, we have to look at one place to remove old upgrading/migrating code.
Also doesn't old_items hold the RSS feeds actually? Then why not name the new file |
|
@sledgehammer999 Rebased PR on top of master and addressed review comments. |
@@ -258,4 +258,23 @@ void macMigratePlists() | |||
#endif // Q_OS_MAC | |||
|
|||
|
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.
don't leave 2 newlines
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 mean that 1 newline is fine.
} | ||
#endif | ||
|
||
|
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.
same here
@sledgehammer999 Fixed double-newlines, including existing doubled newlines before |
Thank you. |
This is one of a series of pull requests designed to improve the responsiveness of the UI. This pull request addresses #6167.
When editing RSS downloader rules, each edit results in persisting the rules to disk. Since the
old_items
are in the same file, this also means persisting theold_items
to disk each time a rule is edited. I have ~100 rules which use <1MB on disk, but theold_items
use ~70MB, so persisting them each edit affected responsiveness.This change moves the RSS
old_items
fromqBittorrent-rss.conf
to a newqBittorrent-rss-items.conf
. Existing entries are migrated on first run.