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
90a02875
Commit
90a02875
authored
Apr 14, 2011
by
Tobias Hunger
Browse files
ToolChain: Remove invalid toolchain when not needed
Remove the invalid toolchain from the combobox when it is no longer needed.
parent
7752a95e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp
View file @
90a02875
...
...
@@ -458,6 +458,7 @@ void Qt4ProjectConfigWidget::toolChainChanged()
{
if
(
m_ignoreChange
)
return
;
bool
foundTc
=
false
;
for
(
int
i
=
0
;
i
<
m_ui
->
toolChainComboBox
->
count
();
++
i
)
{
ProjectExplorer
::
ToolChain
*
tc
=
static_cast
<
ProjectExplorer
::
ToolChain
*>
(
m_ui
->
toolChainComboBox
->
itemData
(
i
,
Qt
::
UserRole
).
value
<
void
*>
());
...
...
@@ -465,13 +466,20 @@ void Qt4ProjectConfigWidget::toolChainChanged()
m_ignoreChange
=
true
;
m_ui
->
toolChainComboBox
->
setCurrentIndex
(
i
);
m_ignoreChange
=
false
;
return
;
foundTc
=
true
;
break
;
}
}
m_ignoreChange
=
true
;
m_ui
->
toolChainComboBox
->
addItem
(
tr
(
"<No tool chain selected>"
),
qVariantFromValue
(
static_cast
<
void
*>
(
0
)));
m_ui
->
toolChainComboBox
->
setCurrentIndex
(
m_ui
->
toolChainComboBox
->
count
()
-
1
);
m_ignoreChange
=
false
;
if
(
foundTc
)
{
int
index
=
m_ui
->
toolChainComboBox
->
findData
(
qVariantFromValue
(
static_cast
<
void
*>
(
0
)));
if
(
index
>=
0
)
m_ui
->
toolChainComboBox
->
removeItem
(
index
);
}
else
{
m_ignoreChange
=
true
;
m_ui
->
toolChainComboBox
->
addItem
(
tr
(
"<No tool chain selected>"
),
qVariantFromValue
(
static_cast
<
void
*>
(
0
)));
m_ui
->
toolChainComboBox
->
setCurrentIndex
(
m_ui
->
toolChainComboBox
->
count
()
-
1
);
m_ignoreChange
=
false
;
}
}
void
Qt4ProjectConfigWidget
::
updateToolChainCombo
()
...
...
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