Bump version.inc for release
[quassel.git] / src / client / clientauthhandler.cpp
index 74bb295..15efef3 100644 (file)
@@ -34,8 +34,6 @@
 #include "clientsettings.h"
 #include "peerfactory.h"
 
-#include "protocols/legacy/legacypeer.h"
-
 using namespace Protocol;
 
 ClientAuthHandler::ClientAuthHandler(CoreAccount account, QObject *parent)
@@ -197,7 +195,7 @@ void ClientAuthHandler::onSocketConnected()
 
     qDebug() << "Legacy core detected, switching to compatibility mode";
 
-    RemotePeer *peer = new LegacyPeer(this, socket(), this);
+    RemotePeer *peer = PeerFactory::createPeer(PeerFactory::ProtoDescriptor(Protocol::LegacyProtocol, 0), this, socket(), this);
     // Only needed for the legacy peer, as all others check the protocol version before instantiation
     connect(peer, SIGNAL(protocolVersionMismatch(int,int)), SLOT(onProtocolVersionMismatch(int,int)));
 
@@ -253,6 +251,8 @@ void ClientAuthHandler::onProtocolVersionMismatch(int actual, int expected)
 
 void ClientAuthHandler::setPeer(RemotePeer *peer)
 {
+    qDebug().nospace() << "Using " << qPrintable(peer->protocolName()) << "...";
+
     _peer = peer;
     connect(_peer, SIGNAL(transferProgress(int,int)), SIGNAL(transferProgress(int,int)));