mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-01-13 13:41:27 +00:00
GUI: Qt6: actively check if QMediaPlayer is available instead of version check
This commit is contained in:
parent
b489d894fe
commit
f73d30ac51
@ -229,6 +229,7 @@ EOF
|
||||
AC_MSG_CHECKING(for Qt 5)
|
||||
|
||||
if test x"$problem" = x; then
|
||||
AC_DEFINE(HAVE_QMEDIAPLAYER, 1, [Define to 1 if you have the QMediaPlayer header file.])
|
||||
AC_DEFINE(HAVE_QT, 1, [Define if Qt is present])
|
||||
AC_MSG_RESULT(yes)
|
||||
have_qt5=yes
|
||||
|
@ -202,6 +202,13 @@ return 0;
|
||||
return
|
||||
fi
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$STD_CXX $CXXFLAGS $QT_CFLAGS -fPIC"
|
||||
AC_CHECK_HEADERS([QMediaPlayer])
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||
AC_LANG_POP()
|
||||
|
||||
AC_DEFINE(HAVE_QT, 1, [Define if Qt is present])
|
||||
AC_MSG_CHECKING(for Qt 6)
|
||||
AC_MSG_RESULT(yes)
|
||||
|
@ -2,10 +2,10 @@
|
||||
|
||||
#include <Qt>
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
#if HAVE_QMEDIAPLYER
|
||||
# include <QMediaPlayer>
|
||||
|
||||
#else // Qt < 6
|
||||
#else // HAVE_QMEDIAPLAYER
|
||||
# include <QUrl>
|
||||
|
||||
// Fake Media Player class as Qt 6.1 hasn't re-added the media framework yet.
|
||||
@ -22,7 +22,7 @@ public:
|
||||
void stop() {}
|
||||
};
|
||||
|
||||
#endif // Qt < 6
|
||||
#endif // HAVE_QMEDIAPLAYER
|
||||
|
||||
#include "mkvtoolnix-gui/util/media_player.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user