Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
cd93d9e3
Commit
cd93d9e3
authored
Mar 27, 2009
by
Oswald Buddenhagen
Browse files
make changing the build dir of a shadow build work
parent
4a1acffb
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
View file @
cd93d9e3
...
...
@@ -214,8 +214,7 @@ void ShadowBuildPage::buildDirectoryChanged()
CMakeRunPage
::
CMakeRunPage
(
CMakeOpenProjectWizard
*
cmakeWizard
)
:
QWizardPage
(
cmakeWizard
),
m_cmakeWizard
(
cmakeWizard
),
m_complete
(
false
),
m_buildDirectory
(
m_cmakeWizard
->
buildDirectory
())
m_complete
(
false
)
{
initWidgets
();
}
...
...
@@ -224,21 +223,10 @@ CMakeRunPage::CMakeRunPage(CMakeOpenProjectWizard *cmakeWizard, const QString &b
:
QWizardPage
(
cmakeWizard
),
m_cmakeWizard
(
cmakeWizard
),
m_complete
(
false
),
m_buildDirectory
(
buildDirectory
)
m_update
(
update
),
m_presetBuildDirectory
(
buildDirectory
)
{
initWidgets
();
// TODO tell the user more?
if
(
update
)
m_descriptionLabel
->
setText
(
tr
(
"The directory %1 contains an outdated .cbp file. Qt "
"Creator needs to update this file by running cmake. "
"If you want to add additional command line arguments, "
"add them in the below."
).
arg
(
m_buildDirectory
));
else
m_descriptionLabel
->
setText
(
tr
(
"The directory %1, specified in a buildconfiguration, "
"does not contain a cbp file. Qt Creator needs to "
"recreate this file, by running cmake. "
"Some projects require command line arguments to "
"the initial cmake call."
).
arg
(
m_buildDirectory
));
}
void
CMakeRunPage
::
initWidgets
()
...
...
@@ -247,8 +235,6 @@ void CMakeRunPage::initWidgets()
setLayout
(
fl
);
m_descriptionLabel
=
new
QLabel
(
this
);
m_descriptionLabel
->
setWordWrap
(
true
);
m_descriptionLabel
->
setText
(
tr
(
"The directory %1 does not contain a cbp file. Qt Creator needs to create this file, by running cmake. "
"Some projects require command line arguments to the initial cmake call."
).
arg
(
m_buildDirectory
));
fl
->
addRow
(
m_descriptionLabel
);
...
...
@@ -265,6 +251,30 @@ void CMakeRunPage::initWidgets()
fl
->
addRow
(
m_output
);
}
void
CMakeRunPage
::
initializePage
()
{
if
(
m_presetBuildDirectory
.
isEmpty
())
{
m_buildDirectory
=
m_cmakeWizard
->
buildDirectory
();
m_descriptionLabel
->
setText
(
tr
(
"The directory %1 does not contain a cbp file. Qt Creator needs to create this file, by running cmake. "
"Some projects require command line arguments to the initial cmake call."
).
arg
(
m_buildDirectory
));
}
else
{
m_buildDirectory
=
m_presetBuildDirectory
;
// TODO tell the user more?
if
(
m_update
)
m_descriptionLabel
->
setText
(
tr
(
"The directory %1 contains an outdated .cbp file. Qt "
"Creator needs to update this file by running cmake. "
"If you want to add additional command line arguments, "
"add them in the below."
).
arg
(
m_buildDirectory
));
else
m_descriptionLabel
->
setText
(
tr
(
"The directory %1, specified in a buildconfiguration, "
"does not contain a cbp file. Qt Creator needs to "
"recreate this file, by running cmake. "
"Some projects require command line arguments to "
"the initial cmake call."
).
arg
(
m_buildDirectory
));
}
}
void
CMakeRunPage
::
runCMake
()
{
m_runCMake
->
setEnabled
(
false
);
...
...
src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.h
View file @
cd93d9e3
...
...
@@ -115,6 +115,7 @@ class CMakeRunPage : public QWizardPage
public:
CMakeRunPage
(
CMakeOpenProjectWizard
*
cmakeWizard
);
CMakeRunPage
(
CMakeOpenProjectWizard
*
cmakeWizard
,
const
QString
&
buildDirectory
,
bool
update
);
virtual
void
initializePage
();
virtual
void
cleanupPage
();
virtual
bool
isComplete
()
const
;
private
slots
:
...
...
@@ -130,7 +131,9 @@ private:
QLineEdit
*
m_argumentsLineEdit
;
QLabel
*
m_descriptionLabel
;
bool
m_complete
;
bool
m_update
;
QString
m_buildDirectory
;
QString
m_presetBuildDirectory
;
};
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment