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
4d5ce2b4
Commit
4d5ce2b4
authored
Jan 13, 2009
by
hjk
Browse files
debugger: move 'Views' menu to menu bar. nobody found it were it was...
parent
8dfdfc06
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/debuggerconstants.h
View file @
4d5ce2b4
...
...
@@ -50,9 +50,7 @@ const char * const NEXT = "Debugger.NextLine";
const
char
*
const
STEPI
=
"Debugger.StepInstruction"
;
const
char
*
const
NEXTI
=
"Debugger.NextInstruction"
;
const
char
*
const
M_VIEW_DEBUG
=
"Debugger.Menu.View.Debug"
;
const
char
*
const
G_DEBUG
=
"Debugger.Group.Debug"
;
const
char
*
const
G_VIEW_DEBUG
=
"Debugger.Group.View.Debug"
;
const
char
*
const
M_DEBUG_VIEWS
=
"Debugger.Menu.View.Debug"
;
const
char
*
const
C_GDBDEBUGGER
=
"Gdb Debugger"
;
const
char
*
const
GDBRUNNING
=
"Gdb.Running"
;
...
...
src/plugins/debugger/debuggerplugin.cpp
View file @
4d5ce2b4
...
...
@@ -68,6 +68,7 @@
#include
<QtCore/QSettings>
#include
<QtCore/QtPlugin>
#include
<QtGui/QDockWidget>
#include
<QtGui/QPlainTextEdit>
#include
<QtGui/QTextBlock>
#include
<QtGui/QTextCursor>
...
...
@@ -227,8 +228,8 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *error_mes
ICore
*
core
=
m_pm
->
getObject
<
Core
::
ICore
>
();
QTC_ASSERT
(
core
,
return
false
);
Core
::
ActionManager
*
a
ctionManager
=
core
->
actionManager
();
QTC_ASSERT
(
a
ctionManager
,
return
false
);
Core
::
ActionManager
*
a
m
=
core
->
actionManager
();
QTC_ASSERT
(
a
m
,
return
false
);
Core
::
UniqueIDManager
*
uidm
=
core
->
uniqueIDManager
();
QTC_ASSERT
(
uidm
,
return
false
);
...
...
@@ -257,26 +258,26 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *error_mes
this
,
SLOT
(
breakpointMarginActionTriggered
()));
//Core::IActionContainer *mcppcontext =
// a
ctionManager
->actionContainer(CppEditor::Constants::M_CONTEXT);
// a
m
->actionContainer(CppEditor::Constants::M_CONTEXT);
Core
::
IActionContainer
*
mdebug
=
a
ctionManager
->
actionContainer
(
ProjectExplorer
::
Constants
::
M_DEBUG
);
a
m
->
actionContainer
(
ProjectExplorer
::
Constants
::
M_DEBUG
);
Core
::
ICommand
*
cmd
=
0
;
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_startExternalAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_startExternalAction
,
Constants
::
STARTEXTERNAL
,
globalcontext
);
mdebug
->
addAction
(
cmd
,
Core
::
Constants
::
G_DEFAULT_ONE
);
#ifndef Q_OS_WIN
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_attachExternalAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_attachExternalAction
,
Constants
::
ATTACHEXTERNAL
,
globalcontext
);
mdebug
->
addAction
(
cmd
,
Core
::
Constants
::
G_DEFAULT_ONE
);
#endif
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_continueAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_continueAction
,
ProjectExplorer
::
Constants
::
DEBUG
,
QList
<
int
>
()
<<
m_gdbRunningContext
);
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_stopAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_stopAction
,
Constants
::
INTERRUPT
,
globalcontext
);
cmd
->
setAttribute
(
Core
::
ICommand
::
CA_UpdateText
);
cmd
->
setAttribute
(
Core
::
ICommand
::
CA_UpdateIcon
);
...
...
@@ -284,7 +285,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *error_mes
cmd
->
setDefaultText
(
tr
(
"Stop Debugger/Interrupt Debugger"
));
mdebug
->
addAction
(
cmd
,
Core
::
Constants
::
G_DEFAULT_ONE
);
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_resetAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_resetAction
,
Constants
::
RESET
,
globalcontext
);
cmd
->
setAttribute
(
Core
::
ICommand
::
CA_UpdateText
);
cmd
->
setDefaultKeySequence
(
QKeySequence
(
Constants
::
RESET_KEY
));
...
...
@@ -293,114 +294,139 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *error_mes
QAction
*
sep
=
new
QAction
(
this
);
sep
->
setSeparator
(
true
);
cmd
=
actionManager
->
registerAction
(
sep
,
QLatin1String
(
"GdbDebugger.Sep1"
),
globalcontext
);
cmd
=
am
->
registerAction
(
sep
,
QLatin1String
(
"Debugger.Sep1"
),
globalcontext
);
mdebug
->
addAction
(
cmd
);
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_nextAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_nextAction
,
Constants
::
NEXT
,
debuggercontext
);
cmd
->
setDefaultKeySequence
(
QKeySequence
(
Constants
::
NEXT_KEY
));
mdebug
->
addAction
(
cmd
);
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_stepAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_stepAction
,
Constants
::
STEP
,
debuggercontext
);
cmd
->
setDefaultKeySequence
(
QKeySequence
(
Constants
::
STEP_KEY
));
mdebug
->
addAction
(
cmd
);
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_stepOutAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_stepOutAction
,
Constants
::
STEPOUT
,
debuggercontext
);
cmd
->
setDefaultKeySequence
(
QKeySequence
(
Constants
::
STEPOUT_KEY
));
mdebug
->
addAction
(
cmd
);
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_nextIAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_nextIAction
,
Constants
::
NEXTI
,
debuggercontext
);
cmd
->
setDefaultKeySequence
(
QKeySequence
(
Constants
::
NEXTI_KEY
));
mdebug
->
addAction
(
cmd
);
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_stepIAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_stepIAction
,
Constants
::
STEPI
,
debuggercontext
);
cmd
->
setDefaultKeySequence
(
QKeySequence
(
Constants
::
STEPI_KEY
));
mdebug
->
addAction
(
cmd
);
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_runToLineAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_runToLineAction
,
Constants
::
RUN_TO_LINE
,
debuggercontext
);
cmd
->
setDefaultKeySequence
(
QKeySequence
(
Constants
::
RUN_TO_LINE_KEY
));
mdebug
->
addAction
(
cmd
);
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_runToFunctionAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_runToFunctionAction
,
Constants
::
RUN_TO_FUNCTION
,
debuggercontext
);
cmd
->
setDefaultKeySequence
(
QKeySequence
(
Constants
::
RUN_TO_FUNCTION_KEY
));
mdebug
->
addAction
(
cmd
);
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_jumpToLineAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_jumpToLineAction
,
Constants
::
JUMP_TO_LINE
,
debuggercontext
);
mdebug
->
addAction
(
cmd
);
sep
=
new
QAction
(
this
);
sep
->
setSeparator
(
true
);
cmd
=
actionManager
->
registerAction
(
sep
,
QLatin1String
(
"GdbDebugger.Sep3"
),
globalcontext
);
cmd
=
am
->
registerAction
(
sep
,
QLatin1String
(
"Debugger.Sep3"
),
globalcontext
);
mdebug
->
addAction
(
cmd
);
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_breakAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_breakAction
,
Constants
::
TOGGLE_BREAK
,
cppeditorcontext
);
cmd
->
setDefaultKeySequence
(
QKeySequence
(
Constants
::
TOGGLE_BREAK_KEY
));
mdebug
->
addAction
(
cmd
);
//mcppcontext->addAction(cmd);
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_breakByFunctionAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_breakByFunctionAction
,
Constants
::
BREAK_BY_FUNCTION
,
globalcontext
);
mdebug
->
addAction
(
cmd
);
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_breakAtMainAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_breakAtMainAction
,
Constants
::
BREAK_AT_MAIN
,
globalcontext
);
mdebug
->
addAction
(
cmd
);
sep
=
new
QAction
(
this
);
sep
->
setSeparator
(
true
);
cmd
=
actionManager
->
registerAction
(
sep
,
QLatin1String
(
"GdbDebugger.Sep2"
),
globalcontext
);
cmd
=
am
->
registerAction
(
sep
,
QLatin1String
(
"Debugger.Sep2"
),
globalcontext
);
mdebug
->
addAction
(
cmd
);
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_skipKnownFramesAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_skipKnownFramesAction
,
Constants
::
SKIP_KNOWN_FRAMES
,
globalcontext
);
mdebug
->
addAction
(
cmd
);
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_useCustomDumpersAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_useCustomDumpersAction
,
Constants
::
USE_CUSTOM_DUMPERS
,
globalcontext
);
mdebug
->
addAction
(
cmd
);
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_useFastStartAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_useFastStartAction
,
Constants
::
USE_FAST_START
,
globalcontext
);
mdebug
->
addAction
(
cmd
);
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_useToolTipsAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_useToolTipsAction
,
Constants
::
USE_TOOL_TIPS
,
globalcontext
);
mdebug
->
addAction
(
cmd
);
#ifdef QT_DEBUG
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_dumpLogAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_dumpLogAction
,
Constants
::
DUMP_LOG
,
globalcontext
);
//cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+D,Ctrl+L")));
cmd
->
setDefaultKeySequence
(
QKeySequence
(
tr
(
"Ctrl+Shift+F11"
)));
mdebug
->
addAction
(
cmd
);
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_debugDumpersAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_debugDumpersAction
,
Constants
::
DEBUG_DUMPERS
,
debuggercontext
);
mdebug
->
addAction
(
cmd
);
#endif
sep
=
new
QAction
(
this
);
sep
->
setSeparator
(
true
);
cmd
=
actionManager
->
registerAction
(
sep
,
QLatin1String
(
"GdbDebugger.Sep4"
),
globalcontext
);
cmd
=
am
->
registerAction
(
sep
,
QLatin1String
(
"Debugger.Sep4"
),
globalcontext
);
mdebug
->
addAction
(
cmd
);
cmd
=
a
ctionManager
->
registerAction
(
m_manager
->
m_watchAction
,
cmd
=
a
m
->
registerAction
(
m_manager
->
m_watchAction
,
Constants
::
ADD_TO_WATCH
,
cppeditorcontext
);
//cmd->setDefaultKeySequence(QKeySequence(tr("ALT+D,ALT+W")));
mdebug
->
addAction
(
cmd
);
// Views menu
cmd
=
am
->
registerAction
(
sep
,
QLatin1String
(
"Debugger.Sep5"
),
globalcontext
);
mdebug
->
addAction
(
cmd
);
IActionContainer
*
viewsMenu
=
am
->
createMenu
(
Constants
::
M_DEBUG_VIEWS
);
QMenu
*
m
=
viewsMenu
->
menu
();
m
->
setEnabled
(
true
);
m
->
setTitle
(
tr
(
"&Views"
));
mdebug
->
addMenu
(
viewsMenu
,
Core
::
Constants
::
G_DEFAULT_THREE
);
m_toggleLockedAction
=
new
QAction
(
tr
(
"Locked"
),
this
);
m_toggleLockedAction
->
setCheckable
(
true
);
m_toggleLockedAction
->
setChecked
(
true
);
connect
(
m_toggleLockedAction
,
SIGNAL
(
toggled
(
bool
)),
m_manager
,
SLOT
(
setLocked
(
bool
)));
foreach
(
QDockWidget
*
dockWidget
,
m_manager
->
dockWidgets
())
{
cmd
=
am
->
registerAction
(
dockWidget
->
toggleViewAction
(),
"Debugger."
+
dockWidget
->
objectName
(),
debuggercontext
);
viewsMenu
->
addAction
(
cmd
);
//m->addAction(dockWidget->toggleViewAction());
}
m
->
addSeparator
();
m
->
addAction
(
m_toggleLockedAction
);
m
->
addSeparator
();
QAction
*
resetToSimpleAction
=
viewsMenu
->
menu
()
->
addAction
(
tr
(
"Reset to default layout"
));
connect
(
resetToSimpleAction
,
SIGNAL
(
triggered
()),
m_manager
,
SLOT
(
setSimpleDockWidgetArrangement
()));
m_generalOptionPage
=
0
;
// FIXME:
...
...
src/plugins/debugger/debuggerplugin.h
View file @
4d5ce2b4
...
...
@@ -108,6 +108,7 @@ private:
int
m_gdbRunningContext
;
QAction
*
m_breakpointMarginAction
;
QAction
*
m_toggleLockedAction
;
int
m_breakpointMarginActionLineNumber
;
QString
m_breakpointMarginActionFileName
;
};
...
...
src/plugins/debugger/mode.cpp
View file @
4d5ce2b4
...
...
@@ -55,7 +55,6 @@
#include
<QtCore/QDebug>
#include
<QtCore/QSettings>
#include
<QtGui/QDockWidget>
#include
<QtGui/QLabel>
#include
<QtGui/QMainWindow>
#include
<QtGui/QVBoxLayout>
...
...
@@ -178,27 +177,6 @@ QToolBar *DebugMode::createToolBar()
stretch
->
setSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Minimum
);
debugToolBar
->
addWidget
(
stretch
);
QMenu
*
viewMenu
=
new
QMenu
(
debugToolBar
);
m_toggleLockedAction
=
new
QAction
(
tr
(
"Locked"
),
viewMenu
);
m_toggleLockedAction
->
setCheckable
(
true
);
m_toggleLockedAction
->
setChecked
(
true
);
connect
(
m_toggleLockedAction
,
SIGNAL
(
toggled
(
bool
)),
m_manager
,
SLOT
(
setLocked
(
bool
)));
foreach
(
QDockWidget
*
dockWidget
,
managerAccess
->
dockWidgets
())
viewMenu
->
addAction
(
dockWidget
->
toggleViewAction
());
viewMenu
->
addSeparator
();
viewMenu
->
addAction
(
m_toggleLockedAction
);
viewMenu
->
addSeparator
();
QAction
*
resetToSimpleAction
=
viewMenu
->
addAction
(
tr
(
"Reset to default layout"
));
connect
(
resetToSimpleAction
,
SIGNAL
(
triggered
()),
m_manager
,
SLOT
(
setSimpleDockWidgetArrangement
()));
QToolButton
*
viewMenuButton
=
new
QToolButton
(
debugToolBar
);
viewMenuButton
->
setText
(
tr
(
"View "
));
viewMenuButton
->
setPopupMode
(
QToolButton
::
InstantPopup
);
viewMenuButton
->
setMenu
(
viewMenu
);
debugToolBar
->
addWidget
(
viewMenuButton
);
return
debugToolBar
;
}
...
...
@@ -220,7 +198,7 @@ void DebugMode::writeSettings() const
QTC_ASSERT
(
m_manager
->
mainWindow
(),
return
);
s
->
beginGroup
(
QLatin1String
(
"DebugMode"
));
s
->
setValue
(
QLatin1String
(
"State"
),
m_manager
->
mainWindow
()
->
saveState
());
s
->
setValue
(
QLatin1String
(
"Locked"
),
m_toggleLockedAction
->
isChecked
());
//
s->setValue(QLatin1String("Locked"), m_toggleLockedAction->isChecked());
s
->
endGroup
();
}
...
...
@@ -229,7 +207,7 @@ void DebugMode::readSettings()
QSettings
*
s
=
settings
();
s
->
beginGroup
(
QLatin1String
(
"DebugMode"
));
m_manager
->
mainWindow
()
->
restoreState
(
s
->
value
(
QLatin1String
(
"State"
),
QByteArray
()).
toByteArray
());
m_toggleLockedAction
->
setChecked
(
s
->
value
(
QLatin1String
(
"Locked"
),
true
).
toBool
());
//
m_toggleLockedAction->setChecked(s->value(QLatin1String("Locked"), true).toBool());
s
->
endGroup
();
}
...
...
src/plugins/debugger/mode.h
View file @
4d5ce2b4
...
...
@@ -76,7 +76,6 @@ private:
void
readSettings
();
QPointer
<
DebuggerManager
>
m_manager
;
QAction
*
m_toggleLockedAction
;
};
}
// namespace Internal
...
...
src/plugins/fakevim/fakevimplugin.cpp
View file @
4d5ce2b4
...
...
@@ -64,9 +64,9 @@
#include
<QtGui/QMessageBox>
#include
<QtGui/QPlainTextEdit>
#include
<QtGui/QTextEdit>
#include
<QtGui/QTextBlock>
#include
<QtGui/QTextCursor>
#include
<QtGui/QTextEdit>
using
namespace
FakeVim
::
Internal
;
...
...
@@ -281,7 +281,6 @@ FakeVimPlugin::~FakeVimPlugin()
delete
d
;
}
bool
FakeVimPlugin
::
initialize
(
const
QStringList
&
arguments
,
QString
*
error_message
)
{
return
d
->
initialize
(
arguments
,
error_message
);
...
...
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