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 Desktop
Commits
fc13ffb8
Commit
fc13ffb8
authored
Apr 21, 2022
by
Volker Krause
Browse files
Port away from deprecated KDeclarative API
parent
94c0c3c2
Pipeline
#166897
passed with stage
in 7 minutes and 53 seconds
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
kcms/mouse/kcm/libinput/libinput_config.cpp
View file @
fc13ffb8
...
...
@@ -8,6 +8,7 @@
#include
"../configcontainer.h"
#include
<KAboutData>
#include
<KLocalizedContext>
#include
<KLocalizedString>
#include
<KMessageWidget>
#include
<kdeclarative/kdeclarative.h>
...
...
@@ -65,10 +66,8 @@ LibinputConfig::LibinputConfig(ConfigContainer *parent, InputBackend *backend)
m_view
->
rootContext
()
->
setContextProperty
(
"backend"
,
m_backend
);
m_view
->
rootContext
()
->
setContextProperty
(
"deviceModel"
,
getDeviceList
(
m_backend
));
KDeclarative
::
KDeclarative
kdeclarative
;
kdeclarative
.
setupEngine
(
m_view
->
engine
());
// This is a new engine
kdeclarative
.
setDeclarativeEngine
(
m_view
->
engine
());
kdeclarative
.
setupContext
();
KDeclarative
::
KDeclarative
::
setupEngine
(
m_view
->
engine
());
// This is a new engine
m_view
->
engine
()
->
rootContext
()
->
setContextObject
(
new
KLocalizedContext
(
m_view
->
engine
()));
if
(
m_backend
->
mode
()
==
InputBackendMode
::
XLibinput
)
{
m_view
->
setSource
(
QUrl
(
QStringLiteral
(
"qrc:/libinput/main_deviceless.qml"
)));
...
...
kcms/touchpad/kcm/libinput/touchpadconfiglibinput.cpp
View file @
fc13ffb8
...
...
@@ -7,6 +7,7 @@
#include
"touchpadconfiglibinput.h"
#include
<KAboutData>
#include
<KLocalizedContext>
#include
<KLocalizedString>
#include
<kdeclarative/kdeclarative.h>
...
...
@@ -55,9 +56,8 @@ TouchpadConfigLibinput::TouchpadConfigLibinput(TouchpadConfigContainer *parent,
qmlRegisterSingletonInstance
(
"org.kde.touchpad.kcm"
,
1
,
0
,
"TouchpadConfig"
,
this
);
KDeclarative
::
KDeclarative
kdeclarative
;
kdeclarative
.
setDeclarativeEngine
(
m_view
->
engine
());
kdeclarative
.
setupBindings
();
KDeclarative
::
KDeclarative
::
setupEngine
(
m_view
->
engine
());
m_view
->
engine
()
->
rootContext
()
->
setContextObject
(
new
KLocalizedContext
(
m_view
->
engine
()));
m_view
->
setSource
(
QUrl
(
"qrc:/libinput/touchpad.qml"
));
if
(
m_initError
)
{
...
...
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