@@ -66,14 +66,11 @@ private Q_SLOTS:
6666 QCOMPARE(m_model->data(index, QLightDM::UsersModel::RealNameRole).toString(),
6767 QStringLiteral(""));
6868
69− // The real AccountsService doesn't let you set via dbus properties. You
70− // have to call SetRealName instead (so that they can protect the call
71− // via policykit). But our test server does let us.
72− QVariant wrapped = QVariant::fromValue(QDBusVariant(QStringLiteral("Test User")));
73− QDBusReply<void> reply = m_user->call(QStringLiteral("Set"),
74− QStringLiteral("org.freedesktop.Accounts.User"),
75− QStringLiteral("RealName"),
76− wrapped);
69+ QDBusInterface accountsIface(m_user->service(),
70+ m_user->path(),
71+ "org.freedesktop.Accounts.User");
72+ QDBusReply<void> reply = accountsIface.call(QStringLiteral("SetRealName"),
73+ QStringLiteral("Test User"));
7774 QVERIFY(reply.isValid());
7875
7976 QTRY_COMPARE(m_model->data(index, QLightDM::UsersModel::RealNameRole).toString(),