diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp index 5e20f185d38..cb4b25a17aa 100644 --- a/src/plugins/qt4projectmanager/qt4project.cpp +++ b/src/plugins/qt4projectmanager/qt4project.cpp @@ -620,19 +620,23 @@ QStringList Qt4Project::frameworkPaths(const QString &fileName) const // */ void Qt4Project::update() { - qDebug()<<"Doing sync update"; + if (debug) + qDebug()<<"Doing sync update"; m_rootProjectNode->update(); - qDebug()<<"State is now Base"; + if (debug) + qDebug()<<"State is now Base"; m_asyncUpdateState = Base; } void Qt4Project::scheduleAsyncUpdate(Qt4ProFileNode *node) { - qDebug()<<"schduleAsyncUpdate (node)"; + if (debug) + qDebug()<<"schduleAsyncUpdate (node)"; Q_ASSERT(m_asyncUpdateState != NoState); if (m_cancelEvaluate) { - qDebug()<<" Already canceling, nothing to do"; + 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 @@ -641,17 +645,20 @@ void Qt4Project::scheduleAsyncUpdate(Qt4ProFileNode *node) if (m_asyncUpdateState == AsyncFullUpdatePending) { // Just postpone - qDebug()<<" full update pending, restarting timer"; + if (debug) + qDebug()<<" full update pending, restarting timer"; m_asyncUpdateTimer.start(); } else if (m_asyncUpdateState == AsyncPartialUpdatePending || m_asyncUpdateState == Base) { - qDebug()<<" adding node to async update list, setting state to AsyncPartialUpdatePending"; + 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; - qDebug()<<"scheduleAsyncUpdate();"<setProgressRange(m_asyncUpdateFutureInterface->progressMinimum(), m_asyncUpdateFutureInterface->progressMaximum() + 1); @@ -720,13 +733,16 @@ void Qt4Project::decrementPendingEvaluateFutures() { --m_pendingEvaluateFuturesCount; - qDebug()<<"decrementPendingEvaluateFutures to"<setProgressValue(m_asyncUpdateFutureInterface->progressValue() + 1); if (m_pendingEvaluateFuturesCount == 0) { - qDebug()<<" WOHOO, no pending futures, cleaning up"; + if (debug) + qDebug()<<" WOHOO, no pending futures, cleaning up"; // We are done! - qDebug()<<" reporting finished"; + if (debug) + qDebug()<<" reporting finished"; m_asyncUpdateFutureInterface->reportFinished(); delete m_asyncUpdateFutureInterface; m_asyncUpdateFutureInterface = 0; @@ -734,7 +750,8 @@ void Qt4Project::decrementPendingEvaluateFutures() // TODO clear the profile cache ? if (m_asyncUpdateState == AsyncFullUpdatePending || m_asyncUpdateState == AsyncPartialUpdatePending) { - qDebug()<<" Oh update is pending start the timer"; + if (debug) + qDebug()<<" Oh update is pending start the timer"; m_asyncUpdateTimer.start(); } else if (m_asyncUpdateState != ShuttingDown){ // After beeing done, we need to call: @@ -742,7 +759,8 @@ void Qt4Project::decrementPendingEvaluateFutures() updateCodeModel(); checkForNewApplicationProjects(); checkForDeletedApplicationProjects(); - qDebug()<<" Setting state to Base"; + if (debug) + qDebug()<<" Setting state to Base"; m_asyncUpdateState = Base; } } @@ -755,29 +773,34 @@ bool Qt4Project::wasEvaluateCanceled() void Qt4Project::asyncUpdate() { - qDebug()<<"async update, timer expired, doing now"; + if (debug) + qDebug()<<"async update, timer expired, doing now"; Q_ASSERT(!m_asyncUpdateFutureInterface); m_asyncUpdateFutureInterface = new QFutureInterface(); Core::ProgressManager *progressManager = Core::ICore::instance()->progressManager(); progressManager->addTask(m_asyncUpdateFutureInterface->future(), tr("Evaluate"), Constants::PROFILE_EVALUATE); - qDebug()<<" adding task"; + if (debug) + qDebug()<<" adding task"; m_asyncUpdateFutureInterface->setProgressRange(0, 0); m_asyncUpdateFutureInterface->reportStarted(); if (m_asyncUpdateState == AsyncFullUpdatePending) { - qDebug()<<" full update, starting with root node"; + if (debug) + qDebug()<<" full update, starting with root node"; m_rootProjectNode->asyncUpdate(); } else { - qDebug()<<" partial update,"<asyncUpdate(); } m_partialEvaluate.clear(); - qDebug()<<" Setting state to AsyncUpdateInProgress"; + if (debug) + qDebug()<<" Setting state to AsyncUpdateInProgress"; m_asyncUpdateState = AsyncUpdateInProgress; }