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
Marco Bubke
flatpak-qt-creator
Commits
5023e844
Commit
5023e844
authored
Aug 11, 2010
by
hjk
Browse files
debugger: show all dockwidgets in the views menu, even if disabled.
parent
62334acb
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/debuggerplugin.cpp
View file @
5023e844
...
...
@@ -1264,7 +1264,7 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
connect
(
m_registerDock
->
toggleViewAction
(),
SIGNAL
(
toggled
(
bool
)),
SLOT
(
registerDockToggled
(
bool
)),
Qt
::
QueuedConnection
);
m_outputDock
=
m_uiSwitcher
->
createDockWidget
(
LANG_CPP
,
m_outputWindow
,
m_outputDock
=
m_uiSwitcher
->
createDockWidget
(
QString
()
,
m_outputWindow
,
Qt
::
TopDockWidgetArea
,
false
);
m_snapshotDock
=
m_uiSwitcher
->
createDockWidget
(
LANG_CPP
,
m_snapshotWindow
);
...
...
src/plugins/debugger/debuggeruiswitcher.cpp
View file @
5023e844
...
...
@@ -216,13 +216,17 @@ void DebuggerUISwitcher::createViewsMenuItems()
d
->
m_debugMenu
->
addMenu
(
d
->
m_languageMenu
,
Core
::
Constants
::
G_DEFAULT_THREE
);
// Add menu items
Core
::
Command
*
cmd
=
am
->
registerAction
(
d
->
m_mainWindow
->
menuSeparator1
(),
QLatin1String
(
"Debugger.Views.Separator1"
),
globalcontext
);
Core
::
Command
*
cmd
=
am
->
registerAction
(
d
->
m_mainWindow
->
menuSeparator1
(),
QLatin1String
(
"Debugger.Views.Separator1"
),
globalcontext
);
d
->
m_viewsMenu
->
addAction
(
cmd
);
cmd
=
am
->
registerAction
(
d
->
m_mainWindow
->
toggleLockedAction
(),
QLatin1String
(
"Debugger.Views.ToggleLocked"
),
globalcontext
);
cmd
=
am
->
registerAction
(
d
->
m_mainWindow
->
toggleLockedAction
(),
QLatin1String
(
"Debugger.Views.ToggleLocked"
),
globalcontext
);
d
->
m_viewsMenu
->
addAction
(
cmd
);
cmd
=
am
->
registerAction
(
d
->
m_mainWindow
->
menuSeparator2
(),
QLatin1String
(
"Debugger.Views.Separator2"
),
globalcontext
);
cmd
=
am
->
registerAction
(
d
->
m_mainWindow
->
menuSeparator2
(),
QLatin1String
(
"Debugger.Views.Separator2"
),
globalcontext
);
d
->
m_viewsMenu
->
addAction
(
cmd
);
cmd
=
am
->
registerAction
(
d
->
m_mainWindow
->
resetLayoutAction
(),
QLatin1String
(
"Debugger.Views.ResetSimple"
),
globalcontext
);
cmd
=
am
->
registerAction
(
d
->
m_mainWindow
->
resetLayoutAction
(),
QLatin1String
(
"Debugger.Views.ResetSimple"
),
globalcontext
);
d
->
m_viewsMenu
->
addAction
(
cmd
);
}
...
...
@@ -282,9 +286,9 @@ void DebuggerUISwitcher::changeDebuggerUI(const QString &langName)
// << window->m_visible;
if
(
window
->
m_languageId
!=
langId
)
{
// visibleTo must be used because during init, debugger is
not visible,
// although visibility is explicitly set through
both default layout and
// QSettings.
// visibleTo must be used because during init, debugger is
//
not visible,
although visibility is explicitly set through
//
both default layout and
QSettings.
window
->
m_visible
=
window
->
m_dockWidget
->
isVisibleTo
(
d
->
m_mainWindow
);
window
->
m_dockWidget
->
hide
();
}
else
{
...
...
@@ -295,11 +299,8 @@ void DebuggerUISwitcher::changeDebuggerUI(const QString &langName)
}
foreach
(
ViewsMenuItems
menuitem
,
d
->
m_viewsMenuItems
)
{
if
(
menuitem
.
first
==
langId
)
{
menuitem
.
second
->
setVisible
(
true
);
}
else
{
menuitem
.
second
->
setVisible
(
false
);
}
bool
enable
=
menuitem
.
first
==
langId
||
menuitem
.
first
==
-
1
;
menuitem
.
second
->
setEnabled
(
enable
);
}
d
->
m_languageMenu
->
menu
()
->
setTitle
(
tr
(
"Language"
)
+
" ("
+
langName
+
")"
);
...
...
@@ -405,12 +406,12 @@ QDockWidget *DebuggerUISwitcher::createDockWidget(const QString &langName,
if
(
d
->
m_languages
.
indexOf
(
langName
)
!=
d
->
m_activeLanguage
)
dockWidget
->
hide
();
Core
::
Context
lang
Context
=
d
->
m_contextsForLanguage
.
value
(
d
->
m_languages
.
indexOf
(
langName
)
);
Core
::
Context
global
Context
(
Core
::
Constants
::
C_GLOBAL
);
Core
::
ActionManager
*
am
=
Core
::
ICore
::
instance
()
->
actionManager
();
QAction
*
action
=
dockWidget
->
toggleViewAction
();
Core
::
Command
*
cmd
=
am
->
registerAction
(
action
,
"Debugger."
+
dockWidget
->
objectName
(),
lang
Context
);
"Debugger."
+
dockWidget
->
objectName
(),
global
Context
);
cmd
->
setAttribute
(
Core
::
Command
::
CA_Hide
);
d
->
m_viewsMenu
->
addAction
(
cmd
);
...
...
src/plugins/debugger/qml/qmlengine.cpp
View file @
5023e844
...
...
@@ -333,9 +333,9 @@ void QmlEngine::updateWatchData(const WatchData &data)
sendMessage
(
reply
);
}
if
(
!
data
.
name
.
isEmpty
()
&&
data
.
isChildrenNeeded
()
&&
watchHandler
()
->
isExpandedIName
(
data
.
iname
))
{
if
(
!
data
.
name
.
isEmpty
()
&&
data
.
isChildrenNeeded
()
&&
watchHandler
()
->
isExpandedIName
(
data
.
iname
))
expandObject
(
data
.
iname
,
data
.
objectId
);
}
{
QByteArray
reply
;
...
...
@@ -447,8 +447,9 @@ void QmlEngine::messageReceived(const QByteArray &message)
else
watchHandler
()
->
endCycle
();
//ensure we got the right ui right now
Debugger
::
DebuggerUISwitcher
*
uiSwitcher
=
Debugger
::
DebuggerUISwitcher
::
instance
();
// Ensure we got the right ui right now.
Debugger
::
DebuggerUISwitcher
*
uiSwitcher
=
Debugger
::
DebuggerUISwitcher
::
instance
();
uiSwitcher
->
setActiveLanguage
(
"C++"
);
bool
becauseOfexception
;
...
...
@@ -457,7 +458,9 @@ void QmlEngine::messageReceived(const QByteArray &message)
QString
error
;
stream
>>
error
;
QString
msg
=
tr
(
"<p>An Uncaught Exception occured in <i>%1</i>:</p><p>%2</p>"
).
arg
(
stackFrames
.
value
(
0
).
file
,
Qt
::
escape
(
error
));
QString
msg
=
tr
(
"<p>An Uncaught Exception occured in <i>%1</i>:</p><p>%2</p>"
)
.
arg
(
stackFrames
.
value
(
0
).
file
,
Qt
::
escape
(
error
));
showMessageBox
(
QMessageBox
::
Information
,
tr
(
"Uncaught Exception"
),
msg
);
}
...
...
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