uic: Ignore obsolete pixmap functions

After qtbase/550d2a0a15c9403894448ab83863e71bbac2d349,
pixmap functions are used for icons as well which can cause compile
errors for old UI files that still use them.

Task-number: QTBUG-8563
Change-Id: I61bd4b9c1bf774e071a35c5806657054a77ff4d0
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
This commit is contained in:
Friedemann Kleint 2018-10-16 10:47:22 +02:00
parent a174b3df44
commit a517eb24fa

View File

@ -247,8 +247,12 @@ bool Uic::write(DomUI *ui)
}
pixFunction = ui->elementPixmapFunction();
if (pixFunction == QLatin1String("QPixmap::fromMimeSource"))
pixFunction = QLatin1String("qPixmapFromMimeSource");
if (pixFunction == QLatin1String("QPixmap::fromMimeSource")
|| pixFunction == QLatin1String("qPixmapFromMimeSource")) {
fprintf(stderr, "%s: Warning: Obsolete pixmap function '%s' specified in the UI file.\n",
qPrintable(opt.messagePrefix()), qPrintable(pixFunction));
pixFunction.clear();
}
info.acceptUI(ui);
cWidgetsInfo.acceptUI(ui);