diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-05-28 10:26:42 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-05-28 10:26:42 -0400 |
| commit | 1ec2260db594a728ce811c78c83d9bdf460dafc5 (patch) | |
| tree | 1d960f545bd4792c1e118ede2a9e982437650fde /src/modinfodialog.cpp | |
| parent | adb5ace7997c4cf8ed5e0bee726478c8e1593524 (diff) | |
reversed 'hide' parameter to 'visible' for changeConflictItemsVisibility()
when I pass true to it, I expect it to be visible, not "yes, this should be hidden"
I had actually started this earlier and ended up in a broken, in-between state, which should be fixed now
Diffstat (limited to 'src/modinfodialog.cpp')
| -rw-r--r-- | src/modinfodialog.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/modinfodialog.cpp b/src/modinfodialog.cpp index fd8093d1..4cb23081 100644 --- a/src/modinfodialog.cpp +++ b/src/modinfodialog.cpp @@ -1637,16 +1637,18 @@ FileRenamer::RenameResults ModInfoDialog::unhideFile(FileRenamer& renamer, const } void ModInfoDialog::changeConflictItemsVisibility( - const QList<QTreeWidgetItem*>& items, bool hide) + const QList<QTreeWidgetItem*>& items, bool visible) { bool changed = false; bool stop = false; qDebug().nospace() - << (hide ? "hiding" : "unhiding") << " " + << (visible ? "unhiding" : "hiding") << " " << items.size() << " conflict files"; - QFlags<FileRenamer::RenameFlags> flags = (hide ? FileRenamer::HIDE : FileRenamer::UNHIDE); + QFlags<FileRenamer::RenameFlags> flags = + (visible ? FileRenamer::UNHIDE : FileRenamer::HIDE); + if (items.size() > 1) { flags |= FileRenamer::MULTIPLE; } @@ -1660,19 +1662,19 @@ void ModInfoDialog::changeConflictItemsVisibility( auto result = FileRenamer::RESULT_CANCEL; - if (hide) { - if (!canHideConflictItem(item)) { - qDebug().nospace() << "cannot hide " << item->text(0) << ", skipping"; + if (visible) { + if (!canUnhideConflictItem(item)) { + qDebug().nospace() << "cannot unhide " << item->text(0) << ", skipping"; continue; } - result = hideFile(renamer, item->data(0, Qt::UserRole).toString()); + result = unhideFile(renamer, item->data(0, Qt::UserRole).toString()); } else { - if (!canUnhideConflictItem(item)) { - qDebug().nospace() << "cannot unhide " << item->text(0) << ", skipping"; + if (!canHideConflictItem(item)) { + qDebug().nospace() << "cannot hide " << item->text(0) << ", skipping"; continue; } - result = unhideFile(renamer, item->data(0, Qt::UserRole).toString()); + result = hideFile(renamer, item->data(0, Qt::UserRole).toString()); } switch (result) { @@ -1695,7 +1697,7 @@ void ModInfoDialog::changeConflictItemsVisibility( } } - qDebug().nospace() << (hide ? "hiding" : "unhiding") << " conflict files done"; + qDebug().nospace() << (visible ? "unhiding" : "hiding") << " conflict files done"; if (changed) { qDebug().nospace() << "triggering refresh"; |
