From 91239baaba07aec3a8ef1a559ef996bd3393e6cd Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 19 Sep 2014 16:08:49 +0200 Subject: Locator filters: Fix various thread-safety issues Introduces a "prepareSearch" method for locator filters that is called on the UI thread prior to the threaded matching. Fix various small thread-safety issues in the various filters. Change-Id: If5ae7d205e126d367420936a93f8d9a84496edb8 Reviewed-by: Daniel Teske --- src/plugins/texteditor/linenumberfilter.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/plugins/texteditor/linenumberfilter.h') diff --git a/src/plugins/texteditor/linenumberfilter.h b/src/plugins/texteditor/linenumberfilter.h index 3806d18f33..ede35e5433 100644 --- a/src/plugins/texteditor/linenumberfilter.h +++ b/src/plugins/texteditor/linenumberfilter.h @@ -48,9 +48,13 @@ class LineNumberFilter : public Core::ILocatorFilter public: explicit LineNumberFilter(QObject *parent = 0); + void prepareSearch(const QString &entry); QList matchesFor(QFutureInterface &future, const QString &entry); void accept(Core::LocatorFilterEntry selection) const; void refresh(QFutureInterface &) {} + +private: + bool m_hasCurrentEditor; }; } // namespace Internal -- cgit v1.2.1