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

Compiler error from clang_64 on MacOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P3: Somewhat important
    • None
    • 5.9.2
    • Core: Other, GUI: Workspace
    • None
    • macOS

    Description

      Following two errors wih solution:

       

      1. First
        File:
        /Volumes/data/Qt5.9.2/5.9.2/clang_64/lib/QtCore.framework/Versions/5/Headers/qdebug.h

      Code:
      141  #ifdef Q_COMPILER_UNICODE_STRINGS
      142    inline QDebug &operator<<(char16_t t) { return *this << QChar(ushort(t)); }
      143    inline QDebug &operator<<(char32_t t) { putUcs4(t); return maybeSpace(); }
      144  #endif

      Compiler error:
      /Volumes/data/Qt5.9.2/5.9.2/clang_64/lib/QtCore.framework/Headers/qdebug.h:142: Fehler: expected '(' for function-style cast or type construction
          inline QDebug &operator<<(char16_t t) { return *this << QChar(ushort(t)); }
                                                                        ^~~~~~

      Solution, change line 142 as followed:
      142 inline QDebug &operator<<(char16_t t) { return *this << QChar((ushort)(t)); }

      1. Second
        File:
        /Volumes/data/Qt5.9.2/5.9.2/clang_64/lib/QtGui.framework/Versions/5/Headers/qrgba64.h

      Code:
      123  Q_DECL_CONSTEXPR ushort toRgb16() const
      124  {
      125      return ushort((red() & 0xf800) | ((green() >> 10) << 5) | (blue() >> 11));
      126  }

      Compiler error:
      /Volumes/data/Qt5.9.2/5.9.2/clang_64/lib/QtGui.framework/Headers/qrgba64.h:125: Fehler: expected '(' for function-style cast or type construction
              return ushort((red() & 0xf800) | ((green() >> 10) << 5) | (blue() >> 11));
                     ^~~~~~

      Solution, change line 125 as followed:
      125 return (ushort)((red() & 0xf800) | ((green() >> 10) << 5) | (blue() >> 11));

      Attachments

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

        Activity

          People

            allan.jensen Allan Sandfeld Jensen
            rix27 Thomas Rixner
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes