[app] Housekeeping
This commit is contained in:
parent
3fbe9561be
commit
3ffcd7cdf2
2 changed files with 3 additions and 8 deletions
|
@ -61,6 +61,6 @@ Item {
|
|||
secondaryColor: Settings.primaryPageToolColor
|
||||
highlightColor: Settings.highlightPageToolColor
|
||||
secondaryHighlightColor: Settings.highlightPageToolColor
|
||||
onValueChanged: root.pageChanged(value)
|
||||
onSliderValueChanged: root.pageChanged(value)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -220,16 +220,11 @@ void BooksStorageModel::onStorageRemoved(BooksStorage aStorage)
|
|||
void BooksStorageModel::onStorageReplaced(BooksStorage aOld, BooksStorage aNew)
|
||||
{
|
||||
int index = find(aOld);
|
||||
if (index >=0) {
|
||||
if (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());
|
||||
iList.at(index)->iStorage = aNew;
|
||||
Q_EMIT dataChanged(modelIndex, modelIndex, roles);
|
||||
Q_EMIT dataChanged(modelIndex, modelIndex);
|
||||
} else {
|
||||
HWARN("device not found on the list");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue