Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove direct usages of TabSupervisor from Chatview #2501

Merged
merged 5 commits into from
Mar 23, 2017
Merged

Conversation

Daenyth
Copy link
Member

@Daenyth Daenyth commented Mar 18, 2017

  • There still might be inherited usages
  • It's still used in the ctor

Areas to test

  • Mentions
  • Chat notifications
  • Username clickable links

if (getAttentionList.contains(message) && (userLevel & ServerInfo_User::IsModerator || userLevel & ServerInfo_User::IsAdmin))
return true;
return (getAttentionList.contains(message)
&& (userLevel & ServerInfo_User::IsModerator
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can just return isModerator as isAdmin is a higher level that will return the same thing anyway.

is Admin implies is Moderator

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Planning on adding a userlistProxy->isOwnUserModerator()

@Daenyth Daenyth requested a review from ctrlaltca March 18, 2017 11:58
@Daenyth
Copy link
Member Author

Daenyth commented Mar 18, 2017

@ctrlaltca Can you explain what is wrong here or how I can fix this if it's not an issue?

In file included from /home/travis/build/Cockatrice/Cockatrice/cockatrice/src/tab_supervisor.h:8:0,
                 from /home/travis/build/Cockatrice/Cockatrice/cockatrice/src/window_main.cpp:46:
/home/travis/build/Cockatrice/Cockatrice/cockatrice/src/chatview/userlistProxy.h:12:54: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
     virtual const bool isOwnUserRegistered() const = 0;
                                                      ^
In file included from /home/travis/build/Cockatrice/Cockatrice/cockatrice/src/window_main.cpp:46:0:
/home/travis/build/Cockatrice/Cockatrice/cockatrice/src/tab_supervisor.h:82:38: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
     const bool isOwnUserRegistered() const;
                                      ^

Gavin Bisesi added 3 commits March 22, 2017 20:44
- There still might be inherited usages
- It's still used in the ctor

Areas to test
- Mentions
- Chat notifications
- Username clickable links
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants