diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2014-08-27 11:50:53 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@digia.com> | 2014-08-29 13:21:06 +0200 |
commit | 4a3cc6d2b2eb3e1090b22bb3c04f6933821afa96 (patch) | |
tree | cfb45c5642d17d18359417dbddafaf338c27b7a3 /src | |
parent | ea82bfb5324e58ceb2eee132a6030c32a1e2916b (diff) | |
download | qt-creator-4a3cc6d2b2eb3e1090b22bb3c04f6933821afa96.tar.gz |
C++: set the objectName of QTimers.
This will hopefully help a bit in resolving the crashes that happen in
QCoreApplication::notifyInternal.
Change-Id: Ib3aa8c1a1f50778bd89938d7c529d8399ccf91ea
Task-number: QTCREATORBUG-11262
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/classview/classviewparser.cpp | 1 | ||||
-rw-r--r-- | src/plugins/coreplugin/editormanager/editormanager.cpp | 1 | ||||
-rw-r--r-- | src/plugins/cppeditor/cppeditor.cpp | 10 | ||||
-rw-r--r-- | src/plugins/cppeditor/cppeditoroutline.cpp | 9 | ||||
-rw-r--r-- | src/plugins/cpptools/cppmodelmanager.cpp | 1 | ||||
-rw-r--r-- | src/plugins/cpptools/cpptoolseditorsupport.cpp | 3 | ||||
-rw-r--r-- | src/plugins/cpptools/stringtable.cpp | 1 |
7 files changed, 20 insertions, 6 deletions
diff --git a/src/plugins/classview/classviewparser.cpp b/src/plugins/classview/classviewparser.cpp index c1ff497d64..828e42d6c4 100644 --- a/src/plugins/classview/classviewparser.cpp +++ b/src/plugins/classview/classviewparser.cpp @@ -166,6 +166,7 @@ Parser::Parser(QObject *parent) d(new ParserPrivate()) { d->timer = new QTimer(this); + d->timer->setObjectName(QLatin1String("ClassViewParser::timer")); d->timer->setSingleShot(true); // connect signal/slots diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 74354e6393..963aceb332 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -438,6 +438,7 @@ EditorManager::EditorManager(QWidget *parent) : d->m_windowPopup = new OpenEditorsWindow(this); d->m_autoSaveTimer = new QTimer(this); + d->m_autoSaveTimer->setObjectName(QLatin1String("EditorManager::m_autoSaveTimer")); connect(d->m_autoSaveTimer, SIGNAL(timeout()), SLOT(autoSave())); updateAutoSave(); } diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index ce1d201ce8..153928c11b 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -93,9 +93,10 @@ using namespace CppEditor::Internal; namespace { -QTimer *newSingleShotTimer(QObject *parent, int msecInterval) +QTimer *newSingleShotTimer(QObject *parent, int msecInterval, const QString &objectName) { QTimer *timer = new QTimer(parent); + timer->setObjectName(objectName); timer->setSingleShot(true); timer->setInterval(msecInterval); return timer; @@ -245,10 +246,13 @@ TextEditor::BaseTextEditor *CPPEditorWidget::createEditor() void CPPEditorWidget::createToolBar(CPPEditor *editor) { - d->m_updateUsesTimer = newSingleShotTimer(this, UPDATE_USES_INTERVAL); + d->m_updateUsesTimer = newSingleShotTimer(this, UPDATE_USES_INTERVAL, + QLatin1String("CPPEditorWidget::m_updateUsesTimer")); connect(d->m_updateUsesTimer, SIGNAL(timeout()), this, SLOT(updateUsesNow())); - d->m_updateFunctionDeclDefLinkTimer = newSingleShotTimer(this, UPDATE_FUNCTION_DECL_DEF_LINK_INTERVAL); + d->m_updateFunctionDeclDefLinkTimer = newSingleShotTimer( + this, UPDATE_FUNCTION_DECL_DEF_LINK_INTERVAL, + QLatin1String("CPPEditorWidget::m_updateFunctionDeclDefLinkTimer")); connect(d->m_updateFunctionDeclDefLinkTimer, SIGNAL(timeout()), this, SLOT(updateFunctionDeclDefLinkNow())); diff --git a/src/plugins/cppeditor/cppeditoroutline.cpp b/src/plugins/cppeditor/cppeditoroutline.cpp index 67eab7658d..bead63007d 100644 --- a/src/plugins/cppeditor/cppeditoroutline.cpp +++ b/src/plugins/cppeditor/cppeditoroutline.cpp @@ -82,9 +82,10 @@ private: CPlusPlus::OverviewModel *m_sourceModel; }; -QTimer *newSingleShotTimer(QObject *parent, int msInternal) +QTimer *newSingleShotTimer(QObject *parent, int msInternal, const QString &objectName) { QTimer *timer = new QTimer(parent); + timer->setObjectName(objectName); timer->setSingleShot(true); timer->setInterval(msInternal); return timer; @@ -131,10 +132,12 @@ CppEditorOutline::CppEditorOutline(CPPEditorWidget *editorWidget) connect(m_combo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateToolTip())); // Set up timers - m_updateTimer = newSingleShotTimer(this, UpdateOutlineIntervalInMs); + m_updateTimer = newSingleShotTimer(this, UpdateOutlineIntervalInMs, + QLatin1String("CppEditorOutline::m_updateTimer")); connect(m_updateTimer, SIGNAL(timeout()), this, SLOT(updateNow())); - m_updateIndexTimer = newSingleShotTimer(this, UpdateOutlineIntervalInMs); + m_updateIndexTimer = newSingleShotTimer(this, UpdateOutlineIntervalInMs, + QLatin1String("CppEditorOutline::m_updateIndexTimer")); connect(m_updateIndexTimer, SIGNAL(timeout()), this, SLOT(updateIndexNow())); } diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp index 8924f64cd8..7437f0eb9b 100644 --- a/src/plugins/cpptools/cppmodelmanager.cpp +++ b/src/plugins/cpptools/cppmodelmanager.cpp @@ -232,6 +232,7 @@ CppModelManager::CppModelManager(QObject *parent) m_dirty = true; m_delayedGcTimer = new QTimer(this); + m_delayedGcTimer->setObjectName(QLatin1String("CppModelManager::m_delayedGcTimer")); m_delayedGcTimer->setSingleShot(true); connect(m_delayedGcTimer, SIGNAL(timeout()), this, SLOT(GC())); diff --git a/src/plugins/cpptools/cpptoolseditorsupport.cpp b/src/plugins/cpptools/cpptoolseditorsupport.cpp index 56f31d9218..bb875ba119 100644 --- a/src/plugins/cpptools/cpptoolseditorsupport.cpp +++ b/src/plugins/cpptools/cpptoolseditorsupport.cpp @@ -137,11 +137,13 @@ CppEditorSupport::CppEditorSupport(CppModelManager *modelManager, BaseTextEditor } m_updateDocumentTimer = new QTimer(this); + m_updateDocumentTimer->setObjectName(QLatin1String("CppEditorSupport::m_updateDocumentTimer")); m_updateDocumentTimer->setSingleShot(true); m_updateDocumentTimer->setInterval(m_updateDocumentInterval); connect(m_updateDocumentTimer, SIGNAL(timeout()), this, SLOT(updateDocumentNow())); m_updateEditorTimer = new QTimer(this); + m_updateEditorTimer->setObjectName(QLatin1String("CppEditorSupport::m_updateEditorTimer")); m_updateEditorTimer->setInterval(UpdateEditorInterval); m_updateEditorTimer->setSingleShot(true); connect(m_updateEditorTimer, SIGNAL(timeout()), @@ -161,6 +163,7 @@ CppEditorSupport::CppEditorSupport(CppModelManager *modelManager, BaseTextEditor connect(Core::EditorManager::instance(), SIGNAL(currentEditorChanged(Core::IEditor*)), this, SLOT(onCurrentEditorChanged())); m_editorGCTimer = new QTimer(this); + m_editorGCTimer->setObjectName(QLatin1String("CppEditorSupport::m_editorGCTimer")); m_editorGCTimer->setSingleShot(true); m_editorGCTimer->setInterval(EditorHiddenGCTimeout); connect(m_editorGCTimer, SIGNAL(timeout()), this, SLOT(releaseResources())); diff --git a/src/plugins/cpptools/stringtable.cpp b/src/plugins/cpptools/stringtable.cpp index 9617430d4a..42cd0bc6c3 100644 --- a/src/plugins/cpptools/stringtable.cpp +++ b/src/plugins/cpptools/stringtable.cpp @@ -47,6 +47,7 @@ StringTable::StringTable() m_gcRunner.setAutoDelete(false); + m_gcCountDown.setObjectName(QLatin1String("StringTable::m_gcCountDown")); m_gcCountDown.setSingleShot(true); m_gcCountDown.setInterval(GCTimeOut); connect(&m_gcCountDown, SIGNAL(timeout()), |