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
e27f6884
Commit
e27f6884
authored
Jul 23, 2009
by
con
Browse files
Fix setting the mode keyboard shortcuts.
Broke with
61e468a8
.
parent
cf6d8d63
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/coreplugin/modemanager.cpp
View file @
e27f6884
...
@@ -147,11 +147,16 @@ void ModeManager::objectAdded(QObject *obj)
...
@@ -147,11 +147,16 @@ void ModeManager::objectAdded(QObject *obj)
m_modeShortcuts
.
insert
(
index
,
cmd
);
m_modeShortcuts
.
insert
(
index
,
cmd
);
connect
(
cmd
,
SIGNAL
(
keySequenceChanged
()),
this
,
SLOT
(
updateModeToolTip
()));
connect
(
cmd
,
SIGNAL
(
keySequenceChanged
()),
this
,
SLOT
(
updateModeToolTip
()));
for
(
int
i
=
0
;
i
<
m_modeShortcuts
.
size
();
++
i
)
{
for
(
int
i
=
0
;
i
<
m_modeShortcuts
.
size
();
++
i
)
{
Command
*
currentCmd
=
m_modeShortcuts
.
at
(
i
);
bool
currentlyHasDefaultSequence
=
(
currentCmd
->
keySequence
()
==
currentCmd
->
defaultKeySequence
());
#ifdef Q_WS_MAC
#ifdef Q_WS_MAC
m_modeShortcuts
.
at
(
i
)
->
setDefaultKeySequence
(
QKeySequence
(
QString
(
"Meta+%1"
).
arg
(
i
+
1
)));
currentCmd
->
setDefaultKeySequence
(
QKeySequence
(
QString
(
"Meta+%1"
).
arg
(
i
+
1
)));
#else
#else
m_modeShortcuts
.
at
(
i
)
->
setDefaultKeySequence
(
QKeySequence
(
QString
(
"Ctrl+%1"
).
arg
(
i
+
1
)));
currentCmd
->
setDefaultKeySequence
(
QKeySequence
(
QString
(
"Ctrl+%1"
).
arg
(
i
+
1
)));
#endif
#endif
if
(
currentlyHasDefaultSequence
)
currentCmd
->
setKeySequence
(
currentCmd
->
defaultKeySequence
());
}
}
m_signalMapper
->
setMapping
(
shortcut
,
mode
->
uniqueModeName
());
m_signalMapper
->
setMapping
(
shortcut
,
mode
->
uniqueModeName
());
...
...
Write
Preview
Supports
Markdown
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