Skip to content

Commit a517eb2

Browse files
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 <[email protected]> Reviewed-by: Andy Shaw <[email protected]>
1 parent a174b3d commit a517eb2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/tools/uic/uic.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,12 @@ bool Uic::write(DomUI *ui)
247247
}
248248

249249
pixFunction = ui->elementPixmapFunction();
250-
if (pixFunction == QLatin1String("QPixmap::fromMimeSource"))
251-
pixFunction = QLatin1String("qPixmapFromMimeSource");
250+
if (pixFunction == QLatin1String("QPixmap::fromMimeSource")
251+
|| pixFunction == QLatin1String("qPixmapFromMimeSource")) {
252+
fprintf(stderr, "%s: Warning: Obsolete pixmap function '%s' specified in the UI file.\n",
253+
qPrintable(opt.messagePrefix()), qPrintable(pixFunction));
254+
pixFunction.clear();
255+
}
252256

253257
info.acceptUI(ui);
254258
cWidgetsInfo.acceptUI(ui);

0 commit comments

Comments
 (0)