mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-02-06 20:33:38 +01:00
Some renaming.
This commit is contained in:
parent
f322ea8e73
commit
53cd34eaa2
@ -124,20 +124,20 @@ void ServiceRoot::updateCounts(bool including_total_count) {
|
||||
|
||||
void ServiceRoot::completelyRemoveAllData() {
|
||||
// Purge old data from SQL and clean all model items.
|
||||
removeOldFeedTree(true);
|
||||
cleanAllItems();
|
||||
removeOldAccountFromDatabase(true);
|
||||
cleanAllItemsFromModel();
|
||||
updateCounts(true);
|
||||
itemChanged(QList<RootItem*>() << this);
|
||||
requestReloadMessageList(true);
|
||||
}
|
||||
|
||||
void ServiceRoot::removeOldFeedTree(bool including_messages) {
|
||||
void ServiceRoot::removeOldAccountFromDatabase(bool including_messages) {
|
||||
QSqlDatabase database = qApp->database()->connection(metaObject()->className());
|
||||
|
||||
DatabaseQueries::deleteAccountData(database, accountId(), including_messages);
|
||||
}
|
||||
|
||||
void ServiceRoot::cleanAllItems() {
|
||||
void ServiceRoot::cleanAllItemsFromModel() {
|
||||
for (RootItem* top_level_item : childItems()) {
|
||||
if (top_level_item->kind() != RootItemKind::Bin && top_level_item->kind() != RootItemKind::Important) {
|
||||
requestItemRemoval(top_level_item);
|
||||
@ -301,8 +301,8 @@ void ServiceRoot::syncIn() {
|
||||
QMap<QString, QVariant> feed_custom_data = storeCustomFeedsData();
|
||||
|
||||
// Remove from feeds model, then from SQL but leave messages intact.
|
||||
cleanAllItems();
|
||||
removeOldFeedTree(false);
|
||||
cleanAllItemsFromModel();
|
||||
removeOldAccountFromDatabase(false);
|
||||
restoreCustomFeedsData(feed_custom_data, new_tree->getHashedSubTreeFeeds());
|
||||
|
||||
// Model is clean, now store new tree into DB and
|
||||
|
@ -164,9 +164,9 @@ class ServiceRoot : public RootItem {
|
||||
|
||||
// Removes all messages/categories/feeds which are
|
||||
// associated with this account.
|
||||
void removeOldFeedTree(bool including_messages);
|
||||
void removeOldAccountFromDatabase(bool including_messages);
|
||||
void storeNewFeedTree(RootItem* root);
|
||||
void cleanAllItems();
|
||||
void cleanAllItemsFromModel();
|
||||
|
||||
// Removes messages which do not belong to any
|
||||
// existing feed.
|
||||
|
Loading…
x
Reference in New Issue
Block a user