Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Plasma Workspace
Manage
Activity
Members
Labels
Plan
Issues
55
Issue boards
Milestones
Wiki
Bugzilla
Code
Merge requests
146
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Plasma
Plasma Workspace
Commits
b2b1a4df
Commit
b2b1a4df
authored
9 years ago
by
Kai Uwe Broulik
🍇
Browse files
Options
Downloads
Patches
Plain Diff
Transfer global shortcut from old applet to new one
REVIEW: 124743 BUG: 351524 FIXED-IN: 5.4.0
parent
aaf5e46e
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
shell/alternativeshelper.cpp
+10
-1
10 additions, 1 deletion
shell/alternativeshelper.cpp
with
10 additions
and
1 deletion
shell/alternativeshelper.cpp
+
10
−
1
View file @
b2b1a4df
...
...
@@ -68,8 +68,17 @@ void AlternativesHelper::loadAlternative(const QString &plugin)
return
;
}
Plasma
::
Applet
*
newApplet
=
Q_NULLPTR
;
//TODO: map the position to containment coordinates
QMetaObject
::
invokeMethod
(
contItem
,
"createApplet"
,
Q_ARG
(
QString
,
plugin
),
Q_ARG
(
QVariantList
,
QVariantList
()),
Q_ARG
(
QPoint
,
appletItem
->
mapToItem
(
contItem
,
QPointF
(
0
,
0
)).
toPoint
()));
QMetaObject
::
invokeMethod
(
contItem
,
"createApplet"
,
Q_RETURN_ARG
(
Plasma
::
Applet
*
,
newApplet
),
Q_ARG
(
QString
,
plugin
),
Q_ARG
(
QVariantList
,
QVariantList
()),
Q_ARG
(
QPoint
,
appletItem
->
mapToItem
(
contItem
,
QPointF
(
0
,
0
)).
toPoint
()));
// ensure the global shortcut is moved to the new applet
const
QKeySequence
&
shortcut
=
m_applet
->
globalShortcut
();
m_applet
->
setGlobalShortcut
(
QKeySequence
());
// need to unmap the old one first
if
(
newApplet
)
{
newApplet
->
setGlobalShortcut
(
shortcut
);
}
m_applet
->
destroy
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment