on xenial help sign in
And update mock plugin too, whoops
commit23959f5820d028e3068ab8ae40ba60e49e40ca10 authorMichael Terry <michael.terry@canonical.com> dateTue 11 Oct 2016, 09:16 (10 years ago) parent8ca16fe
4 files changed+10−12
plugins/Utils/constants.cpp+1−1 plugins/Utils/constants.h+2−5 tests/mocks/Utils/constants.cpp+2−1 tests/mocks/Utils/constants.h+5−5
plugins/Utils/constants.cpp+1−1
@@ -1,5 +1,5 @@
11/*
2− * Copyright 2015 Canonical Ltd.
2+ * Copyright 2015-2016 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU Lesser General Public License as published by
plugins/Utils/constants.h+2−5
@@ -1,5 +1,5 @@
11/*
2− * Copyright 2015 Canonical Ltd.
2+ * Copyright 2015-2016 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU Lesser General Public License as published by
@@ -14,8 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515*/
1616
17−#ifndef CONSTANTS_H
18−#define CONSTANTS_H
17+#pragma once
1918
2019#include <QObject>
2120
@@ -42,5 +41,3 @@ private:
4241 int m_indicatorValueTimeout;
4342 QString m_defaultWallpaper;
4443};
45−
46−#endif
tests/mocks/Utils/constants.cpp+2−1
@@ -1,5 +1,5 @@
11/*
2− * Copyright 2015 Canonical Ltd.
2+ * Copyright 2015-2016 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU Lesser General Public License as published by
@@ -20,4 +20,5 @@ Constants::Constants(QObject *parent)
2020 : QObject(parent)
2121{
2222 m_indicatorValueTimeout = 5000;
23+ m_defaultWallpaper = "/usr/share/backgrounds/warty-final-ubuntu.png";
2324}
tests/mocks/Utils/constants.h+5−5
@@ -1,5 +1,5 @@
11/*
2− * Copyright 2015 Canonical Ltd.
2+ * Copyright 2015-2016 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU Lesser General Public License as published by
@@ -14,8 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515*/
1616
17−#ifndef CONSTANTS_H
18−#define CONSTANTS_H
17+#pragma once
1918
2019#include <QObject>
2120
@@ -30,14 +29,15 @@ class Constants: public QObject
3029{
3130 Q_OBJECT
3231 Q_PROPERTY(int indicatorValueTimeout READ indicatorValueTimeout CONSTANT)
32+ Q_PROPERTY(QString defaultWallpaper READ defaultWallpaper CONSTANT)
3333
3434public:
3535 Constants(QObject *parent = 0);
3636
3737 int indicatorValueTimeout() const { return m_indicatorValueTimeout; }
38+ QString defaultWallpaper() const { return m_defaultWallpaper; }
3839
3940private:
4041 int m_indicatorValueTimeout;
42+ QString m_defaultWallpaper;
4143};
42−
43−#endif