Commit 72daf743 authored by Laurent Montel's avatar Laurent Montel 😁

it's not a qmultimap => we can't use count(...) in qt5.15

parent 202af7d3
...@@ -191,7 +191,7 @@ bool ManageSieveWidget::canAddNewScript(QTreeWidgetItem *item, bool jobsListIsEm ...@@ -191,7 +191,7 @@ bool ManageSieveWidget::canAddNewScript(QTreeWidgetItem *item, bool jobsListIsEm
return false; return false;
} }
if (!mUrls.count(item)) { if (!mUrls.contains(item)) {
return false; return false;
} }
return true; return true;
...@@ -225,7 +225,7 @@ void ManageSieveWidget::slotNewScript() ...@@ -225,7 +225,7 @@ void ManageSieveWidget::slotNewScript()
return; return;
} }
if (!mUrls.count(currentItem)) { if (!mUrls.contains(currentItem)) {
return; return;
} }
...@@ -295,7 +295,7 @@ void ManageSieveWidget::slotEditScript() ...@@ -295,7 +295,7 @@ void ManageSieveWidget::slotEditScript()
return; return;
} }
QTreeWidgetItem *parent = currentItem->parent(); QTreeWidgetItem *parent = currentItem->parent();
if (!mUrls.count(parent)) { if (!mUrls.contains(parent)) {
return; return;
} }
QUrl url = mUrls[parent]; QUrl url = mUrls[parent];
...@@ -335,10 +335,10 @@ void ManageSieveWidget::changeActiveScript(QTreeWidgetItem *item, bool activate) ...@@ -335,10 +335,10 @@ void ManageSieveWidget::changeActiveScript(QTreeWidgetItem *item, bool activate)
if (!item) { if (!item) {
return; return;
} }
if (!mUrls.count(item)) { if (!mUrls.contains(item)) {
return; return;
} }
if (!d->mSelectedItems.count(item)) { if (!d->mSelectedItems.contains(item)) {
return; return;
} }
QUrl u = mUrls[item]; QUrl u = mUrls[item];
...@@ -418,7 +418,7 @@ void ManageSieveWidget::slotRenameScript() ...@@ -418,7 +418,7 @@ void ManageSieveWidget::slotRenameScript()
return; return;
} }
if (!mUrls.count(parent)) { if (!mUrls.contains(parent)) {
return; return;
} }
...@@ -481,7 +481,7 @@ void ManageSieveWidget::slotDeleteScript() ...@@ -481,7 +481,7 @@ void ManageSieveWidget::slotDeleteScript()
return; return;
} }
if (!mUrls.count(parent)) { if (!mUrls.contains(parent)) {
return; return;
} }
...@@ -650,7 +650,7 @@ void ManageSieveWidget::enableDisableActions(bool &newScriptAction, bool &editSc ...@@ -650,7 +650,7 @@ void ManageSieveWidget::enableDisableActions(bool &newScriptAction, bool &editSc
bool enabled = true; bool enabled = true;
if (!item) { if (!item) {
enabled = false; enabled = false;
} else if (!item->parent() && !mUrls.count(item)) { } else if (!item->parent() && !mUrls.contains(item)) {
enabled = false; enabled = false;
} }
...@@ -663,7 +663,7 @@ void ManageSieveWidget::enableDisableActions(bool &newScriptAction, bool &editSc ...@@ -663,7 +663,7 @@ void ManageSieveWidget::enableDisableActions(bool &newScriptAction, bool &editSc
if (serverHasError(item) || !mJobs.keys(item).isEmpty()) { if (serverHasError(item) || !mJobs.keys(item).isEmpty()) {
newScriptAction = false; newScriptAction = false;
} else { } else {
newScriptAction = mUrls.count(item); newScriptAction = mUrls.contains(item);
} }
enabled = isFileNameItem(item); enabled = isFileNameItem(item);
editScriptAction = enabled; editScriptAction = enabled;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment