summaryrefslogtreecommitdiff
path: root/src/libaudqt/util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libaudqt/util.cc')
-rw-r--r--src/libaudqt/util.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libaudqt/util.cc b/src/libaudqt/util.cc
index 67224c4..9ca03b0 100644
--- a/src/libaudqt/util.cc
+++ b/src/libaudqt/util.cc
@@ -47,6 +47,10 @@ EXPORT void init ()
atexit ([] () { delete qapp; });
qapp->setAttribute (Qt::AA_UseHighDpiPixmaps);
+#if QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)
+ qapp->setAttribute (Qt::AA_ForceRasterWidgets);
+#endif
+
qapp->setApplicationName (_("Audacious"));
qapp->setWindowIcon (QIcon::fromTheme (app_name));
}
@@ -131,6 +135,10 @@ EXPORT void simple_message (const char * title, const char * text, QMessageBox::
/* translate GTK+ accelerators and also handle dgettext() */
EXPORT QString translate_str (const char * str, const char * domain)
{
+ /* handle null and empty strings */
+ if (! str || ! str[0])
+ return QString (str);
+
/* translate the GTK+ accelerator (_) into a Qt accelerator (&) */
return QString (dgettext (domain, str)).replace ('_', '&');
}