- 
    Bug 
- 
    Resolution: Fixed
- 
    P3: Somewhat important 
- 
    6.5.2
- 
    None
- 
        80d6956e0 (dev), 7888a86ce (6.5), febe0f1f9 (6.6), 2aae71c86 (tqtc/lts-5.15), c560cff43 (tqtc/lts-6.2)
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
- Start Designer, create a new empty dialog
- Add a push button
- Edit the icon and select a theme name, "dialog-ok"
- Save the file as "test.ui" and exit Designer
- Check the file content in a text editor
- Start Designer again and load "test.ui"
- Move the button a bit
- Save the file again
- Check the file content in a text editor
- relates to
- 
                    QTBUG-7777 Support QIcon::fromTheme() in Qt Designer -         
- Closed
 
-         
| For Gerrit Dashboard: QTBUG-115465 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V | 
| 492393,2 | Qt Designer: Fix invalid QIcon entry "<normaloff>.</normaloff>" | dev | qt/qttools | Status: MERGED | +2 | 0 | 
| 492433,2 | Qt Designer: Fix invalid QIcon entry "<normaloff>.</normaloff>" | 6.6 | qt/qttools | Status: MERGED | +2 | 0 | 
| 492434,2 | Qt Designer: Fix invalid QIcon entry "<normaloff>.</normaloff>" | 6.5 | qt/qttools | Status: MERGED | +2 | 0 | 
| 492436,3 | Qt Designer: Fix invalid QIcon entry "<normaloff>.</normaloff>" | tqtc/lts-6.2 | qt/tqtc-qttools | Status: MERGED | +2 | 0 | 
| 492437,3 | Qt Designer: Fix invalid QIcon entry "<normaloff>.</normaloff>" | tqtc/lts-5.15 | qt/tqtc-qttools | Status: MERGED | +2 | 0 |