Commit 437a4881 authored by Laurent Montel's avatar Laurent Montel
Browse files

Continue to build against qt6

parent 10e02277
......@@ -71,7 +71,9 @@ set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
PURPOSE "Required for building the X11 based workspace"
)
if(X11_FOUND)
find_package(Qt5X11Extras REQUIRED)
if (QT_MAJOR_VERSION STREQUAL "5")
find_package(Qt5X11Extras REQUIRED)
endif()
find_library(X11_XRes_LIB XRes ${X11_LIB_SEARCH_PATH})
find_path(X11_XRes_INCLUDE_PATH X11/extensions/XRes.h ${X11_INC_SEARCH_PATH})
......
......@@ -59,7 +59,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(6, 0, 0)
const auto parts = line.splitRef(QLatin1Char('|'), Qt::SkipEmptyParts);
#else
const auto parts = QStringView(line).split(QLatin1Char('|'), Qt::SkipEmptyParts);
#endif
if (parts.size() < 7) {
continue;
}
......
......@@ -65,7 +65,11 @@ void NvidiaPlugin::setup()
}
continue;
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
const auto parts = line.splitRef(QLatin1Char(' '), Qt::SkipEmptyParts);
#else
const auto parts = QStringView(line).split(QLatin1Char(' '), Qt::SkipEmptyParts);
#endif
// format at time of writing is
// # gpu pid type sm mem enc dec command
......
......@@ -57,7 +57,9 @@ target_include_directories(processui
)
if(X11_FOUND)
target_link_libraries(processui PRIVATE Qt::X11Extras KF5::WindowSystem)
if (QT_MAJOR_VERSION STREQUAL "5")
target_link_libraries(processui PRIVATE Qt::X11Extras KF5::WindowSystem)
endif()
endif()
if(WEBENGINE_SCRIPTING_ENABLED)
......
......@@ -14,6 +14,7 @@
#include <QAbstractItemModel>
#include <QAction>
#include <QActionGroup>
#include <QApplication>
#include <QComboBox>
#include <QDBusMetaType>
......
Supports Markdown
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