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

Project compile error with `QtCore/qdebug.h` on Qt 5.14.2

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P3: Somewhat important
    • None
    • 5.14.2
    • Core: I/O
    • None
    • Archlinux + Qt 5.14.2
    • Linux/Wayland, Linux/X11

    Description

      A open source project SDRAngel (https://github.com/f4exb/sdrangel) could build success on `Qt 5.9.5` & `Qt 5.9.9`.

      But get compile error on `Qt 5.14.2`. (same code)

       

      // error message:
      
      /usr/include/qt/QtCore/qglobal.h: In instantiation of ‘T qExchange(T&, U&&) [with T = QDebug::Stream*; U = long int]’:
      /usr/include/qt/QtCore/qdebug.h:118:77:   required from here
      /usr/include/qt/QtCore/qglobal.h:1050:7: error: invalid conversion from ‘long int’ to 
      ‘QDebug::Stream*’ [-fpermissive]
       1050 |     t = std::forward<U>(newValue);
            |     ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
            |       |
            |       long int
      

       

      Find a solution to solve temporary. Edit /usr/include/qt/QtCore/qdebug.h line 118:

       

      QDebug( QDebug &&other ) noexcept : stream{qExchange(other.stream, nullptr)}{}
      

      To

       

       

      QDebug( QDebug &&other ) noexcept : stream{qExchange(other.stream, (QDebug::Stream*)(nullptr))}{}
      

       

      issue disccuss link
      temporary solution link

       

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            ytexas Forrest Young
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes