mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Remove unneeded checks for GtkIntegration::loaded()
Due to rearranged loading of gtk methods
This commit is contained in:
@@ -22,8 +22,6 @@ using BaseGtkIntegration = base::Platform::GtkIntegration;
|
||||
|
||||
namespace {
|
||||
|
||||
bool Loaded = false;
|
||||
|
||||
QLibrary &Library() {
|
||||
return BaseGtkIntegration::Instance()->library();
|
||||
}
|
||||
@@ -57,7 +55,8 @@ GtkIntegration *GtkIntegration::Instance() {
|
||||
}
|
||||
|
||||
void GtkIntegration::load() {
|
||||
Expects(!loaded());
|
||||
static bool Loaded = false;
|
||||
Expects(!Loaded);
|
||||
|
||||
if (!BaseGtkIntegration::Instance()->loaded()) {
|
||||
return;
|
||||
@@ -134,13 +133,8 @@ void GtkIntegration::load() {
|
||||
Loaded = true;
|
||||
}
|
||||
|
||||
bool GtkIntegration::loaded() const {
|
||||
return Loaded;
|
||||
}
|
||||
|
||||
std::optional<int> GtkIntegration::scaleFactor() const {
|
||||
if (!loaded()
|
||||
|| (gdk_display_get_default == nullptr)
|
||||
if ((gdk_display_get_default == nullptr)
|
||||
|| (gdk_display_get_monitor == nullptr)
|
||||
|| (gdk_display_get_primary_monitor == nullptr)
|
||||
|| (gdk_monitor_get_scale_factor == nullptr)) {
|
||||
|
||||
@@ -17,7 +17,6 @@ public:
|
||||
static GtkIntegration *Instance();
|
||||
|
||||
void load();
|
||||
[[nodiscard]] bool loaded() const;
|
||||
|
||||
[[nodiscard]] std::optional<int> scaleFactor() const;
|
||||
|
||||
|
||||
@@ -20,10 +20,6 @@ GtkIntegration *GtkIntegration::Instance() {
|
||||
void GtkIntegration::load() {
|
||||
}
|
||||
|
||||
bool GtkIntegration::loaded() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::optional<int> GtkIntegration::scaleFactor() const {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user