core: add version variables to qPref and make it qml loadable

add canonical_version and mobile_version to qPref

Having a property in qPref, allows the use in qml, and prepare the
interface for qml testing.

Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
jan Iversen 2018-07-07 22:59:26 +02:00 committed by Dirk Hohndel
parent 06593bd642
commit 4a4bc1c8f3
2 changed files with 15 additions and 0 deletions

View file

@ -11,6 +11,8 @@
class qPref : public QObject {
Q_OBJECT
Q_ENUMS(cloud_status);
Q_PROPERTY(QString canonical_version READ canonical_version);
Q_PROPERTY(QString mobile_version READ mobile_version);
public:
qPref(QObject *parent = NULL);
@ -28,6 +30,8 @@ public:
CS_NOCLOUD
};
const QString canonical_version() const;
const QString mobile_version() const;
private:
};