X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcore.cpp;h=84ce9796b3a0ee22de00c81d5f4d02ebf6652f5f;hp=35b46b613886dd93f76b8ccb0ae19f0fd382e416;hb=fcacaaf16551524c7ebb6114254d005274cc3d63;hpb=714b39660fe19e7f092880019429c8da76ee2bd5 diff --git a/src/core/core.cpp b/src/core/core.cpp index 35b46b61..84ce9796 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -221,12 +221,12 @@ void Core::init() return false; }); - connect(&_storageSyncTimer, SIGNAL(timeout()), this, SLOT(syncStorage())); + connect(&_storageSyncTimer, &QTimer::timeout, this, &Core::syncStorage); _storageSyncTimer.start(10 * 60 * 1000); // 10 minutes } - connect(&_server, SIGNAL(newConnection()), this, SLOT(incomingConnection())); - connect(&_v6server, SIGNAL(newConnection()), this, SLOT(incomingConnection())); + connect(&_server, &QTcpServer::newConnection, this, &Core::incomingConnection); + connect(&_v6server, &QTcpServer::newConnection, this, &Core::incomingConnection); if (!startListening()) { throw ExitException{EXIT_FAILURE, tr("Cannot open port for listening!")}; @@ -443,7 +443,7 @@ bool Core::initStorage(const QString &backend, const QVariantMap &settings, return false; } - connect(storage.get(), SIGNAL(dbUpgradeInProgress(bool)), this, SIGNAL(dbUpgradeInProgress(bool))); + connect(storage.get(), &Storage::dbUpgradeInProgress, this, &Core::dbUpgradeInProgress); Storage::State storageState = storage->init(settings, environment, loadFromEnvironment); switch (storageState) { @@ -465,8 +465,8 @@ bool Core::initStorage(const QString &backend, const QVariantMap &settings, case Storage::IsReady: // delete all other backends _registeredStorageBackends.clear(); - connect(storage.get(), SIGNAL(bufferInfoUpdated(UserId, const BufferInfo &)), - this, SIGNAL(bufferInfoUpdated(UserId, const BufferInfo &))); + connect(storage.get(), &Storage::bufferInfoUpdated, + this, &Core::bufferInfoUpdated); break; } _storage = std::move(storage); @@ -744,9 +744,9 @@ void Core::incomingConnection() auto *handler = new CoreAuthHandler(socket, this); _connectingClients.insert(handler); - connect(handler, SIGNAL(disconnected()), SLOT(clientDisconnected())); - connect(handler, SIGNAL(socketError(QAbstractSocket::SocketError,QString)), SLOT(socketError(QAbstractSocket::SocketError,QString))); - connect(handler, SIGNAL(handshakeComplete(RemotePeer*,UserId)), SLOT(setupClientSession(RemotePeer*,UserId))); + connect(handler, &AuthHandler::disconnected, this, &Core::clientDisconnected); + connect(handler, &AuthHandler::socketError, this, &Core::socketError); + connect(handler, &CoreAuthHandler::handshakeComplete, this, &Core::setupClientSession); quInfo() << qPrintable(tr("Client connected from")) << qPrintable(socket->peerAddress().toString());