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

hex, showbase IO-manipulators do not work for int64 types on q[C]Debug

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.3.0 Beta1
    • 4.8.6, 5.3.0
    • Core: I/O
    • None
    • Windows (MSVC 2013), Linux gcc 4.6
    • iOS/tvOS/watchOS

    Description

      It affects WId, which is annoying:

      5.3.0
      short via qDebug 0xf
      foo: short via qCDebug 0xf
      "short via QTextStream 0xf" 
      
      int via qDebug 0xf
      foo: int via qCDebug 0xf
      "int via QTextStream 0xf" 
      
      unsigned int via qDebug 0xf
      foo: unsigned int via qCDebug 0xf
      "unsigned int via QTextStream 0xf" 
      
      long via qDebug 0xf
      foo: long via qCDebug 0xf
      "long via QTextStream 0xf" 
      
      short via qDebug 0xf
      foo: short via qCDebug 0xf
      "short via QTextStream 0xf" 
      
      unsigned __int64 via qDebug 15
      foo: unsigned __int64 via qCDebug 15
      "unsigned __int64 via QTextStream 0xf" 
      
      __int64 via qDebug 15
      foo: __int64 via qCDebug 15
      "__int64 via QTextStream 0xf" 
      

      produced by

      template <class T>
      void debugHexNumber()
      {
          T n = 15;
          qDebug() << typeid(T).name() << "via qDebug" << hex << showbase << n;
      #if QT_VERSION >= 0x050000
          qCDebug(lC)  << typeid(T).name() << "via qCDebug" << hex << showbase << n;
      #endif
          QString m;
          QTextStream str(&m);
          str << typeid(T).name() << " via QTextStream "  << hex << showbase << n;
          qDebug() << m << '\n';
      }
      

      for quintptr, WId

      Attachments

        For Gerrit Dashboard: QTBUG-36841
        # Subject Branch Project Status CR V

        Activity

          People

            kkohne Kai Köhne
            kleint Friedemann Kleint
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes