Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2017-09-20 11:14:48 +0300
committerOlivier Goffart <olivier@woboq.com>2017-09-21 15:05:39 +0300
commitff4213b59f223b60e87e70af2db6201986f76df8 (patch)
tree98398cd1a1014b9ef1c47457b9139ccf3a546ace /src/gui/socketapi.cpp
parentc4e51247d833d4f08df7036fe4a7823a6f6e0ff6 (diff)
Use the Qt5 connection syntax (automated with clazy)
This is motivated by the fact that QMetaObject::noralizeSignature takes 7.35% CPU of the LargeSyncBench. (Mostly from ABstractNetworkJob::setupConnections and PropagateUploadFileV1::startNextChunk). It could be fixed by using normalized signature in the connection statement, but i tought it was a good oportunity to modernize the code. This commit only contains calls that were automatically converted with clazy.
Diffstat (limited to 'src/gui/socketapi.cpp')
-rw-r--r--src/gui/socketapi.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/socketapi.cpp b/src/gui/socketapi.cpp
index 0073e6154..b46ff1c21 100644
--- a/src/gui/socketapi.cpp
+++ b/src/gui/socketapi.cpp
@@ -207,10 +207,10 @@ SocketApi::SocketApi(QObject *parent)
qCInfo(lcSocketApi) << "server started, listening at " << socketPath;
}
- connect(&_localServer, SIGNAL(newConnection()), this, SLOT(slotNewConnection()));
+ connect(&_localServer, &QLocalServer::newConnection, this, &SocketApi::slotNewConnection);
// folder watcher
- connect(FolderMan::instance(), SIGNAL(folderSyncStateChange(Folder *)), this, SLOT(slotUpdateFolderView(Folder *)));
+ connect(FolderMan::instance(), &FolderMan::folderSyncStateChange, this, &SocketApi::slotUpdateFolderView);
}
SocketApi::~SocketApi()
@@ -230,9 +230,9 @@ void SocketApi::slotNewConnection()
return;
}
qCInfo(lcSocketApi) << "New connection" << socket;
- connect(socket, SIGNAL(readyRead()), this, SLOT(slotReadSocket()));
+ connect(socket, &QIODevice::readyRead, this, &SocketApi::slotReadSocket);
connect(socket, SIGNAL(disconnected()), this, SLOT(onLostConnection()));
- connect(socket, SIGNAL(destroyed(QObject *)), this, SLOT(slotSocketDestroyed(QObject *)));
+ connect(socket, &QObject::destroyed, this, &SocketApi::slotSocketDestroyed);
ASSERT(socket->readAll().isEmpty());
_listeners.append(SocketListener(socket));