From c597f9f8846f1e6c5912b18592fef37f03b6d0ad Mon Sep 17 00:00:00 2001 From: Raul Metsma Date: Mon, 27 May 2024 21:55:56 +0300 Subject: [PATCH 1/3] Update Qt 6.7.1 IB-8094 Signed-off-by: Raul Metsma --- .github/workflows/cmake-windows.yml | 18 +++++++++++++----- install/web-eid.wxs | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cmake-windows.yml b/.github/workflows/cmake-windows.yml index 9dce48cb..b3505b25 100644 --- a/.github/workflows/cmake-windows.yml +++ b/.github/workflows/cmake-windows.yml @@ -5,11 +5,19 @@ on: [push, pull_request] env: BUILD_TYPE: RelWithDebInfo BUILD_NUMBER: ${{github.run_number}} - CMAKE_BUILD_PARALLEL_LEVEL: 3 + CMAKE_BUILD_PARALLEL_LEVEL: 4 jobs: build: - runs-on: windows-2019 + runs-on: ${{ matrix.image }} + strategy: + matrix: + vcver: [142, 143] + include: + - vcver: 142 + image: windows-2019 + - vcver: 143 + image: windows-2022 steps: - name: Checkout code @@ -27,7 +35,7 @@ jobs: - name: Install Qt uses: jurplel/install-qt-action@v3 with: - version: 6.6.3 + version: 6.7.1 arch: win64_msvc2019_64 - name: Setup MS Visual C++ dev env @@ -45,7 +53,7 @@ jobs: - name: Configure run: | cmake "-GNinja" -S . -B build ` - "-DCMAKE_TOOLCHAIN_FILE=${env:VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" ` + "-DCMAKE_TOOLCHAIN_FILE=${env:RUNVCPKG_VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" ` "-DCMAKE_BUILD_TYPE=${env:BUILD_TYPE}" - name: Build @@ -60,7 +68,7 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: web-eid-app-windows-build-${{github.run_number}} + name: web-eid-app-windows-build-VC${{matrix.vcver}}-${{github.run_number}} path: | build/src/app/*.msi build/src/app/*.exe diff --git a/install/web-eid.wxs b/install/web-eid.wxs index db7ede86..383ae66f 100644 --- a/install/web-eid.wxs +++ b/install/web-eid.wxs @@ -92,7 +92,7 @@ - + From a6bce886b36f9503dc04c4b6756095a3a7942a0f Mon Sep 17 00:00:00 2001 From: Raul Metsma Date: Tue, 18 Jun 2024 09:21:15 +0300 Subject: [PATCH 2/3] Update deb source pacakge ignore list and add package suggestions IB-7983 Signed-off-by: Raul Metsma --- .github/workflows/cmake-linux-ubuntu.yml | 28 +++++++++++------------- debian/control | 10 +++++++-- debian/source/options | 3 ++- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/.github/workflows/cmake-linux-ubuntu.yml b/.github/workflows/cmake-linux-ubuntu.yml index 294cb043..7dc4b98f 100644 --- a/.github/workflows/cmake-linux-ubuntu.yml +++ b/.github/workflows/cmake-linux-ubuntu.yml @@ -8,30 +8,25 @@ env: QT_QPA_PLATFORM: offscreen DEBIAN_FRONTEND: noninteractive DEBFULLNAME: GitHub build - DEBEMAIL: github-action@github + DEBEMAIL: github-action@github.com CMAKE_BUILD_PARALLEL_LEVEL: 3 jobs: build: runs-on: ubuntu-latest - container: ${{matrix.container}} + container: ubuntu:${{matrix.container}} strategy: matrix: - container: ['ubuntu:20.04', 'ubuntu:22.04'] - include: - - container: 'ubuntu:20.04' - name: ubuntu2004 - - container: 'ubuntu:22.04' - name: ubuntu2204 + container: ['20.04', '22.04', '24.04'] steps: - name: Install dependencies - if: matrix.container == 'ubuntu:20.04' - run: apt update -qq && apt install --no-install-recommends -y git lsb-release fakeroot build-essential devscripts debhelper pkg-config cmake libpcsclite-dev libssl-dev libgtest-dev libqt5svg5-dev qttools5-dev-tools qttools5-dev + if: matrix.container == '20.04' + run: apt update -qq && apt install --no-install-recommends -y git lsb-release fakeroot build-essential devscripts debhelper lintian pkg-config cmake libpcsclite-dev libssl-dev libgtest-dev libqt5svg5-dev qttools5-dev-tools qttools5-dev - name: Install dependencies - if: matrix.container != 'ubuntu:20.04' - run: apt update -qq && apt install --no-install-recommends -y git lsb-release fakeroot build-essential devscripts debhelper pkg-config cmake libpcsclite-dev libssl-dev libgtest-dev libgl-dev libqt6svg6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libqt6core5compat6-dev + if: matrix.container != '20.04' + run: apt update -qq && apt install --no-install-recommends -y git lsb-release fakeroot build-essential devscripts debhelper lintian pkg-config cmake libpcsclite-dev libssl-dev libgtest-dev libgl-dev libqt6svg6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libqt6core5compat6-dev - uses: actions/checkout@v4 with: @@ -44,9 +39,12 @@ jobs: run: | cmake --build build --config $BUILD_TYPE --target installer # Debian creates artifacts outside of project dir, copy them back to make them available in the build artifacts - cp -r ../web-eid*.* build/src/app + mv ../web-eid*.* build/ + + - name: Test package + run: lintian build/*.deb - uses: actions/upload-artifact@v4 with: - name: web-eid-app-ubuntu-build-${{matrix.name}}-${{github.run_number}} - path: build/src/app/*.*deb + name: web-eid-app-ubuntu-build-ubuntu${{matrix.container}}-${{github.run_number}} + path: build/*.*deb diff --git a/debian/control b/debian/control index f5126285..c610a169 100644 --- a/debian/control +++ b/debian/control @@ -27,9 +27,11 @@ Description: Web eID application suite (metapackage) Package: web-eid-native Architecture: any +Multi-Arch: foreign Depends: pcscd, ${shlibs:Depends}, ${misc:Depends} Replaces: token-signing-native Breaks: token-signing-native +Suggests: web-eid-firefox, web-eid-chrome Description: Web eID browser extension helper application Native messaging host for Web eID Chrome and Firefox extensions that performs cryptographic digital signing and authentication operations with electronic ID @@ -37,9 +39,11 @@ Description: Web eID browser extension helper application Package: web-eid-firefox Architecture: all -Depends: jq, web-eid-native (= ${binary:Version}) +Depends: jq, web-eid-native Replaces: token-signing-firefox Breaks: token-signing-firefox +Suggests: firefox +Enhances: firefox Description: Web eID browser extension for Firefox The Web eID extension for Firefox communicates with the Web eID native application using Native messaging to enable usage of electronic ID smart @@ -47,9 +51,11 @@ Description: Web eID browser extension for Firefox Package: web-eid-chrome Architecture: all -Depends: web-eid-native (= ${binary:Version}) +Depends: web-eid-native Replaces: token-signing-chrome Breaks: token-signing-chrome +Suggests: chromium, chromium-browser, chrome +Enhances: chromium, chromium-browser, chrome Description: Web eID browser extension for Chrome The Web eID extension for Chrome communicates with the Web eID native application using Native messaging to enable usage of electronic ID smart diff --git a/debian/source/options b/debian/source/options index a6772838..4420190e 100644 --- a/debian/source/options +++ b/debian/source/options @@ -1 +1,2 @@ -tar-ignore = "build/*" +tar-ignore +tar-ignore = build From f2374c245bcc64f74f8a05ee864ce1e64f1eb098 Mon Sep 17 00:00:00 2001 From: Raul Metsma Date: Fri, 6 Oct 2023 17:38:14 +0300 Subject: [PATCH 3/3] Use fixed size layout constraint WE2-797 Signed-off-by: Raul Metsma --- src/ui/dialog.ui | 39 +++++++++++++++++++++++++++++++++------ src/ui/webeiddialog.cpp | 20 ++++---------------- src/ui/webeiddialog.hpp | 1 - 3 files changed, 37 insertions(+), 23 deletions(-) diff --git a/src/ui/dialog.ui b/src/ui/dialog.ui index 19bfd744..76753287 100644 --- a/src/ui/dialog.ui +++ b/src/ui/dialog.ui @@ -10,12 +10,6 @@ 510 - - - 550 - 0 - - Web eID @@ -199,6 +193,9 @@ height: 24px; 30 + + QLayout::SetFixedSize + 20 @@ -235,6 +232,12 @@ height: 24px; + + + 510 + 0 + + Qt::TabFocus @@ -306,6 +309,12 @@ height: 24px; + + + 510 + 0 + + Qt::TabFocus @@ -441,6 +450,12 @@ height: 24px; + + + 510 + 0 + + Qt::TabFocus @@ -523,6 +538,12 @@ height: 24px; + + + 510 + 0 + + Qt::TabFocus @@ -773,6 +794,12 @@ height: 24px; + + + 510 + 0 + + 10 diff --git a/src/ui/webeiddialog.cpp b/src/ui/webeiddialog.cpp index 7b8a53e0..9b075b5c 100644 --- a/src/ui/webeiddialog.cpp +++ b/src/ui/webeiddialog.cpp @@ -159,7 +159,9 @@ WebEidDialog::WebEidDialog(QWidget* parent) : WebEidUI(parent), ui(new Private) ui->fatalHelp->hide(); ui->selectAnotherCertificate->hide(); - connect(ui->pageStack, &QStackedWidget::currentChanged, this, &WebEidDialog::resizeHeight); + connect(ui->pageStack, &QStackedWidget::currentChanged, this, [this]{ + ui->pageStack->setFixedHeight(ui->pageStack->currentWidget()->sizeHint().height()); + }); connect(ui->selectionGroup, qOverload(&QButtonGroup::buttonClicked), this, [this] { ui->okButton->setEnabled(true); @@ -243,16 +245,12 @@ void WebEidDialog::showAboutPage() if (app->isSafariExtensionContainingApp()) { d->setupOK([app] { app->showSafariSettings(); }, QT_TR_NOOP("Open Safari settings..."), true); - connect(app, &Application::safariExtensionEnabled, d, [d](bool value) { - d->ui->aboutAlert->setHidden(value); - d->resizeHeight(); - }); + connect(app, &Application::safariExtensionEnabled, d->ui->aboutAlert, &QWidget::setHidden); app->requestSafariExtensionState(); } else { d->ui->okButton->hide(); } d->ui->pageStack->setCurrentIndex(int(Page::ABOUT)); - d->resizeHeight(); d->open(); connect(d, &WebEidDialog::finished, qApp, &QApplication::quit); } @@ -269,7 +267,6 @@ void WebEidDialog::showFatalErrorPage() d->ui->cancelButton->show(); d->ui->okButton->hide(); d->ui->pageStack->setCurrentIndex(int(Page::ALERT)); - d->resizeHeight(); d->exec(); } @@ -457,7 +454,6 @@ void WebEidDialog::onVerifyPinFailed(const VerifyPinFailed::Status status, const break; case Status::PIN_BLOCKED: displayPinBlockedError(); - resizeHeight(); return; case Status::INVALID_PIN_LENGTH: message = [] { return tr("Invalid PIN length"); }; @@ -485,7 +481,6 @@ void WebEidDialog::onVerifyPinFailed(const VerifyPinFailed::Status status, const ui->pinTitleLabel->show(); ui->okButton->setDisabled(true); ui->cancelButton->setEnabled(true); - resizeHeight(); } } @@ -502,7 +497,6 @@ bool WebEidDialog::event(QEvent* event) case QEvent::LanguageChange: ui->retranslateUi(this); emit languageChange(); - resizeHeight(); break; case QEvent::MouseButtonRelease: if (auto* w = findChild(QStringLiteral("langMenu"))) { @@ -689,12 +683,6 @@ void WebEidDialog::showPinInputWarning(bool show) style()->polish(ui->pinInput); } -void WebEidDialog::resizeHeight() -{ - ui->pageStack->setFixedHeight(ui->pageStack->currentWidget()->sizeHint().height()); - adjustSize(); -} - QPixmap WebEidDialog::pixmap(QLatin1String name) { return {QStringLiteral(":/images/%1%2.svg") diff --git a/src/ui/webeiddialog.hpp b/src/ui/webeiddialog.hpp index cdbe2c0b..726558e8 100644 --- a/src/ui/webeiddialog.hpp +++ b/src/ui/webeiddialog.hpp @@ -106,7 +106,6 @@ class WebEidDialog final : public WebEidUI void displayPinBlockedError(); void showPinInputWarning(bool show); - void resizeHeight(); static QPixmap pixmap(QLatin1String name); constexpr static std::tuple