Commit 8b8f8136 authored by David Redondo's avatar David Redondo 🏎
Browse files

Report windowing system

Summary:
Sometimes applications or Plasma have different code paths for X11 or Wayland.
Drkonqi reporting that saves one "question -> wait for reply -> period until reply
is seen"-cycle.

Test Plan: Try it in test mode

Reviewers: sitter

Reviewed By: sitter

Subscribers: apol, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D24890
parent f7125e4e
...@@ -26,10 +26,7 @@ find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Widgets Test ...@@ -26,10 +26,7 @@ find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Widgets Test
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS I18n CoreAddons Service find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS I18n CoreAddons Service
ConfigWidgets JobWidgets KIO Crash Completion WidgetsAddons Wallet ConfigWidgets JobWidgets KIO Crash Completion WidgetsAddons Wallet
Notifications IdleTime) Notifications IdleTime WindowSystem)
if(APPLE)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS WindowSystem)
endif()
find_package(Qt5X11Extras ${QT_MIN_VERSION} CONFIG) find_package(Qt5X11Extras ${QT_MIN_VERSION} CONFIG)
set_package_properties(Qt5X11Extras PROPERTIES TYPE RECOMMENDED PURPOSE "Recommended for better integration on X11.") set_package_properties(Qt5X11Extras PROPERTIES TYPE RECOMMENDED PURPOSE "Recommended for better integration on X11.")
......
...@@ -95,6 +95,7 @@ target_link_libraries(DrKonqiInternal ...@@ -95,6 +95,7 @@ target_link_libraries(DrKonqiInternal
KF5::KIOCore KF5::KIOCore
KF5::Crash KF5::Crash
KF5::Completion KF5::Completion
KF5::WindowSystem
Qt5::DBus Qt5::DBus
KF5::WidgetsAddons KF5::WidgetsAddons
...@@ -111,11 +112,6 @@ if (${Qt5X11Extras_FOUND}) ...@@ -111,11 +112,6 @@ if (${Qt5X11Extras_FOUND})
Qt5::X11Extras Qt5::X11Extras
) )
endif() endif()
if (APPLE)
target_link_libraries(DrKonqiInternal
KF5::WindowSystem
)
endif()
if (WIN32) if (WIN32)
target_link_libraries(DrKonqiInternal kdewin) target_link_libraries(DrKonqiInternal kdewin)
......
...@@ -160,6 +160,7 @@ QString ReportInterface::generateReportFullText(DrKonqiStamp stamp, Backtrace in ...@@ -160,6 +160,7 @@ QString ReportInterface::generateReportFullText(DrKonqiStamp stamp, Backtrace in
report.append(QStringLiteral("Frameworks Version: %1\n").arg(sysInfo->frameworksVersion())); report.append(QStringLiteral("Frameworks Version: %1\n").arg(sysInfo->frameworksVersion()));
report.append(QStringLiteral("Operating System: %1\n").arg(sysInfo->operatingSystem())); 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 //LSB output or manually selected distro
if ( !sysInfo->distributionPrettyName().isEmpty() ) { if ( !sysInfo->distributionPrettyName().isEmpty() ) {
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <kcoreaddons_version.h> #include <kcoreaddons_version.h>
#include <KCoreAddons> #include <KCoreAddons>
#include <KOSRelease> #include <KOSRelease>
#include <KWindowSystem>
#include <QStandardPaths> #include <QStandardPaths>
static const QString OS_UNSPECIFIED = QStringLiteral("unspecified"); static const QString OS_UNSPECIFIED = QStringLiteral("unspecified");
...@@ -289,3 +290,16 @@ bool SystemInformation::complete() const ...@@ -289,3 +290,16 @@ bool SystemInformation::complete() const
{ {
return m_complete; 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");
}
...@@ -56,6 +56,7 @@ class SystemInformation: public QObject ...@@ -56,6 +56,7 @@ class SystemInformation: public QObject
QString qtVersion() const; QString qtVersion() const;
QString frameworksVersion() const; QString frameworksVersion() const;
QString windowSystem() const;
/// All helpers finished and the data is complete /// All helpers finished and the data is complete
bool complete() const; bool complete() const;
......
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