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

Error when including <QtDebug>

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Invalid
    • Affects Version/s: 6.2.0 Beta2
    • Fix Version/s: None
    • Component/s: Core: Other
    • Labels:
      None

      Description

      I am porting from qt5 to 6 and using `qWarning`, but when I add the `#include <QtDebug>`, I get the following error:

      [  2%] Building CXX object src/CMakeFiles/lichtsteuerung.dir/audio/systemvolume.cpp.o
      In file included from /Users/leanderSchulten/git_projekte/Lichtsteuerung/src/audio/systemvolume.cpp:2:
      In file included from /Users/leanderSchulten/Qt/6.2.0/macos/lib/QtCore.framework/Headers/QtDebug:1:
      /Users/leanderSchulten/Qt/6.2.0/macos/lib/QtCore.framework/Headers/qdebug.h:401:56: error: no member named 'toInt' in 'QFlags<Qt::KeyboardModifier>'
          return qt_QMetaEnum_flagDebugOperator(debug, flags.toInt(), obj, name);
                                                       ~~~~~ ^
      /Users/leanderSchulten/Qt/6.2.0/macos/lib/QtCore.framework/Headers/qdebug.h:423:12: note: in instantiation of function template specialization 'qt_QMetaEnum_flagDebugOperator_helper<Qt::KeyboardModifier>' requested here
          return qt_QMetaEnum_flagDebugOperator_helper(debug, flags);
                 ^
      /Users/leanderSchulten/Qt/6.2.0/macos/lib/QtCore.framework/Headers/qdebug.h:430:21: note: in instantiation of function template specialization 'operator<<<Qt::KeyboardModifier>' requested here
                          << combination.keyboardModifiers()
                          ^
      1 error generated.
      make[2]: *** [src/CMakeFiles/lichtsteuerung.dir/audio/systemvolume.cpp.o] Error 1
      make[1]: *** [src/CMakeFiles/lichtsteuerung.dir/all] Error 2
      make: *** [all] Error 2
      14:33:35: The process "/usr/local/Cellar/cmake/3.21.1/bin/cmake" exited with code 2.
      Error while building/deploying project lichtsteuerung (kit: Qt 6.2.0 for macOS)
      When executing step "Build"
      

        Attachments

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

          Activity

            People

            Assignee:
            thiago Thiago Macieira
            Reporter:
            autoantwort autoantwort
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes