forked from qt-creator/qt-creator
CMake: Fix project parsing notification
This builds on top of 08677c0b01
and
fixes one more code path to go through a common entry/exit point.
Change-Id: I1d00fa9242f247028e5d3b0ef3b5fe1d3f4cb03d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "cmakeprojectmanager.h"
|
||||
#include "builddirmanager.h"
|
||||
#include "cmakebuildconfiguration.h"
|
||||
#include "cmakekitinformation.h"
|
||||
#include "cmakeprojectconstants.h"
|
||||
@@ -43,9 +42,6 @@
|
||||
#include <projectexplorer/session.h>
|
||||
#include <projectexplorer/target.h>
|
||||
|
||||
#include <utils/qtcprocess.h>
|
||||
#include <utils/synchronousprocess.h>
|
||||
|
||||
#include <QAction>
|
||||
#include <QDateTime>
|
||||
#include <QIcon>
|
||||
@@ -121,19 +117,15 @@ void CMakeManager::updateCmakeActions()
|
||||
|
||||
void CMakeManager::clearCMakeCache(Project *project)
|
||||
{
|
||||
if (!project || !project->activeTarget())
|
||||
return;
|
||||
auto bc = qobject_cast<CMakeBuildConfiguration *>(project->activeTarget()->activeBuildConfiguration());
|
||||
if (!bc)
|
||||
CMakeProject *cmakeProject = qobject_cast<CMakeProject *>(project);
|
||||
if (!cmakeProject || !cmakeProject->activeTarget() || !cmakeProject->activeTarget()->activeBuildConfiguration())
|
||||
return;
|
||||
|
||||
bc->clearCache();
|
||||
cmakeProject->clearCMakeCache();
|
||||
}
|
||||
|
||||
void CMakeManager::runCMake(Project *project)
|
||||
{
|
||||
if (!project)
|
||||
return;
|
||||
CMakeProject *cmakeProject = qobject_cast<CMakeProject *>(project);
|
||||
if (!cmakeProject || !cmakeProject->activeTarget() || !cmakeProject->activeTarget()->activeBuildConfiguration())
|
||||
return;
|
||||
@@ -146,8 +138,6 @@ void CMakeManager::runCMake(Project *project)
|
||||
|
||||
void CMakeManager::rescanProject(Project *project)
|
||||
{
|
||||
if (!project)
|
||||
return;
|
||||
CMakeProject *cmakeProject = qobject_cast<CMakeProject *>(project);
|
||||
if (!cmakeProject || !cmakeProject->activeTarget() || !cmakeProject->activeTarget()->activeBuildConfiguration())
|
||||
return;
|
||||
|
Reference in New Issue
Block a user