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!")};
}
for (auto &&session : _sessions) {
- connect(session, SIGNAL(shutdownComplete(SessionThread*)), this, SLOT(onSessionShutdown(SessionThread*)));
+ connect(session, &SessionThread::shutdownComplete, this, &Core::onSessionShutdown);
session->shutdown();
}
}
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) {
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);
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());