2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Show better information in sessions list.

This commit is contained in:
John Preston
2018-06-03 22:52:23 +03:00
parent b4a2e84aa3
commit e122353bfb
12 changed files with 155 additions and 34 deletions

View File

@@ -38,8 +38,27 @@ private:
};
QString DeviceModel() {
#ifdef Q_OS_LINUX64
return "PC 64bit";
#else // Q_OS_LINUX64
return "PC 32bit";
#endif // Q_OS_LINUX64
}
QString SystemVersion() {
const auto result = getenv("XDG_CURRENT_DESKTOP");
const auto value = result ? QString::fromLatin1(result) : QString();
const auto list = value.split(':', QString::SkipEmptyParts);
return list.isEmpty() ? "Linux" : "Linux " + list[0];
}
} // namespace
Launcher::Launcher(int argc, char *argv[])
: Core::Launcher(argc, argv, DeviceModel(), SystemVersion()) {
}
bool Launcher::launchUpdater(UpdaterLaunch action) {
if (cExeName().isEmpty()) {
return false;

View File

@@ -13,7 +13,7 @@ namespace Platform {
class Launcher : public Core::Launcher {
public:
using Core::Launcher::Launcher;
Launcher(int argc, char *argv[]);
private:
bool launchUpdater(UpdaterLaunch action) override;