Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-126792

QT 6.7.2 fails to build with QT_NO_EXCEPTIONS for Android

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P1: Critical
    • None
    • 6.7.2
    • Core: Other
    • None
    • Android

    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/

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            dmitriano Dmitry Efimov
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes