aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/coreplugin/locator/javascriptfilter.h
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2018-02-06 09:33:54 +0100
committerEike Ziller <eike.ziller@qt.io>2018-02-06 09:16:46 +0000
commit3f87c4685e3d93522e8cad11a725dd193156d20d (patch)
treef4a51aefed465993ccff7d7f6382c2cb916aac25 /src/plugins/coreplugin/locator/javascriptfilter.h
parent6ca1d2bfa4c3880a90b28b96924e49b6f25acb9c (diff)
Fix crash in timeout of JavaScript locator filterv4.6.0-beta1
The timeout code may not access thread local state, because if it fires on the main thread after the thread already finished, that state is gone. Change-Id: I3b9b432515ff6f0c46c46b1904bdd622a19960d2 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/coreplugin/locator/javascriptfilter.h')
-rw-r--r--src/plugins/coreplugin/locator/javascriptfilter.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/coreplugin/locator/javascriptfilter.h b/src/plugins/coreplugin/locator/javascriptfilter.h
index 025ce2fa6a..feaf326036 100644
--- a/src/plugins/coreplugin/locator/javascriptfilter.h
+++ b/src/plugins/coreplugin/locator/javascriptfilter.h
@@ -27,6 +27,8 @@
#include <coreplugin/locator/ilocatorfilter.h>
+#include <QTimer>
+
#include <memory>
QT_BEGIN_NAMESPACE
@@ -54,6 +56,8 @@ private:
void setupEngine();
mutable std::unique_ptr<QScriptEngine> m_engine;
+ QTimer m_abortTimer;
+ bool m_aborted = false;
};
} // namespace Internal