File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed
Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change 1414
1515#include " platform.h"
1616
17- #include " platform_unix.h"
1817#if defined(Q_OS_WIN)
1918#include " platform_win.h"
20- #endif
21-
22- #if defined(Q_OS_MAC)
19+ #elif defined(Q_OS_MACOS)
2320#include " platform_mac.h"
21+ #else
22+ #include " platform_unix.h"
2423#endif
2524
2625#include " configfile.h"
2726
27+
2828#ifdef CRASHREPORTER_EXECUTABLE
2929#include < QDir>
30-
3130#include < libcrashreporter-handler/Handler.h>
32-
3331#endif
3432
33+ #include < QApplication>
34+ #include < QFontDatabase>
35+
3536namespace OCC {
3637
3738void Platform::migrate ()
@@ -40,6 +41,15 @@ void Platform::migrate()
4041
4142void Platform::setApplication ([[maybe_unused]] QCoreApplication *application)
4243{
44+ if (qobject_cast<QApplication *>(application)) {
45+ const auto fontID = QFontDatabase::addApplicationFont (QStringLiteral (" :/client/OpenCloud/theme/OpenCloud500-Regular.otf" ));
46+ const auto fontBoldID = QFontDatabase::addApplicationFont (QStringLiteral (" :/client/OpenCloud/theme/OpenCloud750-Bold.otf" ));
47+ if (fontID != -1 ) {
48+ auto font = QApplication::font ();
49+ font.setFamilies (QFontDatabase::applicationFontFamilies (fontID) << QFontDatabase::applicationFontFamilies (fontBoldID) << font.families ());
50+ QApplication::setFont (font);
51+ }
52+ }
4353#ifdef CRASHREPORTER_EXECUTABLE
4454 if (ConfigFile ().crashReporter ()) {
4555 auto *crashHandler =
You can’t perform that action at this time.
0 commit comments