on xenial help sign in
And update mock plugin too, whoops
23959f5Michael Terry
plugins/Utils/constants.cpp+1−1
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright 2015 Canonical Ltd.
2+ * Copyright 2015-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 Lesser General Public License as published by
5 * it under the terms of the GNU Lesser General Public License as published by
plugins/Utils/constants.h+2−5
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright 2015 Canonical Ltd.
2+ * Copyright 2015-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 Lesser General Public License as published by
5 * it under the terms of the GNU Lesser General Public License as published by
@@ -14,8 +14,7 @@
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*/
15*/
16
16
17−#ifndef CONSTANTS_H
17+#pragma once
18−#define CONSTANTS_H
19
18
20#include <QObject>
19#include <QObject>
21
20
@@ -42,5 +41,3 @@ private:
42 int m_indicatorValueTimeout;
41 int m_indicatorValueTimeout;
43 QString m_defaultWallpaper;
42 QString m_defaultWallpaper;
44};
43};
45−
46−#endif
tests/mocks/Utils/constants.cpp+2−1
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright 2015 Canonical Ltd.
2+ * Copyright 2015-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 Lesser General Public License as published by
5 * it under the terms of the GNU Lesser General Public License as published by
@@ -20,4 +20,5 @@ Constants::Constants(QObject *parent)
20 : QObject(parent)
20 : QObject(parent)
21{
21{
22 m_indicatorValueTimeout = 5000;
22 m_indicatorValueTimeout = 5000;
23+ m_defaultWallpaper = "/usr/share/backgrounds/warty-final-ubuntu.png";
23}
24}
tests/mocks/Utils/constants.h+5−5
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright 2015 Canonical Ltd.
2+ * Copyright 2015-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 Lesser General Public License as published by
5 * it under the terms of the GNU Lesser General Public License as published by
@@ -14,8 +14,7 @@
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*/
15*/
16
16
17−#ifndef CONSTANTS_H
17+#pragma once
18−#define CONSTANTS_H
19
18
20#include <QObject>
19#include <QObject>
21
20
@@ -30,14 +29,15 @@ class Constants: public QObject
30{
29{
31 Q_OBJECT
30 Q_OBJECT
32 Q_PROPERTY(int indicatorValueTimeout READ indicatorValueTimeout CONSTANT)
31 Q_PROPERTY(int indicatorValueTimeout READ indicatorValueTimeout CONSTANT)
32+ Q_PROPERTY(QString defaultWallpaper READ defaultWallpaper CONSTANT)
33
33
34public:
34public:
35 Constants(QObject *parent = 0);
35 Constants(QObject *parent = 0);
36
36
37 int indicatorValueTimeout() const { return m_indicatorValueTimeout; }
37 int indicatorValueTimeout() const { return m_indicatorValueTimeout; }
38+ QString defaultWallpaper() const { return m_defaultWallpaper; }
38
39
39private:
40private:
40 int m_indicatorValueTimeout;
41 int m_indicatorValueTimeout;
42+ QString m_defaultWallpaper;
41};
43};
42−
43−#endif