Un-const non-pointer return types

This commit is contained in:
Gavin Bisesi 2017-03-22 21:12:42 -04:00
parent a3f4012d1a
commit 8ac2a5870d
3 changed files with 6 additions and 6 deletions

View file

@ -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

View file

@ -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());
}

View file

@ -79,8 +79,8 @@ public:
const QMap<int, TabRoom *> &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;