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

Designer injects bogus "<normaloff>.</normaloff>." for icon properties

    XMLWordPrintable

Details

    • 80d6956e0 (dev), 7888a86ce (6.5), febe0f1f9 (6.6), 2aae71c86 (tqtc/lts-5.15), c560cff43 (tqtc/lts-6.2)

    Description

      Editing an existing UI file with Designer and saving the file results in icon properties which before only had an iconset element with a theme attribute set to suddenly have some bogus "normaloff>.</normaloff>." content inserted:

        <widget class="QPushButton" name="pushButton">
         <property name="icon">
          <iconset theme="dialog-ok"/>
         </property>
        </widget>
      

      becomes

        <widget class="QPushButton" name="pushButton">
         <property name="icon">
          <iconset theme="dialog-ok">
           <normaloff>.</normaloff>.</iconset>
         </property>
        </widget>
      

      Which results in some bogus code generated from uic:

          QIcon icon;
          QString iconThemeName = QString::fromUtf8("dialog-ok");
          if (QIcon::hasThemeIcon(iconThemeName)) {
              icon = QIcon::fromTheme(iconThemeName);
          } else {
              icon.addFile(QString::fromUtf8("."), QSize(), QIcon::Normal, QIcon::Off);
          }
      

      How to reproduce

      1. Start Designer, create a new empty dialog
      2. Add a push button
      3. Edit the icon and select a theme name, "dialog-ok"
      4. Save the file as "test.ui" and exit Designer
      5. Check the file content in a text editor
      6. Start Designer again and load "test.ui"
      7. Move the button a bit
      8. Save the file again
      9. Check the file content in a text editor

      Attachments

        1. qtbug115465_diag.diff
          4 kB
        2. qtbug115465_log.txt
          0.1 kB
        3. qtbug115465.ui
          0.7 kB

        Issue Links

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

          Activity

            People

              kleint Friedemann Kleint
              kossebau Friedrich W. H. Kossebau
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: