X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcoresession.cpp;h=11a95301b3f861eb4fc9912377ed37d59e5a7a88;hp=b5de50ed0b395cc1077d4fa9054aa72320c27fc2;hb=db00831bca59a012242d1ad5fac52a20c6cd2956;hpb=c1cf157116de7fc3da96203aa6f03c38c7ebb650 diff --git a/src/core/coresession.cpp b/src/core/coresession.cpp index b5de50ed..11a95301 100644 --- a/src/core/coresession.cpp +++ b/src/core/coresession.cpp @@ -44,7 +44,6 @@ #include "ircchannel.h" #include "ircparser.h" #include "ircuser.h" -#include "logmessage.h" #include "messageevent.h" #include "remotepeer.h" #include "storage.h" @@ -91,29 +90,25 @@ CoreSession::CoreSession(UserId uid, bool restoreState, bool strictIdentEnabled, connect(p, &SignalProxy::connected, this, &CoreSession::clientsConnected); connect(p, &SignalProxy::disconnected, this, &CoreSession::clientsDisconnected); - p->attachSlot(SIGNAL(sendInput(BufferInfo, QString)), this, SLOT(msgFromClient(BufferInfo, QString))); - p->attachSignal(this, SIGNAL(displayMsg(Message))); - p->attachSignal(this, SIGNAL(displayStatusMsg(QString, QString))); + p->attachSlot(SIGNAL(sendInput(BufferInfo,QString)), this, &CoreSession::msgFromClient); + p->attachSignal(this, &CoreSession::displayMsg); + p->attachSignal(this, &CoreSession::displayStatusMsg); - p->attachSignal(this, SIGNAL(identityCreated(const Identity&))); - p->attachSignal(this, SIGNAL(identityRemoved(IdentityId))); - p->attachSlot(SIGNAL(createIdentity(const Identity&, const QVariantMap&)), - this, - SLOT(createIdentity(const Identity&, const QVariantMap&))); - p->attachSlot(SIGNAL(removeIdentity(IdentityId)), this, SLOT(removeIdentity(IdentityId))); + p->attachSignal(this, &CoreSession::identityCreated); + p->attachSignal(this, &CoreSession::identityRemoved); + p->attachSlot(SIGNAL(createIdentity(Identity,QVariantMap)), this, selectOverload(&CoreSession::createIdentity)); + p->attachSlot(SIGNAL(removeIdentity(IdentityId)), this, &CoreSession::removeIdentity); - p->attachSignal(this, SIGNAL(networkCreated(NetworkId))); - p->attachSignal(this, SIGNAL(networkRemoved(NetworkId))); - p->attachSlot(SIGNAL(createNetwork(const NetworkInfo&, const QStringList&)), - this, - SLOT(createNetwork(const NetworkInfo&, const QStringList&))); - p->attachSlot(SIGNAL(removeNetwork(NetworkId)), this, SLOT(removeNetwork(NetworkId))); + p->attachSignal(this, &CoreSession::networkCreated); + p->attachSignal(this, &CoreSession::networkRemoved); + p->attachSlot(SIGNAL(createNetwork(NetworkInfo,QStringList)), this,&CoreSession::createNetwork); + p->attachSlot(SIGNAL(removeNetwork(NetworkId)), this, &CoreSession::removeNetwork); - p->attachSlot(SIGNAL(changePassword(PeerPtr, QString, QString, QString)), this, SLOT(changePassword(PeerPtr, QString, QString, QString))); - p->attachSignal(this, SIGNAL(passwordChanged(PeerPtr, bool))); + p->attachSlot(SIGNAL(changePassword(PeerPtr,QString,QString,QString)), this, &CoreSession::changePassword); + p->attachSignal(this, &CoreSession::passwordChanged); - p->attachSlot(SIGNAL(kickClient(int)), this, SLOT(kickClient(int))); - p->attachSignal(this, SIGNAL(disconnectFromCore())); + p->attachSlot(SIGNAL(kickClient(int)), this, &CoreSession::kickClient); + p->attachSignal(this, &CoreSession::disconnectFromCore); QVariantMap data; data["quasselVersion"] = Quassel::buildInfo().fancyVersionString; @@ -272,7 +267,7 @@ void CoreSession::removeClient(Peer* peer) { auto* p = qobject_cast(peer); if (p) - quInfo() << qPrintable(tr("Client")) << p->description() << qPrintable(tr("disconnected (UserId: %1).").arg(user().toInt())); + qInfo() << qPrintable(tr("Client")) << p->description() << qPrintable(tr("disconnected (UserId: %1).").arg(user().toInt())); _coreInfo->setConnectedClientData(signalProxy()->peerCount(), signalProxy()->peerData()); } @@ -519,8 +514,8 @@ Protocol::SessionState CoreSession::sessionState() const void CoreSession::initScriptEngine() { - signalProxy()->attachSlot(SIGNAL(scriptRequest(QString)), this, SLOT(scriptRequest(QString))); - signalProxy()->attachSignal(this, SIGNAL(scriptResult(QString))); + signalProxy()->attachSlot(SIGNAL(scriptRequest(QString)), this, &CoreSession::scriptRequest); + signalProxy()->attachSignal(this, &CoreSession::scriptResult); // FIXME // QScriptValue storage_ = scriptEngine->newQObject(storage);