QbsProject: Make initial CppTools::ProjectInfo valid

This fixes triggering the QTC_ASSERT in updateCppCompilerCallData() if
the user opens and builds the following qbs project:

    import qbs
    Product {}

Conceptually the initial ProjectInfo should stay invalid, but this would
result in a bigger / more risky change. Will be addressed in master
properly.

Change-Id: I74d3374b438884f38947f551915a80ec836a85c1
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2014-11-20 13:06:04 +01:00
parent 4b0992568f
commit a21dda3360

View File

@@ -110,6 +110,7 @@ QbsProject::QbsProject(QbsManager *manager, const QString &fileName) :
m_qbsUpdateFutureInterface(0), m_qbsUpdateFutureInterface(0),
m_parsingScheduled(false), m_parsingScheduled(false),
m_cancelStatus(CancelStatusNone), m_cancelStatus(CancelStatusNone),
m_codeModelProjectInfo(this),
m_currentBc(0) m_currentBc(0)
{ {
m_parsingDelay.setInterval(1000); // delay parsing by 1s. m_parsingDelay.setInterval(1000); // delay parsing by 1s.