summary refs log tree commit diff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJoseph Donofry <joedonofry@gmail.com>2020-06-11 22:28:44 -0400
committerGitHub <noreply@github.com>2020-06-11 22:28:44 -0400
commit21dfb3c0b9fb760391ff76f39a81889db94d50e3 (patch)
treefa33fb0a8be883401da6bc90054be31a42df4db0 /src/main.cpp
parentMerge pull request #217 from Nheko-Reborn/reactions (diff)
parentMerge branch origin/master and update translations (diff)
downloadnheko-21dfb3c0b9fb760391ff76f39a81889db94d50e3.tar.xz
Merge pull request #216 from Nheko-Reborn/presence
Presence support
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp

index ec4f638d..46691e6f 100644 --- a/src/main.cpp +++ b/src/main.cpp
@@ -104,6 +104,18 @@ createCacheDirectory() int main(int argc, char *argv[]) { + // needed for settings so need to register before any settings are read to prevent warings + qRegisterMetaType<UserSettings::Presence>(); + + QCoreApplication::setApplicationName("nheko"); + QCoreApplication::setApplicationVersion(nheko::version); + QCoreApplication::setOrganizationName("nheko"); + QCoreApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings); + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + + // this needs to be after setting the application name. Or how would we find our settings + // file then? #if defined(Q_OS_LINUX) || defined(Q_OS_WIN) || defined(Q_OS_FREEBSD) if (qgetenv("QT_SCALE_FACTOR").size() == 0) { float factor = utils::scaleFactor(); @@ -113,12 +125,6 @@ main(int argc, char *argv[]) } #endif - QCoreApplication::setApplicationName("nheko"); - QCoreApplication::setApplicationVersion(nheko::version); - QCoreApplication::setOrganizationName("nheko"); - QCoreApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings); - QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); SingleApplication app(argc, argv, false,