Skip to content

Commit

Permalink
Use Qt6 on Ubuntu 22.04 (open-eid#1082)
Browse files Browse the repository at this point in the history
IB-7420

Signed-off-by: Raul Metsma <[email protected]>

Signed-off-by: Raul Metsma <[email protected]>
  • Loading branch information
metsma authored Sep 23, 2022
1 parent a948dc6 commit f0fab17
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 9 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
repo: open-eid/libdigidocpp
- name: Install dependencies
run: |
brew install ninja
HASH=($(shasum prepare_osx_build_environment.sh))
curl -O -L -s https://installer.id.ee/media/github/opensc_0.22.0.pkg
curl -O -L -s https://installer.id.ee/media/github/${HASH}.zip
Expand All @@ -33,7 +34,7 @@ jobs:
- name: Build
run: |
QT_DIR=$(ls -d /Library/Developer/Qt-*-OpenSSL | tail -n 1)
cmake \
cmake "-GNinja" \
-DCMAKE_PREFIX_PATH=${QT_DIR} \
-DOPENSSL_ROOT_DIR=/Library/Developer/OpenSSL \
-DLDAP_ROOT=/Library/Developer/OpenLDAP \
Expand Down Expand Up @@ -61,7 +62,11 @@ jobs:
with:
submodules: recursive
- name: Install dependencies
if: matrix.container != 'ubuntu:22.04'
run: apt update -qq && apt install --no-install-recommends -y lsb-release fakeroot build-essential devscripts cdbs pkg-config cmake libldap2-dev gettext libpcsclite-dev libssl-dev libqt5svg5-dev qttools5-dev-tools qttools5-dev lintian
- name: Install dependencies
if: matrix.container == 'ubuntu:22.04'
run: apt update -qq && apt install --no-install-recommends -y lsb-release fakeroot build-essential devscripts cdbs pkg-config cmake libldap2-dev gettext libpcsclite-dev libssl-dev libgl-dev libqt6svg6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libqt6core5compat6-dev lintian
- name: Download artifact
uses: dawidd6/action-download-artifact@v2
with:
Expand Down Expand Up @@ -105,7 +110,11 @@ jobs:
with:
submodules: recursive
- name: Install Deps
if: matrix.container == 'fedora:35'
run: dnf install -y gcc-c++ cmake rpm-build gettext openssl-devel openldap-devel pcsc-lite-devel qt5-qtsvg-devel qt5-linguist
- name: Install Deps
if: matrix.container != 'fedora:35'
run: dnf install -y gcc-c++ cmake rpm-build gettext openssl-devel openldap-devel pcsc-lite-devel qt6-qtsvg-devel qt6-qttools-devel qt6-qt5compat-devel
- name: Download artifact
uses: dawidd6/action-download-artifact@v2
with:
Expand Down
5 changes: 3 additions & 2 deletions client/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class MacMenuBar {};
#include <QtCore/QJsonDocument>
#include <QtCore/QJsonObject>
#include <QtCore/QProcess>
#include <QtCore/QRegularExpression>
#include <QtCore/QSettings>
#include <QtCore/QStandardPaths>
#include <QtCore/QTimer>
Expand Down Expand Up @@ -722,7 +723,7 @@ void Application::mailTo( const QUrl &url )
QByteArray thunderbird;
QProcess p;
QStringList env = QProcess::systemEnvironment();
if( env.indexOf( QRegExp("KDE_FULL_SESSION.*") ) != -1 )
if(env.indexOf(QRegularExpression(QStringLiteral("KDE_FULL_SESSION.*"))) != -1)
{
p.start("kreadconfig", {
"--file", "emaildefaults",
Expand All @@ -733,7 +734,7 @@ void Application::mailTo( const QUrl &url )
if( data.contains("thunderbird") )
thunderbird = data;
}
else if( env.indexOf( QRegExp("GNOME_DESKTOP_SESSION_ID.*") ) != -1 )
else if(env.indexOf(QRegularExpression(QStringLiteral("GNOME_DESKTOP_SESSION_ID.*"))) != -1)
{
if(QSettings(QDir::homePath() + "/.local/share/applications/mimeapps.list", QSettings::IniFormat)
.value("Default Applications/x-scheme-handler/mailto").toString().contains("thunderbird"))
Expand Down
10 changes: 6 additions & 4 deletions client/Diagnostics_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "Common.h"

#include <QtCore/QFile>
#include <QtCore/QRegularExpression>
#include <QtCore/QTextStream>
#include <QtCore/QProcess>
#include <QtNetwork/QSslSocket>
Expand Down Expand Up @@ -102,10 +103,11 @@ void Diagnostics::run()
QFile f( "/proc/cpuinfo" );
if( f.open( QFile::ReadOnly ) )
{
QRegExp rx( "model name.*\\: (.*)\n" );
rx.setMinimal( true );
if( rx.indexIn( QString::fromLocal8Bit( f.readAll() ) ) != -1 )
s << rx.cap( 1 );
QRegularExpression rx(QStringLiteral("model name.*\\: (.*)\n"));
rx.setPatternOptions(QRegularExpression::InvertedGreedinessOption);
QRegularExpressionMatch match = rx.match(QString::fromLocal8Bit(f.readAll()));
if(match.hasMatch())
s << match.captured(1);
}
s << "<br />";
#endif
Expand Down
6 changes: 4 additions & 2 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ Build-Depends:
libldap2-dev,
libpcsclite-dev,
libssl-dev,
qttools5-dev,
libqt5svg5-dev
qt6-tools-dev | qttools5-dev,
qt6-l10n-tools | qttools5-dev-tools,
libqt6svg6-dev | libqt5svg5-dev
Standards-Version: 3.9.8
Homepage: https://github.com/open-eid/DigiDoc4-Client

Expand All @@ -20,6 +21,7 @@ Architecture: any
Depends:
opensc-pkcs11,
python3-nautilus|python-nautilus,
qt6-qpa-plugins | libqt5gui5,
${shlibs:Depends},
${misc:Depends}
Replaces:
Expand Down

0 comments on commit f0fab17

Please sign in to comment.