diff options
author | hjk <hjk@qt.io> | 2020-08-20 11:41:42 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2020-08-20 10:23:15 +0000 |
commit | c03eadefda856ffa5f9b0eb48686a5a8af39875a (patch) | |
tree | ef132e5abbe8234a1339208f1f7bd856f30dcff7 | |
parent | 54c3419eeed07367b2aba592365806906ee8ebef (diff) |
PerfParser: Make it compile with Qt 6
Note that this creates a hard dependency on Qt 5.14. If that's not
wanted the uses of Qt::SkipEmptyParts would need to be #ifdef-ed, too.
Task-number: QTCREATORBUG-24098
Change-Id: I9b26fa9ed39c2200bb8329fa228c96613e529efe
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r-- | app/main.cpp | 4 | ||||
-rw-r--r-- | app/perfsymboltable.cpp | 2 | ||||
-rw-r--r-- | app/perfunwind.cpp | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/app/main.cpp b/app/main.cpp index 5be1667..b9d0bec 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -444,8 +444,12 @@ void PerfTcpSocket::processError(QAbstractSocket::SocketError error) PerfTcpSocket::PerfTcpSocket(QCoreApplication *app, const QString &host, quint16 port) : QTcpSocket(app), host(host), port(port) { +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) + connect(this, &QAbstractSocket::errorOccurred, this, &PerfTcpSocket::processError); +#else connect(this, QOverload<QAbstractSocket::SocketError>::of(&QTcpSocket::error), this, &PerfTcpSocket::processError); +#endif connect(this, &QAbstractSocket::disconnected, this, &QIODevice::close); } diff --git a/app/perfsymboltable.cpp b/app/perfsymboltable.cpp index f82f4f2..a94d159 100644 --- a/app/perfsymboltable.cpp +++ b/app/perfsymboltable.cpp @@ -247,7 +247,7 @@ static bool findBuildIdPath(QFileInfo &path, const QString &fileName) static QStringList splitPath(const QString &path) { - return path.split(QDir::listSeparator(), QString::SkipEmptyParts); + return path.split(QDir::listSeparator(), Qt::SkipEmptyParts); } QFileInfo PerfSymbolTable::findFile(const char *path, const QString &fileName, diff --git a/app/perfunwind.cpp b/app/perfunwind.cpp index 165f086..07ead96 100644 --- a/app/perfunwind.cpp +++ b/app/perfunwind.cpp @@ -793,7 +793,7 @@ PerfKallsymEntry PerfUnwind::findKallsymEntry(quint64 address) const auto &buildId = m_buildIds.value(QByteArrayLiteral("[kernel.kallsyms]")); if (!buildId.isEmpty()) { const auto debugPaths = m_debugPath.split(QDir::listSeparator(), - QString::SkipEmptyParts); + Qt::SkipEmptyParts); for (const auto &debugPath : debugPaths) { const QString buildIdPath = debugPath + QDir::separator() + QLatin1String("[kernel.kallsyms]") + |