aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-06-13 14:08:52 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-06-13 14:08:52 +0200
commit67ea5b45701e6bd5bf244039dc60a134d67a4cab (patch)
treebe5982eb6c03011f36d2508e2ee65854a0d968e7
parent620c2fe55b327e555477ed29bd670ddc6b9023d1 (diff)
downloadlibquotient-67ea5b45701e6bd5bf244039dc60a134d67a4cab.tar.gz
libquotient-67ea5b45701e6bd5bf244039dc60a134d67a4cab.zip
Disable the piece depending on Qt Multimedia for Qt 6
Waiting for the Multimedia arrival in Qt 6.2.
-rw-r--r--lib/events/roommessageevent.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/events/roommessageevent.cpp b/lib/events/roommessageevent.cpp
index 31c0fd9e..3f6e475d 100644
--- a/lib/events/roommessageevent.cpp
+++ b/lib/events/roommessageevent.cpp
@@ -10,7 +10,9 @@
#include <QtCore/QFileInfo>
#include <QtCore/QMimeDatabase>
#include <QtGui/QImageReader>
-#include <QtMultimedia/QMediaResource>
+#if QT_VERSION_MAJOR < 6
+# include <QtMultimedia/QMediaResource>
+#endif
using namespace Quotient;
using namespace EventContent;
@@ -149,7 +151,11 @@ TypedBase* contentFromFile(const QFileInfo& file, bool asGenericFile)
// done by starting to play the file. Left for a future implementation.
if (mimeTypeName.startsWith("video/"))
return new VideoContent(localUrl, file.size(), mimeType,
+#if QT_VERSION_MAJOR < 6
QMediaResource(localUrl).resolution(),
+#else
+ {},
+#endif
file.fileName());
if (mimeTypeName.startsWith("audio/"))