Fix some properties
Properties with READ and WRITE need to NOTIFY
This commit is contained in:
@@ -199,6 +199,7 @@ void RoomManager::setLastSpaceId(const QString &lastSpaceId)
|
||||
return;
|
||||
}
|
||||
m_lastSpaceConfig.writeEntry(m_connection->userId(), lastSpaceId);
|
||||
Q_EMIT lastSpaceIdChanged();
|
||||
}
|
||||
|
||||
bool RoomManager::directChatsActive() const
|
||||
@@ -220,6 +221,7 @@ void RoomManager::setDirectChatsActive(bool directChatsActive)
|
||||
return;
|
||||
}
|
||||
m_directChatsConfig.writeEntry(m_connection->userId(), directChatsActive);
|
||||
Q_EMIT directChatsActiveChanged();
|
||||
}
|
||||
|
||||
void RoomManager::openRoomForActiveConnection()
|
||||
|
||||
@@ -92,12 +92,12 @@ class RoomManager : public QObject, public UriResolverBase
|
||||
/**
|
||||
* @brief The room ID of the last space entered.
|
||||
*/
|
||||
Q_PROPERTY(QString lastSpaceId READ lastSpaceId WRITE setLastSpaceId CONSTANT)
|
||||
Q_PROPERTY(QString lastSpaceId READ lastSpaceId WRITE setLastSpaceId NOTIFY directChatsActiveChanged)
|
||||
|
||||
/**
|
||||
* @brief Whether the last SpaceDrawer category selected was direct chats.
|
||||
*/
|
||||
Q_PROPERTY(bool directChatsActive READ directChatsActive WRITE setDirectChatsActive CONSTANT)
|
||||
Q_PROPERTY(bool directChatsActive READ directChatsActive WRITE setDirectChatsActive NOTIFY directChatsActiveChanged)
|
||||
|
||||
/**
|
||||
* @brief The ChatDocumentHandler for the open room.
|
||||
@@ -334,6 +334,9 @@ Q_SIGNALS:
|
||||
|
||||
void connectionChanged();
|
||||
|
||||
void directChatsActiveChanged();
|
||||
void lastSpaceIdChanged();
|
||||
|
||||
private:
|
||||
void openRoomForActiveConnection();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user