Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
9749d38f
Commit
9749d38f
authored
Apr 14, 2010
by
dt
Browse files
Enable the build project action if the project has buildable dependencies
Task-Nr: QTCREATORBUG-1016
parent
61e5ce37
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/projectexplorer/projectexplorer.cpp
View file @
9749d38f
...
...
@@ -260,6 +260,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
this
,
SLOT
(
updatePreferredWizardKinds
()));
connect
(
d
->
m_session
,
SIGNAL
(
projectRemoved
(
ProjectExplorer
::
Project
*
)),
this
,
SLOT
(
updatePreferredWizardKinds
()));
connect
(
d
->
m_session
,
SIGNAL
(
dependencyChanged
(
ProjectExplorer
::
Project
*
,
ProjectExplorer
::
Project
*
)),
this
,
SLOT
(
updateActions
()));
d
->
m_proWindow
=
new
ProjectWindow
;
...
...
@@ -1358,11 +1360,11 @@ void ProjectExplorerPlugin::updateActions()
Project
*
startupProject
=
session
()
->
startupProject
();
bool
enableBuildActions
=
startupProject
&&
!
(
d
->
m_buildManager
->
isBuilding
(
startupProject
))
&&
startupProject
->
hasActiveBuildSettings
(
);
&&
hasBuildSettings
(
startupProject
);
bool
enableBuildActionsContextMenu
=
d
->
m_currentProject
&&
!
(
d
->
m_buildManager
->
isBuilding
(
d
->
m_currentProject
))
&&
d
->
m_currentProject
->
hasActiveBuildSettings
(
);
&&
hasBuildSettings
(
d
->
m_currentProject
);
bool
hasProjects
=
!
d
->
m_session
->
projects
().
isEmpty
();
...
...
@@ -1632,12 +1634,21 @@ void ProjectExplorerPlugin::runProjectContextMenu()
runProjectImpl
(
d
->
m_currentProject
,
ProjectExplorer
::
Constants
::
RUNMODE
);
}
bool
ProjectExplorerPlugin
::
hasBuildSettings
(
Project
*
pro
)
{
const
QList
<
Project
*>
&
projects
=
d
->
m_session
->
projectOrder
(
pro
);
foreach
(
Project
*
pro
,
projects
)
if
(
pro
->
activeTarget
()
->
activeBuildConfiguration
())
return
true
;
return
false
;
}
void
ProjectExplorerPlugin
::
runProjectImpl
(
Project
*
pro
,
QString
mode
)
{
if
(
!
pro
)
return
;
if
(
d
->
m_projectExplorerSettings
.
buildBeforeRun
&&
pro
->
hasActive
BuildSettings
())
{
if
(
d
->
m_projectExplorerSettings
.
buildBeforeRun
&&
has
BuildSettings
(
pro
))
{
if
(
!
pro
->
activeTarget
()
->
activeRunConfiguration
()
->
isEnabled
())
{
if
(
!
showBuildConfigDialog
())
return
;
...
...
src/plugins/projectexplorer/projectexplorer.h
View file @
9749d38f
...
...
@@ -207,6 +207,7 @@ private:
bool
parseArguments
(
const
QStringList
&
arguments
,
QString
*
error
);
void
runProjectImpl
(
Project
*
pro
,
QString
mode
);
void
executeRunConfiguration
(
RunConfiguration
*
,
const
QString
&
mode
);
bool
hasBuildSettings
(
Project
*
pro
);
bool
showBuildConfigDialog
();
void
setCurrent
(
Project
*
project
,
QString
filePath
,
Node
*
node
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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