Details
-
Bug
-
Resolution: Out of scope
-
P1: Critical
-
None
-
6.7.2
-
None
Description
QT 6.7.2 failed to build with QT_NO_EXCEPTIONS for Android with the following errors:
C:/dev/repos/qt-everywhere-src-6.7.2/qtbase/src/corelib/io/qprocess_unix.cpp:889:29: error: use of undeclared identifier 'e' failChildProcess(d, e.what(), FakeErrnoForThrow); ^ C:/dev/repos/qt-everywhere-src-6.7.2/qtbase/src/corelib/io/qprocess_unix.cpp:890:7: error: expected expression } QT_CATCH (...) { ^ C:/dev/repos/qt-everywhere-src-6.7.2/qtbase/src/corelib/global/qexceptionhandling.h:28:23: note: expanded from macro 'QT_CATCH' # define QT_CATCH(A) else ^ 2 errors generated.
Workaround:
// the noexcept here adds an extra layer of protection static void callChildProcessModifier(const QProcessPrivate *d) noexcept { //QT_TRY { if (d->unixExtras->childProcessModifier) d->unixExtras->childProcessModifier(); // } QT_CATCH (std::exception &e) { // failChildProcess(d, "e.what() workaround", FakeErrnoForThrow); // } QT_CATCH (...) { // failChildProcess(d, "throw", FakeErrnoForThrow); // } }
details: https://developernote.com/2024/06/qt-stopped-compiling-with-qt_no_exceptions/