Refactoring.

This commit is contained in:
Martin Rotter 2014-09-17 12:27:33 +02:00
parent 5581a5a92f
commit fb19f12ad3

View File

@ -363,16 +363,12 @@ bool FeedsModel::editFeed(FeedsModelFeed *original_feed, FeedsModelFeed *new_fee
int new_index_of_feed = new_parent->childCount(); int new_index_of_feed = new_parent->childCount();
// Remove the original item from the model... // Remove the original item from the model...
beginRemoveRows(indexForItem(original_parent), beginRemoveRows(indexForItem(original_parent), original_index_of_feed, original_index_of_feed);
original_index_of_feed,
original_index_of_feed);
original_parent->removeChild(original_feed); original_parent->removeChild(original_feed);
endRemoveRows(); endRemoveRows();
// ... and insert it under the new parent. // ... and insert it under the new parent.
beginInsertRows(indexForItem(new_parent), beginInsertRows(indexForItem(new_parent), new_index_of_feed, new_index_of_feed);
new_index_of_feed,
new_index_of_feed);
new_parent->appendChild(original_feed); new_parent->appendChild(original_feed);
endInsertRows(); endInsertRows();
} }
@ -888,8 +884,7 @@ void FeedsModel::assembleFeeds(FeedAssignment feeds) {
categories.value(feed.first)->appendChild(feed.second); categories.value(feed.first)->appendChild(feed.second);
} }
else { else {
qWarning("Feed '%s' is loose, skipping it.", qWarning("Feed '%s' is loose, skipping it.", qPrintable(feed.second->title()));
qPrintable(feed.second->title()));
} }
} }
} }