replaced one structure, stored omemo support in Global object

This commit is contained in:
Blue 2022-12-29 01:41:59 +03:00
parent dfe72ca36c
commit 758a9d95f3
Signed by: blue
GPG key ID: 9B203B252A63EE38
5 changed files with 17 additions and 26 deletions

View file

@ -20,6 +20,11 @@
#include "enums.h"
#include "ui/models/roster.h"
#ifdef WITH_OMEMO
constexpr bool OMEMO_SUPPORT = true;
#else
constexpr bool OMEMO_SUPPORT = false
#endif
Shared::Global* Shared::Global::instance = 0;
const std::set<QString> Shared::Global::supportedImagesExts = {"png", "jpg", "webp", "jpeg", "gif", "svg"};
@ -96,6 +101,7 @@ Shared::Global::Global():
}),
defaultSystemStyle(QApplication::style()->objectName()),
defaultSystemPalette(QApplication::palette()),
omemoSupport(OMEMO_SUPPORT),
pluginSupport({
{"KWallet", false},
{"openFileManagerWindowJob", false},

View file

@ -99,6 +99,7 @@ namespace Shared {
static QString getColorSchemeName(const QString& path);
static void setTheme(const QString& path);
static void setStyle(const QString& style);
const bool omemoSupport;
template<typename T>
static T fromInt(int src);