diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.cpp b/src/plugins/qmakeprojectmanager/qmakeproject.cpp index 78d392f7aff..490c06157b4 100644 --- a/src/plugins/qmakeprojectmanager/qmakeproject.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeproject.cpp @@ -70,8 +70,6 @@ using namespace QmakeProjectManager::Internal; using namespace ProjectExplorer; using namespace Utils; -enum { debug = 0 }; - namespace QmakeProjectManager { namespace Internal { @@ -303,8 +301,6 @@ void QmakeProject::updateFileList() if (newFiles != *m_projectFiles) { *m_projectFiles = newFiles; emit fileListChanged(); - if (debug) - qDebug() << Q_FUNC_INFO << *m_projectFiles; } } @@ -342,9 +338,6 @@ Project::RestoreResult QmakeProject::fromMap(const QVariantMap &map, QString *er void QmakeProject::updateCodeModels() { - if (debug) - qDebug() << "QmakeProject::updateCodeModel()"; - if (activeTarget() && !activeTarget()->activeBuildConfiguration()) return; @@ -497,12 +490,7 @@ void QmakeProject::scheduleAsyncUpdate(QmakeProFileNode *node, QmakeProFileNode: if (m_asyncUpdateState == ShuttingDown) return; - if (debug) - qDebug()<<"schduleAsyncUpdate (node)"<filePath(); - if (m_cancelEvaluate) { - if (debug) - qDebug()<<" Already canceling, nothing to do"; // A cancel is in progress // That implies that a full update is going to happen afterwards // So we don't need to do anything @@ -514,20 +502,14 @@ void QmakeProject::scheduleAsyncUpdate(QmakeProFileNode *node, QmakeProFileNode: if (m_asyncUpdateState == AsyncFullUpdatePending) { // Just postpone - if (debug) - qDebug()<<" full update pending, restarting timer"; startAsyncTimer(delay); } else if (m_asyncUpdateState == AsyncPartialUpdatePending || m_asyncUpdateState == Base) { - if (debug) - qDebug()<<" adding node to async update list, setting state to AsyncPartialUpdatePending"; // Add the node m_asyncUpdateState = AsyncPartialUpdatePending; QList::iterator it; bool add = true; - if (debug) - qDebug()<<"scheduleAsyncUpdate();"<setProgressRange(m_asyncUpdateFutureInterface->progressMinimum(), m_asyncUpdateFutureInterface->progressMaximum() + 1); } @@ -620,16 +589,9 @@ void QmakeProject::decrementPendingEvaluateFutures() { --m_pendingEvaluateFuturesCount; - if (debug) - qDebug()<<"decrementPendingEvaluateFutures to"<setProgressValue(m_asyncUpdateFutureInterface->progressValue() + 1); if (m_pendingEvaluateFuturesCount == 0) { - if (debug) - qDebug()<<" WOHOO, no pending futures, cleaning up"; // We are done! - if (debug) - qDebug()<<" reporting finished"; m_asyncUpdateFutureInterface->reportFinished(); delete m_asyncUpdateFutureInterface; @@ -638,8 +600,6 @@ void QmakeProject::decrementPendingEvaluateFutures() // TODO clear the profile cache ? if (m_asyncUpdateState == AsyncFullUpdatePending || m_asyncUpdateState == AsyncPartialUpdatePending) { - if (debug) - qDebug()<<" Oh update is pending start the timer"; rootProjectNode()->setParseInProgressRecursive(true); setAllBuildConfigurationsEnabled(false); startAsyncTimer(QmakeProFileNode::ParseLater); @@ -656,8 +616,6 @@ void QmakeProject::decrementPendingEvaluateFutures() updateRunConfigurations(); emit proFilesEvaluated(); emit parsingFinished(); - if (debug) - qDebug()<<" Setting state to Base"; } } } @@ -670,8 +628,6 @@ bool QmakeProject::wasEvaluateCanceled() void QmakeProject::asyncUpdate() { m_asyncUpdateTimer.setInterval(3000); - if (debug) - qDebug()<<"async update, timer expired, doing now"; m_qmakeVfs->invalidateCache(); @@ -682,25 +638,17 @@ void QmakeProject::asyncUpdate() Core::ProgressManager::addTask(m_asyncUpdateFutureInterface->future(), tr("Reading Project \"%1\"").arg(displayName()), Constants::PROFILE_EVALUATE); - if (debug) - qDebug()<<" adding task"; m_asyncUpdateFutureInterface->reportStarted(); if (m_asyncUpdateState == AsyncFullUpdatePending) { - if (debug) - qDebug()<<" full update, starting with root node"; rootProjectNode()->asyncUpdate(); } else { - if (debug) - qDebug()<<" partial update,"<asyncUpdate(); } m_partialEvaluate.clear(); - if (debug) - qDebug()<<" Setting state to AsyncUpdateInProgress"; m_asyncUpdateState = AsyncUpdateInProgress; } diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.h b/src/plugins/qmakeprojectmanager/qmakeproject.h index 3784daa6b58..38805e31b8a 100644 --- a/src/plugins/qmakeprojectmanager/qmakeproject.h +++ b/src/plugins/qmakeprojectmanager/qmakeproject.h @@ -30,7 +30,6 @@ #include "qmakenodes.h" #include -#include #include #include @@ -47,8 +46,6 @@ namespace QtSupport { class ProFileReader; } namespace QmakeProjectManager { class QmakeBuildConfiguration; -class QmakePriFileNode; -class QmakeProFileNode; namespace Internal { class CentralizedFolderWatcher; @@ -63,19 +60,19 @@ class QMAKEPROJECTMANAGER_EXPORT QmakeProject : public ProjectExplorer::Project public: QmakeProject(QmakeManager *manager, const QString &proFile); - ~QmakeProject() override; + ~QmakeProject() final; - QString displayName() const override; - QmakeManager *projectManager() const override; + QString displayName() const final; + QmakeManager *projectManager() const final; - bool supportsKit(ProjectExplorer::Kit *k, QString *errorMesage) const override; + bool supportsKit(ProjectExplorer::Kit *k, QString *errorMesage) const final; - QmakeProFileNode *rootProjectNode() const override; + QmakeProFileNode *rootProjectNode() const final; bool validParse(const Utils::FileName &proFilePath) const; bool parseInProgress(const Utils::FileName &proFilePath) const; - virtual QStringList files(FilesMode fileMode) const override; - virtual QStringList filesGeneratedFrom(const QString &file) const override; + virtual QStringList files(FilesMode fileMode) const final; + virtual QStringList filesGeneratedFrom(const QString &file) const final; enum Parsing {ExactParse, ExactAndCumulativeParse }; QList allProFiles(const QList &projectTypes = QList(), @@ -116,11 +113,11 @@ public: void watchFolders(const QStringList &l, QmakePriFileNode *node); void unwatchFolders(const QStringList &l, QmakePriFileNode *node); - bool needsConfiguration() const override; + bool needsConfiguration() const final; - void configureAsExampleProject(const QSet &platforms) override; + void configureAsExampleProject(const QSet &platforms) final; - bool requiresTargetPanel() const override; + bool requiresTargetPanel() const final; /// \internal QString disabledReasonForRunConfiguration(const Utils::FileName &proFilePath); @@ -131,7 +128,7 @@ public: void emitBuildDirectoryInitialized(); static void proFileParseError(const QString &errorMessage); - ProjectExplorer::ProjectImporter *projectImporter() const override; + ProjectExplorer::ProjectImporter *projectImporter() const final; enum AsyncUpdateState { Base, AsyncFullUpdatePending, AsyncPartialUpdatePending, AsyncUpdateInProgress, ShuttingDown }; AsyncUpdateState asyncUpdateState() const; @@ -148,7 +145,7 @@ public: void scheduleAsyncUpdateLater() { scheduleAsyncUpdate(); } protected: - RestoreResult fromMap(const QVariantMap &map, QString *errorMessage) override; + RestoreResult fromMap(const QVariantMap &map, QString *errorMessage) final; private: void asyncUpdate();