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 <Friedemann.Kleint@qt.io>bb10
parent
88e56d0932
commit
ac098eef42
|
|
@ -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 <images>.");
|
||||
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 <sizepolicy>.");
|
||||
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 <script>.");
|
||||
reader.skipCurrentElement();
|
||||
continue;
|
||||
}
|
||||
if (!tag.compare(QLatin1String("properties"), Qt::CaseInsensitive)) {
|
||||
qWarning("Omitting deprecated element <properties>.");
|
||||
reader.skipCurrentElement();
|
||||
continue;
|
||||
}
|
||||
if (!tag.compare(QLatin1String("slots"), Qt::CaseInsensitive)) {
|
||||
DomSlots *v = new DomSlots();
|
||||
v->read(reader);
|
||||
|
|
@ -2111,6 +2132,16 @@ void DomWidget::read(QXmlStreamReader &reader)
|
|||
m_property.append(v);
|
||||
continue;
|
||||
}
|
||||
if (!tag.compare(QLatin1String("script"), Qt::CaseInsensitive)) {
|
||||
qWarning("Omitting deprecated element <script>.");
|
||||
reader.skipCurrentElement();
|
||||
continue;
|
||||
}
|
||||
if (!tag.compare(QLatin1String("widgetdata"), Qt::CaseInsensitive)) {
|
||||
qWarning("Omitting deprecated element <widgetdata>.");
|
||||
reader.skipCurrentElement();
|
||||
continue;
|
||||
}
|
||||
if (!tag.compare(QLatin1String("attribute"), Qt::CaseInsensitive)) {
|
||||
DomProperty *v = new DomProperty();
|
||||
v->read(reader);
|
||||
|
|
|
|||
Loading…
Reference in New Issue