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

Qt 5 to-do's in QSizePolicy

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 5.0.0 Beta 1
    • Component/s: Widgets: Layout
    • Labels:
      None
    • Technical Risk:
      Normal

      Description

      src/widgets/kernel/qsizepolicy.h
          // ### Qt 5: merge these two constructors (with type == DefaultType)
          QSizePolicy(Policy horizontal, Policy vertical)
              : data(horizontal | (vertical << HSize)) { }
          QSizePolicy(Policy horizontal, Policy vertical, ControlType type)
              : data(horizontal | (vertical << HSize)) { setControlType(type); }
      ...
          quint32 data;
      /*  Qt5: Use bit flags instead, keep it here for improved readability for now.
          We can maybe change it for Qt4, but we'd have to be careful, since the behaviour
          is implementation defined. It usually varies between little- and big-endian compilers, but
          it might also not vary.
          quint32 horzPolicy : 4;
          quint32 vertPolicy : 4;
          quint32 hfw : 1;
          quint32 ctype : 5;
          quint32 wfh : 1;
          quint32 padding : 1;   // we cannot use the highest bit
          quint32 verStretch : 8;
          quint32 horStretch : 8;
      */
      

      These comments should either be actioned for Qt 5.0.0 (if source-compatibility can be maintained), removed, or changed to Qt 6 to-do's.

      Note that addressing the second item should also involve making the parameter types of the setHorizontalStretch() and setVerticalStretch() methods match those of the horizontalStretch() and verticalStretch() methods.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              smd Jan Arve
              Reporter:
              jasmcdon Jason McDonald (Closed Nokia Identity. Please assign to "macadder" instead) (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes