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

Incosistent bahavior of Q_PROPERTY QStringList

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P3: Somewhat important
    • None
    • 5.5.0
    • None

    Description

      I have custom widget for qdesigner which has such property:

      Q_PROPERTY( QStringList resourcePaths READ getResourcePaths WRITE setResourcePaths )

      In Qt4.4.8 either if .ui file doesn't contain this property value or the value is empty then setter method is not called.

      Qt5.5.0 behaves differently. If property doesn't exist in .ui then setter is not called, but if .ui contains empty property then it calls setter with empty value.

      Problem is that there is no way to remove empty value from Designer. If you add anything into list and then remove it then empty property remains in .ui file.

      I'm not sure this is regression or progression, however, old behavior seems to be more consistent for me. My idea is to revert to 4.4.8 behavior, or call setter with empty list also if property doesn't exist in .ui.

      Attachments

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

        Activity

          People

            mmutz Marc Mutz
            bodzio131 Bogdan Slusarczyk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes