64 lines
1.6 KiB
Diff
64 lines
1.6 KiB
Diff
--- Telegram/lib_base/base/platform/linux/base_info_linux.cpp 2020-06-03 09:28:30.000000000 +0200
|
|
+++ - 2020-06-08 00:40:30.503197310 +0200
|
|
@@ -13,7 +13,6 @@
|
|
#include <QtCore/QVersionNumber>
|
|
#include <QtCore/QDate>
|
|
#include <QtGui/QGuiApplication>
|
|
-#include <gnu/libc-version.h>
|
|
|
|
namespace Platform {
|
|
namespace {
|
|
@@ -53,15 +52,6 @@
|
|
}
|
|
}
|
|
|
|
-const std::optional<QVersionNumber> &GetLibCVersion() {
|
|
- static const auto result = [&] {
|
|
- const auto version = gnu_get_libc_version(); // #TODO log
|
|
- const auto parsed = QVersionNumber::fromString(version);
|
|
- return parsed.isNull() ? std::nullopt : std::make_optional(parsed);
|
|
- }();
|
|
- return result;
|
|
-}
|
|
-
|
|
} // namespace
|
|
|
|
QString DeviceModelPretty() {
|
|
@@ -84,8 +74,7 @@
|
|
return "Linux "
|
|
+ (list.isEmpty() ? QString() : list[0] + ' ')
|
|
+ (IsWayland() ? "Wayland " : "X11 ")
|
|
- + "glibc "
|
|
- + GetGlibCVersion();
|
|
+ + "void ";
|
|
}
|
|
|
|
QString SystemCountry() {
|
|
@@ -103,11 +92,7 @@
|
|
QDate WhenSystemBecomesOutdated() {
|
|
if (IsLinux32Bit()) {
|
|
return QDate(2020, 9, 1);
|
|
- } else if (const auto version = GetGlibCVersion(); !version.isEmpty()) {
|
|
- if (QVersionNumber::fromString(version) < QVersionNumber(2, 23)) {
|
|
- return QDate(2020, 9, 1); // Older than Ubuntu 16.04.
|
|
- }
|
|
- }
|
|
+ }
|
|
return QDate();
|
|
}
|
|
|
|
@@ -129,14 +114,6 @@
|
|
}
|
|
}
|
|
|
|
-QString GetGlibCVersion() {
|
|
- static const auto result = [&] {
|
|
- const auto version = QString::fromLatin1(gnu_get_libc_version());
|
|
- return QVersionNumber::fromString(version).isNull() ? QString() : version;
|
|
- }();
|
|
- return result;
|
|
-}
|
|
-
|
|
bool IsWayland() {
|
|
return QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive);
|
|
}
|