Details
-
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)
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
- 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
Attachments
Issue Links
- relates to
-
QTBUG-7777 Support QIcon::fromTheme() in Qt Designer
- Closed