forked from qt-creator/qt-creator
Remove debugging output.
This commit is contained in:
@@ -620,18 +620,22 @@ QStringList Qt4Project::frameworkPaths(const QString &fileName) const
|
|||||||
// */
|
// */
|
||||||
void Qt4Project::update()
|
void Qt4Project::update()
|
||||||
{
|
{
|
||||||
|
if (debug)
|
||||||
qDebug()<<"Doing sync update";
|
qDebug()<<"Doing sync update";
|
||||||
m_rootProjectNode->update();
|
m_rootProjectNode->update();
|
||||||
|
if (debug)
|
||||||
qDebug()<<"State is now Base";
|
qDebug()<<"State is now Base";
|
||||||
m_asyncUpdateState = Base;
|
m_asyncUpdateState = Base;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Qt4Project::scheduleAsyncUpdate(Qt4ProFileNode *node)
|
void Qt4Project::scheduleAsyncUpdate(Qt4ProFileNode *node)
|
||||||
{
|
{
|
||||||
|
if (debug)
|
||||||
qDebug()<<"schduleAsyncUpdate (node)";
|
qDebug()<<"schduleAsyncUpdate (node)";
|
||||||
Q_ASSERT(m_asyncUpdateState != NoState);
|
Q_ASSERT(m_asyncUpdateState != NoState);
|
||||||
|
|
||||||
if (m_cancelEvaluate) {
|
if (m_cancelEvaluate) {
|
||||||
|
if (debug)
|
||||||
qDebug()<<" Already canceling, nothing to do";
|
qDebug()<<" Already canceling, nothing to do";
|
||||||
// A cancel is in progress
|
// A cancel is in progress
|
||||||
// That implies that a full update is going to happen afterwards
|
// That implies that a full update is going to happen afterwards
|
||||||
@@ -641,16 +645,19 @@ void Qt4Project::scheduleAsyncUpdate(Qt4ProFileNode *node)
|
|||||||
|
|
||||||
if (m_asyncUpdateState == AsyncFullUpdatePending) {
|
if (m_asyncUpdateState == AsyncFullUpdatePending) {
|
||||||
// Just postpone
|
// Just postpone
|
||||||
|
if (debug)
|
||||||
qDebug()<<" full update pending, restarting timer";
|
qDebug()<<" full update pending, restarting timer";
|
||||||
m_asyncUpdateTimer.start();
|
m_asyncUpdateTimer.start();
|
||||||
} else if (m_asyncUpdateState == AsyncPartialUpdatePending
|
} else if (m_asyncUpdateState == AsyncPartialUpdatePending
|
||||||
|| m_asyncUpdateState == Base) {
|
|| m_asyncUpdateState == Base) {
|
||||||
|
if (debug)
|
||||||
qDebug()<<" adding node to async update list, setting state to AsyncPartialUpdatePending";
|
qDebug()<<" adding node to async update list, setting state to AsyncPartialUpdatePending";
|
||||||
// Add the node
|
// Add the node
|
||||||
m_asyncUpdateState = AsyncPartialUpdatePending;
|
m_asyncUpdateState = AsyncPartialUpdatePending;
|
||||||
|
|
||||||
QList<Internal::Qt4ProFileNode *>::iterator it;
|
QList<Internal::Qt4ProFileNode *>::iterator it;
|
||||||
bool add = true;
|
bool add = true;
|
||||||
|
if (debug)
|
||||||
qDebug()<<"scheduleAsyncUpdate();"<<m_partialEvaluate.size()<<"nodes";
|
qDebug()<<"scheduleAsyncUpdate();"<<m_partialEvaluate.size()<<"nodes";
|
||||||
it = m_partialEvaluate.begin();
|
it = m_partialEvaluate.begin();
|
||||||
while (it != m_partialEvaluate.end()) {
|
while (it != m_partialEvaluate.end()) {
|
||||||
@@ -679,6 +686,7 @@ void Qt4Project::scheduleAsyncUpdate(Qt4ProFileNode *node)
|
|||||||
// change a partial update gets in progress and then another
|
// change a partial update gets in progress and then another
|
||||||
// batch of changes come in, which triggers a full update
|
// batch of changes come in, which triggers a full update
|
||||||
// even if that's not really needed
|
// even if that's not really needed
|
||||||
|
if (debug)
|
||||||
qDebug()<<" Async update in progress, scheduling new one afterwards";
|
qDebug()<<" Async update in progress, scheduling new one afterwards";
|
||||||
scheduleAsyncUpdate();
|
scheduleAsyncUpdate();
|
||||||
}
|
}
|
||||||
@@ -686,20 +694,24 @@ void Qt4Project::scheduleAsyncUpdate(Qt4ProFileNode *node)
|
|||||||
|
|
||||||
void Qt4Project::scheduleAsyncUpdate()
|
void Qt4Project::scheduleAsyncUpdate()
|
||||||
{
|
{
|
||||||
|
if (debug)
|
||||||
qDebug()<<"scheduleAsyncUpdate";
|
qDebug()<<"scheduleAsyncUpdate";
|
||||||
Q_ASSERT(m_asyncUpdateState != NoState);
|
Q_ASSERT(m_asyncUpdateState != NoState);
|
||||||
if (m_cancelEvaluate) { // we are in progress of canceling
|
if (m_cancelEvaluate) { // we are in progress of canceling
|
||||||
// and will start the evaluation after that
|
// and will start the evaluation after that
|
||||||
|
if (debug)
|
||||||
qDebug()<<" canceling is in progress, doing nothing";
|
qDebug()<<" canceling is in progress, doing nothing";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m_asyncUpdateState == AsyncUpdateInProgress) {
|
if (m_asyncUpdateState == AsyncUpdateInProgress) {
|
||||||
|
if (debug)
|
||||||
qDebug()<<" update in progress, canceling and setting state to full update pending";
|
qDebug()<<" update in progress, canceling and setting state to full update pending";
|
||||||
m_cancelEvaluate = true;
|
m_cancelEvaluate = true;
|
||||||
m_asyncUpdateState = AsyncFullUpdatePending;
|
m_asyncUpdateState = AsyncFullUpdatePending;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (debug)
|
||||||
qDebug()<<" starting timer for full update, setting state to full update pending";
|
qDebug()<<" starting timer for full update, setting state to full update pending";
|
||||||
m_partialEvaluate.clear();
|
m_partialEvaluate.clear();
|
||||||
m_asyncUpdateState = AsyncFullUpdatePending;
|
m_asyncUpdateState = AsyncFullUpdatePending;
|
||||||
@@ -710,6 +722,7 @@ void Qt4Project::scheduleAsyncUpdate()
|
|||||||
void Qt4Project::incrementPendingEvaluateFutures()
|
void Qt4Project::incrementPendingEvaluateFutures()
|
||||||
{
|
{
|
||||||
++m_pendingEvaluateFuturesCount;
|
++m_pendingEvaluateFuturesCount;
|
||||||
|
if (debug)
|
||||||
qDebug()<<"incrementPendingEvaluateFutures to"<<m_pendingEvaluateFuturesCount;
|
qDebug()<<"incrementPendingEvaluateFutures to"<<m_pendingEvaluateFuturesCount;
|
||||||
|
|
||||||
m_asyncUpdateFutureInterface->setProgressRange(m_asyncUpdateFutureInterface->progressMinimum(),
|
m_asyncUpdateFutureInterface->setProgressRange(m_asyncUpdateFutureInterface->progressMinimum(),
|
||||||
@@ -720,12 +733,15 @@ void Qt4Project::decrementPendingEvaluateFutures()
|
|||||||
{
|
{
|
||||||
--m_pendingEvaluateFuturesCount;
|
--m_pendingEvaluateFuturesCount;
|
||||||
|
|
||||||
|
if (debug)
|
||||||
qDebug()<<"decrementPendingEvaluateFutures to"<<m_pendingEvaluateFuturesCount;
|
qDebug()<<"decrementPendingEvaluateFutures to"<<m_pendingEvaluateFuturesCount;
|
||||||
|
|
||||||
m_asyncUpdateFutureInterface->setProgressValue(m_asyncUpdateFutureInterface->progressValue() + 1);
|
m_asyncUpdateFutureInterface->setProgressValue(m_asyncUpdateFutureInterface->progressValue() + 1);
|
||||||
if (m_pendingEvaluateFuturesCount == 0) {
|
if (m_pendingEvaluateFuturesCount == 0) {
|
||||||
|
if (debug)
|
||||||
qDebug()<<" WOHOO, no pending futures, cleaning up";
|
qDebug()<<" WOHOO, no pending futures, cleaning up";
|
||||||
// We are done!
|
// We are done!
|
||||||
|
if (debug)
|
||||||
qDebug()<<" reporting finished";
|
qDebug()<<" reporting finished";
|
||||||
m_asyncUpdateFutureInterface->reportFinished();
|
m_asyncUpdateFutureInterface->reportFinished();
|
||||||
delete m_asyncUpdateFutureInterface;
|
delete m_asyncUpdateFutureInterface;
|
||||||
@@ -734,6 +750,7 @@ void Qt4Project::decrementPendingEvaluateFutures()
|
|||||||
|
|
||||||
// TODO clear the profile cache ?
|
// TODO clear the profile cache ?
|
||||||
if (m_asyncUpdateState == AsyncFullUpdatePending || m_asyncUpdateState == AsyncPartialUpdatePending) {
|
if (m_asyncUpdateState == AsyncFullUpdatePending || m_asyncUpdateState == AsyncPartialUpdatePending) {
|
||||||
|
if (debug)
|
||||||
qDebug()<<" Oh update is pending start the timer";
|
qDebug()<<" Oh update is pending start the timer";
|
||||||
m_asyncUpdateTimer.start();
|
m_asyncUpdateTimer.start();
|
||||||
} else if (m_asyncUpdateState != ShuttingDown){
|
} else if (m_asyncUpdateState != ShuttingDown){
|
||||||
@@ -742,6 +759,7 @@ void Qt4Project::decrementPendingEvaluateFutures()
|
|||||||
updateCodeModel();
|
updateCodeModel();
|
||||||
checkForNewApplicationProjects();
|
checkForNewApplicationProjects();
|
||||||
checkForDeletedApplicationProjects();
|
checkForDeletedApplicationProjects();
|
||||||
|
if (debug)
|
||||||
qDebug()<<" Setting state to Base";
|
qDebug()<<" Setting state to Base";
|
||||||
m_asyncUpdateState = Base;
|
m_asyncUpdateState = Base;
|
||||||
}
|
}
|
||||||
@@ -755,6 +773,7 @@ bool Qt4Project::wasEvaluateCanceled()
|
|||||||
|
|
||||||
void Qt4Project::asyncUpdate()
|
void Qt4Project::asyncUpdate()
|
||||||
{
|
{
|
||||||
|
if (debug)
|
||||||
qDebug()<<"async update, timer expired, doing now";
|
qDebug()<<"async update, timer expired, doing now";
|
||||||
Q_ASSERT(!m_asyncUpdateFutureInterface);
|
Q_ASSERT(!m_asyncUpdateFutureInterface);
|
||||||
m_asyncUpdateFutureInterface = new QFutureInterface<void>();
|
m_asyncUpdateFutureInterface = new QFutureInterface<void>();
|
||||||
@@ -762,21 +781,25 @@ void Qt4Project::asyncUpdate()
|
|||||||
Core::ProgressManager *progressManager = Core::ICore::instance()->progressManager();
|
Core::ProgressManager *progressManager = Core::ICore::instance()->progressManager();
|
||||||
|
|
||||||
progressManager->addTask(m_asyncUpdateFutureInterface->future(), tr("Evaluate"), Constants::PROFILE_EVALUATE);
|
progressManager->addTask(m_asyncUpdateFutureInterface->future(), tr("Evaluate"), Constants::PROFILE_EVALUATE);
|
||||||
|
if (debug)
|
||||||
qDebug()<<" adding task";
|
qDebug()<<" adding task";
|
||||||
|
|
||||||
m_asyncUpdateFutureInterface->setProgressRange(0, 0);
|
m_asyncUpdateFutureInterface->setProgressRange(0, 0);
|
||||||
m_asyncUpdateFutureInterface->reportStarted();
|
m_asyncUpdateFutureInterface->reportStarted();
|
||||||
|
|
||||||
if (m_asyncUpdateState == AsyncFullUpdatePending) {
|
if (m_asyncUpdateState == AsyncFullUpdatePending) {
|
||||||
|
if (debug)
|
||||||
qDebug()<<" full update, starting with root node";
|
qDebug()<<" full update, starting with root node";
|
||||||
m_rootProjectNode->asyncUpdate();
|
m_rootProjectNode->asyncUpdate();
|
||||||
} else {
|
} else {
|
||||||
|
if (debug)
|
||||||
qDebug()<<" partial update,"<<m_partialEvaluate.size()<<"nodes to update";
|
qDebug()<<" partial update,"<<m_partialEvaluate.size()<<"nodes to update";
|
||||||
foreach(Qt4ProFileNode *node, m_partialEvaluate)
|
foreach(Qt4ProFileNode *node, m_partialEvaluate)
|
||||||
node->asyncUpdate();
|
node->asyncUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_partialEvaluate.clear();
|
m_partialEvaluate.clear();
|
||||||
|
if (debug)
|
||||||
qDebug()<<" Setting state to AsyncUpdateInProgress";
|
qDebug()<<" Setting state to AsyncUpdateInProgress";
|
||||||
m_asyncUpdateState = AsyncUpdateInProgress;
|
m_asyncUpdateState = AsyncUpdateInProgress;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user