summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2021-01-12 15:12:53 +0100
committerJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2021-01-12 15:40:48 +0100
commitb062ec04a47ab064064f0fe8399954db5aa77a7d (patch)
tree66286ba1af41470a75abbffea3da86efed95d284 /src
parentbaf5431588a4bc3e475b3e4f39e2d4c7a3f1802b (diff)
lp1911196: Do no print a warning if fonts directory is missing
On Linux, the `fonts/` directory might not exist if Mixxx was installed via package manager. You might say "this is a hack" and you'd be right. Ideally, a skin should request what font it needs, then we check if that font is available in the Qt Font Database, and if not, we try to load it from the `fonts/` directory. This is just a band-aid. See this for details: - https://bugs.launchpad.net/mixxx/+bug/1911196 - https://github.com/mixxxdj/mixxx/pull/3458#discussion_r545470642
Diffstat (limited to 'src')
-rw-r--r--src/util/font.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/util/font.h b/src/util/font.h
index f5b760e8e1..d421623842 100644
--- a/src/util/font.h
+++ b/src/util/font.h
@@ -12,7 +12,15 @@ class FontUtils {
static void initializeFonts(const QString& resourcePath) {
QDir fontsDir(resourcePath);
if (!fontsDir.cd("fonts")) {
- qWarning("FontUtils::initializeFonts: cd fonts failed");
+#ifdef __LINUX__
+ // If the fonts already have been installed via the package
+ // manager, this is okay. We currently have no way to verify that
+ // though.
+ qDebug()
+#else
+ qWarning()
+#endif
+ << "No fonts directory found in" << resourcePath;
return;
}