mobile-widgets: solve cloudstatus register problem

Use Q_ENUM instad of Q_ENUMS (which is depreciated) since it does the
meta registration for all Qt platforms.

Q_ENUM require the enum to be defined in the class and cannot refer to
a global class, therefore copied enum to class.

This commit is made to get the release to work, with minimal changes,
this class will be moved to qPref and the double definition solved

Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
jan Iversen 2018-07-05 09:46:07 +02:00 committed by Dirk Hohndel
parent 5fc2e0f80f
commit 19803ab3c3
3 changed files with 39 additions and 31 deletions

View file

@ -8,7 +8,7 @@
class QMLPrefs : public QObject {
Q_OBJECT
Q_ENUMS(cloud_status)
Q_ENUM(cloud_status)
Q_PROPERTY(QString cloudPassword
MEMBER m_cloudPassword
WRITE setCloudPassword
@ -51,6 +51,14 @@ class QMLPrefs : public QObject {
NOTIFY timeThresholdChanged)
public:
enum cloud_status {
CS_UNKNOWN,
CS_INCORRECT_USER_PASSWD,
CS_NEED_TO_VERIFY,
CS_VERIFIED,
CS_NOCLOUD
};
QMLPrefs();
~QMLPrefs();