Merge lp:~mterry/unity8/set-real-name into lp:unity8

Proposed by Michael Terry
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 2309
Merged at revision: 2315
Proposed branch: lp:~mterry/unity8/set-real-name
Merge into: lp:unity8
Diff against target: 330 lines (+146/-30)
8 files modified
plugins/AccountsService/AccountsServiceDBusAdaptor.cpp (+12/-2)
tests/plugins/AccountsService/CMakeLists.txt (+2/-1)
tests/plugins/AccountsService/PropertiesServer.cpp (+36/-7)
tests/plugins/AccountsService/PropertiesServer.h (+7/-0)
tests/plugins/AccountsService/client.cpp (+46/-12)
tests/plugins/AccountsService/interfaces.xml (+13/-0)
tests/plugins/AccountsService/types.h (+25/-0)
tests/plugins/IntegratedLightDM/integrated.cpp (+5/-8)
To merge this branch: bzr merge lp:~mterry/unity8/set-real-name
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing
Albert Astals Cid (community) Approve
Review via email: mp+289973@code.launchpad.net

This proposal supersedes a proposal from 2016-03-16.

Commit message

Fix OOBE wizard not setting your name.

Description of the change

Fix how we set some standard properties of AccountsService (like Email and RealName).

AS does not let you set those properties directly. You must call SetEmail or SetRealName.

I've modified our DBus wrapper to notice such sets and use the right call. I've also updated our test suite to match and added a new test for SetRealName.

= To reproduce =

- Use tablet mode
- Go through the wizard, setting name

When done with wizard, your name should be above the greeter password field, instead of "Ubuntu"

= Checklist =

 * Are there any related MPs required for this MP to build/function as expected? Please list.
 No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
 Yes

 * Did you make sure that your branch does not contain spurious tags?
 Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
 NA

 * If you changed the UI, has there been a design review?
 NA

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

The diff looks weird, i guess launchpad got confused by the prereq? Maybe put this as Work in Progress until the prereq silo lands?

Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal
Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

The code from commit 2297 looks good but i'm afraid you will need to rework this branch since even if i download the current lp:~ci-train-bot/unity8/unity8-ubuntu-xenial-landing-041 and then merge this branch in, i get conflicts, i guess because lp:~ci-train-bot/unity8/unity8-ubuntu-xenial-landing-041 has been changing with time.

So half-approving

review: Approve (code looks good, branch may need rework)
Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

OK good point, I'll mark this WIP until we land one of the silos we're waiting on.

Revision history for this message
Michael Terry (mterry) wrote :

OK, Albert. Rebased on trunk, should be good to go.

lp:~mterry/unity8/set-real-name updated
2308. By Michael Terry

Add missing file

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
MichaƂ Sawicz (saviq) wrote :

The following tests FAILED:
   4 - testGreeterIntegrated (Failed)

Revision history for this message
Albert Astals Cid (aacid) wrote :

As saviq says

4: Test command: /usr/bin/dbus-test-runner "--task" "/home/tsdgeos_work/phablet/unity8/set-real-name/builddir/tests/plugins/AccountsService/mock-server" "--task-name" "server" "--ignore-return" "--task" "/home/tsdgeos_work/phablet/unity8/set-real-name/builddir/tests/plugins/IntegratedLightDM/GreeterIntegratedTestExec" "--task-name" "client" "--wait-for" "org.freedesktop.Accounts" "--parameter" "-o" "--parameter" "/home/tsdgeos_work/phablet/unity8/set-real-name/builddir/tests/plugins/IntegratedLightDM/testGreeterIntegrated.xml,xunitxml" "--parameter" "-o" "--parameter" "-,txt"
4: Test timeout computed to be: 1500
4: DBus daemon: unix:abstract=/tmp/dbus-eV1QCIrOHY,guid=5ecedd4735815462e11add7356f3b0f5
4: server: Started with PID: 4405
4: client: Started with PID: 4410
4: client: ********* Start testing of GreeterIntegratedTest *********
4: client: Config: Using QtTest library 5.5.1, Qt 5.5.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 5.3.1 20160225)
4: client: PASS : GreeterIntegratedTest::initTestCase()
4: client: FAIL! : GreeterIntegratedTest::testWatchRealName() 'reply.isValid()' returned FALSE. ()
4: client: Loc: [/home/tsdgeos_work/phablet/unity8/set-real-name/tests/plugins/IntegratedLightDM/integrated.cpp(77)]
4: client: PASS : GreeterIntegratedTest::cleanupTestCase()
4: client: Totals: 2 passed, 1 failed, 0 skipped, 0 blacklisted
4: client: ********* Finished testing of GreeterIntegratedTest *********
4: client: Exited with status 256
4: server: Shutting down
4: client: Shutting down
4: DBus daemon: Shutdown
 4/23 Test #4: testGreeterIntegrated ............***Failed 0.05 sec

