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
Q
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
Tobias Hunger
qt-creator
Commits
bc5c462d
Commit
bc5c462d
authored
Mar 15, 2011
by
Friedemann Kleint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debugging helpers: Build Gdb helper on Mac only.
Reviewed-by:
Kai Köhne
<
kai.koehne@nokia.com
>
parent
d144936f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
89 additions
and
77 deletions
+89
-77
src/plugins/qt4projectmanager/debugginghelper.ui
src/plugins/qt4projectmanager/debugginghelper.ui
+45
-37
src/plugins/qt4projectmanager/debugginghelperbuildtask.cpp
src/plugins/qt4projectmanager/debugginghelperbuildtask.cpp
+24
-24
src/plugins/qt4projectmanager/debugginghelperbuildtask.h
src/plugins/qt4projectmanager/debugginghelperbuildtask.h
+3
-1
src/plugins/qt4projectmanager/qtoptionspage.cpp
src/plugins/qt4projectmanager/qtoptionspage.cpp
+17
-15
No files found.
src/plugins/qt4projectmanager/debugginghelper.ui
View file @
bc5c462d
...
...
@@ -2,42 +2,20 @@
<ui
version=
"4.0"
>
<class>
Qt4ProjectManager::Internal::DebuggingHelper
</class>
<widget
class=
"QWidget"
name=
"Qt4ProjectManager::Internal::DebuggingHelper"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
321
</width>
<height>
150
</height>
</rect>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<property
name=
"margin"
>
<number>
0
</number>
</property>
<item>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"gdbHelperLabel"
>
<property
name=
"toolTip"
>
<string>
Helps showing content of Qt types. Only used in older versions of gdb.
</string>
</property>
<property
name=
"text"
>
<string>
Gdb Helper:
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QLabel"
name=
"gdbHelperStatus"
>
<property
name=
"text"
>
<string
notr=
"true"
>
TextLabel
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"2"
>
<spacer
name=
"horizontalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLabel"
name=
"qmlDumpLabel"
>
<property
name=
"toolTip"
>
...
...
@@ -98,13 +76,6 @@
</property>
</spacer>
</item>
<item
row=
"0"
column=
"4"
>
<widget
class=
"QPushButton"
name=
"gdbHelperBuildButton"
>
<property
name=
"text"
>
<string>
Build
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"4"
>
<widget
class=
"QPushButton"
name=
"qmlDumpBuildButton"
>
<property
name=
"text"
>
...
...
@@ -153,6 +124,43 @@
</property>
</widget>
</item>
<item
row=
"4"
column=
"0"
>
<widget
class=
"QLabel"
name=
"gdbHelperLabel"
>
<property
name=
"toolTip"
>
<string>
Helps showing content of Qt types. Only used in older versions of gdb.
</string>
</property>
<property
name=
"text"
>
<string>
Gdb Helper:
</string>
</property>
</widget>
</item>
<item
row=
"4"
column=
"1"
>
<widget
class=
"QLabel"
name=
"gdbHelperStatus"
>
<property
name=
"text"
>
<string
notr=
"true"
>
TextLabel
</string>
</property>
</widget>
</item>
<item
row=
"4"
column=
"2"
>
<spacer
name=
"horizontalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"4"
column=
"4"
>
<widget
class=
"QPushButton"
name=
"gdbHelperBuildButton"
>
<property
name=
"text"
>
<string>
Build
</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
...
...
src/plugins/qt4projectmanager/debugginghelperbuildtask.cpp
View file @
bc5c462d
...
...
@@ -39,6 +39,8 @@
#include <qt4projectmanager/qtversionmanager.h>
#include <projectexplorer/toolchainmanager.h>
#include <projectexplorer/debugginghelper.h>
#include <projectexplorer/abi.h>
#include <utils/qtcassert.h>
#include <QtCore/QCoreApplication>
...
...
@@ -47,7 +49,8 @@ using namespace Qt4ProjectManager::Internal;
using
ProjectExplorer
::
DebuggingHelperLibrary
;
DebuggingHelperBuildTask
::
DebuggingHelperBuildTask
(
const
QtVersion
*
version
,
Tools
tools
)
DebuggingHelperBuildTask
::
DebuggingHelperBuildTask
(
const
QtVersion
*
version
,
Tools
tools
)
:
m_tools
(
tools
&
availableTools
(
version
))
{
if
(
!
version
||
!
version
->
isValid
())
return
;
...
...
@@ -90,35 +93,32 @@ DebuggingHelperBuildTask::DebuggingHelperBuildTask(const QtVersion *version, Too
m_qmakeCommand
=
version
->
qmakeCommand
();
m_makeCommand
=
tc
->
makeCommand
();
m_mkspec
=
version
->
mkspec
();
}
m_tools
=
tools
;
DebuggingHelperBuildTask
::~
DebuggingHelperBuildTask
()
{
}
DebuggingHelperBuildTask
::
Tools
DebuggingHelperBuildTask
::
availableTools
(
const
QtVersion
*
version
)
{
QTC_ASSERT
(
version
,
return
0
;
)
// Check the build requirements of the tools
if
(
m_tools
&
QmlDump
)
{
if
(
!
QmlDumpTool
::
canBuild
(
version
))
{
m_tools
^=
QmlDump
;
}
}
if
(
m_tools
&
QmlObserver
)
{
if
(
!
QmlObserverTool
::
canBuild
(
version
))
{
m_tools
^=
QmlObserver
;
}
else
{
m_tools
|=
QmlDebugging
;
DebuggingHelperBuildTask
::
Tools
tools
=
0
;
// Gdb helpers are needed on Mac/gdb only.
foreach
(
const
ProjectExplorer
::
Abi
&
abi
,
version
->
qtAbis
())
{
if
(
abi
.
os
()
==
ProjectExplorer
::
Abi
::
MacOS
)
{
tools
|=
DebuggingHelperBuildTask
::
GdbDebugging
;
break
;
}
}
if
(
m_tools
&
QmlDebugging
)
{
if
(
!
QmlDebuggingLibrary
::
canBuild
(
version
))
{
m_tools
^
=
QmlDebugging
;
m_tools
&=
~
QmlObserver
;
// remove observer if set
}
if
(
QmlDumpTool
::
canBuild
(
version
))
tools
|=
QmlDump
;
if
(
QmlDebuggingLibrary
::
canBuild
(
version
))
{
tools
|
=
QmlDebugging
;
if
(
QmlObserverTool
::
canBuild
(
version
))
tools
|=
QmlObserver
;
// requires QML debugging.
}
}
DebuggingHelperBuildTask
::~
DebuggingHelperBuildTask
()
{
return
tools
;
}
void
DebuggingHelperBuildTask
::
run
(
QFutureInterface
<
void
>
&
future
)
...
...
src/plugins/qt4projectmanager/debugginghelperbuildtask.h
View file @
bc5c462d
...
...
@@ -62,13 +62,15 @@ public:
void
run
(
QFutureInterface
<
void
>
&
future
);
static
Tools
availableTools
(
const
QtVersion
*
version
);
signals:
void
finished
(
int
qtVersionId
,
DebuggingHelperBuildTask
::
Tools
tools
,
const
QString
&
output
);
private:
bool
buildDebuggingHelper
(
QFutureInterface
<
void
>
&
future
,
QString
*
output
);
Tools
m_tools
;
const
Tools
m_tools
;
int
m_qtId
;
QString
m_qtInstallData
;
...
...
src/plugins/qt4projectmanager/qtoptionspage.cpp
View file @
bc5c462d
...
...
@@ -39,10 +39,6 @@
#include "qt4projectmanagerconstants.h"
#include "qt4target.h"
#include "qtversionmanager.h"
#include "qmldumptool.h"
#include "qmlobservertool.h"
#include "qmldebugginglibrary.h"
#include "debugginghelperbuildtask.h"
#include <projectexplorer/abi.h>
#include <projectexplorer/debugginghelper.h>
...
...
@@ -439,20 +435,22 @@ void QtOptionsPageWidget::removeQtDir()
void
QtOptionsPageWidget
::
updateDebuggingHelperUi
()
{
QtVersion
*
version
=
currentVersion
();
const
QtVersion
*
version
=
currentVersion
();
const
QTreeWidgetItem
*
currentItem
=
m_ui
->
qtdirList
->
currentItem
();
if
(
!
version
||
!
version
->
supportsBinaryDebuggingHelper
())
{
m_ui
->
debuggingHelperWidget
->
setVisible
(
false
);
}
else
{
bool
canBuildQmlDumper
=
QmlDumpTool
::
canBuild
(
version
);
bool
canBuildQmlDebuggingLib
=
QmlDebuggingLibrary
::
canBuild
(
version
);
bool
canBuildQmlObserver
=
QmlObserverTool
::
canBuild
(
version
);
const
DebuggingHelperBuildTask
::
Tools
availableTools
=
DebuggingHelperBuildTask
::
availableTools
(
version
);
const
bool
canBuildGdbHelper
=
availableTools
&
DebuggingHelperBuildTask
::
GdbDebugging
;
const
bool
canBuildQmlDumper
=
availableTools
&
DebuggingHelperBuildTask
::
QmlDump
;
const
bool
canBuildQmlDebuggingLib
=
availableTools
&
DebuggingHelperBuildTask
::
QmlDebugging
;
const
bool
canBuildQmlObserver
=
availableTools
&
DebuggingHelperBuildTask
::
QmlObserver
;
bool
hasGdbHelper
=
!
version
->
gdbDebuggingHelperLibrary
().
isEmpty
();
bool
hasQmlDumper
=
version
->
hasQmlDump
();
bool
hasQmlDebuggingLib
=
version
->
hasQmlDebuggingLibrary
();
bool
hasQmlObserver
=
!
version
->
qmlObserverTool
().
isEmpty
();
const
bool
hasGdbHelper
=
!
version
->
gdbDebuggingHelperLibrary
().
isEmpty
();
const
bool
hasQmlDumper
=
version
->
hasQmlDump
();
const
bool
hasQmlDebuggingLib
=
version
->
hasQmlDebuggingLibrary
();
const
bool
hasQmlObserver
=
!
version
->
qmlObserverTool
().
isEmpty
();
bool
isBuildingGdbHelper
=
false
;
bool
isBuildingQmlDumper
=
false
;
...
...
@@ -495,11 +493,15 @@ void QtOptionsPageWidget::updateDebuggingHelperUi()
gdbHelperText
=
QDir
::
toNativeSeparators
(
version
->
gdbDebuggingHelperLibrary
());
gdbHelperTextFlags
=
Qt
::
TextSelectableByMouse
;
}
else
{
gdbHelperText
=
tr
(
"<i>Not yet built.</i>"
);
if
(
canBuildGdbHelper
)
{
gdbHelperText
=
tr
(
"<i>Not yet built.</i>"
);
}
else
{
gdbHelperText
=
tr
(
"<i>Not needed.</i>"
);
}
}
m_debuggingHelperUi
->
gdbHelperStatus
->
setText
(
gdbHelperText
);
m_debuggingHelperUi
->
gdbHelperStatus
->
setTextInteractionFlags
(
gdbHelperTextFlags
);
m_debuggingHelperUi
->
gdbHelperBuildButton
->
setEnabled
(
!
isBuildingGdbHelper
);
m_debuggingHelperUi
->
gdbHelperBuildButton
->
setEnabled
(
canBuildGdbHelper
&&
!
isBuildingGdbHelper
);
QString
qmlDumpStatusText
;
Qt
::
TextInteractionFlags
qmlDumpStatusTextFlags
=
Qt
::
NoTextInteraction
;
...
...
@@ -535,7 +537,7 @@ void QtOptionsPageWidget::updateDebuggingHelperUi()
if
(
qmlDebuggingLibStatusText
!=
debugPath
)
{
if
(
!
qmlDebuggingLibStatusText
.
isEmpty
()
&&
!
debugPath
.
isEmpty
())
{
qmlDebuggingLibStatusText
+=
QLatin1
String
(
"
\n
"
);
qmlDebuggingLibStatusText
+=
QLatin1
Char
(
'\n'
);
}
qmlDebuggingLibStatusText
+=
debugPath
;
}
...
...
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