diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2019-07-11 09:36:24 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2019-07-24 06:39:00 +0000 |
commit | 3f12e848168f61f986f2809cd7f8dac75408548f (patch) | |
tree | 33c292647d45292788fa99e7a47d727556917c37 /src | |
parent | 2eb0a98f1de07782004a5a4261cb5d2c46ca6d15 (diff) |
Move-enable QMediaTimeInterval
The class shouldn't have a user-provided copy ctor, because the compiler
could write it for us and the type would be trivial, but we can't remove
it in Qt 5, because that changes the way the class is passed by value
into functions (register instead of stack).
At least give it back its move special member functions, inhibited by the
user-provided copy ctor, and schedule the whole lot for removal in Qt 6.
Change-Id: Ic19ef43f3d313fea938aa769c067a736ec691337
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/multimedia/qmediatimerange.cpp | 2 | ||||
-rw-r--r-- | src/multimedia/qmediatimerange.h | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/multimedia/qmediatimerange.cpp b/src/multimedia/qmediatimerange.cpp index 676d3d391..3a22e000f 100644 --- a/src/multimedia/qmediatimerange.cpp +++ b/src/multimedia/qmediatimerange.cpp @@ -94,6 +94,7 @@ QMediaTimeInterval::QMediaTimeInterval(qint64 start, qint64 end) } +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) /*! \fn QMediaTimeInterval::QMediaTimeInterval(const QMediaTimeInterval &other) @@ -105,6 +106,7 @@ QMediaTimeInterval::QMediaTimeInterval(const QMediaTimeInterval &other) { } +#endif /*! \fn QMediaTimeInterval::start() const diff --git a/src/multimedia/qmediatimerange.h b/src/multimedia/qmediatimerange.h index 5b6d711af..71145adde 100644 --- a/src/multimedia/qmediatimerange.h +++ b/src/multimedia/qmediatimerange.h @@ -54,8 +54,12 @@ class Q_MULTIMEDIA_EXPORT QMediaTimeInterval public: QMediaTimeInterval(); QMediaTimeInterval(qint64 start, qint64 end); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QMediaTimeInterval(const QMediaTimeInterval&); QMediaTimeInterval &operator=(const QMediaTimeInterval&) = default; + QMediaTimeInterval(QMediaTimeInterval &&) = default; + QMediaTimeInterval &operator=(QMediaTimeInterval &&) = default; +#endif qint64 start() const; qint64 end() const; |