summaryrefslogtreecommitdiff
path: root/src/plugins/designer/settingspage.cpp
diff options
context:
space:
mode:
authorAndre Hartmann <aha_1980@gmx.de>2017-10-16 20:47:05 +0200
committerAndré Hartmann <aha_1980@gmx.de>2017-10-20 06:34:40 +0000
commit1d53110402264e294592bb0c0e8a52546bdf426a (patch)
tree07e6be8f7275709fe252c22cca37cb461dafdceb /src/plugins/designer/settingspage.cpp
parent72c283afc8d748296dc509fb73848c2607fa7d9f (diff)
downloadqt-creator-1d53110402264e294592bb0c0e8a52546bdf426a.tar.gz
Designer: Modernize
* Remove QLatin1{Char|String} * Use member initialization * Use range-for * Use nullptr Change-Id: I51c24c0a2066861f59731585f19d61b28c76c0a3 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/plugins/designer/settingspage.cpp')
-rw-r--r--src/plugins/designer/settingspage.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/designer/settingspage.cpp b/src/plugins/designer/settingspage.cpp
index 137f9a66aa..488ee8ea5e 100644
--- a/src/plugins/designer/settingspage.cpp
+++ b/src/plugins/designer/settingspage.cpp
@@ -28,6 +28,7 @@
#include <coreplugin/icontext.h>
+#include <utils/asconst.h>
#include <utils/stringutils.h>
#include <QDesignerOptionsPageInterface>
@@ -74,7 +75,7 @@ SettingsPageProvider::SettingsPageProvider(QObject *parent)
setCategory(Designer::Constants::SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Designer",
Designer::Constants::SETTINGS_TR_CATEGORY));
- setCategoryIcon(QLatin1String(Designer::Constants::SETTINGS_CATEGORY_ICON));
+ setCategoryIcon(Designer::Constants::SETTINGS_CATEGORY_ICON);
}
QList<Core::IOptionsPage *> SettingsPageProvider::pages() const
@@ -120,7 +121,7 @@ bool SettingsPageProvider::matches(const QString &searchKeyWord) const
for (size_t i = 0; i < itemCount; ++i)
m_keywords << Utils::stripAccelerator(QCoreApplication::translate(uitext[i].context, uitext[i].value));
}
- foreach (const QString &key, m_keywords) {
+ for (const QString &key : Utils::asConst(m_keywords)) {
if (key.contains(searchKeyWord, Qt::CaseInsensitive))
return true;
}