diff --git a/.gitea/workflows/release.yml b/.forgejo/workflows/release.yml similarity index 100% rename from .gitea/workflows/release.yml rename to .forgejo/workflows/release.yml diff --git a/.gitmodules b/.gitmodules index 448dae5..3742a90 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,6 @@ [submodule "external/qxmpp"] path = external/qxmpp - url = https://github.com/qxmpp-project/qxmpp.git -[submodule "external/storage"] - path = external/storage - url = https://git.macaw.me/blue/storage + url = https://invent.kde.org/libraries/qxmpp/ [submodule "external/lmdbal"] path = external/lmdbal - url = gitea@git.macaw.me:blue/lmdbal.git + url = https://git.macaw.me/blue/lmdbal diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d764ac..5eb98a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -207,7 +207,8 @@ if(CMAKE_COMPILER_IS_GNUCXX) list(APPEND COMPILE_OPTIONS -O3) endif() if (CMAKE_BUILD_TYPE STREQUAL Debug) - list(APPEND COMPILE_OPTIONS -g) + list(APPEND COMPILE_OPTIONS -O0) + list(APPEND COMPILE_OPTIONS -g3) list(APPEND COMPILE_OPTIONS -Wall) list(APPEND COMPILE_OPTIONS -Wextra) endif() diff --git a/external/lmdbal b/external/lmdbal index 3ae1fd1..3701fb9 160000 --- a/external/lmdbal +++ b/external/lmdbal @@ -1 +1 @@ -Subproject commit 3ae1fd15c0f4f753227d6fd5bafa4968c7310b92 +Subproject commit 3701fb92a1498bd737828d8d1df63d4c4d8f02c7 diff --git a/external/qxmpp b/external/qxmpp index 0cd7379..ca1bdb3 160000 --- a/external/qxmpp +++ b/external/qxmpp @@ -1 +1 @@ -Subproject commit 0cd7379bd78aa01af7e84f2fad6269ef0c0ba49c +Subproject commit ca1bdb3e46c71ceb334e6dc52291850f0c96cb50 diff --git a/main/root.cpp b/main/root.cpp index 87d97bb..f71951c 100644 --- a/main/root.cpp +++ b/main/root.cpp @@ -64,9 +64,14 @@ Root::~Root() { delete global; } - void Root::initializeTranslation() { +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + bool defaultLoaded = defaultTranslator.load("qt_" + QLocale::system().name(), QLibraryInfo::path(QLibraryInfo::TranslationsPath)); + if (!defaultLoaded) + qDebug() << "Couldn't load default translation"; +#else defaultTranslator.load("qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); +#endif installTranslator(&defaultTranslator); QStringList shares = QStandardPaths::standardLocations(QStandardPaths::AppDataLocation); @@ -78,15 +83,17 @@ void Root::initializeTranslation() { } if (!found) - currentTranslator.load(QLocale(), QLatin1String("squawk"), ".", QCoreApplication::applicationDirPath()); + found = currentTranslator.load(QLocale(), QLatin1String("squawk"), ".", QCoreApplication::applicationDirPath()); - - installTranslator(¤tTranslator); + if (found) + installTranslator(¤tTranslator); + else + qDebug() << "Couldn't load current translation"; } void Root::initializeAppIcon() { - for (std::vector::size_type i = 0; i < appIconSizes.size(); ++i) - appIcon.addFile(":images/logo.svg", QSize(appIconSizes[i], appIconSizes[i])); + for (unsigned int appIconSize : appIconSizes) + appIcon.addFile(":images/logo.svg", QSize(appIconSize, appIconSize)); Root::setWindowIcon(appIcon); }