on xenial help sign in
cleanup, use nullptr
c98ab57Lukáš Tinkl
plugins/Unity/Indicators/actionrootstate.h+1−1
@@ -30,7 +30,7 @@ class UNITYINDICATORS_EXPORT ActionRootState : public RootStateObject
30 Q_PROPERTY(QString actionName READ actionName WRITE setActionName NOTIFY actionNameChanged)
30 Q_PROPERTY(QString actionName READ actionName WRITE setActionName NOTIFY actionNameChanged)
31
31
32public:
32public:
33− ActionRootState(QObject *parent = 0);
33+ ActionRootState(QObject *parent = nullptr);
34
34
35 QDBusActionGroup *actionGroup() const;
35 QDBusActionGroup *actionGroup() const;
36 void setActionGroup(QDBusActionGroup *actionGroup);
36 void setActionGroup(QDBusActionGroup *actionGroup);
plugins/Unity/Indicators/indicator.h+1−1
@@ -32,7 +32,7 @@ class UNITYINDICATORS_EXPORT Indicator : public QObject
32public:
32public:
33 typedef QSharedPointer<Indicator> Ptr;
33 typedef QSharedPointer<Indicator> Ptr;
34
34
35− Indicator(QObject *parent = 0);
35+ Indicator(QObject *parent = nullptr);
36 virtual ~Indicator();
36 virtual ~Indicator();
37
37
38 void init(const QString& busName, const QSettings& settings);
38 void init(const QString& busName, const QSettings& settings);
plugins/Unity/Indicators/indicatorsmanager.cpp+3−4
@@ -116,8 +116,6 @@ void IndicatorsManager::loadFile(const QFileInfo& file_info)
116 QSettings indicator_settings(file_info.absoluteFilePath(), QSettings::IniFormat, this);
116 QSettings indicator_settings(file_info.absoluteFilePath(), QSettings::IniFormat, this);
117 const QString name = indicator_settings.value(QStringLiteral("Indicator Service/Name")).toString();
117 const QString name = indicator_settings.value(QStringLiteral("Indicator Service/Name")).toString();
118
118
119− qDebug() << "!!! Loading indicator" << name << ", profile" << m_profile;
120−
121 if (m_platform.isPC() && name == "indicator-keyboard") {
119 if (m_platform.isPC() && name == "indicator-keyboard") {
122 return; // convergence: skip this indicator until it works in Mir
120 return; // convergence: skip this indicator until it works in Mir
123 }
121 }
@@ -288,8 +286,9 @@ Indicator::Ptr IndicatorsManager::indicator(const QString& indicator_name)
288 new_indicator->init(data->m_fileInfo.fileName(), settings);
286 new_indicator->init(data->m_fileInfo.fileName(), settings);
289
287
290 // convergence:
288 // convergence:
291− // 1) enable session indicator conditionally, typically when running on desktop
289+ // 1) enable session indicator conditionally, typically when running in a multisession/multiuser environment
290+ // 2) on a PC, switch the battery/power indicator to desktop mode,
292− // 2) switch the battery/power indicator to desktop mode, can't control brightness for now and phone-on-desktop broken (FIXME)
291+ // can't control brightness for now and phone-on-desktop broken (FIXME)
293 //
292 //
294 // The rest of the indicators respect their default profile (which is "phone", even on desktop PCs)
293 // The rest of the indicators respect their default profile (which is "phone", even on desktop PCs)
295 if ((new_indicator->identifier() == QStringLiteral("indicator-session") && m_platform.isMultiSession())
294 if ((new_indicator->identifier() == QStringLiteral("indicator-session") && m_platform.isMultiSession())
plugins/Unity/Indicators/indicatorsmanager.h+1−1
@@ -35,7 +35,7 @@ class UNITYINDICATORS_EXPORT IndicatorsManager : public QObject
35 Q_PROPERTY(bool loaded READ isLoaded NOTIFY loadedChanged)
35 Q_PROPERTY(bool loaded READ isLoaded NOTIFY loadedChanged)
36 Q_PROPERTY(QString profile READ profile WRITE setProfile NOTIFY profileChanged)
36 Q_PROPERTY(QString profile READ profile WRITE setProfile NOTIFY profileChanged)
37public:
37public:
38− explicit IndicatorsManager(QObject* parent = 0);
38+ explicit IndicatorsManager(QObject* parent = nullptr);
39 ~IndicatorsManager();
39 ~IndicatorsManager();
40
40
41 Q_INVOKABLE void load();
41 Q_INVOKABLE void load();
plugins/Unity/Indicators/indicatorsmodel.h+1−1
@@ -38,7 +38,7 @@ class UNITYINDICATORS_EXPORT IndicatorsModel : public QAbstractListModel
38
38
39public:
39public:
40
40
41− IndicatorsModel(QObject *parent=0);
41+ IndicatorsModel(QObject *parent=nullptr);
42 ~IndicatorsModel();
42 ~IndicatorsModel();
43
43
44 Q_INVOKABLE void load();
44 Q_INVOKABLE void load();
plugins/Unity/Indicators/modelprinter.h+1−1
@@ -32,7 +32,7 @@ class ModelPrinter : public QObject
32 Q_PROPERTY(UnityMenuModel* model READ sourceModel WRITE setSourceModel NOTIFY modelChanged)
32 Q_PROPERTY(UnityMenuModel* model READ sourceModel WRITE setSourceModel NOTIFY modelChanged)
33 Q_PROPERTY(QString text READ text NOTIFY textChanged)
33 Q_PROPERTY(QString text READ text NOTIFY textChanged)
34public:
34public:
35− ModelPrinter(QObject* parent=0);
35+ ModelPrinter(QObject* parent=nullptr);
36
36
37 void setSourceModel(UnityMenuModel* sourceModel);
37 void setSourceModel(UnityMenuModel* sourceModel);
38 UnityMenuModel* sourceModel() const;
38 UnityMenuModel* sourceModel() const;