mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 15:47:11 +02:00
Remove unneeded checks for GtkIntegration::loaded()
Due to rearranged loading of gtk methods
This commit is contained in:
parent
53fd3fce84
commit
23c8d7f38f
3 changed files with 3 additions and 14 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue