From 1d3d18a96988eb091b207103f18c9fbba505013a Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Mon, 14 Jan 2019 01:40:53 +0100 Subject: CppTools: modernize Change-Id: Iaf02e4d026f1ac8b216833d83cd7a735e21ff60a Reviewed-by: Nikolai Kosjar Reviewed-by: Orgad Shaneh --- src/plugins/cpptools/cppmodelmanager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/plugins/cpptools/cppmodelmanager.cpp') diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp index 4db2cbb1b9..45ab82efec 100644 --- a/src/plugins/cpptools/cppmodelmanager.cpp +++ b/src/plugins/cpptools/cppmodelmanager.cpp @@ -95,7 +95,7 @@ class DumpAST: protected ASTVisitor public: int depth; - DumpAST(Control *control) + explicit DumpAST(Control *control) : ASTVisitor(control), depth(0) { } @@ -511,7 +511,7 @@ CppModelManager::CppModelManager() : CppModelManagerBase(nullptr) , d(new CppModelManagerPrivate) { - d->m_indexingSupporter = 0; + d->m_indexingSupporter = nullptr; d->m_enableGC = true; qRegisterMetaType >(); @@ -696,7 +696,7 @@ void CppModelManager::removeExtraEditorSupport(AbstractEditorSupport *editorSupp CppEditorDocumentHandle *CppModelManager::cppEditorDocument(const QString &filePath) const { if (filePath.isEmpty()) - return 0; + return nullptr; QMutexLocker locker(&d->m_cppEditorDocumentsMutex); return d->m_cppEditorDocuments.value(filePath, 0); @@ -987,7 +987,7 @@ void CppModelManager::watchForCanceledProjectIndexer(const QVector if (future.isCanceled() || future.isFinished()) continue; - QFutureWatcher *watcher = new QFutureWatcher(); + auto watcher = new QFutureWatcher(); connect(watcher, &QFutureWatcher::canceled, this, [this, project, watcher]() { if (d->m_projectToIndexerCanceled.contains(project)) // Project not yet removed d->m_projectToIndexerCanceled.insert(project, true); @@ -1411,7 +1411,7 @@ void CppModelManager::setIndexingSupport(CppIndexingSupport *indexingSupport) { if (indexingSupport) { if (dynamic_cast(indexingSupport)) - d->m_indexingSupporter = 0; + d->m_indexingSupporter = nullptr; else d->m_indexingSupporter = indexingSupport; } -- cgit v1.2.1