forked from qt-creator/qt-creator
CMake: Simplify setting up a new reader
There is no need to reset a reader when e.g. the build directory changes when the server-mode reader is *not* used. So the one case where having separate reparse-options for the case where the reader changes and the case where it stays the same is bogus. So unify the flags into one set and simplify the code accordingly. Change-Id: I9bcfcc6333d574d49513ef1256a9a8597bda4ec7 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -316,8 +316,6 @@ void CMakeProject::runCMake()
|
||||
BuildDirParameters parameters(bc);
|
||||
bc->m_buildDirManager
|
||||
.setParametersAndRequestParse(parameters,
|
||||
BuildDirManager::REPARSE_CHECK_CONFIGURATION
|
||||
| BuildDirManager::REPARSE_FORCE_CMAKE_RUN,
|
||||
BuildDirManager::REPARSE_CHECK_CONFIGURATION
|
||||
| BuildDirManager::REPARSE_FORCE_CMAKE_RUN);
|
||||
}
|
||||
@@ -331,8 +329,6 @@ void CMakeProject::runCMakeAndScanProjectTree()
|
||||
|
||||
BuildDirParameters parameters(bc);
|
||||
bc->m_buildDirManager.setParametersAndRequestParse(parameters,
|
||||
BuildDirManager::REPARSE_CHECK_CONFIGURATION
|
||||
| BuildDirManager::REPARSE_SCAN,
|
||||
BuildDirManager::REPARSE_CHECK_CONFIGURATION
|
||||
| BuildDirManager::REPARSE_SCAN);
|
||||
}
|
||||
@@ -369,7 +365,6 @@ void CMakeProject::startParsing(int reparseParameters)
|
||||
{
|
||||
m_delayedParsingParameters = BuildDirManager::REPARSE_DEFAULT;
|
||||
|
||||
QTC_ASSERT((reparseParameters & BuildDirManager::REPARSE_FAIL) == 0, return);
|
||||
if (reparseParameters & BuildDirManager::REPARSE_IGNORE)
|
||||
return;
|
||||
|
||||
@@ -417,7 +412,6 @@ void CMakeProject::reportError(const QString &errorMessage) const
|
||||
|
||||
void CMakeProject::requestReparse(int reparseParameters)
|
||||
{
|
||||
QTC_ASSERT(!(reparseParameters & BuildDirManager::REPARSE_FAIL), return );
|
||||
if (reparseParameters & BuildDirManager::REPARSE_IGNORE)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user