Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
78b0c59a
Commit
78b0c59a
authored
Jan 24, 2011
by
Tobias Hunger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make RunSettingsWidget more robust
Handle a situation that can never happen but caused a crash.
parent
6061c405
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
16 deletions
+18
-16
src/plugins/projectexplorer/runsettingspropertiespage.cpp
src/plugins/projectexplorer/runsettingspropertiespage.cpp
+16
-16
src/plugins/projectexplorer/runsettingspropertiespage.h
src/plugins/projectexplorer/runsettingspropertiespage.h
+2
-0
No files found.
src/plugins/projectexplorer/runsettingspropertiespage.cpp
View file @
78b0c59a
...
@@ -191,8 +191,7 @@ RunSettingsWidget::RunSettingsWidget(Target *target)
...
@@ -191,8 +191,7 @@ RunSettingsWidget::RunSettingsWidget(Target *target)
m_ui
->
removeRunToolButton
->
setEnabled
(
m_target
->
runConfigurations
().
size
()
>
1
);
m_ui
->
removeRunToolButton
->
setEnabled
(
m_target
->
runConfigurations
().
size
()
>
1
);
m_ui
->
renameRunButton
->
setEnabled
(
m_target
->
activeRunConfiguration
());
m_ui
->
renameRunButton
->
setEnabled
(
m_target
->
activeRunConfiguration
());
m_runConfigurationWidget
=
m_target
->
activeRunConfiguration
()
->
createConfigurationWidget
();
setConfigurationWidget
(
m_target
->
activeRunConfiguration
());
m_runLayout
->
addWidget
(
m_runConfigurationWidget
);
connect
(
m_addRunMenu
,
SIGNAL
(
aboutToShow
()),
connect
(
m_addRunMenu
,
SIGNAL
(
aboutToShow
()),
this
,
SLOT
(
aboutToShowAddMenu
()));
this
,
SLOT
(
aboutToShowAddMenu
()));
...
@@ -280,10 +279,6 @@ void RunSettingsWidget::activeRunConfigurationChanged()
...
@@ -280,10 +279,6 @@ void RunSettingsWidget::activeRunConfigurationChanged()
m_ignoreChange
=
true
;
m_ignoreChange
=
true
;
m_ui
->
runConfigurationCombo
->
setCurrentIndex
(
actRc
.
row
());
m_ui
->
runConfigurationCombo
->
setCurrentIndex
(
actRc
.
row
());
m_ignoreChange
=
false
;
m_ignoreChange
=
false
;
delete
m_runConfigurationWidget
;
m_runConfigurationWidget
=
m_target
->
activeRunConfiguration
()
->
createConfigurationWidget
();
m_runLayout
->
addWidget
(
m_runConfigurationWidget
);
}
}
void
RunSettingsWidget
::
renameRunConfiguration
()
void
RunSettingsWidget
::
renameRunConfiguration
()
...
@@ -308,22 +303,17 @@ void RunSettingsWidget::currentRunConfigurationChanged(int index)
...
@@ -308,22 +303,17 @@ void RunSettingsWidget::currentRunConfigurationChanged(int index)
{
{
if
(
m_ignoreChange
)
if
(
m_ignoreChange
)
return
;
return
;
if
(
index
==
-
1
)
{
delete
m_runConfigurationWidget
;
RunConfiguration
*
selectedRunConfiguration
=
0
;
m_runConfigurationWidget
=
0
;
if
(
index
>=
0
)
return
;
selectedRunConfiguration
=
m_runConfigurationsModel
->
runConfigurationAt
(
index
);
}
RunConfiguration
*
selectedRunConfiguration
=
m_runConfigurationsModel
->
runConfigurationAt
(
index
);
m_ignoreChange
=
true
;
m_ignoreChange
=
true
;
m_target
->
setActiveRunConfiguration
(
selectedRunConfiguration
);
m_target
->
setActiveRunConfiguration
(
selectedRunConfiguration
);
m_ignoreChange
=
false
;
m_ignoreChange
=
false
;
// Update the run configuration configuration widget
// Update the run configuration configuration widget
delete
m_runConfigurationWidget
;
setConfigurationWidget
(
selectedRunConfiguration
);
m_runConfigurationWidget
=
selectedRunConfiguration
->
createConfigurationWidget
();
m_runLayout
->
addWidget
(
m_runConfigurationWidget
);
}
}
void
RunSettingsWidget
::
currentDeployConfigurationChanged
(
int
index
)
void
RunSettingsWidget
::
currentDeployConfigurationChanged
(
int
index
)
...
@@ -424,6 +414,16 @@ void RunSettingsWidget::updateDeployConfiguration(DeployConfiguration *dc)
...
@@ -424,6 +414,16 @@ void RunSettingsWidget::updateDeployConfiguration(DeployConfiguration *dc)
m_deployLayout
->
addWidget
(
m_deploySteps
);
m_deployLayout
->
addWidget
(
m_deploySteps
);
}
}
void
RunSettingsWidget
::
setConfigurationWidget
(
RunConfiguration
*
rc
)
{
delete
m_runConfigurationWidget
;
m_runConfigurationWidget
=
0
;
if
(
!
rc
)
return
;
m_runConfigurationWidget
=
m_target
->
activeRunConfiguration
()
->
createConfigurationWidget
();
m_runLayout
->
addWidget
(
m_runConfigurationWidget
);
}
QString
RunSettingsWidget
::
uniqueDCName
(
const
QString
&
name
)
QString
RunSettingsWidget
::
uniqueDCName
(
const
QString
&
name
)
{
{
QString
result
=
name
.
trimmed
();
QString
result
=
name
.
trimmed
();
...
...
src/plugins/projectexplorer/runsettingspropertiespage.h
View file @
78b0c59a
...
@@ -50,6 +50,7 @@ namespace ProjectExplorer {
...
@@ -50,6 +50,7 @@ namespace ProjectExplorer {
class
DeployConfiguration
;
class
DeployConfiguration
;
class
DeployConfigurationWidget
;
class
DeployConfigurationWidget
;
class
DeployConfigurationModel
;
class
DeployConfigurationModel
;
class
RunConfiguration
;
class
RunConfigurationModel
;
class
RunConfigurationModel
;
namespace
Internal
{
namespace
Internal
{
...
@@ -112,6 +113,7 @@ private:
...
@@ -112,6 +113,7 @@ private:
QString
uniqueDCName
(
const
QString
&
name
);
QString
uniqueDCName
(
const
QString
&
name
);
QString
uniqueRCName
(
const
QString
&
name
);
QString
uniqueRCName
(
const
QString
&
name
);
void
updateDeployConfiguration
(
DeployConfiguration
*
);
void
updateDeployConfiguration
(
DeployConfiguration
*
);
void
setConfigurationWidget
(
RunConfiguration
*
rc
);
Target
*
m_target
;
Target
*
m_target
;
RunConfigurationModel
*
m_runConfigurationsModel
;
RunConfigurationModel
*
m_runConfigurationsModel
;
...
...
Write
Preview
Markdown
is supported
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