File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -246,7 +246,7 @@ bool ResultsTree::addErrorItem(const ErrorItem& errorItem)
246246 const QString s = errorItem.toString ();
247247 if (mErrorList .contains (s))
248248 return false ;
249- mErrorList .append (s);
249+ mErrorList .insert (s);
250250
251251 QSharedPointer<ErrorItem> errorItemPtr{new ErrorItem (errorItem)};
252252
@@ -1137,7 +1137,7 @@ void ResultsTree::removeFileErrorsFromErrorList(const ResultItem *fileItem)
11371137 for (int i{0 }; i < fileItem->rowCount (); ++i) {
11381138 const auto *errorItem = dynamic_cast <const ResultItem*>(fileItem->child (i, COLUMN_FILE ));
11391139 if (errorItem && errorItem->errorItem )
1140- mErrorList .removeAll (errorItem->errorItem ->toString ());
1140+ mErrorList .remove (errorItem->errorItem ->toString ());
11411141 }
11421142}
11431143
Original file line number Diff line number Diff line change 2929#include < string>
3030
3131#include < QObject>
32+ #include < QSet>
3233#include < QString>
3334#include < QStringList>
3435#include < QTreeView>
@@ -572,8 +573,8 @@ protected slots:
572573
573574 QStringList mHiddenMessageId ;
574575
575- // List of existing errors so we can avoid duplicates
576- QStringList mErrorList ;
576+ // Set of existing errors so we can avoid duplicates
577+ QSet<QString> mErrorList ;
577578
578579 QItemSelectionModel* mSelectionModel {};
579580 ThreadHandler *mThread {};
You can’t perform that action at this time.
0 commit comments