on xenial help sign in
Some minor cleanup nits
9cc9cefMichael Terry
plugins/AccountsService/AccountsServiceDBusAdaptor.cpp+2−4
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2013 Canonical, Ltd.
2+ * Copyright (C) 2013-2016 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -12,8 +12,6 @@
12 *
12 *
13 * You should have received a copy of the GNU General Public License
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− *
16− * Author: Michael Terry <michael.terry@canonical.com>
17 */
15 */
18
16
19#include "AccountsServiceDBusAdaptor.h"
17#include "AccountsServiceDBusAdaptor.h"
@@ -89,7 +87,7 @@ void AccountsServiceDBusAdaptor::maybeChangedSlot()
89 m_ignoreNextChanged = false;
87 m_ignoreNextChanged = false;
90}
88}
91
89
92−QString AccountsServiceDBusAdaptor::getUserForPath(const QString &path)
90+QString AccountsServiceDBusAdaptor::getUserForPath(const QString &path) const
93{
91{
94 QMap<QString, QDBusInterface *>::const_iterator i;
92 QMap<QString, QDBusInterface *>::const_iterator i;
95 for (i = m_users.constBegin(); i != m_users.constEnd(); ++i) {
93 for (i = m_users.constBegin(); i != m_users.constEnd(); ++i) {
plugins/AccountsService/AccountsServiceDBusAdaptor.h+4−6
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2013 Canonical, Ltd.
2+ * Copyright (C) 2013-2016 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -12,8 +12,6 @@
12 *
12 *
13 * You should have received a copy of the GNU General Public License
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− *
16− * Authors: Michael Terry <michael.terry@canonical.com>
17 */
15 */
18
16
19#ifndef UNITY_ACCOUNTSSERVICEDBUSADAPTOR_H
17#ifndef UNITY_ACCOUNTSSERVICEDBUSADAPTOR_H
@@ -36,8 +34,8 @@ public:
36 ~AccountsServiceDBusAdaptor() = default;
34 ~AccountsServiceDBusAdaptor() = default;
37
35
38 QDBusPendingReply<QVariantMap> getAllPropertiesAsync(const QString &user, const QString &interface);
36 QDBusPendingReply<QVariantMap> getAllPropertiesAsync(const QString &user, const QString &interface);
39− Q_INVOKABLE QDBusPendingReply<QVariant> getUserPropertyAsync(const QString &user, const QString &interface, const QString &property);
37+ QDBusPendingReply<QVariant> getUserPropertyAsync(const QString &user, const QString &interface, const QString &property);
40− Q_INVOKABLE QDBusPendingCall setUserPropertyAsync(const QString &user, const QString &interface, const QString &property, const QVariant &value);
38+ QDBusPendingCall setUserPropertyAsync(const QString &user, const QString &interface, const QString &property, const QVariant &value);
41
39
42Q_SIGNALS:
40Q_SIGNALS:
43 void propertiesChanged(const QString &user, const QString &interface, const QStringList &changed);
41 void propertiesChanged(const QString &user, const QString &interface, const QStringList &changed);
@@ -49,7 +47,7 @@ private Q_SLOTS:
49
47
50private:
48private:
51 QDBusInterface *getUserInterface(const QString &user);
49 QDBusInterface *getUserInterface(const QString &user);
52− QString getUserForPath(const QString &path);
50+ QString getUserForPath(const QString &path) const;
53
51
54 QDBusInterface *m_accountsManager;
52 QDBusInterface *m_accountsManager;
55 QMap<QString, QDBusInterface *> m_users;
53 QMap<QString, QDBusInterface *> m_users;