Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add information about Linux GFX environnement in FC info #2038

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 21 additions & 1 deletion src/Gui/Splashscreen.cpp
Expand Up @@ -33,6 +33,7 @@
# include <QMutex>
# include <QTextBrowser>
# include <QProcess>
# include <QProcessEnvironment>
# include <QSysInfo>
# include <QTextStream>
# include <QWaitCondition>
Expand Down Expand Up @@ -738,7 +739,26 @@ void AboutDialog::on_copyButton_clicked()
QString major = QString::fromLatin1(config["BuildVersionMajor"].c_str());
QString minor = QString::fromLatin1(config["BuildVersionMinor"].c_str());
QString build = QString::fromLatin1(config["BuildRevision"].c_str());
str << "OS: " << SystemInfo::getOperatingSystem() << endl;

QString deskEnv = QProcessEnvironment::systemEnvironment().value(QString::fromLatin1("XDG_CURRENT_DESKTOP"),QString::fromLatin1(""));
QString deskSess = QProcessEnvironment::systemEnvironment().value(QString::fromLatin1("DESKTOP_SESSION"),QString::fromLatin1(""));
QString deskInfo = QString::fromLatin1("");

if (!(deskEnv == QString::fromLatin1("") && deskSess == QString::fromLatin1("")))
{
if (deskEnv == QString::fromLatin1("") || deskSess == QString::fromLatin1(""))
{
deskInfo = QString::fromLatin1(" (") + deskEnv + deskSess + QString::fromLatin1(")");

}
else
{
deskInfo = QString::fromLatin1(" (") + deskEnv + QString::fromLatin1("/") + deskSess + QString::fromLatin1(")");
}
}

str << "OS: " << SystemInfo::getOperatingSystem() << deskInfo << endl;

int wordSize = SystemInfo::getWordSizeOfOS();
if (wordSize > 0) {
str << "Word size of OS: " << wordSize << "-bit" << endl;
Expand Down