diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,10 +26,7 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS I18n CoreAddons Service ConfigWidgets JobWidgets KIO Crash Completion WidgetsAddons Wallet - Notifications IdleTime) -if(APPLE) - find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS WindowSystem) -endif() + Notifications IdleTime WindowSystem) find_package(Qt5X11Extras ${QT_MIN_VERSION} CONFIG) set_package_properties(Qt5X11Extras PROPERTIES TYPE RECOMMENDED PURPOSE "Recommended for better integration on X11.") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -95,6 +95,7 @@ KF5::KIOCore KF5::Crash KF5::Completion + KF5::WindowSystem Qt5::DBus KF5::WidgetsAddons @@ -111,11 +112,6 @@ Qt5::X11Extras ) endif() -if (APPLE) - target_link_libraries(DrKonqiInternal - KF5::WindowSystem - ) -endif() if (WIN32) target_link_libraries(DrKonqiInternal kdewin) diff --git a/src/bugzillaintegration/reportinterface.cpp b/src/bugzillaintegration/reportinterface.cpp --- a/src/bugzillaintegration/reportinterface.cpp +++ b/src/bugzillaintegration/reportinterface.cpp @@ -160,6 +160,7 @@ report.append(QStringLiteral("Frameworks Version: %1\n").arg(sysInfo->frameworksVersion())); report.append(QStringLiteral("Operating System: %1\n").arg(sysInfo->operatingSystem())); + report.append(QStringLiteral("Windowing system: %1\n").arg(sysInfo->windowSystem())); //LSB output or manually selected distro if ( !sysInfo->distributionPrettyName().isEmpty() ) { diff --git a/src/systeminformation.h b/src/systeminformation.h --- a/src/systeminformation.h +++ b/src/systeminformation.h @@ -56,6 +56,7 @@ QString qtVersion() const; QString frameworksVersion() const; + QString windowSystem() const; /// All helpers finished and the data is complete bool complete() const; diff --git a/src/systeminformation.cpp b/src/systeminformation.cpp --- a/src/systeminformation.cpp +++ b/src/systeminformation.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include static const QString OS_UNSPECIFIED = QStringLiteral("unspecified"); @@ -289,3 +290,16 @@ { return m_complete; } + +QString SystemInformation::windowSystem() const +{ + switch (KWindowSystem::platform()) { + case KWindowSystem::Platform::Unknown: + return QStringLiteral("Unknown"); + case KWindowSystem::Platform::X11: + return QStringLiteral("X11"); + case KWindowSystem::Platform::Wayland: + return QStringLiteral("Wayland"); + } + return QStringLiteral("Unknown"); +}