forked from qt-creator/qt-creator
Locator: Cleanup and modernize Locator and filters
* Omit QLatin1{Char|String}
* Use member initialization
* Use range-based-for
(and fixed the cases with non-const Qt container)
* Sort includes to common style
Change-Id: Ibc33a732bb153862efd6d5febfac758229cb61d4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
André Hartmann
parent
ccc0bebcf4
commit
b2aa1b9845
@@ -24,6 +24,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "qmljsfunctionfilter.h"
|
||||
|
||||
#include "qmljslocatordata.h"
|
||||
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
@@ -41,7 +42,7 @@ FunctionFilter::FunctionFilter(LocatorData *data, QObject *parent)
|
||||
{
|
||||
setId("Functions");
|
||||
setDisplayName(tr("QML Functions"));
|
||||
setShortcutString(QString(QLatin1Char('m')));
|
||||
setShortcutString("m");
|
||||
setIncludedByDefault(false);
|
||||
}
|
||||
|
||||
@@ -73,7 +74,7 @@ QList<Core::LocatorFilterEntry> FunctionFilter::matchesFor(
|
||||
it.next();
|
||||
|
||||
const QList<LocatorData::Entry> items = it.value();
|
||||
foreach (const LocatorData::Entry &info, items) {
|
||||
for (const LocatorData::Entry &info : items) {
|
||||
if (info.type != LocatorData::Function)
|
||||
continue;
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
void refresh(QFutureInterface<void> &future) override;
|
||||
|
||||
private:
|
||||
LocatorData *m_data;
|
||||
LocatorData *m_data = nullptr;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user