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
41a91ff9
Commit
41a91ff9
authored
Mar 30, 2010
by
Tobias Hunger
Browse files
Remove customexecutable RCs again if they are unused
parent
176115a0
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
View file @
41a91ff9
...
...
@@ -371,6 +371,10 @@ QString CustomExecutableRunConfiguration::executable() const
return
exec
;
}
bool
CustomExecutableRunConfiguration
::
isConfigured
()
const
{
return
!
m_executable
.
isEmpty
();
}
LocalApplicationRunConfiguration
::
RunMode
CustomExecutableRunConfiguration
::
runMode
()
const
{
...
...
src/plugins/projectexplorer/customexecutablerunconfiguration.h
View file @
41a91ff9
...
...
@@ -76,6 +76,10 @@ public:
*/
QString
executable
()
const
;
/** Returns whether this runconfiguration ever was configured with a executable
*/
bool
isConfigured
()
const
;
/**
* Returns only what is stored in the internal variable, not what we might
* get after extending it with a path or asking the user. This value is
...
...
src/plugins/qt4projectmanager/qt4project.cpp
View file @
41a91ff9
...
...
@@ -999,6 +999,18 @@ void Qt4Project::checkForNewApplicationProjects()
if
(
!
found
)
{
qt4Target
->
addRunConfigurationForPath
(
qt4proFile
->
path
());
}
// Remove unused CustomExecutableRCs:
if
(
target
->
runConfigurations
().
count
()
>
1
)
{
QList
<
RunConfiguration
*>
toRemove
;
foreach
(
RunConfiguration
*
rc
,
target
->
runConfigurations
())
{
CustomExecutableRunConfiguration
*
cerc
=
qobject_cast
<
CustomExecutableRunConfiguration
*>
(
rc
);
if
(
cerc
&&
!
cerc
->
isConfigured
())
toRemove
.
append
(
rc
);
}
foreach
(
RunConfiguration
*
rc
,
toRemove
)
target
->
removeRunConfiguration
(
rc
);
}
}
}
}
...
...
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