Gui: add Qt Platform name to splashscreen information dump

There is several bugs in FreeCAD which are related to platform (mostly wayland),
the hope is this will make it easier to identify the dependence of bug on the platform
This commit is contained in:
Jiří Pinkava
2024-10-10 23:19:02 +02:00
committed by Yorik van Havre
parent df639075b1
commit 37e021edd4

View File

@@ -819,13 +819,20 @@ void AboutDialog::copyToClipboard()
QString deskEnv = QProcessEnvironment::systemEnvironment().value(QStringLiteral("XDG_CURRENT_DESKTOP"), QString());
QString deskSess = QProcessEnvironment::systemEnvironment().value(QStringLiteral("DESKTOP_SESSION"), QString());
QStringList deskInfoList;
QString deskInfo;
if ( !(deskEnv.isEmpty() && deskSess.isEmpty()) ) {
if ( deskEnv.isEmpty() || deskSess.isEmpty() )
deskInfo = QLatin1String(" (") + deskEnv + deskSess + QLatin1String(")");
else
deskInfo = QLatin1String(" (") + deskEnv + QLatin1String("/") + deskSess + QLatin1String(")");
if (!deskEnv.isEmpty()) {
deskInfoList.append(deskEnv);
}
if (!deskSess.isEmpty()) {
deskInfoList.append(deskSess);
}
if (qGuiApp->platformName() != QLatin1String("windows") && qGuiApp->platformName() != QLatin1String("cocoa")) {
deskInfoList.append(qGuiApp->platformName());
}
if(!deskInfoList.isEmpty()) {
deskInfo = QLatin1String(" (") + deskInfoList.join(QLatin1String("/")) + QLatin1String(")");
}
str << "OS: " << prettyProductInfoWrapper() << deskInfo << '\n';