diff --git a/.github/workflows/arch.yml b/.github/workflows/arch.yml new file mode 100644 index 0000000..9e03118 --- /dev/null +++ b/.github/workflows/arch.yml @@ -0,0 +1,45 @@ +name: archlinux + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + build: + runs-on: ubuntu-latest + container: + image: archlinux:latest + strategy: + matrix: + buildtype: [Debug, Release] + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 3 + - run: > + pacman -Sy --noconfirm + base-devel + git + boost-libs boost + qt5-base qt5-tools + poppler-qt5 + cmake + xorg-server-xvfb + - run: > + cmake -B build/ + -DCMAKE_VERBOSE_MAKEFILE=ON + -DUsePrerenderedPDF=ON + -DCodeCoverage=ON + -DWarningAsError=ON + -DCMAKE_BUILD_TYPE=${{matrix.buildtype}} + . + - run: cmake --build build/ + - name: run tests within xvfb + working-directory: build/ + run: > + xvfb-run -a -s '-screen 0 1920x1080x24 -screen 1 1920x1200x24' + ctest --output-on-failure --timeout 60 + - name: upload coverage + run: bash <(curl -s https://codecov.io/bash) diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index 22d5903..0864071 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -34,6 +34,7 @@ jobs: -DCMAKE_VERBOSE_MAKEFILE=ON -DUsePrerenderedPDF=ON -DCodeCoverage=ON + -DWarningAsError=ON -DCMAKE_BUILD_TYPE=${{matrix.buildtype}} . - run: cmake --build build/ diff --git a/.github/workflows/osx.yml b/.github/workflows/osx.yml index e5cda8a..a6eb471 100644 --- a/.github/workflows/osx.yml +++ b/.github/workflows/osx.yml @@ -18,6 +18,8 @@ jobs: PKG_CONFIG_PATH: /usr/local/opt/poppler-qt5/lib/pkgconfig:/usr/local/opt/poppler-qt5/share/pkgconfig steps: - uses: actions/checkout@v3 + with: + fetch-depth: 3 - run: brew install boost - run: brew install poppler-qt5 - name: cmake -B build/ @@ -28,6 +30,7 @@ jobs: -DCodeCoverage=ON -DCMAKE_BUILD_TYPE=${{matrix.buildtype}} -DRunDualScreenTests=OFF + -DWarningAsError=ON . - run: cmake --build build/ - run: ctest --output-on-failure --timeout 60 diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 4c09cfb..0ab9287 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -11,10 +11,12 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ ubuntu-18.04, ubuntu-20.04, ubuntu-22.04 ] + os: [ ubuntu-20.04, ubuntu-22.04 ] buildtype: [ Debug, Release ] steps: - uses: actions/checkout@v3 + with: + fetch-depth: 3 - run: sudo apt-get update - name: Install build deps run: > @@ -31,6 +33,7 @@ jobs: -DCMAKE_VERBOSE_MAKEFILE=ON -DUsePrerenderedPDF=ON -DCodeCoverage=ON + -DWarningAsError=ON -DCMAKE_BUILD_TYPE=${{matrix.buildtype}} . - run: cmake --build build/ diff --git a/dspdfviewer.cpp b/dspdfviewer.cpp index b963bec..85e8279 100644 --- a/dspdfviewer.cpp +++ b/dspdfviewer.cpp @@ -47,7 +47,7 @@ DSPDFViewer::DSPDFViewer(const RuntimeConfiguration& r): renderFactory(r), m_pagenumber(0), audienceWindow(1, r.useFullPage() ? PagePart::FullPage : PagePart::LeftHalf , false, r, WindowRole::AudienceWindow), - secondaryWindow(0, (r.useFullPage() | r.duplicate())? PagePart::FullPage : PagePart::RightHalf, true , r, WindowRole::PresenterWindow, r.useSecondScreen()) + secondaryWindow(0, (r.useFullPage() || r.duplicate())? PagePart::FullPage : PagePart::RightHalf, true , r, WindowRole::PresenterWindow, r.useSecondScreen()) { DEBUGOUT << tr("Starting constructor") ; @@ -307,7 +307,7 @@ RenderingIdentifier DSPDFViewer::toRenderIdent(unsigned int pageNumber, const PD RenderingIdentifier DSPDFViewer::toThumbnailRenderIdent(unsigned int pageNumber, PDFViewerWindow& window) { - QSize newSize = window.getPreviewImageSize();; + QSize newSize = window.getPreviewImageSize(); static QSize thumbnailSize; if ( thumbnailSize != newSize ) { DEBUGOUT << "Thumbnail size changed from" << thumbnailSize << "to" << newSize;