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
Network
Konversation
Commits
178389ed
Commit
178389ed
authored
Jun 26, 2021
by
Ahmad Samir
Browse files
Port away from deprecated KShortcutsDialog::configure() method
parent
32499da0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/mainwindow.cpp
View file @
178389ed
...
...
@@ -818,16 +818,21 @@ void MainWindow::openKeyBindings()
actionCollection
()
->
action
(
QStringLiteral
(
"open_logfile"
))
->
setText
(
i18n
(
"&Open Logfile"
));
// Open shortcut configuration dialog.
KShortcutsDialog
::
configure
(
actionCollection
());
// Reset action names.
actionCollection
()
->
action
(
QStringLiteral
(
"tab_notifications"
))
->
setText
(
i18n
(
"Enable Notifications"
));
actionCollection
()
->
action
(
QStringLiteral
(
"toggle_away"
))
->
setText
(
i18n
(
"Set &Away Globally"
));
actionCollection
()
->
action
(
QStringLiteral
(
"irc_colors"
))
->
setText
(
i18n
(
"&IRC Color..."
));
actionCollection
()
->
action
(
QStringLiteral
(
"insert_character"
))
->
setText
(
i18n
(
"Special &Character..."
));
actionCollection
()
->
action
(
QStringLiteral
(
"insert_marker_line"
))
->
setText
(
i18n
(
"&Marker Line"
));
actionCollection
()
->
action
(
QStringLiteral
(
"open_channel_list"
))
->
setText
(
openChannelListString
);
actionCollection
()
->
action
(
QStringLiteral
(
"open_logfile"
))
->
setText
(
openLogFileString
);
auto
*
dlg
=
new
KShortcutsDialog
(
KShortcutsEditor
::
AllActions
,
KShortcutsEditor
::
LetterShortcutsAllowed
,
this
);
dlg
->
setAttribute
(
Qt
::
WA_DeleteOnClose
);
dlg
->
addCollection
(
actionCollection
());
connect
(
dlg
,
&
QDialog
::
finished
,
this
,
[
this
,
openChannelListString
,
openLogFileString
]()
{
// Reset action names.
actionCollection
()
->
action
(
QStringLiteral
(
"tab_notifications"
))
->
setText
(
i18n
(
"Enable Notifications"
));
actionCollection
()
->
action
(
QStringLiteral
(
"toggle_away"
))
->
setText
(
i18n
(
"Set &Away Globally"
));
actionCollection
()
->
action
(
QStringLiteral
(
"irc_colors"
))
->
setText
(
i18n
(
"&IRC Color..."
));
actionCollection
()
->
action
(
QStringLiteral
(
"insert_character"
))
->
setText
(
i18n
(
"Special &Character..."
));
actionCollection
()
->
action
(
QStringLiteral
(
"insert_marker_line"
))
->
setText
(
i18n
(
"&Marker Line"
));
actionCollection
()
->
action
(
QStringLiteral
(
"open_channel_list"
))
->
setText
(
openChannelListString
);
actionCollection
()
->
action
(
QStringLiteral
(
"open_logfile"
))
->
setText
(
openLogFileString
);
});
dlg
->
configure
(
true
/* save settings */
);
}
void
MainWindow
::
openServerList
()
...
...
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