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
Tobias Hunger
qt-creator
Commits
45141813
Commit
45141813
authored
Apr 23, 2010
by
con
Browse files
Hide building debug helper UI in cases where it's not supported.
Reviewed-by: Alessandro Portale
parent
21fbbc2c
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qtoptionspage.cpp
View file @
45141813
...
...
@@ -188,7 +188,7 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent, QList<QtVersion *> ver
item
->
setText
(
1
,
QDir
::
toNativeSeparators
(
version
->
qmakeCommand
()));
item
->
setData
(
0
,
Qt
::
UserRole
,
version
->
uniqueId
());
if
(
version
->
isValid
())
if
(
version
->
isValid
()
&&
version
->
supportsBinaryDebuggingHelper
()
)
item
->
setData
(
2
,
Qt
::
DecorationRole
,
version
->
hasDebuggingHelper
()
?
m_debuggingHelperOkIcon
:
m_debuggingHelperErrorIcon
);
else
item
->
setData
(
2
,
Qt
::
DecorationRole
,
QIcon
());
...
...
@@ -447,6 +447,14 @@ void QtOptionsPageWidget::makeS60Visible(bool visible)
m_ui
->
gccePath
->
setVisible
(
visible
);
}
void
QtOptionsPageWidget
::
makeDebuggingHelperVisible
(
bool
visible
)
{
m_ui
->
debuggingHelperLabel
->
setVisible
(
visible
);
m_ui
->
debuggingHelperStateLabel
->
setVisible
(
visible
);
m_ui
->
showLogButton
->
setVisible
(
visible
);
m_ui
->
rebuildButton
->
setVisible
(
visible
);
}
void
QtOptionsPageWidget
::
showEnvironmentPage
(
QTreeWidgetItem
*
item
)
{
if
(
item
)
{
...
...
@@ -456,11 +464,13 @@ void QtOptionsPageWidget::showEnvironmentPage(QTreeWidgetItem *item)
makeMSVCVisible
(
false
);
makeMingwVisible
(
false
);
makeS60Visible
(
false
);
makeDebuggingHelperVisible
(
false
);
return
;
}
const
QSharedPointerQtVersion
qtVersion
=
m_versions
.
at
(
index
);
QList
<
ProjectExplorer
::
ToolChain
::
ToolChainType
>
types
=
qtVersion
->
possibleToolChainTypes
();
QSet
<
QString
>
targets
=
qtVersion
->
supportedTargetIds
();
makeDebuggingHelperVisible
(
qtVersion
->
supportsBinaryDebuggingHelper
());
if
(
types
.
isEmpty
())
{
makeMSVCVisible
(
false
);
makeMingwVisible
(
false
);
...
...
@@ -528,6 +538,7 @@ void QtOptionsPageWidget::showEnvironmentPage(QTreeWidgetItem *item)
makeMSVCVisible
(
false
);
makeMingwVisible
(
false
);
makeS60Visible
(
false
);
makeDebuggingHelperVisible
(
false
);
}
}
...
...
@@ -668,7 +679,7 @@ void QtOptionsPageWidget::updateCurrentQMakeLocation()
currentItem
->
setText
(
1
,
QDir
::
toNativeSeparators
(
version
->
qmakeCommand
()));
showEnvironmentPage
(
currentItem
);
if
(
version
->
isValid
())
{
if
(
version
->
isValid
()
&&
version
->
supportsBinaryDebuggingHelper
()
)
{
const
bool
hasLog
=
!
currentItem
->
data
(
2
,
Qt
::
UserRole
).
toString
().
isEmpty
();
currentItem
->
setData
(
2
,
Qt
::
DecorationRole
,
version
->
hasDebuggingHelper
()
?
m_debuggingHelperOkIcon
:
m_debuggingHelperErrorIcon
);
m_ui
->
showLogButton
->
setEnabled
(
hasLog
);
...
...
src/plugins/qt4projectmanager/qtoptionspage.h
View file @
45141813
...
...
@@ -112,6 +112,7 @@ private slots:
void
makeMingwVisible
(
bool
visible
);
void
makeMSVCVisible
(
bool
visible
);
void
makeS60Visible
(
bool
visible
);
void
makeDebuggingHelperVisible
(
bool
visible
);
void
onQtBrowsed
();
void
onMingwBrowsed
();
void
updateCurrentQtName
();
...
...
src/plugins/qt4projectmanager/qtversionmanager.cpp
View file @
45141813
...
...
@@ -1550,6 +1550,20 @@ QStringList QtVersion::debuggingHelperLibraryLocations() const
return
DebuggingHelperLibrary
::
debuggingHelperLibraryLocationsByInstallData
(
qtInstallData
);
}
bool
QtVersion
::
supportsBinaryDebuggingHelper
()
const
{
QList
<
ProjectExplorer
::
ToolChain
::
ToolChainType
>
types
=
possibleToolChainTypes
();
if
(
types
.
contains
(
ProjectExplorer
::
ToolChain
::
GCC
)
||
types
.
contains
(
ProjectExplorer
::
ToolChain
::
LINUX_ICC
)
||
types
.
contains
(
ProjectExplorer
::
ToolChain
::
MSVC
)
||
types
.
contains
(
ProjectExplorer
::
ToolChain
::
WINCE
)
||
types
.
contains
(
ProjectExplorer
::
ToolChain
::
GCC_MAEMO
)
||
types
.
contains
(
ProjectExplorer
::
ToolChain
::
OTHER
)
||
types
.
contains
(
ProjectExplorer
::
ToolChain
::
UNKNOWN
))
return
true
;
return
false
;
}
bool
QtVersion
::
hasDocumentation
()
const
{
updateVersionInfo
();
...
...
src/plugins/qt4projectmanager/qtversionmanager.h
View file @
45141813
...
...
@@ -108,6 +108,7 @@ public:
bool
hasDebuggingHelper
()
const
;
QString
debuggingHelperLibrary
()
const
;
QStringList
debuggingHelperLibraryLocations
()
const
;
bool
supportsBinaryDebuggingHelper
()
const
;
// Builds a debugging library
// returns the output of the commands
...
...
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