hluk / hluk/CopyQ

Scripting API: version() does not indicate windowing system / display server

Open
#3,478 4 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
C++
Stars
12.3k
Forks
593
Avg merge
2d 8h
Merged PRs (30d)
9

Description

Several CopyQ bugs/issues on GNU + Linux/BSD depend on the windowing system/platform. Unfortunately, it can take time to get information on the display server used, because while the bug reporting template suggests `copy(version())`, [`version()`](https://github.com/hluk/CopyQ/blob/master/src/scriptable/scriptable.cpp#L717) does not indicate the platform.

For example, the initial body of ticket #3416 did not include that information.

**Describe the solution you'd like**
It would be good if, when running on GNU OSs, a line indicating the windowing system like KInfoCenter’s “Graphics Platform” would be added to `version()`. Ideally, this would be fed by [QSysInfo](https://doc.qt.io/qt-6/qsysinfo.html), but this would apparently need an upstream change as I don't see any member providing that.

**Describe alternatives you've considered**
To avoid blocking on Qt, we could steal [KInfoCenter’s code/algorithm](https://github.com/KDE/kinfocenter/blob/master/kcms/about-distro/src/GraphicsPlatformEntry.cpp), which is freely licensed C++. It is fairly simple, although a little hacky/fragile. Perhaps [QWaylandCompositor](https://doc.qt.io/qt-6/qwaylandcompositor.html#details) could be used to replace the Wayland case.

Even better than just the system/platform would be to indicate the display server (for example X.org, KWin or Mutter).

**Additional context**
Obviously, such information does not belong in a “version string”, but I guess it is time to acknowledge that `version()` no longer returns just the version. The specification could be adapted, and perhaps the function can even be renamed something like `getDiagnosticInfo()`.

License
This report (including all messages and attachments I add to it) is offered under the terms of CC0 1.0.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.