Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KInfoCenter
Commits
a07380a3
Commit
a07380a3
authored
Jan 25, 2021
by
Méven Car
Browse files
About-distro: display Graphics Platform (X11 or Wayland)
Also include it in the copy to clipboard output.
BUG: 428382
parent
f8d6a66c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Modules/about-distro/src/CMakeLists.txt
View file @
a07380a3
...
...
@@ -10,6 +10,7 @@ set(kcm_SRCS
SectionLabel.cpp
BitEntry.cpp
MemoryEntry.cpp
GraphicsPlatformEntry.cpp
CPUEntry.cpp
GPUEntry.cpp
FancyString.cpp
...
...
Modules/about-distro/src/GraphicsPlatformEntry.cpp
0 → 100644
View file @
a07380a3
/*
SPDX-FileCopyrightText: 2021 Méven Car <meven.car@kdemail.net>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#include
"GraphicsPlatformEntry.h"
#include
<QGuiApplication>
GraphicsPlatformEntry
::
GraphicsPlatformEntry
()
:
Entry
(
ki18n
(
"Graphics Platform:"
),
graphicsPlatform
())
{
}
QString
GraphicsPlatformEntry
::
graphicsPlatform
()
{
const
QString
platformName
=
QGuiApplication
::
platformName
();
if
(
platformName
.
startsWith
(
QLatin1String
(
"xcb"
),
Qt
::
CaseInsensitive
))
{
return
QStringLiteral
(
"X11"
);
}
if
(
platformName
.
startsWith
(
QLatin1String
(
"wayland"
),
Qt
::
CaseInsensitive
))
{
return
QStringLiteral
(
"Wayland"
);
}
return
platformName
;
}
Modules/about-distro/src/GraphicsPlatformEntry.h
0 → 100644
View file @
a07380a3
/*
SPDX-FileCopyrightText: 2021 Méven Car <meven.car@kdemail.net>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#ifndef GRAPHICSPLATFORMENTRY_H
#define GRAPHICSPLATFORMENTRY_H
#include
"Entry.h"
class
GraphicsPlatformEntry
:
public
Entry
{
public:
GraphicsPlatformEntry
();
static
QString
graphicsPlatform
();
};
#endif // GRAPHICSPLATFORMENTRY_H
Modules/about-distro/src/Module.cpp
View file @
a07380a3
...
...
@@ -20,6 +20,7 @@
#include
"CPUEntry.h"
#include
"BitEntry.h"
#include
"GraphicsPlatformEntry.h"
#include
"GPUEntry.h"
#include
"KernelEntry.h"
#include
"MemoryEntry.h"
...
...
@@ -183,7 +184,8 @@ void Module::loadEntries()
new
Entry
(
ki18n
(
"KDE Frameworks Version:"
),
KCoreAddons
::
versionString
()),
new
Entry
(
ki18n
(
"Qt Version:"
),
QString
::
fromLatin1
(
qVersion
())),
new
KernelEntry
(),
new
BitEntry
()
new
BitEntry
(),
new
GraphicsPlatformEntry
()
});
// hardware
...
...
Méven Car
@meven
mentioned in merge request
!22 (merged)
·
Feb 02, 2021
mentioned in merge request
!22 (merged)
mentioned in merge request !22
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment