mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 08:17:59 +00:00
Merge pull request #3027
0db4c36
QrScanThread: fix Qt 5.15 compability (selsta)
This commit is contained in:
commit
9220937c4b
1 changed files with 5 additions and 6 deletions
|
@ -30,13 +30,8 @@
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
|
||||||
extern QImage qt_imageFromVideoFrame(const QVideoFrame &f);
|
extern QImage qt_imageFromVideoFrame(const QVideoFrame &f);
|
||||||
#else
|
|
||||||
QImage qt_imageFromVideoFrame(const QVideoFrame &f){
|
|
||||||
Q_ASSERT_X(0 != 0, "qt_imageFromVideoFrame", "Should have been managed in .pro");
|
|
||||||
return QImage();
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QrScanThread::QrScanThread(QObject *parent)
|
QrScanThread::QrScanThread(QObject *parent)
|
||||||
|
@ -108,7 +103,11 @@ void QrScanThread::processQImage(const QImage &qimg)
|
||||||
|
|
||||||
void QrScanThread::processVideoFrame(const QVideoFrame &frame)
|
void QrScanThread::processVideoFrame(const QVideoFrame &frame)
|
||||||
{
|
{
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
|
||||||
processQImage( qt_imageFromVideoFrame(frame) );
|
processQImage( qt_imageFromVideoFrame(frame) );
|
||||||
|
#else
|
||||||
|
processQImage(frame.image());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void QrScanThread::stop()
|
void QrScanThread::stop()
|
||||||
|
|
Loading…
Reference in a new issue