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
Tobias Hunger
qt-creator
Commits
04b4fcb6
Commit
04b4fcb6
authored
Feb 12, 2010
by
hjk
Browse files
debugger: change capitalization of context menu action texts to Book Style
parent
221fc011
Changes
9
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/breakwindow.cpp
View file @
04b4fcb6
...
...
@@ -145,48 +145,56 @@ void BreakWindow::contextMenuEvent(QContextMenuEvent *ev)
const
int
rowCount
=
itemModel
->
rowCount
();
const
unsigned
engineCapabilities
=
m_manager
->
debuggerCapabilities
();
QAction
*
deleteAction
=
new
QAction
(
tr
(
"Delete
b
reakpoint"
),
&
menu
);
QAction
*
deleteAction
=
new
QAction
(
tr
(
"Delete
B
reakpoint"
),
&
menu
);
deleteAction
->
setEnabled
(
si
.
size
()
>
0
);
QAction
*
deleteAllAction
=
new
QAction
(
tr
(
"Delete
a
ll
b
reakpoints"
),
&
menu
);
QAction
*
deleteAllAction
=
new
QAction
(
tr
(
"Delete
A
ll
B
reakpoints"
),
&
menu
);
deleteAllAction
->
setEnabled
(
si
.
size
()
>
0
);
// Delete by file: Find ind
ex
es of breakpoints of the same file
// Delete by file: Find ind
ic
es of breakpoints of the same file
.
QAction
*
deleteByFileAction
=
0
;
QList
<
int
>
breakPointsOfFile
;
if
(
indexUnderMouse
.
isValid
())
{
const
QString
file
=
itemModel
->
data
(
indexUnderMouse
.
sibling
(
indexUnderMouse
.
row
(),
2
)).
toString
();
const
QModelIndex
index
=
indexUnderMouse
.
sibling
(
indexUnderMouse
.
row
(),
2
);
const
QString
file
=
itemModel
->
data
(
index
).
toString
();
if
(
!
file
.
isEmpty
())
{
for
(
int
i
=
0
;
i
<
rowCount
;
i
++
)
if
(
itemModel
->
data
(
itemModel
->
index
(
i
,
2
)).
toString
()
==
file
)
breakPointsOfFile
.
push_back
(
i
);
if
(
breakPointsOfFile
.
size
()
>
1
)
{
deleteByFileAction
=
new
QAction
(
tr
(
"Delete breakpoints of
\"
%1
\"
"
).
arg
(
file
),
&
menu
);
deleteByFileAction
=
new
QAction
(
tr
(
"Delete Breakpoints of
\"
%1
\"
"
).
arg
(
file
),
&
menu
);
deleteByFileAction
->
setEnabled
(
true
);
}
}
}
if
(
!
deleteByFileAction
)
{
deleteByFileAction
=
new
QAction
(
tr
(
"Delete
b
reakpoints of
f
ile"
),
&
menu
);
deleteByFileAction
=
new
QAction
(
tr
(
"Delete
B
reakpoints of
F
ile"
),
&
menu
);
deleteByFileAction
->
setEnabled
(
false
);
}
QAction
*
adjustColumnAction
=
new
QAction
(
tr
(
"Adjust column widths to contents"
),
&
menu
);
QAction
*
adjustColumnAction
=
new
QAction
(
tr
(
"Adjust Column Widths to Contents"
),
&
menu
);
QAction
*
alwaysAdjustAction
=
new
QAction
(
tr
(
"Always Adjust Column Widths to Contents"
),
&
menu
);
QAction
*
alwaysAdjustAction
=
new
QAction
(
tr
(
"Always adjust column widths to contents"
),
&
menu
);
alwaysAdjustAction
->
setCheckable
(
true
);
alwaysAdjustAction
->
setChecked
(
m_alwaysResizeColumnsToContents
);
QAction
*
editConditionAction
=
new
QAction
(
tr
(
"Edit condition..."
),
&
menu
);
QAction
*
editConditionAction
=
new
QAction
(
tr
(
"Edit Condition..."
),
&
menu
);
editConditionAction
->
setEnabled
(
si
.
size
()
>
0
);
QAction
*
synchronizeAction
=
new
QAction
(
tr
(
"Synchronize breakpoints"
),
&
menu
);
synchronizeAction
->
setEnabled
(
Debugger
::
DebuggerManager
::
instance
()
->
debuggerActionsEnabled
());
QAction
*
synchronizeAction
=
new
QAction
(
tr
(
"Synchronize Breakpoints"
),
&
menu
);
synchronizeAction
->
setEnabled
(
Debugger
::
DebuggerManager
::
instance
()
->
debuggerActionsEnabled
());
QModelIndex
idx0
=
(
si
.
size
()
?
si
.
front
()
:
QModelIndex
());
QModelIndex
idx2
=
idx0
.
sibling
(
idx0
.
row
(),
2
);
bool
enabled
=
si
.
isEmpty
()
||
itemModel
->
data
(
idx0
,
Qt
::
UserRole
).
toBool
();
const
QString
str5
=
enabled
?
tr
(
"Disable
b
reakpoint"
)
:
tr
(
"Enable
b
reakpoint"
);
const
QString
str5
=
enabled
?
tr
(
"Disable
B
reakpoint"
)
:
tr
(
"Enable
B
reakpoint"
);
QAction
*
toggleEnabledAction
=
new
QAction
(
str5
,
&
menu
);
toggleEnabledAction
->
setEnabled
(
si
.
size
()
>
0
);
...
...
src/plugins/debugger/debuggeroutputwindow.cpp
View file @
04b4fcb6
...
...
@@ -177,13 +177,13 @@ public:
{
setMaximumBlockCount
(
100000
);
m_clearContentsAction
=
new
QAction
(
this
);
m_clearContentsAction
->
setText
(
tr
(
"Clear
c
ontents"
));
m_clearContentsAction
->
setText
(
tr
(
"Clear
C
ontents"
));
m_clearContentsAction
->
setEnabled
(
true
);
connect
(
m_clearContentsAction
,
SIGNAL
(
triggered
(
bool
)),
parent
,
SLOT
(
clearContents
()));
m_saveContentsAction
=
new
QAction
(
this
);
m_saveContentsAction
->
setText
(
tr
(
"Save
c
ontents"
));
m_saveContentsAction
->
setText
(
tr
(
"Save
C
ontents"
));
m_saveContentsAction
->
setEnabled
(
true
);
}
...
...
src/plugins/debugger/moduleswindow.cpp
View file @
04b4fcb6
...
...
@@ -109,27 +109,27 @@ void ModulesWindow::contextMenuEvent(QContextMenuEvent *ev)
QMenu
menu
;
const
bool
enabled
=
Debugger
::
DebuggerManager
::
instance
()
->
debuggerActionsEnabled
();
const
unsigned
capabilities
=
Debugger
::
DebuggerManager
::
instance
()
->
debuggerCapabilities
();
QAction
*
act0
=
new
QAction
(
tr
(
"Update
m
odule
l
ist"
),
&
menu
);
QAction
*
act0
=
new
QAction
(
tr
(
"Update
M
odule
L
ist"
),
&
menu
);
act0
->
setEnabled
(
enabled
&&
(
capabilities
&
ReloadModuleCapability
));
QAction
*
act3
=
new
QAction
(
tr
(
"Show
s
ource
f
iles for
m
odule
\"
%1
\"
"
).
arg
(
name
),
&
menu
);
QAction
*
act3
=
new
QAction
(
tr
(
"Show
S
ource
F
iles for
M
odule
\"
%1
\"
"
).
arg
(
name
),
&
menu
);
act3
->
setEnabled
(
enabled
&&
(
capabilities
&
ReloadModuleCapability
));
QAction
*
act4
=
new
QAction
(
tr
(
"Load
s
ymbols for
a
ll
m
odules"
),
&
menu
);
QAction
*
act4
=
new
QAction
(
tr
(
"Load
S
ymbols for
A
ll
M
odules"
),
&
menu
);
act4
->
setEnabled
(
enabled
&&
(
capabilities
&
ReloadModuleSymbolsCapability
));
QAction
*
act5
=
0
;
QAction
*
act6
=
0
;
QAction
*
act7
=
0
;
if
(
name
.
isEmpty
())
{
act5
=
new
QAction
(
tr
(
"Load
s
ymbols for
m
odule"
),
&
menu
);
act5
=
new
QAction
(
tr
(
"Load
S
ymbols for
M
odule"
),
&
menu
);
act5
->
setEnabled
(
false
);
act6
=
new
QAction
(
tr
(
"Edit
f
ile"
),
&
menu
);
act6
=
new
QAction
(
tr
(
"Edit
F
ile"
),
&
menu
);
act6
->
setEnabled
(
false
);
act7
=
new
QAction
(
tr
(
"Show
s
ymbols"
),
&
menu
);
act7
=
new
QAction
(
tr
(
"Show
S
ymbols"
),
&
menu
);
act7
->
setEnabled
(
false
);
}
else
{
act5
=
new
QAction
(
tr
(
"Load
s
ymbols for
m
odule
\"
%1
\"
"
).
arg
(
name
),
&
menu
);
act5
=
new
QAction
(
tr
(
"Load
S
ymbols for
M
odule
\"
%1
\"
"
).
arg
(
name
),
&
menu
);
act5
->
setEnabled
(
capabilities
&
ReloadModuleSymbolsCapability
);
act6
=
new
QAction
(
tr
(
"Edit
f
ile
\"
%1
\"
"
).
arg
(
name
),
&
menu
);
act7
=
new
QAction
(
tr
(
"Show
s
ymbols in
f
ile
\"
%1
\"
"
).
arg
(
name
),
&
menu
);
act6
=
new
QAction
(
tr
(
"Edit
F
ile
\"
%1
\"
"
).
arg
(
name
),
&
menu
);
act7
=
new
QAction
(
tr
(
"Show
S
ymbols in
F
ile
\"
%1
\"
"
).
arg
(
name
),
&
menu
);
}
menu
.
addAction
(
act0
);
...
...
@@ -139,9 +139,9 @@ void ModulesWindow::contextMenuEvent(QContextMenuEvent *ev)
menu
.
addAction
(
act7
);
menu
.
addSeparator
();
QAction
*
actAdjustColumnWidths
=
menu
.
addAction
(
tr
(
"Adjust
c
olumn
w
idths to
c
ontents"
));
menu
.
addAction
(
tr
(
"Adjust
C
olumn
W
idths to
C
ontents"
));
QAction
*
actAlwaysAdjustColumnWidth
=
menu
.
addAction
(
tr
(
"Always
a
djust
c
olumn
w
idths to
c
ontents"
));
menu
.
addAction
(
tr
(
"Always
A
djust
C
olumn
W
idths to
C
ontents"
));
actAlwaysAdjustColumnWidth
->
setCheckable
(
true
);
actAlwaysAdjustColumnWidth
->
setChecked
(
m_alwaysResizeColumnsToContents
);
menu
.
addSeparator
();
...
...
src/plugins/debugger/registerwindow.cpp
View file @
04b4fcb6
...
...
@@ -168,7 +168,7 @@ void RegisterWindow::contextMenuEvent(QContextMenuEvent *ev)
const
unsigned
engineCapabilities
=
m_manager
->
debuggerCapabilities
();
const
bool
actionsEnabled
=
m_manager
->
debuggerActionsEnabled
();
QAction
*
actReload
=
menu
.
addAction
(
tr
(
"Reload
r
egister
l
isting"
));
QAction
*
actReload
=
menu
.
addAction
(
tr
(
"Reload
R
egister
L
isting"
));
actReload
->
setEnabled
((
engineCapabilities
&
RegisterCapability
)
&&
(
m_manager
->
state
()
==
InferiorStopped
||
m_manager
->
state
()
==
InferiorUnrunnable
));
...
...
@@ -179,10 +179,10 @@ void RegisterWindow::contextMenuEvent(QContextMenuEvent *ev)
QString
address
=
model
()
->
data
(
idx
,
RegisterAddressRole
).
toString
();
QAction
*
actShowMemory
=
menu
.
addAction
(
QString
());
if
(
address
.
isEmpty
())
{
actShowMemory
->
setText
(
tr
(
"Open
m
emory
e
ditor"
));
actShowMemory
->
setText
(
tr
(
"Open
M
emory
E
ditor"
));
actShowMemory
->
setEnabled
(
false
);
}
else
{
actShowMemory
->
setText
(
tr
(
"Open
m
emory
e
ditor at %1"
).
arg
(
address
));
actShowMemory
->
setText
(
tr
(
"Open
M
emory
E
ditor at %1"
).
arg
(
address
));
actShowMemory
->
setEnabled
(
actionsEnabled
&&
(
engineCapabilities
&
ShowMemoryCapability
));
}
...
...
@@ -203,9 +203,9 @@ void RegisterWindow::contextMenuEvent(QContextMenuEvent *ev)
act2
->
setChecked
(
base
==
2
);
menu
.
addSeparator
();
QAction
*
actAdjust
=
menu
.
addAction
(
tr
(
"Adjust
c
olumn
w
idths to
c
ontents"
));
QAction
*
actAdjust
=
menu
.
addAction
(
tr
(
"Adjust
C
olumn
W
idths to
C
ontents"
));
QAction
*
actAlwaysAdjust
=
menu
.
addAction
(
tr
(
"Always
a
djust
c
olumn
w
idths to
c
ontents"
));
menu
.
addAction
(
tr
(
"Always
A
djust
C
olumn
W
idths to
C
ontents"
));
actAlwaysAdjust
->
setCheckable
(
true
);
actAlwaysAdjust
->
setChecked
(
m_alwaysResizeColumnsToContents
);
menu
.
addSeparator
();
...
...
src/plugins/debugger/snapshotwindow.cpp
View file @
04b4fcb6
...
...
@@ -138,10 +138,10 @@ void SnapshotWindow::contextMenuEvent(QContextMenuEvent *ev)
QMenu
menu
;
QAction
*
actAdjust
=
menu
.
addAction
(
tr
(
"Adjust
c
olumn
w
idths to
c
ontents"
));
QAction
*
actAdjust
=
menu
.
addAction
(
tr
(
"Adjust
C
olumn
W
idths to
C
ontents"
));
QAction
*
actAlwaysAdjust
=
menu
.
addAction
(
tr
(
"Always
a
djust
c
olumn
w
idths to
c
ontents"
));
menu
.
addAction
(
tr
(
"Always
A
djust
C
olumn
W
idths to
C
ontents"
));
actAlwaysAdjust
->
setCheckable
(
true
);
actAlwaysAdjust
->
setChecked
(
m_alwaysResizeColumnsToContents
);
...
...
src/plugins/debugger/sourcefileswindow.cpp
View file @
04b4fcb6
...
...
@@ -196,15 +196,15 @@ void SourceFilesWindow::contextMenuEvent(QContextMenuEvent *ev)
QString
name
=
model
()
->
data
(
index
).
toString
();
QMenu
menu
;
QAction
*
act1
=
new
QAction
(
tr
(
"Reload
d
ata"
),
&
menu
);
QAction
*
act1
=
new
QAction
(
tr
(
"Reload
D
ata"
),
&
menu
);
act1
->
setEnabled
(
Debugger
::
DebuggerManager
::
instance
()
->
debuggerActionsEnabled
());
//act1->setCheckable(true);
QAction
*
act2
=
0
;
if
(
name
.
isEmpty
())
{
act2
=
new
QAction
(
tr
(
"Open
f
ile"
),
&
menu
);
act2
=
new
QAction
(
tr
(
"Open
F
ile"
),
&
menu
);
act2
->
setEnabled
(
false
);
}
else
{
act2
=
new
QAction
(
tr
(
"Open
f
ile
\"
%1
\"
'"
).
arg
(
name
),
&
menu
);
act2
=
new
QAction
(
tr
(
"Open
F
ile
\"
%1
\"
'"
).
arg
(
name
),
&
menu
);
act2
->
setEnabled
(
true
);
}
...
...
src/plugins/debugger/stackwindow.cpp
View file @
04b4fcb6
...
...
@@ -107,16 +107,16 @@ void StackWindow::contextMenuEvent(QContextMenuEvent *ev)
actShowMemory
->
setText
(
tr
(
"Open memory editor"
));
actShowMemory
->
setEnabled
(
false
);
}
else
{
actShowMemory
->
setText
(
tr
(
"Open
m
emory
e
ditor at %1"
).
arg
(
address
));
actShowMemory
->
setText
(
tr
(
"Open
M
emory
E
ditor at %1"
).
arg
(
address
));
actShowMemory
->
setEnabled
(
engineCapabilities
&
ShowMemoryCapability
);
}
QAction
*
actShowDisassembler
=
menu
.
addAction
(
QString
());
if
(
address
.
isEmpty
())
{
actShowDisassembler
->
setText
(
tr
(
"Open
d
isassembler"
));
actShowDisassembler
->
setText
(
tr
(
"Open
D
isassembler"
));
actShowDisassembler
->
setEnabled
(
false
);
}
else
{
actShowDisassembler
->
setText
(
tr
(
"Open
d
isassembler at %1"
).
arg
(
address
));
actShowDisassembler
->
setText
(
tr
(
"Open
D
isassembler at %1"
).
arg
(
address
));
actShowDisassembler
->
setEnabled
(
engineCapabilities
&
DisassemblerCapability
);
}
...
...
@@ -126,10 +126,10 @@ void StackWindow::contextMenuEvent(QContextMenuEvent *ev)
#endif
menu
.
addAction
(
theDebuggerAction
(
UseAddressInStackView
));
QAction
*
actAdjust
=
menu
.
addAction
(
tr
(
"Adjust
c
olumn
w
idths to
c
ontents"
));
QAction
*
actAdjust
=
menu
.
addAction
(
tr
(
"Adjust
C
olumn
W
idths to
C
ontents"
));
QAction
*
actAlwaysAdjust
=
menu
.
addAction
(
tr
(
"Always
a
djust
c
olumn
w
idths to
c
ontents"
));
menu
.
addAction
(
tr
(
"Always
A
djust
C
olumn
W
idths to
C
ontents"
));
actAlwaysAdjust
->
setCheckable
(
true
);
actAlwaysAdjust
->
setChecked
(
m_alwaysResizeColumnsToContents
);
...
...
src/plugins/debugger/threadswindow.cpp
View file @
04b4fcb6
...
...
@@ -64,8 +64,10 @@ void ThreadsWindow::rowActivated(const QModelIndex &index)
void
ThreadsWindow
::
contextMenuEvent
(
QContextMenuEvent
*
ev
)
{
QMenu
menu
;
QAction
*
adjustColumnAction
=
menu
.
addAction
(
tr
(
"Adjust column widths to contents"
));
QAction
*
alwaysAdjustColumnAction
=
menu
.
addAction
(
tr
(
"Always adjust column widths to contents"
));
QAction
*
adjustColumnAction
=
menu
.
addAction
(
tr
(
"Adjust Column Widths to Contents"
));
QAction
*
alwaysAdjustColumnAction
=
menu
.
addAction
(
tr
(
"Always Adjust Column Widths to Contents"
));
alwaysAdjustColumnAction
->
setCheckable
(
true
);
alwaysAdjustColumnAction
->
setChecked
(
m_alwaysResizeColumnsToContents
);
menu
.
addSeparator
();
...
...
src/plugins/debugger/watchwindow.cpp
View file @
04b4fcb6
...
...
@@ -223,8 +223,8 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
QList
<
QAction
*>
individualFormatActions
;
QAction
*
clearIndividualFormatAction
=
0
;
if
(
idx
.
isValid
())
{
typeFormatMenu
.
setTitle
(
tr
(
"Change
f
ormat for
t
ype '%1'"
).
arg
(
type
));
individualFormatMenu
.
setTitle
(
tr
(
"Change
f
ormat for
e
xpression '%1'"
).
arg
(
exp
));
typeFormatMenu
.
setTitle
(
tr
(
"Change
F
ormat for
T
ype '%1'"
).
arg
(
type
));
individualFormatMenu
.
setTitle
(
tr
(
"Change
F
ormat for
E
xpression '%1'"
).
arg
(
exp
));
if
(
alternativeFormats
.
isEmpty
())
{
typeFormatMenu
.
setEnabled
(
false
);
individualFormatMenu
.
setEnabled
(
false
);
...
...
@@ -257,19 +257,19 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
QMenu
menu
;
QAction
*
actInsertNewWatchItem
=
menu
.
addAction
(
tr
(
"Insert
n
ew
w
atch
i
tem"
));
QAction
*
actSelectWidgetToWatch
=
menu
.
addAction
(
tr
(
"Select
w
idget to
w
atch"
));
QAction
*
actInsertNewWatchItem
=
menu
.
addAction
(
tr
(
"Insert
N
ew
W
atch
I
tem"
));
QAction
*
actSelectWidgetToWatch
=
menu
.
addAction
(
tr
(
"Select
W
idget to
W
atch"
));
const
bool
actionsEnabled
=
m_manager
->
debuggerActionsEnabled
();
const
unsigned
engineCapabilities
=
m_manager
->
debuggerCapabilities
();
const
QString
address
=
model
()
->
data
(
mi0
,
AddressRole
).
toString
();
QAction
*
actWatchKnownMemory
=
0
;
QAction
*
actWatchUnknownMemory
=
new
QAction
(
tr
(
"Open
m
emory
e
ditor..."
),
&
menu
);
QAction
*
actWatchUnknownMemory
=
new
QAction
(
tr
(
"Open
M
emory
E
ditor..."
),
&
menu
);
const
bool
canShowMemory
=
engineCapabilities
&
ShowMemoryCapability
;
actWatchUnknownMemory
->
setEnabled
(
actionsEnabled
&&
canShowMemory
);
if
(
canShowMemory
&&
!
address
.
isEmpty
())
actWatchKnownMemory
=
new
QAction
(
tr
(
"Open
m
emory
e
ditor at %1"
).
arg
(
address
),
&
menu
);
actWatchKnownMemory
=
new
QAction
(
tr
(
"Open
M
emory
E
ditor at %1"
).
arg
(
address
),
&
menu
);
menu
.
addSeparator
();
QAction
*
actWatchOrRemove
;
...
...
@@ -293,7 +293,7 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
menu
.
addAction
(
theDebuggerAction
(
RecheckDebuggingHelpers
));
menu
.
addAction
(
theDebuggerAction
(
UseDebuggingHelpers
));
QAction
*
actClearCodeModelSnapshot
=
new
QAction
(
tr
(
"Refresh
c
ode
m
odel
s
napshot"
),
&
menu
);
QAction
*
actClearCodeModelSnapshot
=
new
QAction
(
tr
(
"Refresh
C
ode
M
odel
S
napshot"
),
&
menu
);
actClearCodeModelSnapshot
->
setEnabled
(
actionsEnabled
&&
theDebuggerAction
(
UseCodeModel
)
->
isChecked
());
menu
.
addAction
(
actClearCodeModelSnapshot
);
menu
.
addSeparator
();
...
...
@@ -304,9 +304,9 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
menu
.
addAction
(
theDebuggerAction
(
ShowQtNamespace
));
QAction
*
actAdjustColumnWidths
=
menu
.
addAction
(
tr
(
"Adjust
c
olumn
w
idths to
c
ontents"
));
menu
.
addAction
(
tr
(
"Adjust
C
olumn
W
idths to
C
ontents"
));
QAction
*
actAlwaysAdjustColumnWidth
=
menu
.
addAction
(
tr
(
"Always
a
djust
c
olumn
w
idths to
c
ontents"
));
menu
.
addAction
(
tr
(
"Always
A
djust
C
olumn
W
idths to
C
ontents"
));
actAlwaysAdjustColumnWidth
->
setCheckable
(
true
);
actAlwaysAdjustColumnWidth
->
setChecked
(
m_alwaysResizeColumnsToContents
);
...
...
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