Minor changes

This commit is contained in:
Blue 2025-05-05 18:20:08 +03:00
parent 066ab487fc
commit c147e02187
Signed by untrusted user: blue
GPG key ID: 9B203B252A63EE38
6 changed files with 19 additions and 14 deletions

7
.gitmodules vendored
View file

@ -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

View file

@ -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()

2
external/lmdbal vendored

@ -1 +1 @@
Subproject commit 3ae1fd15c0f4f753227d6fd5bafa4968c7310b92
Subproject commit 3701fb92a1498bd737828d8d1df63d4c4d8f02c7

2
external/qxmpp vendored

@ -1 +1 @@
Subproject commit 0cd7379bd78aa01af7e84f2fad6269ef0c0ba49c
Subproject commit ca1bdb3e46c71ceb334e6dc52291850f0c96cb50

View file

@ -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(&currentTranslator);
if (found)
installTranslator(&currentTranslator);
else
qDebug() << "Couldn't load current translation";
}
void Root::initializeAppIcon() {
for (std::vector<unsigned int>::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);
}