diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-06-13 18:15:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-13 18:15:36 +0200 |
commit | d20aa002c0dcb2b40bbf7b48c5c995a5ed8138c1 (patch) | |
tree | 713338c8bde5e6784bbdfcdee29cafc1f9eb36d4 /lib/events/roommessageevent.cpp | |
parent | 0571ba1fb1948a6cc050230a85201291ababbf04 (diff) | |
parent | 083f62f58bc525d761969133e12a859de9b29648 (diff) | |
download | libquotient-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.cpp | 8 |
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/")) |