forked from qt-creator/qt-creator
Mark that shutdown has started and don't start any new thread anymore
Amends cb5977fbad
Task-number: QTCREATORBUG-25318
Change-Id: I650389d53571724fe1ec4e299d7d3d8cf4a24061
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -171,6 +171,7 @@ bool Locator::delayedInitialize()
|
||||
|
||||
void Locator::aboutToShutdown()
|
||||
{
|
||||
m_shuttingDown = true;
|
||||
m_refreshTimer.stop();
|
||||
if (m_refreshTask.isRunning()) {
|
||||
m_refreshTask.cancel();
|
||||
@@ -384,6 +385,9 @@ void Locator::setRefreshInterval(int interval)
|
||||
|
||||
void Locator::refresh(QList<ILocatorFilter *> filters)
|
||||
{
|
||||
if (m_shuttingDown)
|
||||
return;
|
||||
|
||||
if (m_refreshTask.isRunning()) {
|
||||
m_refreshTask.cancel();
|
||||
// this is not ideal because some of the previous filters might have finished, but we
|
||||
|
@@ -76,6 +76,7 @@ private:
|
||||
|
||||
LocatorData *m_locatorData = nullptr;
|
||||
|
||||
bool m_shuttingDown = false;
|
||||
bool m_settingsInitialized = false;
|
||||
QList<ILocatorFilter *> m_filters;
|
||||
QList<ILocatorFilter *> m_customFilters;
|
||||
|
Reference in New Issue
Block a user