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
Marco Bubke
flatpak-qt-creator
Commits
8fd395fe
Commit
8fd395fe
authored
Jun 23, 2009
by
con
Browse files
Update the enabled state of run configurations on toolchain change.
And if Qt version changed.
parent
936ba4c0
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/plugins/projectexplorer/project.h
View file @
8fd395fe
...
...
@@ -148,6 +148,7 @@ signals:
void
fileListChanged
();
void
activeBuildConfigurationChanged
();
void
activeRunConfigurationChanged
();
void
runConfigurationsEnabledStateChanged
();
void
removedRunConfiguration
(
const
QString
&
name
);
void
addedRunConfiguration
(
const
QString
&
name
);
// This signal is jut there for updating the tree list in the buildsettings wizard
...
...
src/plugins/projectexplorer/projectexplorer.cpp
View file @
8fd395fe
...
...
@@ -1887,15 +1887,17 @@ void ProjectExplorerPlugin::populateRunConfigurationMenu()
foreach
(
const
Project
*
pro
,
m_session
->
projects
())
{
foreach
(
QSharedPointer
<
RunConfiguration
>
runConfiguration
,
pro
->
runConfigurations
())
{
const
QString
title
=
QString
(
"%1 (%2)"
).
arg
(
pro
->
name
(),
runConfiguration
->
name
());
QAction
*
act
=
new
QAction
(
title
,
m_runConfigurationActionGroup
);
act
->
setCheckable
(
true
);
act
->
setData
(
qVariantFromValue
(
runConfiguration
));
act
->
setChecked
(
runConfiguration
==
activeRunConfiguration
);
m_runConfigurationMenu
->
addAction
(
act
);
if
(
debug
)
qDebug
()
<<
"RunConfiguration"
<<
runConfiguration
<<
"project:"
<<
pro
->
name
()
<<
"active:"
<<
(
runConfiguration
==
activeRunConfiguration
);
if
(
runConfiguration
->
isEnabled
())
{
const
QString
title
=
QString
(
"%1 (%2)"
).
arg
(
pro
->
name
(),
runConfiguration
->
name
());
QAction
*
act
=
new
QAction
(
title
,
m_runConfigurationActionGroup
);
act
->
setCheckable
(
true
);
act
->
setData
(
qVariantFromValue
(
runConfiguration
));
act
->
setChecked
(
runConfiguration
==
activeRunConfiguration
);
m_runConfigurationMenu
->
addAction
(
act
);
if
(
debug
)
qDebug
()
<<
"RunConfiguration"
<<
runConfiguration
<<
"project:"
<<
pro
->
name
()
<<
"active:"
<<
(
runConfiguration
==
activeRunConfiguration
);
}
}
}
...
...
src/plugins/projectexplorer/runsettingspropertiespage.cpp
View file @
8fd395fe
...
...
@@ -196,6 +196,8 @@ RunSettingsWidget::RunSettingsWidget(Project *project)
connect
(
m_project
,
SIGNAL
(
activeRunConfigurationChanged
()),
this
,
SLOT
(
activeRunConfigurationChanged
()));
connect
(
m_project
,
SIGNAL
(
runConfigurationsEnabledStateChanged
()),
this
,
SLOT
(
initRunConfigurationComboBox
()));
initRunConfigurationComboBox
();
const
QList
<
QSharedPointer
<
RunConfiguration
>
>
runConfigurations
=
m_project
->
runConfigurations
();
...
...
src/plugins/qt4projectmanager/qt-s60/qt-s60-todo.txt
View file @
8fd395fe
...
...
@@ -7,16 +7,13 @@
* QtVersion:
* gui for overriding the default make target if necessary,
make arguments --> make options
* more general "debug / release" configuration to be used in toolchain???
* build parser should be defined/created by toolchain, not make step
* Debugging helpers
* must probably be compiled for different toolchains
* Run Configurations
* enabled property doesn't update correctly
* missing signals qtVersionChanged + toolChainChanged
* handling of active run config getting disabled
* handling of active run config getting disabled not optimal yet
* Run on device
* makesis, signsis and applicationinstaller don't report errors back
...
...
src/plugins/qt4projectmanager/qt4project.cpp
View file @
8fd395fe
...
...
@@ -834,6 +834,7 @@ int Qt4Project::qtVersionId(const QString &buildConfiguration) const
void
Qt4Project
::
setQtVersion
(
const
QString
&
buildConfiguration
,
int
id
)
{
setValue
(
buildConfiguration
,
"QtVersionId"
,
id
);
updateActiveRunConfiguration
();
}
void
Qt4Project
::
setToolChainType
(
const
QString
&
buildConfiguration
,
ProjectExplorer
::
ToolChain
::
ToolChainType
type
)
...
...
@@ -841,16 +842,32 @@ void Qt4Project::setToolChainType(const QString &buildConfiguration, ProjectExpl
setValue
(
buildConfiguration
,
"ToolChain"
,
(
int
)
type
);
delete
m_toolChain
;
m_toolChain
=
0
;
updateActiveRunConfiguration
();
}
void
Qt4Project
::
updateActiveRunConfiguration
()
{
if
(
!
activeRunConfiguration
()
->
isEnabled
())
{
foreach
(
QSharedPointer
<
RunConfiguration
>
runConfiguration
,
runConfigurations
())
{
if
(
runConfiguration
->
isEnabled
())
{
setActiveRunConfiguration
(
runConfiguration
);
}
}
}
emit
runConfigurationsEnabledStateChanged
();
emit
invalidateCachedTargetInformation
();
}
ProjectExplorer
::
ToolChain
::
ToolChainType
Qt4Project
::
toolChainType
(
const
QString
&
buildConfiguration
)
const
{
ProjectExplorer
::
ToolChain
::
ToolChainType
t
ype
=
const
ProjectExplorer
::
ToolChain
::
ToolChainType
originalT
ype
=
(
ProjectExplorer
::
ToolChain
::
ToolChainType
)
value
(
buildConfiguration
,
"ToolChain"
).
toInt
();
ProjectExplorer
::
ToolChain
::
ToolChainType
type
=
originalType
;
const
QtVersion
*
version
=
qtVersion
(
buildConfiguration
);
if
(
!
version
->
possibleToolChainTypes
().
contains
(
type
))
// use default tool chain
type
=
version
->
defaultToolchainType
();
const_cast
<
Qt4Project
*>
(
this
)
->
setToolChainType
(
buildConfiguration
,
type
);
if
(
type
!=
originalType
)
const_cast
<
Qt4Project
*>
(
this
)
->
setToolChainType
(
buildConfiguration
,
type
);
return
type
;
}
...
...
src/plugins/qt4projectmanager/qt4project.h
View file @
8fd395fe
...
...
@@ -233,6 +233,7 @@ private:
void
addDefaultBuild
();
static
QString
qmakeVarName
(
ProjectExplorer
::
FileType
type
);
void
updateActiveRunConfiguration
();
Qt4Manager
*
m_manager
;
Internal
::
Qt4ProFileNode
*
m_rootProjectNode
;
...
...
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