open-eid / DigiDoc4-Client

DigiDoc4 is an application for digitally signing and encrypting documents; the software includes functionality to manage Estonian ID-card - change pin codes etc.
https://www.id.ee/en/article/install-id-software/
Other
119 stars 42 forks source link

Include missing <QRegExp> to fix Qt6 build #1098

Closed klemensn closed 2 years ago

klemensn commented 2 years ago
.../client/Application.cpp:727:19: error: use of undeclared identifier 'QRegExp'
        if( env.indexOf( QRegExp("KDE_FULL_SESSION.*") ) != -1 )
                         ^
.../Application.cpp:738:24: error: use of undeclared identifier 'QRegExp'
        else if( env.indexOf( QRegExp("GNOME_DESKTOP_SESSION_ID.*") ) != -1 )
                              ^
2 errors generated.

No idea why this builds fine against Qt5, but Qt6 fails as per above.

Qt6 provides this header under Qt5Core5Compact.

Signed-off-by: Klemens Nanni klemens@posteo.de

klemensn commented 2 years ago

Posting as draft since this only creates a different failure:

In file included from /usr/ports/pobj/qdigidoc4-4.2.11pl20220713/DigiDoc4-Client-0b158fcfc2ca8ea04a0dd07a711073217e19e68d/client/Application.cpp:22:
In file included from /usr/ports/pobj/qdigidoc4-4.2.11pl20220713/DigiDoc4-Client-0b158fcfc2ca8ea04a0dd07a711073217e19e68d/client/Application.h:22:
In file included from /usr/ports/pobj/qdigidoc4-4.2.11pl20220713/DigiDoc4-Client-0b158fcfc2ca8ea04a0dd07a711073217e19e68d/common/Common.h:28:
In file included from /usr/ports/pobj/qdigidoc4-4.2.11pl20220713/DigiDoc4-Client-0b158fcfc2ca8ea04a0dd07a711073217e19e68d/common/qtsingleapplication/src/QtSingleApplication:1:
In file included from /usr/ports/pobj/qdigidoc4-4.2.11pl20220713/DigiDoc4-Client-0b158fcfc2ca8ea04a0dd07a711073217e19e68d/common/qtsingleapplication/src/qtsingleapplication.h:44:
In file included from /usr/local/include/X11/qt6/QtWidgets/QApplication:1:
In file included from /usr/local/include/X11/qt6/QtWidgets/qapplication.h:44:
In file included from /usr/local/include/X11/qt6/QtCore/qcoreapplication.h:47:
In file included from /usr/local/include/X11/qt6/QtCore/qeventloop.h:43:
In file included from /usr/local/include/X11/qt6/QtCore/qobject.h:49:
/usr/local/include/X11/qt6/QtCore/qlist.h:939:20: error: invalid operands to binary expression ('const QString' and 'const QRegExp')
            if (*n == u)
                ~~ ^  ~
klemensn commented 2 years ago

See #1097.

klemensn commented 2 years ago

Cherry-picking #1082's changes to to client/Application.cpp and client/Diagnostics_unix.cpp fixes these compilation errors.

qdigidoc4 then runs fine on OpenBSD using Qt6.