[app] Housekeeping

This commit is contained in:
Slava Monich 2016-11-06 21:52:09 +03:00
parent 3fbe9561be
commit 3ffcd7cdf2
2 changed files with 3 additions and 8 deletions

View file

@ -61,6 +61,6 @@ Item {
secondaryColor: Settings.primaryPageToolColor secondaryColor: Settings.primaryPageToolColor
highlightColor: Settings.highlightPageToolColor highlightColor: Settings.highlightPageToolColor
secondaryHighlightColor: Settings.highlightPageToolColor secondaryHighlightColor: Settings.highlightPageToolColor
onValueChanged: root.pageChanged(value) onSliderValueChanged: root.pageChanged(value)
} }
} }

View file

@ -220,16 +220,11 @@ void BooksStorageModel::onStorageRemoved(BooksStorage aStorage)
void BooksStorageModel::onStorageReplaced(BooksStorage aOld, BooksStorage aNew) void BooksStorageModel::onStorageReplaced(BooksStorage aOld, BooksStorage aNew)
{ {
int index = find(aOld); int index = find(aOld);
if (index >=0) { if (index >= 0) {
QModelIndex modelIndex(createIndex(index, 0)); QModelIndex modelIndex(createIndex(index, 0));
QVector<int> roles(4);
roles.append(BooksStorageRoot);
roles.append(BooksStorageDevice);
roles.append(BooksStorageRemovable);
roles.append(BooksStorageDeleteAllRequest);
HWARN(aOld.root() << "->" << aNew.root()); HWARN(aOld.root() << "->" << aNew.root());
iList.at(index)->iStorage = aNew; iList.at(index)->iStorage = aNew;
Q_EMIT dataChanged(modelIndex, modelIndex, roles); Q_EMIT dataChanged(modelIndex, modelIndex);
} else { } else {
HWARN("device not found on the list"); HWARN("device not found on the list");
} }