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

Improve QTextOption total bit fields size.

XMLWordPrintable

      In qtextoption.h file, the QTextOption has total bit fields size of 33. The compiler will allocate as many uint (four bytes), slots as it needs to represent the number of bits.

      It was most likely a typo when Qt needed to support binary compatibility legacy from Qt 4.x version. It is too late to fix for Qt 5 now since it will break binary compatibility. Thus, this is a task for Qt 6.x version.

      struct QTextOptionPrivate;
      
      class Q_GUI_EXPORT QTextOption
      {
      //...
      //...
      private:
          uint align : 8;
          uint wordWrap : 4;
          uint design : 1;
          uint direction : 2;
          uint unused : 18;
          uint f;
          qreal tab;
          QTextOptionPrivate *d;
      };
      

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

            esabraha Eskil Abrahamsen Blomfeldt
            leonlee Leonard Lee
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes