aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qmldebug/qmldebugconnection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/qmldebug/qmldebugconnection.cpp')
-rw-r--r--src/libs/qmldebug/qmldebugconnection.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libs/qmldebug/qmldebugconnection.cpp b/src/libs/qmldebug/qmldebugconnection.cpp
index 33b050efb3..cb31557d10 100644
--- a/src/libs/qmldebug/qmldebugconnection.cpp
+++ b/src/libs/qmldebug/qmldebugconnection.cpp
@@ -27,6 +27,7 @@
#include "qmldebugclient.h"
#include "qpacketprotocol.h"
+#include <utils/porting.h>
#include <utils/temporaryfile.h>
#include <QLocalServer>
@@ -346,8 +347,12 @@ void QmlDebugConnection::connectToHost(const QString &hostName, quint16 port)
emit logStateChange(socketStateToString(state));
});
- connect(socket, QOverload<QAbstractSocket::SocketError>::of(&QAbstractSocket::error),
- this, [this](QAbstractSocket::SocketError error) {
+#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
+ const auto errorOccurred = QOverload<QAbstractSocket::SocketError>::of(&QAbstractSocket::error);
+#else
+ const auto errorOccurred = &QAbstractSocket::errorOccurred;
+#endif
+ connect(socket, errorOccurred, this, [this](QAbstractSocket::SocketError error) {
emit logError(socketErrorToString(error));
socketDisconnected();
}, Qt::QueuedConnection);