QbsProjectManager: Build up the project tree in a dedicated thread

... and only switch the root node in the UI thread.
Creating the project tree can take some time for larger projects; no
need to block the UI for that.

Task-number: QTCREATORBUG-18533
Change-Id: I093dc9fb8f3454011a3c64bcc0f785e8b7753b4e
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2020-02-04 14:59:08 +01:00
parent ede1d31a3f
commit a6e6a53e82
4 changed files with 81 additions and 46 deletions

View File

@@ -25,18 +25,29 @@
#pragma once
#include <QtGlobal>
#include <memory>
QT_BEGIN_NAMESPACE
class QJsonObject;
class QString;
QT_END_NAMESPACE
namespace Utils { class FilePath; }
namespace QbsProjectManager {
namespace Internal {
class QbsBuildSystem;
class QbsProjectNode;
class QbsNodeTreeBuilder
{
public:
static std::unique_ptr<QbsProjectNode> buildTree(const QbsBuildSystem *buildSystem);
static QbsProjectNode *buildTree(const QString &projectName,
const Utils::FilePath &projectFile,
const Utils::FilePath &projectDir,
const QJsonObject &projectData);
};
} // namespace Internal