review: Needs Fixing
lp:~mterry/unity8/set-real-name updated
2309. By Michael Terry

Fix integrated test

Revision history for this message
Michael Terry (mterry) wrote :

Fixed, thanks.

Revision history for this message
Albert Astals Cid (aacid) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Yes

 * Did CI run pass?
Borked CI

 * Did you make sure that the branch does not contain spurious tags?
Yes

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/AccountsService/AccountsServiceDBusAdaptor.cpp'
--- plugins/AccountsService/AccountsServiceDBusAdaptor.cpp 2016-02-16 14:12:58 +0000
+++ plugins/AccountsService/AccountsServiceDBusAdaptor.cpp 2016-03-24 13:27:20 +0000
@@ -57,8 +57,18 @@
57{57{
58 QDBusInterface *iface = getUserInterface(user);58 QDBusInterface *iface = getUserInterface(user);
59 if (iface != nullptr && iface->isValid()) {59 if (iface != nullptr && iface->isValid()) {
60 // The value needs to be carefully wrapped60 if (interface == QStringLiteral("org.freedesktop.Accounts.User")) {
61 return iface->asyncCall(QStringLiteral("Set"), interface, property, QVariant::fromValue(QDBusVariant(value)));61 // Standard AccountsService properties use special set methods.
62 // It will not let you use the usual DBus property setters.
63 QDBusInterface accountsIface(iface->service(),
64 iface->path(),
65 interface,
66 iface->connection());
67 return accountsIface.asyncCall(QStringLiteral("Set") + property, value);
68 } else {
69 // The value needs to be carefully wrapped
70 return iface->asyncCall(QStringLiteral("Set"), interface, property, QVariant::fromValue(QDBusVariant(value)));
71 }
62 }72 }
63 return QDBusPendingCall::fromCompletedCall(QDBusMessage::createError(QDBusError::Other, QStringLiteral("Invalid Interface")));73 return QDBusPendingCall::fromCompletedCall(QDBusMessage::createError(QDBusError::Other, QStringLiteral("Invalid Interface")));
64}74}
6575
=== modified file 'tests/plugins/AccountsService/CMakeLists.txt'
--- tests/plugins/AccountsService/CMakeLists.txt 2016-02-25 10:57:17 +0000
+++ tests/plugins/AccountsService/CMakeLists.txt 2016-03-24 13:27:20 +0000
@@ -5,7 +5,7 @@
5endif()5endif()
6macro(make_dbus_class NAME INTERFACE)6macro(make_dbus_class NAME INTERFACE)
7 if(${CMAKE_CURRENT_SOURCE_DIR}/interfaces.xml IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/${NAME}Adaptor.h)7 if(${CMAKE_CURRENT_SOURCE_DIR}/interfaces.xml IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/${NAME}Adaptor.h)
8 execute_process(COMMAND ${QDBUSXML2CPP_EXECUTABLE} -c ${NAME}Adaptor -a ${CMAKE_CURRENT_BINARY_DIR}/${NAME}Adaptor ${CMAKE_CURRENT_SOURCE_DIR}/interfaces.xml ${INTERFACE})8 execute_process(COMMAND ${QDBUSXML2CPP_EXECUTABLE} -c ${NAME}Adaptor -i types.h -a ${CMAKE_CURRENT_BINARY_DIR}/${NAME}Adaptor ${CMAKE_CURRENT_SOURCE_DIR}/interfaces.xml ${INTERFACE})
9 endif()9 endif()
10endmacro(make_dbus_class)10endmacro(make_dbus_class)
1111
@@ -20,6 +20,7 @@
2020
21include_directories(21include_directories(
22 ${CMAKE_CURRENT_BINARY_DIR}22 ${CMAKE_CURRENT_BINARY_DIR}
23 ${CMAKE_CURRENT_SOURCE_DIR}
23 ${CMAKE_SOURCE_DIR}/plugins/AccountsService24 ${CMAKE_SOURCE_DIR}/plugins/AccountsService
24 )25 )
2526
2627
=== modified file 'tests/plugins/AccountsService/PropertiesServer.cpp'
--- tests/plugins/AccountsService/PropertiesServer.cpp 2016-03-23 09:50:10 +0000
+++ tests/plugins/AccountsService/PropertiesServer.cpp 2016-03-24 13:27:20 +0000
@@ -25,9 +25,7 @@
25#include <QDBusMessage>25#include <QDBusMessage>
26#include <QDBusMetaType>26#include <QDBusMetaType>
2727
28using StringMap = QMap<QString,QString>;28#define IFACE_ACCOUNTS_USER QStringLiteral("org.freedesktop.Accounts.User")
29using StringMapList = QList<StringMap>;
30Q_DECLARE_METATYPE(StringMapList)
3129
32PropertiesServer::PropertiesServer(QObject *parent)30PropertiesServer::PropertiesServer(QObject *parent)
33 : QObject(parent)31 : QObject(parent)
@@ -62,6 +60,38 @@
62{60{
63 QVariant newValue = variant.variant();61 QVariant newValue = variant.variant();
6462
63 if (interface == IFACE_ACCOUNTS_USER) {
64 sendErrorReply(QDBusError::InvalidArgs, QStringLiteral("Property is not writable"));
65 return;
66 }
67
68 internalSet(interface, property, newValue);
69}
70
71void PropertiesServer::SetBackgroundFile(const QString &backgroundFile)
72{
73 internalSet(IFACE_ACCOUNTS_USER, QStringLiteral("BackgroundFile"), backgroundFile);
74}
75
76void PropertiesServer::SetEmail(const QString &email)
77{
78 internalSet(IFACE_ACCOUNTS_USER, QStringLiteral("Email"), email);
79}
80
81void PropertiesServer::SetInputSources(const StringMapList &inputSources)
82{
83 internalSet(IFACE_ACCOUNTS_USER, QStringLiteral("InputSources"), QVariant::fromValue(inputSources));
84}
85
86void PropertiesServer::SetRealName(const QString &realName)
87{
88 internalSet(IFACE_ACCOUNTS_USER, QStringLiteral("RealName"), realName);
89}
90
91void PropertiesServer::internalSet(const QString &interface, const QString &property, const QVariant &variant)
92{
93 QVariant newValue = variant;
94
65 if (m_properties[interface].contains(property)) {95 if (m_properties[interface].contains(property)) {
66 QVariant& oldValue = m_properties[interface][property];96 QVariant& oldValue = m_properties[interface][property];
67 if (oldValue != newValue) {97 if (oldValue != newValue) {
@@ -69,14 +99,12 @@
69 if (interface == QStringLiteral("com.canonical.unity.AccountsService") &&99 if (interface == QStringLiteral("com.canonical.unity.AccountsService") &&
70 property == QStringLiteral("LauncherItems")) {100 property == QStringLiteral("LauncherItems")) {
71 newValue = QVariant::fromValue(qdbus_cast<QList<QVariantMap>>(newValue.value<QDBusArgument>()));101 newValue = QVariant::fromValue(qdbus_cast<QList<QVariantMap>>(newValue.value<QDBusArgument>()));
72 } else if (interface == "org.freedesktop.Accounts.User" && property == "InputSources") {
73 newValue = QVariant::fromValue(qdbus_cast<StringMapList>(newValue.value<QDBusArgument>()));
74 }102 }
75103
76 oldValue = newValue;104 oldValue = newValue;
77105
78 // Special case for user properties.106 // Special case for user properties.
79 if (interface == "org.freedesktop.Accounts.User") {107 if (interface == IFACE_ACCOUNTS_USER) {
80 Q_EMIT Changed();108 Q_EMIT Changed();
81 } else {109 } else {
82 QVariantMap propertyChanges;110 QVariantMap propertyChanges;
@@ -108,6 +136,7 @@
108 m_properties["com.ubuntu.location.providers.here.AccountsService"]["LicenseAccepted"] = false;136 m_properties["com.ubuntu.location.providers.here.AccountsService"]["LicenseAccepted"] = false;
109 m_properties["com.ubuntu.location.providers.here.AccountsService"]["LicenseBasePath"] = "";137 m_properties["com.ubuntu.location.providers.here.AccountsService"]["LicenseBasePath"] = "";
110 m_properties["org.freedesktop.Accounts.User"]["BackgroundFile"] = "";138 m_properties["org.freedesktop.Accounts.User"]["BackgroundFile"] = "";
139 m_properties["org.freedesktop.Accounts.User"]["Email"] = "";
140 m_properties["org.freedesktop.Accounts.User"]["InputSources"] = QVariant::fromValue(StringMapList());
111 m_properties["org.freedesktop.Accounts.User"]["RealName"] = "";141 m_properties["org.freedesktop.Accounts.User"]["RealName"] = "";
112 m_properties["org.freedesktop.Accounts.User"]["InputSources"] = QVariant::fromValue(StringMapList());
113}142}
114143
=== modified file 'tests/plugins/AccountsService/PropertiesServer.h'
--- tests/plugins/AccountsService/PropertiesServer.h 2016-03-11 12:54:58 +0000
+++ tests/plugins/AccountsService/PropertiesServer.h 2016-03-24 13:27:20 +0000
@@ -24,6 +24,7 @@
24#include <QDBusVariant>24#include <QDBusVariant>
25#include <QObject>25#include <QObject>
26#include <QString>26#include <QString>
27#include "types.h"
2728
28class PropertiesServer: public QObject, protected QDBusContext29class PropertiesServer: public QObject, protected QDBusContext
29{30{
@@ -36,6 +37,10 @@
36 QDBusVariant Get(const QString &interface, const QString &property) const;37 QDBusVariant Get(const QString &interface, const QString &property) const;
37 QVariantMap GetAll(const QString &interface) const;38 QVariantMap GetAll(const QString &interface) const;
38 void Set(const QString &interface, const QString &property, const QDBusVariant &variant);39 void Set(const QString &interface, const QString &property, const QDBusVariant &variant);
40 void SetBackgroundFile(const QString &backgroundFile);
41 void SetEmail(const QString &email);
42 void SetInputSources(const StringMapList &inputSources);
43 void SetRealName(const QString &realName);
3944
40 // mock only.45 // mock only.
41 void Reset();46 void Reset();
@@ -45,6 +50,8 @@
45 void Changed();50 void Changed();
4651
47private:52private:
53 void internalSet(const QString &interface, const QString &property, const QVariant &variant);
54
48 QHash<QString, QVariantMap> m_properties;55 QHash<QString, QVariantMap> m_properties;
49};56};
5057
5158
=== modified file 'tests/plugins/AccountsService/client.cpp'
--- tests/plugins/AccountsService/client.cpp 2016-03-23 09:50:10 +0000
+++ tests/plugins/AccountsService/client.cpp 2016-03-24 13:27:20 +0000
@@ -19,16 +19,13 @@
1919
20#include "AccountsService.h"20#include "AccountsService.h"
21#include "AccountsServiceDBusAdaptor.h"21#include "AccountsServiceDBusAdaptor.h"
22#include "types.h"
22#include <QSignalSpy>23#include <QSignalSpy>
23#include <QTest>24#include <QTest>
24#include <QDebug>25#include <QDebug>
25#include <QDBusReply>26#include <QDBusReply>
26#include <QDBusMetaType>27#include <QDBusMetaType>
2728
28using StringMap = QMap<QString,QString>;
29using StringMapList = QList<StringMap>;
30Q_DECLARE_METATYPE(StringMapList)
31
32template <class T>29template <class T>
33QVariant dbusVariant(const T& value) { return QVariant::fromValue(QDBusVariant(value)); }30QVariant dbusVariant(const T& value) { return QVariant::fromValue(QDBusVariant(value)); }
3431
@@ -263,10 +260,13 @@
263 AccountsService session(this, QTest::currentTestFunction());260 AccountsService session(this, QTest::currentTestFunction());
264261
265 QCOMPARE(session.backgroundFile(), QString());262 QCOMPARE(session.backgroundFile(), QString());
266 ASSERT_DBUS_CALL(m_userInterface->asyncCall("Set",263
267 "org.freedesktop.Accounts.User",264 QDBusInterface accountsIface(m_userInterface->service(),
268 "BackgroundFile",265 m_userInterface->path(),
269 dbusVariant("/test/BackgroundFile")));266 "org.freedesktop.Accounts.User");
267 ASSERT_DBUS_CALL(accountsIface.asyncCall("SetBackgroundFile",
268 "/test/BackgroundFile"));
269
270 QTRY_COMPARE(session.backgroundFile(), QString("/test/BackgroundFile"));270 QTRY_COMPARE(session.backgroundFile(), QString("/test/BackgroundFile"));
271 }271 }
272272
@@ -311,6 +311,39 @@
311 QCOMPARE(arguments.at(0).toInt(), 0);311 QCOMPARE(arguments.at(0).toInt(), 0);
312 }312 }
313313
314 void testSetRealName()
315 {
316 AccountsService session(this, QTest::currentTestFunction());
317
318 // Just confirm that we can't set normal way
319 auto message = m_userInterface->call("Set",
320 "org.freedesktop.Accounts.User",
321 "RealName",
322 dbusVariant("Stallman"));
323 QCOMPARE(message.type(), QDBusMessage::ErrorMessage);
324 QCOMPARE(message.errorName(), QStringLiteral("org.freedesktop.DBus.Error.InvalidArgs"));
325
326 message = m_userInterface->call("Get",
327 "org.freedesktop.Accounts.User",
328 "RealName");
329 QCOMPARE(message.type(), QDBusMessage::ReplyMessage);
330 auto response = message.arguments().first().value<QDBusVariant>().variant().toString();
331 QCOMPARE(response, QStringLiteral(""));
332
333 // Now try it via our AS wrapper and confirm it did get through, unlike above
334 session.setRealName("Stallman");
335
336 QCOMPARE(session.realName(), QStringLiteral("Stallman"));
337
338 message = m_userInterface->call("Get",
339 "org.freedesktop.Accounts.User",
340 "RealName");
341 QCOMPARE(message.type(), QDBusMessage::ReplyMessage);
342 response = message.arguments().first().value<QDBusVariant>().variant().toString();
343 QCOMPARE(response, QStringLiteral("Stallman"));
344
345 }
346
314 void testAsynchronousChangeForKeymaps()347 void testAsynchronousChangeForKeymaps()
315 {348 {
316 AccountsService session(this, QTest::currentTestFunction());349 AccountsService session(this, QTest::currentTestFunction());
@@ -325,10 +358,11 @@
325 map2.insert("xkb", "fr");358 map2.insert("xkb", "fr");
326 inputSources.append(map2);359 inputSources.append(map2);
327360
328 ASSERT_DBUS_CALL(m_userInterface->asyncCall("Set",361 QDBusInterface accountsIface(m_userInterface->service(),
329 "org.freedesktop.Accounts.User",362 m_userInterface->path(),
330 "InputSources",363 "org.freedesktop.Accounts.User");
331 QVariant::fromValue(QDBusVariant(QVariant::fromValue(inputSources)))));364 ASSERT_DBUS_CALL(accountsIface.asyncCall("SetInputSources",
365 QVariant::fromValue(inputSources)));
332 QStringList result = {"cz+qwerty", "fr"};366 QStringList result = {"cz+qwerty", "fr"};
333 QTRY_COMPARE(session.keymaps(), result);367 QTRY_COMPARE(session.keymaps(), result);
334 }368 }
335369
=== modified file 'tests/plugins/AccountsService/interfaces.xml'
--- tests/plugins/AccountsService/interfaces.xml 2016-02-25 10:57:17 +0000
+++ tests/plugins/AccountsService/interfaces.xml 2016-03-24 13:27:20 +0000
@@ -42,6 +42,19 @@
42 <interface name="com.ubuntu.location.providers.here.AccountsService" />42 <interface name="com.ubuntu.location.providers.here.AccountsService" />
43 <interface name="org.freedesktop.Accounts.User">43 <interface name="org.freedesktop.Accounts.User">
44 <signal name="Changed" />44 <signal name="Changed" />
45 <method name="SetBackgroundFile">
46 <arg name="backgroundFile" type="s" direction="in" />
47 </method>
48 <method name="SetEmail">
49 <arg name="email" type="s" direction="in" />
50 </method>
51 <method name="SetInputSources">
52 <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="StringMapList"/>
53 <arg name="inputSources" type="aa{ss}" direction="in" />
54 </method>
55 <method name="SetRealName">
56 <arg name="realName" type="s" direction="in" />
57 </method>
45 </interface>58 </interface>
46 <interface name="com.canonical.unity.AccountsService.Private" />59 <interface name="com.canonical.unity.AccountsService.Private" />
4760
4861
=== added file 'tests/plugins/AccountsService/types.h'
--- tests/plugins/AccountsService/types.h 1970-01-01 00:00:00 +0000
+++ tests/plugins/AccountsService/types.h 2016-03-24 13:27:20 +0000
@@ -0,0 +1,25 @@
1/*
2 * Copyright 2016 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 3, as published
6 * by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranties of
10 * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
11 * PURPOSE. See the GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * version 3 along with this program. If not, see
15 * <http://www.gnu.org/licenses/>
16 */
17
18#ifndef UNITY_ASMOCKTYPES_H
19#define UNITY_ASMOCKTYPES_H
20
21using StringMap = QMap<QString,QString>;
22using StringMapList = QList<StringMap>;
23Q_DECLARE_METATYPE(StringMapList)
24
25#endif
026
=== modified file 'tests/plugins/IntegratedLightDM/integrated.cpp'
--- tests/plugins/IntegratedLightDM/integrated.cpp 2016-03-08 18:07:38 +0000
+++ tests/plugins/IntegratedLightDM/integrated.cpp 2016-03-24 13:27:20 +0000
@@ -66,14 +66,11 @@
66 QCOMPARE(m_model->data(index, QLightDM::UsersModel::RealNameRole).toString(),66 QCOMPARE(m_model->data(index, QLightDM::UsersModel::RealNameRole).toString(),
67 QStringLiteral(""));67 QStringLiteral(""));
6868
69 // The real AccountsService doesn't let you set via dbus properties. You69 QDBusInterface accountsIface(m_user->service(),
70 // have to call SetRealName instead (so that they can protect the call70 m_user->path(),
71 // via policykit). But our test server does let us.71 "org.freedesktop.Accounts.User");
72 QVariant wrapped = QVariant::fromValue(QDBusVariant(QStringLiteral("Test User")));72 QDBusReply<void> reply = accountsIface.call(QStringLiteral("SetRealName"),
73 QDBusReply<void> reply = m_user->call(QStringLiteral("Set"),73 QStringLiteral("Test User"));
74 QStringLiteral("org.freedesktop.Accounts.User"),
75 QStringLiteral("RealName"),
76 wrapped);
77 QVERIFY(reply.isValid());74 QVERIFY(reply.isValid());
7875
79 QTRY_COMPARE(m_model->data(index, QLightDM::UsersModel::RealNameRole).toString(),76 QTRY_COMPARE(m_model->data(index, QLightDM::UsersModel::RealNameRole).toString(),

Subscribers

People subscribed via source and target branches