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
Plasma
Plasma Workspace
Commits
dbc2488f
Commit
dbc2488f
authored
Apr 09, 2022
by
Martin Seher
Browse files
use createMethodCall instead of QDBusInterface
parent
fc4c89c6
Pipeline
#162110
passed with stage
in 7 minutes and 50 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
krunner/view.cpp
View file @
dbc2488f
...
...
@@ -215,11 +215,8 @@ void View::positionOnScreen()
QScreen
*
shownOnScreen
=
QGuiApplication
::
primaryScreen
();
QDBusReply
<
QString
>
reply
;
QDBusInterface
kwin
(
"org.kde.KWin"
,
"/KWin"
);
if
(
kwin
.
isValid
())
reply
=
kwin
.
call
(
"activeOutputName"
);
auto
message
=
QDBusMessage
::
createMethodCall
(
"org.kde.KWin"
,
"/KWin"
,
"org.kde.KWin"
,
"activeOutputName"
);
QDBusReply
<
QString
>
reply
=
QDBusConnection
::
sessionBus
().
call
(
message
);
const
auto
screens
=
QGuiApplication
::
screens
();
for
(
QScreen
*
screen
:
screens
)
{
...
...
@@ -237,7 +234,7 @@ void View::positionOnScreen()
// in wayland, QScreen::availableGeometry() returns QScreen::geometry()
// we could get a better value from plasmashell
// BUG: 386114
auto
message
=
QDBusMessage
::
createMethodCall
(
"org.kde.plasmashell"
,
"/StrutManager"
,
"org.kde.PlasmaShell.StrutManager"
,
"availableScreenRect"
);
message
=
QDBusMessage
::
createMethodCall
(
"org.kde.plasmashell"
,
"/StrutManager"
,
"org.kde.PlasmaShell.StrutManager"
,
"availableScreenRect"
);
message
.
setArguments
({
shownOnScreen
->
name
()});
QDBusPendingCall
call
=
QDBusConnection
::
sessionBus
().
asyncCall
(
message
);
QDBusPendingCallWatcher
*
watcher
=
new
QDBusPendingCallWatcher
(
call
,
this
);
...
...
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