X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcorenetwork.cpp;h=596a598c9eb110c3867b3f80ad24b2afa66f105e;hb=d13c54e1850b5ed6980e6350beaf4469e680b4f1;hp=21415aed8ec94b82d485478e4986e9b9027b11e9;hpb=08adbf35b56f8ce8cf3a8edf614aa0c67061e60f;p=quassel.git diff --git a/src/core/corenetwork.cpp b/src/core/corenetwork.cpp index 21415aed..596a598c 100644 --- a/src/core/corenetwork.cpp +++ b/src/core/corenetwork.cpp @@ -26,14 +26,15 @@ #include "corenetworkconfig.h" #include "ircserverhandler.h" -#include "userinputhandler.h" +#include "coreuserinputhandler.h" #include "ctcphandler.h" +INIT_SYNCABLE_OBJECT(CoreNetwork) CoreNetwork::CoreNetwork(const NetworkId &networkid, CoreSession *session) : Network(networkid, session), _coreSession(session), _ircServerHandler(new IrcServerHandler(this)), - _userInputHandler(new UserInputHandler(this)), + _userInputHandler(new CoreUserInputHandler(this)), _ctcpHandler(new CtcpHandler(this)), _autoReconnectCount(0), _quitRequested(false), @@ -70,7 +71,6 @@ CoreNetwork::CoreNetwork(const NetworkId &networkid, CoreSession *session) connect(&_autoWhoTimer, SIGNAL(timeout()), this, SLOT(sendAutoWho())); connect(&_autoWhoCycleTimer, SIGNAL(timeout()), this, SLOT(startAutoWhoCycle())); connect(&_tokenBucketTimer, SIGNAL(timeout()), this, SLOT(fillBucketAndProcessQueue())); - connect(this, SIGNAL(connectRequested()), this, SLOT(connectToIrc())); connect(&socket, SIGNAL(connected()), this, SLOT(socketInitialized())); connect(&socket, SIGNAL(disconnected()), this, SLOT(socketDisconnected())); @@ -369,6 +369,7 @@ void CoreNetwork::socketDisconnected() { setConnected(false); emit disconnected(networkId()); if(_quitRequested) { + _quitRequested = false; setConnectionState(Network::Disconnected); Core::setNetworkConnected(userId(), networkId(), false); } else if(_autoReconnectCount != 0) { @@ -650,7 +651,7 @@ void CoreNetwork::requestConnect() const { qWarning() << "Requesting connect while already being connected!"; return; } - Network::requestConnect(); + QMetaObject::invokeMethod(const_cast(this), "connectToIrc", Qt::QueuedConnection); } void CoreNetwork::requestDisconnect() const {