ark: hack for KMediaPlayer part

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>
This commit is contained in:
Ivailo Monev 2022-11-27 02:10:04 +02:00
parent 438d8ad3a7
commit 47ec323674

View file

@ -33,6 +33,16 @@
#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)