forked from qt-creator/qt-creator
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>
This commit is contained in:
committed by
André Hartmann
parent
72c283afc8
commit
1d53110402
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user