X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fclientauthhandler.cpp;h=52bd1e4a827fee8cf52676844f05a8379ce2a0db;hp=a5bf291bc70b541c3d602e4e70f7d1d444249f2e;hb=af29862368978b94f00f13b957f685d78c7e8104;hpb=c1cf157116de7fc3da96203aa6f03c38c7ebb650 diff --git a/src/client/clientauthhandler.cpp b/src/client/clientauthhandler.cpp index a5bf291b..52bd1e4a 100644 --- a/src/client/clientauthhandler.cpp +++ b/src/client/clientauthhandler.cpp @@ -30,12 +30,9 @@ #include "client.h" #include "clientsettings.h" -#include "logmessage.h" #include "peerfactory.h" #include "util.h" -using namespace Protocol; - ClientAuthHandler::ClientAuthHandler(CoreAccount account, QObject* parent) : AuthHandler(parent) , _peer(nullptr) @@ -295,16 +292,16 @@ void ClientAuthHandler::startRegistration() useSsl = _account.useSsl(); #endif - _peer->dispatch(RegisterClient(Quassel::Features{}, Quassel::buildInfo().fancyVersionString, Quassel::buildInfo().commitDate, useSsl)); + _peer->dispatch(Protocol::RegisterClient(Quassel::Features{}, Quassel::buildInfo().fancyVersionString, Quassel::buildInfo().commitDate, useSsl)); } -void ClientAuthHandler::handle(const ClientDenied& msg) +void ClientAuthHandler::handle(const Protocol::ClientDenied& msg) { emit errorPopup(msg.errorString); requestDisconnect(tr("The core refused connection from this client")); } -void ClientAuthHandler::handle(const ClientRegistered& msg) +void ClientAuthHandler::handle(const Protocol::ClientRegistered& msg) { _coreConfigured = msg.coreConfigured; _backendInfo = msg.backendInfo; @@ -324,10 +321,10 @@ void ClientAuthHandler::onConnectionReady() const auto& coreFeatures = _peer->features(); auto unsupported = coreFeatures.toStringList(false); if (!unsupported.isEmpty()) { - quInfo() << qPrintable(tr("Core does not support the following features: %1").arg(unsupported.join(", "))); + qInfo() << qPrintable(tr("Core does not support the following features: %1").arg(unsupported.join(", "))); } if (!coreFeatures.unknownFeatures().isEmpty()) { - quInfo() << qPrintable(tr("Core supports unknown features: %1").arg(coreFeatures.unknownFeatures().join(", "))); + qInfo() << qPrintable(tr("Core supports unknown features: %1").arg(coreFeatures.unknownFeatures().join(", "))); } emit connectionReady(); @@ -341,17 +338,17 @@ void ClientAuthHandler::onConnectionReady() login(); } -void ClientAuthHandler::setupCore(const SetupData& setupData) +void ClientAuthHandler::setupCore(const Protocol::SetupData& setupData) { _peer->dispatch(setupData); } -void ClientAuthHandler::handle(const SetupFailed& msg) +void ClientAuthHandler::handle(const Protocol::SetupFailed& msg) { emit coreSetupFailed(msg.errorString); } -void ClientAuthHandler::handle(const SetupDone& msg) +void ClientAuthHandler::handle(const Protocol::SetupDone& msg) { Q_UNUSED(msg) @@ -378,22 +375,22 @@ void ClientAuthHandler::login(const QString& previousError) } } - _peer->dispatch(Login(_account.user(), _account.password())); + _peer->dispatch(Protocol::Login(_account.user(), _account.password())); } -void ClientAuthHandler::handle(const LoginFailed& msg) +void ClientAuthHandler::handle(const Protocol::LoginFailed& msg) { login(msg.errorString); } -void ClientAuthHandler::handle(const LoginSuccess& msg) +void ClientAuthHandler::handle(const Protocol::LoginSuccess& msg) { Q_UNUSED(msg) emit loginSuccessful(_account); } -void ClientAuthHandler::handle(const SessionState& msg) +void ClientAuthHandler::handle(const Protocol::SessionState& msg) { disconnect(socket(), nullptr, this, nullptr); // this is the last message we shall ever get