diff options
Diffstat (limited to 'Swift/Controllers/Chat')
-rw-r--r-- | Swift/Controllers/Chat/UserSearchController.cpp | 24 | ||||
-rw-r--r-- | Swift/Controllers/Chat/UserSearchController.h | 4 |
2 files changed, 14 insertions, 14 deletions
diff --git a/Swift/Controllers/Chat/UserSearchController.cpp b/Swift/Controllers/Chat/UserSearchController.cpp index 91de670..30c3c77 100644 --- a/Swift/Controllers/Chat/UserSearchController.cpp +++ b/Swift/Controllers/Chat/UserSearchController.cpp @@ -1,3 +1,3 @@ /* - * Copyright (c) 2010-2016 Isode Limited. + * Copyright (c) 2010-2017 Isode Limited. * All rights reserved. @@ -85,3 +85,3 @@ void UserSearchController::handleUIEvent(std::shared_ptr<UIEvent> event) { switch (type_) { - case AddContact: + case Type::AddContact: if ((addUserRequest = std::dynamic_pointer_cast<RequestAddUserDialogUIEvent>(event))) { @@ -90,3 +90,3 @@ void UserSearchController::handleUIEvent(std::shared_ptr<UIEvent> event) { break; - case StartChat: + case Type::StartChat: if (std::dynamic_pointer_cast<RequestChatWithUserDialogUIEvent>(event)) { @@ -95,3 +95,3 @@ void UserSearchController::handleUIEvent(std::shared_ptr<UIEvent> event) { break; - case InviteToChat: + case Type::InviteToChat: if ((inviteToMUCRequest = std::dynamic_pointer_cast<RequestInviteToMUCUIEvent>(event))) { @@ -243,3 +243,3 @@ void UserSearchController::handleContactSuggestionsRequested(std::string text) { // remove contact suggestions which are already on the contact list in add-contact-mode - if (type_ == AddContact) { + if (type_ == Type::AddContact) { if (!found && !!rosterController_->getItem((*i)->jid)) { @@ -329,12 +329,12 @@ void UserSearchController::initializeUserWindow() { if (!window_) { - UserSearchWindow::Type windowType = UserSearchWindow::AddContact; + auto windowType = UserSearchWindow::Type::AddContact; switch(type_) { - case AddContact: - windowType = UserSearchWindow::AddContact; + case Type::AddContact: + windowType = UserSearchWindow::Type::AddContact; break; - case StartChat: - windowType = UserSearchWindow::ChatToContact; + case Type::StartChat: + windowType = UserSearchWindow::Type::ChatToContact; break; - case InviteToChat: - windowType = UserSearchWindow::InviteToChat; + case Type::InviteToChat: + windowType = UserSearchWindow::Type::InviteToChat; break; diff --git a/Swift/Controllers/Chat/UserSearchController.h b/Swift/Controllers/Chat/UserSearchController.h index 4658301..49bb63c 100644 --- a/Swift/Controllers/Chat/UserSearchController.h +++ b/Swift/Controllers/Chat/UserSearchController.h @@ -1,3 +1,3 @@ /* - * Copyright (c) 2010-2016 Isode Limited. + * Copyright (c) 2010-2017 Isode Limited. * All rights reserved. @@ -51,3 +51,3 @@ namespace Swift { public: - enum Type {AddContact, StartChat, InviteToChat}; + enum class Type {AddContact, StartChat, InviteToChat}; UserSearchController(Type type, const JID& jid, UIEventStream* uiEventStream, VCardManager* vcardManager, UserSearchWindowFactory* userSearchWindowFactory, IQRouter* iqRouter, RosterController* rosterController, ContactSuggester* contactSuggester, AvatarManager* avatarManager, PresenceOracle* presenceOracle, ProfileSettingsProvider* settings); |