diff --git a/Dockerfile b/Dockerfile index 7a53a1d..e6e0d4e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,12 +10,11 @@ ENV SOURCE_DATE_EPOCH=1397818193 RUN apt-get update RUN apt-get install -y nano vim ccache software-properties-common - RUN add-apt-repository ppa:git-core/ppa RUN apt-get update RUN apt install -y automake git pkg-config python xutils-dev && \ - git clone -b xorgproto-2020.1 --depth 1 https://gitlab.freedesktop.org/xorg/proto/xorgproto && \ + git clone -b xorgproto-2020.1 --depth 1 https://gitlab.freedesktop.org/xorg/proto/xorgproto && \ cd xorgproto && \ git reset --hard c62e8203402cafafa5ba0357b6d1c019156c9f36 && \ ./autogen.sh && \ @@ -210,7 +209,7 @@ RUN apt install -y libgl1-mesa-dev libglib2.0-dev mesa-common-dev && \ -no-opengl -qpa xcb --xcb -xcb-xlib -feature-xlib -openssl-linked -I /usr/local/openssl/include \ -L /usr/local/openssl/lib -system-freetype -fontconfig -glib \ -no-dbus -no-sql-sqlite -no-use-gold-linker -no-kms \ - -qt-harfbuzz -qt-libjpeg -qt-libpng -qt-pcre -qt-zlib \ + -qt-harfbuzz -qt-libjpeg -qt-libpng -qt-pcre -qt-zlib -gstreamer \ -skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d \ -skip qtdoc -skip qtquickcontrols -skip qtquickcontrols2 -skip qtspeech -skip qtgamepad \ -skip qtlocation -skip qtmacextras -skip qtnetworkauth -skip qtpurchasing -optimize-size \ @@ -346,3 +345,12 @@ RUN git clone https://git.wownero.com/feather/monero-seed.git && \ make -Cbuild -j$THREADS && \ make -Cbuild install && \ rm -rf $(pwd) + +RUN git clone -b stable-0.21 --recursive https://github.com/mchehab/zbar.git && \ + cd zbar && \ + git reset --hard 505f1a87b32cb7bb0edbaf37e20ccdd46bbae2a3 && \ + autoreconf -vfi && \ + CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --enable-static --disable-shared --without-imagemagick --with-gtk=no --with-python=no --enable-doc=no && \ + make -j$THREADS && \ + make install && \ + rm -rf $(pwd) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cd5e1e6..d5f011d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -167,6 +167,7 @@ target_compile_definitions(feather ${Qt5Xml_DEFINITIONS} ${Qt5WebSockets_DEFINITIONS} ${Qt5Multimedia_DEFINITIONS} + ${Qt5MultimediaWidgets_DEFINITIONS} ) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}") diff --git a/src/dialog/qrcodescandialog.cpp b/src/dialog/qrcodescandialog.cpp index 973f439..0d74f33 100644 --- a/src/dialog/qrcodescandialog.cpp +++ b/src/dialog/qrcodescandialog.cpp @@ -2,9 +2,8 @@ #include "ui_qrcodescandialog.h" #include -#include #include -#include +#include QrCodeScanDialog::QrCodeScanDialog(QWidget *parent) : QDialog(parent) @@ -15,8 +14,8 @@ QrCodeScanDialog::QrCodeScanDialog(QWidget *parent) auto cameras = QCameraInfo::availableCameras(); if (cameras.count() < 1) { - QMessageBox::warning(this, "QR code scanner","No available cameras found."); - this->reject(); + QMessageBox::warning(parent, "QR code scanner","No available cameras found."); + return; } m_camera = new QCamera(cameras.first(), this); @@ -37,6 +36,5 @@ void QrCodeScanDialog::onDecoded(int type, const QString &data) { QrCodeScanDialog::~QrCodeScanDialog() { - m_camera->stop(); delete ui; }