Commit 47577998 authored by Nate Graham's avatar Nate Graham
Browse files

Add KWin Support Information KCM



This should help bug reporters gather relevant KWin information more
easily.

co-authored-by: Harald Sitter's avatarHarald Sitter <sitter@kde.org>
parent 9ec360a0
Pipeline #230881 failed with stage
in 1 minute and 20 seconds
......@@ -2,6 +2,7 @@
add_subdirectory( about-distro )
add_subdirectory( devinfo )
add_subdirectory(vulkan)
add_subdirectory(kwinsupportinfo)
add_subdirectory(cpu)
add_subdirectory(wayland)
add_subdirectory(interrupts)
......
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-FileCopyrightText: 2021 Harald Sitter <sitter@kde.org>
# SPDX-FileCopyrightText: 2022 Nate Graham <nate@kde.org>
add_definitions(-DTRANSLATION_DOMAIN=\"kcm_kwinsupportinfo\")
add_library(kcm_kwinsupportinfo MODULE main.cpp)
target_link_libraries(kcm_kwinsupportinfo KF5::CoreAddons KF5::QuickAddons KF5::I18n KInfoCenterInternal)
install(TARGETS kcm_kwinsupportinfo DESTINATION ${KDE_INSTALL_PLUGINDIR}/plasma/kcms/kinfocenter)
kpackage_install_package(package kcm_kwinsupportinfo kcms)
#!/bin/sh
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-FileCopyrightText: 2020-2021 Harald Sitter <sitter@kde.org>
# SPDX-FileCopyrightText: 2022 Nate Graham <nate@kde.org>
$XGETTEXT `find . -name \*.cpp -o -name \*.h` -o $podir/kcm_kwinsupportinfo.pot
# Extract JavaScripty files as what they are, otherwise for example template literals won't work correctly (by default we extract as C++).
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
$XGETTEXT --join-existing --language=JavaScript `find . -name \*.qml -o -name \*.js` -o $podir/kcm_kwinsupportinfo.pot
{
"Categories": "Qt;KDE;X-KDE-information;",
"KPlugin": {
"Description": "KWin Support information",
"Icon": "kwin",
"Name": "Window Manager"
},
"TryExec": "qdbus",
"X-KDE-KInfoCenter-Category": "graphical_information"
}
SPDX-License-Identifier: CC0-1.0
SPDX-FileCopyrightText: 2021 Harald Sitter <sitter@kde.org>
SPDX-FileCopyrightText: 2022 Nate Graham <nate@kde.org>
/*
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
SPDX-FileCopyrightText: 2021 Harald Sitter <sitter@kde.org>
SPDX-FileCopyrightText: 2022 Nate Graham <nate@kde.org>
*/
#include <KAboutData>
#include <KLocalizedString>
#include <KPluginFactory>
#include <KQuickAddons/ConfigModule>
#include <CommandOutputContext.h>
class KCMKWinSupportInfo : public KQuickAddons::ConfigModule
{
Q_OBJECT
public:
explicit KCMKWinSupportInfo(QObject *parent, const KPluginMetaData &data, const QVariantList &args)
: ConfigModule(parent, data, args)
{
auto outputContext = new CommandOutputContext(QStringLiteral("qdbus"),
{QStringLiteral("org.kde.KWin"), QStringLiteral("/KWin"), QStringLiteral("supportInformation")},
parent);
qmlRegisterSingletonInstance("org.kde.kinfocenter.kwinsupportinfo.private", 1, 0, "InfoOutputContext", outputContext);
auto *about = new KAboutData(QStringLiteral("kcm_kwinsupportinfo"),
i18nc("@label kcm name", "Window Manager"),
QStringLiteral("1.0"),
QString(),
KAboutLicense::GPL);
about->addAuthor(i18n("Nate Graham"), QString(), QStringLiteral("nate@kde.org"));
setAboutData(about);
}
};
K_PLUGIN_CLASS_WITH_JSON(KCMKWinSupportInfo, "kcm_kwinsupportinfo.json")
#include "main.moc"
/*
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
SPDX-FileCopyrightText: 2021 Harald Sitter <sitter@kde.org>
SPDX-FileCopyrightText: 2022 Nate Graham <nate@kde.org>
*/
import QtQuick 2.5
import org.kde.kcm 1.4 as KCM
import org.kde.kinfocenter.private 1.0 as KInfoCenter
import org.kde.kinfocenter.kwinsupportinfo.private 1.0
KInfoCenter.CommandOutputKCM {
KCM.ConfigModule.quickHelp: i18nc("@info", "KWin Support Information")
output: InfoOutputContext
}
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