Merge remote-tracking branch 'origin/3.3'

Conflicts:
	src/plugins/debugger/watchhandler.cpp
	src/plugins/projectexplorer/kitmodel.cpp
	src/plugins/qbsprojectmanager/qbsprojectmanager.cpp
	src/shared/qbs

Change-Id: I6a68090993a264e93ac7850858cc24ba6bdb5602
This commit is contained in:
Eike Ziller
2015-02-12 17:36:29 +01:00
44 changed files with 302 additions and 214 deletions

View File

@@ -1006,7 +1006,8 @@ void ModelManagerInterface::importScan(QFutureInterface<void> &future,
int totalWork(progressRange), workDone(0);
future.setProgressRange(0, progressRange); // update max length while iterating?
const Snapshot snapshot = modelManager->snapshot();
while (!pathsToScan.isEmpty() && !future.isCanceled()) {
bool isCanceled = future.isCanceled();
while (!pathsToScan.isEmpty() && !isCanceled) {
ScanItem toScan = pathsToScan.last();
pathsToScan.pop_back();
int pathBudget = (1 << (maxScanDepth + 2 - toScan.depth));
@@ -1043,9 +1044,10 @@ void ModelManagerInterface::importScan(QFutureInterface<void> &future,
workDone += pathBudget * 3 / 4;
}
future.setProgressValue(progressRange * workDone / totalWork);
isCanceled = future.isCanceled();
}
future.setProgressValue(progressRange);
if (future.isCanceled()) {
if (isCanceled) {
// assume no work has been done
QMutexLocker l(&modelManager->m_mutex);
for (int i = 0; i < paths.size(); ++i)