Commit 33cc799b authored by Eike Ziller's avatar Eike Ziller

Locator filters: Add overrides

Change-Id: I20f93d6bcb22a342d9f662d8190f97798ca3e423
Reviewed-by: David Schulz's avatarDavid Schulz <david.schulz@qt.io>
parent 6310afc1
......@@ -69,9 +69,10 @@ public:
BaseFileFilter();
~BaseFileFilter();
void prepareSearch(const QString &entry);
QList<LocatorFilterEntry> matchesFor(QFutureInterface<LocatorFilterEntry> &future, const QString &entry);
void accept(LocatorFilterEntry selection) const;
void prepareSearch(const QString &entry) override;
QList<LocatorFilterEntry> matchesFor(QFutureInterface<LocatorFilterEntry> &future,
const QString &entry) override;
void accept(LocatorFilterEntry selection) const override;
protected:
void setFileIterator(Iterator *iterator);
......
......@@ -45,9 +45,10 @@ public:
void appendCommand(Command *cmd);
QList<LocatorFilterEntry> matchesFor(QFutureInterface<LocatorFilterEntry> &future, const QString &entry);
void accept(LocatorFilterEntry selection) const;
void refresh(QFutureInterface<void> &future);
QList<LocatorFilterEntry> matchesFor(QFutureInterface<LocatorFilterEntry> &future,
const QString &entry) override;
void accept(LocatorFilterEntry selection) const override;
void refresh(QFutureInterface<void> &future) override;
private:
CommandLocatorPrivate *d;
......
......@@ -42,10 +42,10 @@ class DirectoryFilter : public BaseFileFilter
public:
DirectoryFilter(Id id);
QByteArray saveState() const;
void restoreState(const QByteArray &state);
bool openConfigDialog(QWidget *parent, bool &needsRefresh);
void refresh(QFutureInterface<void> &future);
QByteArray saveState() const override;
void restoreState(const QByteArray &state) override;
bool openConfigDialog(QWidget *parent, bool &needsRefresh) override;
void refresh(QFutureInterface<void> &future) override;
private:
void addDirectory();
......
......@@ -50,9 +50,9 @@ class ExecuteFilter : public Core::ILocatorFilter
public:
ExecuteFilter();
QList<LocatorFilterEntry> matchesFor(QFutureInterface<LocatorFilterEntry> &future,
const QString &entry);
void accept(LocatorFilterEntry selection) const;
void refresh(QFutureInterface<void> &) {}
const QString &entry) override;
void accept(LocatorFilterEntry selection) const override;
void refresh(QFutureInterface<void> &) override {}
private:
void finished(int exitCode, QProcess::ExitStatus status);
......
......@@ -44,13 +44,14 @@ class FileSystemFilter : public ILocatorFilter
public:
explicit FileSystemFilter(LocatorWidget *locatorWidget);
void prepareSearch(const QString &entry);
QList<LocatorFilterEntry> matchesFor(QFutureInterface<LocatorFilterEntry> &future, const QString &entry);
void accept(LocatorFilterEntry selection) const;
QByteArray saveState() const;
void restoreState(const QByteArray &state);
bool openConfigDialog(QWidget *parent, bool &needsRefresh);
void refresh(QFutureInterface<void> &) {}
void prepareSearch(const QString &entry) override;
QList<LocatorFilterEntry> matchesFor(QFutureInterface<LocatorFilterEntry> &future,
const QString &entry) override;
void accept(LocatorFilterEntry selection) const override;
QByteArray saveState() const override;
void restoreState(const QByteArray &state) override;
bool openConfigDialog(QWidget *parent, bool &needsRefresh) override;
void refresh(QFutureInterface<void> &) override {}
private:
LocatorWidget *m_locatorWidget;
......
......@@ -49,7 +49,7 @@ public:
setFileIterator(new BaseFileFilter::ListIterator(theFiles));
}
void refresh(QFutureInterface<void> &) {}
void refresh(QFutureInterface<void> &) override {}
};
inline QString _(const QByteArray &ba) { return QString::fromLatin1(ba, ba.size()); }
......
......@@ -48,10 +48,11 @@ public:
LocatorWidget *locatorWidget);
// ILocatorFilter
void prepareSearch(const QString &entry);
QList<LocatorFilterEntry> matchesFor(QFutureInterface<LocatorFilterEntry> &future, const QString &entry);
void accept(LocatorFilterEntry selection) const;
void refresh(QFutureInterface<void> &future);
void prepareSearch(const QString &entry) override;
QList<LocatorFilterEntry> matchesFor(QFutureInterface<LocatorFilterEntry> &future,
const QString &entry) override;
void accept(LocatorFilterEntry selection) const override;
void refresh(QFutureInterface<void> &future) override;
private:
Locator *m_plugin;
......
......@@ -43,9 +43,10 @@ class OpenDocumentsFilter : public ILocatorFilter
public:
OpenDocumentsFilter();
QList<LocatorFilterEntry> matchesFor(QFutureInterface<LocatorFilterEntry> &future, const QString &entry);
void accept(LocatorFilterEntry selection) const;
void refresh(QFutureInterface<void> &future);
QList<LocatorFilterEntry> matchesFor(QFutureInterface<LocatorFilterEntry> &future,
const QString &entry) override;
void accept(LocatorFilterEntry selection) const override;
void refresh(QFutureInterface<void> &future) override;
public slots:
void refreshInternally();
......
......@@ -42,8 +42,8 @@ public:
setShortcutString(QLatin1String("md"));
}
void prepareSearch(const QString &entry);
void refresh(QFutureInterface<void> &future);
void prepareSearch(const QString &entry) override;
void refresh(QFutureInterface<void> &future) override;
};
} // Internal
......
......@@ -46,9 +46,10 @@ public:
StringTable &stringTable);
~CppCurrentDocumentFilter() {}
QList<Core::LocatorFilterEntry> matchesFor(QFutureInterface<Core::LocatorFilterEntry> &future, const QString &entry);
void accept(Core::LocatorFilterEntry selection) const;
void refresh(QFutureInterface<void> &future);
QList<Core::LocatorFilterEntry> matchesFor(QFutureInterface<Core::LocatorFilterEntry> &future,
const QString &entry) override;
void accept(Core::LocatorFilterEntry selection) const override;
void refresh(QFutureInterface<void> &future) override;
private:
void onDocumentUpdated(CPlusPlus::Document::Ptr doc);
......
......@@ -39,8 +39,8 @@ public:
// ILocatorFilter interface
public:
void prepareSearch(const QString &entry);
void refresh(QFutureInterface<void> &future);
void prepareSearch(const QString &entry) override;
void refresh(QFutureInterface<void> &future) override;
private:
void markOutdated();
......
......@@ -42,9 +42,9 @@ public:
~CppLocatorFilter();
QList<Core::LocatorFilterEntry> matchesFor(QFutureInterface<Core::LocatorFilterEntry> &future,
const QString &entry);
void accept(Core::LocatorFilterEntry selection) const;
void refresh(QFutureInterface<void> &future);
const QString &entry) override;
void accept(Core::LocatorFilterEntry selection) const override;
void refresh(QFutureInterface<void> &future) override;
protected:
virtual IndexItem::ItemType matchTypes() const { return IndexItem::All; }
......
......@@ -42,11 +42,11 @@ public:
~HelpIndexFilter();
// ILocatorFilter
void prepareSearch(const QString &entry);
void prepareSearch(const QString &entry) override;
QList<Core::LocatorFilterEntry> matchesFor(QFutureInterface<Core::LocatorFilterEntry> &future,
const QString &entry);
void accept(Core::LocatorFilterEntry selection) const;
void refresh(QFutureInterface<void> &future);
const QString &entry) override;
void accept(Core::LocatorFilterEntry selection) const override;
void refresh(QFutureInterface<void> &future) override;
Q_INVOKABLE QSet<QString> searchMatches(const QString &databaseFilePath,
const QString &term, int limit);
......
......@@ -43,12 +43,13 @@ public:
~RemoteHelpFilter();
// ILocatorFilter
QList<Core::LocatorFilterEntry> matchesFor(QFutureInterface<Core::LocatorFilterEntry> &future, const QString &entry);
void accept(Core::LocatorFilterEntry selection) const;
void refresh(QFutureInterface<void> &future);
QByteArray saveState() const;
void restoreState(const QByteArray &state);
bool openConfigDialog(QWidget *parent, bool &needsRefresh);
QList<Core::LocatorFilterEntry> matchesFor(QFutureInterface<Core::LocatorFilterEntry> &future,
const QString &entry) override;
void accept(Core::LocatorFilterEntry selection) const override;
void refresh(QFutureInterface<void> &future) override;
QByteArray saveState() const override;
void restoreState(const QByteArray &state) override;
bool openConfigDialog(QWidget *parent, bool &needsRefresh) override;
QStringList remoteUrls() const;
......
......@@ -43,9 +43,10 @@ public:
MacroLocatorFilter();
~MacroLocatorFilter();
QList<Core::LocatorFilterEntry> matchesFor(QFutureInterface<Core::LocatorFilterEntry> &future, const QString &entry);
void accept(Core::LocatorFilterEntry selection) const;
void refresh(QFutureInterface<void> &future);
QList<Core::LocatorFilterEntry> matchesFor(QFutureInterface<Core::LocatorFilterEntry> &future,
const QString &entry) override;
void accept(Core::LocatorFilterEntry selection) const override;
void refresh(QFutureInterface<void> &future) override;
private:
const QIcon m_icon;
......
......@@ -40,9 +40,10 @@ public:
explicit FunctionFilter(LocatorData *data, QObject *parent = 0);
~FunctionFilter();
QList<Core::LocatorFilterEntry> matchesFor(QFutureInterface<Core::LocatorFilterEntry> &future, const QString &entry);
void accept(Core::LocatorFilterEntry selection) const;
void refresh(QFutureInterface<void> &future);
QList<Core::LocatorFilterEntry> matchesFor(QFutureInterface<Core::LocatorFilterEntry> &future,
const QString &entry) override;
void accept(Core::LocatorFilterEntry selection) const override;
void refresh(QFutureInterface<void> &future) override;
private:
LocatorData *m_data;
......
......@@ -43,10 +43,11 @@ class LineNumberFilter : public Core::ILocatorFilter
public:
explicit LineNumberFilter(QObject *parent = 0);
void prepareSearch(const QString &entry);
QList<Core::LocatorFilterEntry> matchesFor(QFutureInterface<Core::LocatorFilterEntry> &future, const QString &entry);
void accept(Core::LocatorFilterEntry selection) const;
void refresh(QFutureInterface<void> &) {}
void prepareSearch(const QString &entry) override;
QList<Core::LocatorFilterEntry> matchesFor(QFutureInterface<Core::LocatorFilterEntry> &future,
const QString &entry) override;
void accept(Core::LocatorFilterEntry selection) const override;
void refresh(QFutureInterface<void> &) override {}
private:
bool m_hasCurrentEditor;
......
Markdown is supported
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