forked from qt-creator/qt-creator
CMakeProject: use static_cast not qojbect_cast
Change-Id: I5568316edb16fb3c797b8d403d75617279c1bcae Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
@@ -142,9 +142,7 @@ void CMakeProject::changeActiveBuildConfiguration(ProjectExplorer::BuildConfigur
|
|||||||
if (!bc || bc->target() != activeTarget())
|
if (!bc || bc->target() != activeTarget())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CMakeBuildConfiguration * cmakebc(qobject_cast<CMakeBuildConfiguration *>(bc));
|
CMakeBuildConfiguration *cmakebc = static_cast<CMakeBuildConfiguration *>(bc);
|
||||||
if (!cmakebc)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Pop up a dialog asking the user to rerun cmake
|
// Pop up a dialog asking the user to rerun cmake
|
||||||
QFileInfo sourceFileInfo(m_fileName);
|
QFileInfo sourceFileInfo(m_fileName);
|
||||||
@@ -845,9 +843,7 @@ void CMakeBuildSettingsWidget::init(BuildConfiguration *bc)
|
|||||||
|
|
||||||
void CMakeBuildSettingsWidget::openChangeBuildDirectoryDialog()
|
void CMakeBuildSettingsWidget::openChangeBuildDirectoryDialog()
|
||||||
{
|
{
|
||||||
CMakeProject *project = qobject_cast<CMakeProject *>(m_buildConfiguration->target()->project());
|
CMakeProject *project = static_cast<CMakeProject *>(m_buildConfiguration->target()->project());
|
||||||
if (!project)
|
|
||||||
return;
|
|
||||||
CMakeOpenProjectWizard copw(project->projectManager(),
|
CMakeOpenProjectWizard copw(project->projectManager(),
|
||||||
project->projectDirectory(),
|
project->projectDirectory(),
|
||||||
m_buildConfiguration->buildDirectory(),
|
m_buildConfiguration->buildDirectory(),
|
||||||
@@ -861,9 +857,7 @@ void CMakeBuildSettingsWidget::openChangeBuildDirectoryDialog()
|
|||||||
void CMakeBuildSettingsWidget::runCMake()
|
void CMakeBuildSettingsWidget::runCMake()
|
||||||
{
|
{
|
||||||
// TODO skip build directory
|
// TODO skip build directory
|
||||||
CMakeProject *project = qobject_cast<CMakeProject *>(m_buildConfiguration->target()->project());
|
CMakeProject *project = static_cast<CMakeProject *>(m_buildConfiguration->target()->project());
|
||||||
if (!project)
|
|
||||||
return;
|
|
||||||
CMakeOpenProjectWizard copw(project->projectManager(),
|
CMakeOpenProjectWizard copw(project->projectManager(),
|
||||||
project->projectDirectory(),
|
project->projectDirectory(),
|
||||||
m_buildConfiguration->buildDirectory(),
|
m_buildConfiguration->buildDirectory(),
|
||||||
|
Reference in New Issue
Block a user