From ac098eef427e20b35f14b0b3f84483e7828d07d4 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Thu, 15 Jun 2017 15:56:03 +0200 Subject: uic: Ignore deprecated elements instead of raising an error [ChangeLog][QtCore][uic] Ignore old images embedded in ui files, which were imported from Qt 3. uic will now behave consistently with Qt Designer - both will ignore them. Change-Id: Ib2dfd0bb28c0532463fdee2d46a8f0979c28c80c Reviewed-by: Friedemann Kleint --- src/tools/uic/ui4.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/tools/uic/ui4.cpp b/src/tools/uic/ui4.cpp index 57400c1e3c..bc1039871e 100644 --- a/src/tools/uic/ui4.cpp +++ b/src/tools/uic/ui4.cpp @@ -39,6 +39,7 @@ using namespace QFormInternal; /******************************************************************************* ** Implementations */ + DomUI::~DomUI() { delete m_widget; @@ -136,6 +137,11 @@ void DomUI::read(QXmlStreamReader &reader) setElementTabStops(v); continue; } + if (!tag.compare(QLatin1String("images"), Qt::CaseInsensitive)) { + qWarning("Omitting deprecated element ."); + reader.skipCurrentElement(); + continue; + } if (!tag.compare(QLatin1String("includes"), Qt::CaseInsensitive)) { DomIncludes *v = new DomIncludes(); v->read(reader); @@ -1236,10 +1242,25 @@ void DomCustomWidget::read(QXmlStreamReader &reader) setElementContainer(reader.readElementText().toInt()); continue; } + if (!tag.compare(QLatin1String("sizepolicy"), Qt::CaseInsensitive)) { + qWarning("Omitting deprecated element ."); + reader.skipCurrentElement(); + continue; + } if (!tag.compare(QLatin1String("pixmap"), Qt::CaseInsensitive)) { setElementPixmap(reader.readElementText()); continue; } + if (!tag.compare(QLatin1String("script"), Qt::CaseInsensitive)) { + qWarning("Omitting deprecated element