Commit ba9a5a34 authored by Laurent Montel's avatar Laurent Montel 😁

Make it compile against qt5.15. SkipEmptyParts is part of Qt::.

parent fb60360a
......@@ -75,7 +75,11 @@ NetworkPlugin::NetworkPlugin(QObject *parent, const QVariantList &args)
const QString line = QString::fromUtf8(m_process->readLine());
// Each line consists of: timestamp|PID|pid|IN|in_bytes|OUT|out_bytes
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const auto parts = line.splitRef(QLatin1Char('|'), QString::SkipEmptyParts);
#else
const auto parts = line.splitRef(QLatin1Char('|'), Qt::SkipEmptyParts);
#endif
if (parts.size() < 7) {
continue;
}
......
......@@ -79,7 +79,11 @@ void NvidiaPlugin::setup()
}
continue;
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const auto parts = line.splitRef(QLatin1Char(' '), QString::SkipEmptyParts);
#else
const auto parts = line.splitRef(QLatin1Char(' '), Qt::SkipEmptyParts);
#endif
// format at time of writing is
// # gpu pid type sm mem enc dec command
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment