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
Plasma
KScreenLocker
Commits
f81923d0
Commit
f81923d0
authored
May 13, 2021
by
David Edmundson
Browse files
Fix logind test
parent
e1153a3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
autotests/fakelogind.cpp
View file @
f81923d0
...
...
@@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
FakeLogind
::
FakeLogind
(
QObject
*
parent
)
:
QObject
(
parent
)
,
m_session
(
new
FakeLogindSession
(
QStringLiteral
(
"/org/freedesktop/login1/session/
_1
"
),
this
))
,
m_session
(
new
FakeLogindSession
(
QStringLiteral
(
"/org/freedesktop/login1/session/
auto
"
),
this
))
{
QDBusConnection
::
sessionBus
().
registerObject
(
QStringLiteral
(
"/org/freedesktop/login1"
),
this
,
QDBusConnection
::
ExportScriptableContents
);
QDBusConnection
::
sessionBus
().
registerService
(
QStringLiteral
(
"org.freedesktop.login1"
));
...
...
@@ -33,9 +33,9 @@ FakeLogind::~FakeLogind()
QDBusConnection
::
sessionBus
().
unregisterService
(
QStringLiteral
(
"org.freedesktop.login1"
));
}
QDBusObjectPath
FakeLogind
::
GetSession
ByPID
(
quint32
pid
)
QDBusObjectPath
FakeLogind
::
GetSession
(
const
QString
&
session
)
{
Q_UNUSED
(
pid
)
Q_UNUSED
(
session
)
return
QDBusObjectPath
(
m_session
->
path
());
}
...
...
autotests/fakelogind.h
View file @
f81923d0
...
...
@@ -39,7 +39,7 @@ public:
}
public
Q_SLOTS
:
Q_SCRIPTABLE
QDBusObjectPath
GetSession
ByPID
(
quint32
pid
);
Q_SCRIPTABLE
QDBusObjectPath
GetSession
(
const
QString
&
session
);
Q_SCRIPTABLE
void
lock
();
Q_SCRIPTABLE
void
unlock
();
...
...
Write
Preview
Supports
Markdown
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