Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Plasma Desktop
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dan Leinir Turthra Jensen
Plasma Desktop
Commits
886aefd6
Commit
886aefd6
authored
Jun 25, 2020
by
Nate Graham
🔩
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Plasma/5.19'
parents
5edb4fc9
b460e5b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
kcms/keys/shortcutsmodel.cpp
kcms/keys/shortcutsmodel.cpp
+7
-6
No files found.
kcms/keys/shortcutsmodel.cpp
View file @
886aefd6
...
...
@@ -147,13 +147,14 @@ Component ShortcutsModel::loadComponent(const QList<KGlobalShortcutInfo> &info)
void
ShortcutsModel
::
save
()
{
for
(
auto
&
component
:
m_components
)
{
if
(
component
.
pendingDeletion
)
{
removeComponent
(
component
);
for
(
auto
it
=
m_components
.
rbegin
();
it
!=
m_components
.
rend
();
++
it
)
{
if
(
it
->
pendingDeletion
)
{
removeComponent
(
*
it
);
continue
;
}
for
(
auto
&
shortcut
:
component
.
shortcuts
)
{
for
(
auto
&
shortcut
:
it
->
shortcuts
)
{
if
(
shortcut
.
initialShortcuts
!=
shortcut
.
activeShortcuts
)
{
const
QStringList
actionId
=
buildActionId
(
component
.
uniqueName
,
component
.
friendlyName
,
const
QStringList
actionId
=
buildActionId
(
it
->
uniqueName
,
it
->
friendlyName
,
shortcut
.
uniqueName
,
shortcut
.
friendlyName
);
//operator int of QKeySequence
QList
<
int
>
keys
(
shortcut
.
activeShortcuts
.
cbegin
(),
shortcut
.
activeShortcuts
.
cend
());
...
...
@@ -166,7 +167,7 @@ void ShortcutsModel::save()
qCCritical
(
KCMKEYS
)
<<
reply
.
error
().
name
()
<<
reply
.
error
().
message
();
}
emit
errorOccured
(
i18nc
(
"%1 is the name of the component, %2 is the action for which saving failed"
,
"Error while saving shortcut %1: %2"
,
component
.
friendlyName
,
shortcut
.
friendlyName
));
"Error while saving shortcut %1: %2"
,
it
->
friendlyName
,
shortcut
.
friendlyName
));
}
else
{
shortcut
.
initialShortcuts
=
shortcut
.
activeShortcuts
;
}
...
...
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