Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
9da7aef4
Commit
9da7aef4
authored
Dec 11, 2008
by
hjk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
re-organizize gdb location selection again
parent
65d48ce4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
65 deletions
+33
-65
src/plugins/debugger/gdboptionpage.cpp
src/plugins/debugger/gdboptionpage.cpp
+16
-22
src/plugins/debugger/gdboptionpage.h
src/plugins/debugger/gdboptionpage.h
+2
-2
src/plugins/debugger/gdboptionpage.ui
src/plugins/debugger/gdboptionpage.ui
+15
-41
No files found.
src/plugins/debugger/gdboptionpage.cpp
View file @
9da7aef4
...
...
@@ -88,11 +88,15 @@ QWidget *GdbOptionPage::createPage(QWidget *parent)
{
QWidget
*
w
=
new
QWidget
(
parent
);
m_ui
.
setupUi
(
w
);
m_ui
.
gdbLocationEdit
->
setText
(
m_settings
->
m_gdbCmd
);
m_ui
.
gdbLocationChooser
->
setExpectedKind
(
Core
::
Utils
::
PathChooser
::
Command
);
m_ui
.
gdbLocationChooser
->
setPromptDialogTitle
(
tr
(
"Choose Gdb Location"
));
m_ui
.
gdbLocationChooser
->
setPath
(
m_settings
->
m_gdbCmd
);
m_ui
.
scriptFileChooser
->
setExpectedKind
(
Core
::
Utils
::
PathChooser
::
File
);
m_ui
.
scriptFileChooser
->
setPromptDialogTitle
(
tr
(
"Choose Location of Startup Script File"
));
m_ui
.
scriptFileChooser
->
setPath
(
m_settings
->
m_scriptFile
);
m_ui
.
environmentEdit
->
setText
(
m_settings
->
m_gdbEnv
);
m_ui
.
autoStartBox
->
setChecked
(
m_settings
->
m_autoRun
);
m_ui
.
autoQuitBox
->
setChecked
(
m_settings
->
m_autoQuit
);
m_ui
.
gdbStartupScriptEdit
->
setText
(
m_settings
->
m_scriptFile
);
// FIXME
m_ui
.
autoStartBox
->
hide
();
...
...
@@ -100,32 +104,22 @@ QWidget *GdbOptionPage::createPage(QWidget *parent)
m_ui
.
environmentEdit
->
hide
();
m_ui
.
labelEnvironment
->
hide
();
connect
(
m_ui
.
browseForGdbButton
,
SIGNAL
(
c
lick
ed
()),
this
,
SLOT
(
browseForGdb
()));
connect
(
m_ui
.
browseForScriptButton
,
SIGNAL
(
c
lick
ed
()),
this
,
SLOT
(
browseForScript
()));
connect
(
m_ui
.
gdbLocationChooser
,
SIGNAL
(
c
hang
ed
()),
this
,
SLOT
(
onGdbLocationChanged
()));
connect
(
m_ui
.
scriptFileChooser
,
SIGNAL
(
c
hang
ed
()),
this
,
SLOT
(
onScriptFileChanged
()));
return
w
;
}
void
GdbOptionPage
::
browseForGdb
()
void
GdbOptionPage
::
onGdbLocationChanged
()
{
QString
fileName
=
QFileDialog
::
getOpenFileName
(
m_ui
.
browseForGdbButton
,
"Browse for gdb executable"
);
if
(
fileName
.
isEmpty
())
return
;
m_settings
->
m_gdbCmd
=
fileName
;
m_ui
.
gdbLocationEdit
->
setText
(
fileName
);
m_settings
->
m_gdbCmd
=
m_ui
.
gdbLocationChooser
->
path
();
}
void
GdbOptionPage
::
browseForScript
()
void
GdbOptionPage
::
onScriptFileChanged
()
{
QString
fileName
=
QFileDialog
::
getOpenFileName
(
m_ui
.
browseForGdbButton
,
"Browse for gdb startup script"
);
if
(
fileName
.
isEmpty
())
return
;
m_settings
->
m_scriptFile
=
fileName
;
m_ui
.
gdbStartupScriptEdit
->
setText
(
fileName
);
m_settings
->
m_scriptFile
=
m_ui
.
scriptFileChooser
->
path
();
}
void
GdbOptionPage
::
finished
(
bool
accepted
)
...
...
@@ -133,11 +127,11 @@ void GdbOptionPage::finished(bool accepted)
if
(
!
accepted
)
return
;
m_settings
->
m_gdbCmd
=
m_ui
.
gdbLocation
Edit
->
text
();
m_settings
->
m_gdbCmd
=
m_ui
.
gdbLocation
Chooser
->
path
();
m_settings
->
m_gdbEnv
=
m_ui
.
environmentEdit
->
text
();
m_settings
->
m_autoRun
=
m_ui
.
autoStartBox
->
isChecked
();
m_settings
->
m_autoQuit
=
m_ui
.
autoQuitBox
->
isChecked
();
m_settings
->
m_scriptFile
=
m_ui
.
gdbStartupScriptEdit
->
text
();
m_settings
->
m_scriptFile
=
m_ui
.
scriptFileChooser
->
path
();
Core
::
ICore
*
coreIFace
=
m_pm
->
getObject
<
Core
::
ICore
>
();
if
(
!
coreIFace
||
!
coreIFace
->
settings
())
...
...
src/plugins/debugger/gdboptionpage.h
View file @
9da7aef4
...
...
@@ -62,8 +62,8 @@ public:
void
finished
(
bool
accepted
);
public
slots
:
void
browseForGdb
();
void
browseForScript
();
void
onGdbLocationChanged
();
void
onScriptFileChanged
();
private:
ExtensionSystem
::
PluginManager
*
m_pm
;
...
...
src/plugins/debugger/gdboptionpage.ui
View file @
9da7aef4
...
...
@@ -32,10 +32,7 @@
<property
name=
"spacing"
>
<number>
6
</number>
</property>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QLineEdit"
name=
"gdbLocationEdit"
/>
</item>
<item
row=
"1"
column=
"1"
colspan=
"2"
>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QLineEdit"
name=
"environmentEdit"
/>
</item>
<item
row=
"0"
column=
"0"
>
...
...
@@ -46,9 +43,6 @@
<property
name=
"text"
>
<string>
Gdb Location:
</string>
</property>
<property
name=
"buddy"
>
<cstring>
gdbLocationEdit
</cstring>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
...
...
@@ -61,40 +55,6 @@
</property>
</widget>
</item>
<item
row=
"0"
column=
"2"
>
<widget
class=
"QPushButton"
name=
"browseForGdbButton"
>
<property
name=
"text"
>
<string/>
</property>
<property
name=
"icon"
>
<iconset
resource=
"../coreplugin/core.qrc"
>
<normaloff>
:/qworkbench/images/fileopen.png
</normaloff>
:/qworkbench/images/fileopen.png
</iconset>
</property>
<property
name=
"checkable"
>
<bool>
false
</bool>
</property>
</widget>
</item>
<item
row=
"2"
column=
"1"
>
<widget
class=
"QLineEdit"
name=
"gdbStartupScriptEdit"
/>
</item>
<item
row=
"2"
column=
"2"
>
<widget
class=
"QToolButton"
name=
"browseForScriptButton"
>
<property
name=
"minimumSize"
>
<size>
<width>
21
</width>
<height>
23
</height>
</size>
</property>
<property
name=
"text"
>
<string>
...
</string>
</property>
<property
name=
"icon"
>
<iconset
resource=
"../coreplugin/core.qrc"
>
<normaloff>
:/qworkbench/images/fileopen.png
</normaloff>
:/qworkbench/images/fileopen.png
</iconset>
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<widget
class=
"QLabel"
name=
"labelGdbStartupScript"
>
<property
name=
"toolTip"
>
...
...
@@ -105,6 +65,12 @@
</property>
</widget>
</item>
<item
row=
"2"
column=
"1"
>
<widget
class=
"Core::Utils::PathChooser"
name=
"scriptFileChooser"
native=
"true"
/>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"Core::Utils::PathChooser"
name=
"gdbLocationChooser"
native=
"true"
/>
</item>
</layout>
</widget>
</item>
...
...
@@ -137,6 +103,14 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>
Core::Utils::PathChooser
</class>
<extends>
QWidget
</extends>
<header
location=
"global"
>
utils/pathchooser.h
</header>
<container>
1
</container>
</customwidget>
</customwidgets>
<resources>
<include
location=
"../coreplugin/core.qrc"
/>
</resources>
...
...
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