Skip to content

Remove Designer's "." normaloff file data from icon properties in .ui files

Friedrich W. H. Kossebau requested to merge work/kossebau/dropnormaloff into master

Qt Designer (accidentally) injected "." file names as fallback when setting theme icon names, which then results in generated code like:

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

Such a "." file name is not documented to serve any purpose, just results in failing icon lookup.

Same also for <normaloff/> which respectively gets an empty file name set even.

        icon.addFile(QString::fromUtf8(""), QSize(), QIcon::Normal, QIcon::Off);

Merge request reports