note that it is MPV itself that requires it thus the media classes (such as
KMediaPlayer, KMediaWidget, etc.) require it
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
#include <QByteArray>
#include <QFileInfo>
+// NOTE: this has to be done before application instance is created and KMediaPlayer part requires
+// it, i.e. it is too late to do it from the kmediaplayer library itself if it is dlopen-ed
+#if defined(Q_WS_X11)
+static int ark_x11_init_threads() {
+ QApplication::setAttribute(Qt::AA_X11InitThreads, true);
+ return 1;
+};
+Q_CONSTRUCTOR_FUNCTION(ark_x11_init_threads)
+#endif
+
using Kerfuffle::AddToArchive;
int main(int argc, char **argv)