Commit 23e01d2c authored by Ahmad Samir's avatar Ahmad Samir Committed by Ingo Klöcker
Browse files

Optimize containers' usage

Replace some QMaps/QSets with vector/array of struct. For a couple of
elements, a map/set isn't needed.
parent 034153b5
Pipeline #182664 passed with stage
in 2 minutes and 49 seconds
......@@ -15,6 +15,7 @@
#include "conf/groupsconfigdialog.h"
#include <Libkleo/Algorithm>
#include <view/keytreeview.h>
#include <view/searchbar.h>
#include <view/tabwidget.h>
......@@ -135,7 +136,7 @@ private:
}
private:
QSet<QAbstractItemView *> connectedViews;
std::vector<QAbstractItemView *> connectedViews;
QString customLabelText;
Options options = AnyCertificate | AnyFormat;
......@@ -443,8 +444,8 @@ void CertificateSelectionDialog::filterAllowedKeys(std::vector<Key> &keys, int o
void CertificateSelectionDialog::Private::slotCurrentViewChanged(QAbstractItemView *newView)
{
if (!connectedViews.contains(newView)) {
connectedViews.insert(newView);
if (!Kleo::contains(connectedViews, newView)) {
connectedViews.push_back(newView);
connect(newView, &QAbstractItemView::doubleClicked,
q, [this] (const QModelIndex &index) { slotDoubleClicked(index); });
Q_ASSERT(newView->selectionModel());
......
Supports Markdown
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