diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-07-19 08:46:51 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-07-19 08:46:51 +0900 |
commit | 980b2997b78e8a1e4322fa7b25ba8c4d5199318d (patch) | |
tree | 14bf027aa2924651360418b37e2ae544cae3e650 /lib/connection.h | |
parent | 50a117a7764ff134b57051a0456d4eac32ae7df5 (diff) | |
download | libquotient-980b2997b78e8a1e4322fa7b25ba8c4d5199318d.tar.gz libquotient-980b2997b78e8a1e4322fa7b25ba8c4d5199318d.zip |
Connection::stateChanged() signal
Also: as of the previous commit, we officially bump API version to 0.4
Diffstat (limited to 'lib/connection.h')
-rw-r--r-- | lib/connection.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/connection.h b/lib/connection.h index aec67972..c7e28282 100644 --- a/lib/connection.h +++ b/lib/connection.h @@ -61,10 +61,10 @@ namespace QMatrixClient /** Whether or not the rooms state should be cached locally * \sa loadState(), saveState() */ - Q_PROPERTY(User* localUser READ user CONSTANT) - Q_PROPERTY(QString localUserId READ userId CONSTANT) - Q_PROPERTY(QString deviceId READ deviceId CONSTANT) - Q_PROPERTY(QByteArray accessToken READ accessToken CONSTANT) + Q_PROPERTY(User* localUser READ user NOTIFY stateChanged) + Q_PROPERTY(QString localUserId READ userId NOTIFY stateChanged) + Q_PROPERTY(QString deviceId READ deviceId NOTIFY stateChanged) + Q_PROPERTY(QByteArray accessToken READ accessToken NOTIFY stateChanged) Q_PROPERTY(QUrl homeserver READ homeserver WRITE setHomeserver NOTIFY homeserverChanged) Q_PROPERTY(bool cacheState READ cacheState WRITE setCacheState NOTIFY cacheStateChanged) public: @@ -431,6 +431,13 @@ namespace QMatrixClient void connected(); void reconnected(); //< \deprecated Use connected() instead void loggedOut(); + /** Login data or state have changed + * + * This is a common change signal for userId, deviceId and + * accessToken - these properties normally only change at + * a successful login and logout and are constant at other times. + */ + void stateChanged(); void loginError(QString message, QByteArray details); /** A network request (job) failed |