diff --git a/cockatrice/src/chatview/userlistProxy.h b/cockatrice/src/chatview/userlistProxy.h index 14411982..febb7952 100644 --- a/cockatrice/src/chatview/userlistProxy.h +++ b/cockatrice/src/chatview/userlistProxy.h @@ -9,8 +9,8 @@ class ServerInfo_User; */ class UserlistProxy { public: - virtual const bool isOwnUserRegistered() const = 0; - virtual const QString getOwnUsername() const = 0; + virtual bool isOwnUserRegistered() const = 0; + virtual QString getOwnUsername() const = 0; virtual bool isUserBuddy(const QString &userName) const = 0; virtual bool isUserIgnored(const QString &userName) const = 0; virtual const ServerInfo_User* getOnlineUser(const QString &userName) const = 0; // Can return nullptr diff --git a/cockatrice/src/tab_supervisor.cpp b/cockatrice/src/tab_supervisor.cpp index 63dc432e..24bf6360 100644 --- a/cockatrice/src/tab_supervisor.cpp +++ b/cockatrice/src/tab_supervisor.cpp @@ -606,12 +606,12 @@ void TabSupervisor::processNotifyUserEvent(const Event_NotifyUser &event) } -const bool TabSupervisor::isOwnUserRegistered() const +bool TabSupervisor::isOwnUserRegistered() const { return (bool) getUserInfo()->user_level() & ServerInfo_User::IsRegistered; } -const QString TabSupervisor::getOwnUsername() const +QString TabSupervisor::getOwnUsername() const { return QString::fromStdString(userInfo->name()); } diff --git a/cockatrice/src/tab_supervisor.h b/cockatrice/src/tab_supervisor.h index cadc826c..6a7a4a15 100644 --- a/cockatrice/src/tab_supervisor.h +++ b/cockatrice/src/tab_supervisor.h @@ -79,8 +79,8 @@ public: const QMap &getRoomTabs() const { return roomTabs; } bool getAdminLocked() const; bool closeRequest(); - const bool isOwnUserRegistered() const; - const QString getOwnUsername() const; + bool isOwnUserRegistered() const; + QString getOwnUsername() const; bool isUserBuddy(const QString &userName) const; bool isUserIgnored(const QString &userName) const; const ServerInfo_User* getOnlineUser(const QString &userName) const;