diff options
| author | MoroccanMalinois <MoroccanMalinois@protonmail.com> | 2017-03-27 17:39:47 +0000 |
|---|---|---|
| committer | MoroccanMalinois <MoroccanMalinois@protonmail.com> | 2017-03-27 17:39:47 +0000 |
| commit | fb3a6182fc7db83ffac04752c37192f3dc1acd5f (patch) | |
| tree | bcdf4e5bf0b86e53091f5f66e32d02936b7152a9 /src/QR-Code-scanner | |
| parent | 12573652a0a5836938b02a2308098929fdf06ab4 (diff) | |
| download | monzero-gui-fb3a6182fc7db83ffac04752c37192f3dc1acd5f.tar.gz monzero-gui-fb3a6182fc7db83ffac04752c37192f3dc1acd5f.tar.xz monzero-gui-fb3a6182fc7db83ffac04752c37192f3dc1acd5f.zip | |
Make QtMultimedia dependency optional
Diffstat (limited to 'src/QR-Code-scanner')
| -rw-r--r-- | src/QR-Code-scanner/QrCodeScanner.cpp | 4 | ||||
| -rw-r--r-- | src/QR-Code-scanner/QrCodeScanner.h | 4 |
2 files changed, 0 insertions, 8 deletions
diff --git a/src/QR-Code-scanner/QrCodeScanner.cpp b/src/QR-Code-scanner/QrCodeScanner.cpp index 94102429..1129e986 100644 --- a/src/QR-Code-scanner/QrCodeScanner.cpp +++ b/src/QR-Code-scanner/QrCodeScanner.cpp @@ -37,14 +37,12 @@ QrCodeScanner::QrCodeScanner(QObject *parent) , m_processInterval(750) , m_enabled(true) { -#ifdef WITH_SCANNER m_probe = new QVideoProbe(this); m_thread = new QrScanThread(this); m_thread->start(); QObject::connect(m_thread, SIGNAL(decoded(int,QString)), this, SLOT(processCode(int,QString))); QObject::connect(m_thread, SIGNAL(notifyError(const QString &, bool)), this, SIGNAL(notifyError(const QString &, bool))); connect(m_probe, SIGNAL(videoFrameProbed(QVideoFrame)), this, SLOT(processFrame(QVideoFrame))); -#endif } void QrCodeScanner::setSource(QCamera *camera) { @@ -97,12 +95,10 @@ void QrCodeScanner::setEnabled(bool enabled) } emit enabledChanged(); } -#ifdef WITH_SCANNER void QrCodeScanner::timerEvent(QTimerEvent *event) { if( (event->timerId() == m_processTimerId) ){ m_thread->addFrame(m_curFrame); } } -#endif diff --git a/src/QR-Code-scanner/QrCodeScanner.h b/src/QR-Code-scanner/QrCodeScanner.h index 791800f0..a6a747b3 100644 --- a/src/QR-Code-scanner/QrCodeScanner.h +++ b/src/QR-Code-scanner/QrCodeScanner.h @@ -31,9 +31,7 @@ #include <QImage> #include <QVideoFrame> -#ifdef WITH_SCANNER #include "QrScanThread.h" -#endif class QVideoProbe; class QCamera; @@ -64,10 +62,8 @@ Q_SIGNALS: void notifyError(const QString &error, bool warning = false); protected: -#ifdef WITH_SCANNER void timerEvent(QTimerEvent *); QrScanThread *m_thread; -#endif int m_processTimerId; int m_processInterval; int m_enabled; |
