aboutsummaryrefslogtreecommitdiff
path: root/lib/events/roommessageevent.cpp
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-06-13 18:15:36 +0200
committerGitHub <noreply@github.com>2021-06-13 18:15:36 +0200
commitd20aa002c0dcb2b40bbf7b48c5c995a5ed8138c1 (patch)
tree713338c8bde5e6784bbdfcdee29cafc1f9eb36d4 /lib/events/roommessageevent.cpp
parent0571ba1fb1948a6cc050230a85201291ababbf04 (diff)
parent083f62f58bc525d761969133e12a859de9b29648 (diff)
downloadlibquotient-d20aa002c0dcb2b40bbf7b48c5c995a5ed8138c1.tar.gz
libquotient-d20aa002c0dcb2b40bbf7b48c5c995a5ed8138c1.zip
Merge pull request #480 from quotient-im/kitsune-qt6-compat
Qt 6 support
Diffstat (limited to 'lib/events/roommessageevent.cpp')
-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/"))