diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-27 12:42:48 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-07-01 23:09:54 +0200 |
commit | 199329c9df889d371dc5f717248fcc519e8952e3 (patch) | |
tree | 7cf4d9ccff1253aef4f6e05bf5c997c14edecdc5 /src/designer/src/lib/uilib/ui4.cpp | |
parent | b5bf195dc9c7576f627f37428c5ff2ff6e958411 (diff) | |
download | qttools-199329c9df889d371dc5f717248fcc519e8952e3.tar.gz |
Qt Designer: Add a setting for calling connectSlotsByName()
Add a boolean attribute to DomUI and a form setting, allowing for
per-form migration to the Qt 5 connection syntax.
[ChangeLog][Designer] A per-form setting for disabling generating
calls to QObject::connectSlotsByName() has been added to support
migrating forms to Qt 5 connection syntax.
Task-number: QTBUG-76375
Change-Id: Id59d4689287fdec025c199e4efc87a919e37ae9e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/designer/src/lib/uilib/ui4.cpp')
-rw-r--r-- | src/designer/src/lib/uilib/ui4.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/designer/src/lib/uilib/ui4.cpp b/src/designer/src/lib/uilib/ui4.cpp index 4afa1dce5..879426b0d 100644 --- a/src/designer/src/lib/uilib/ui4.cpp +++ b/src/designer/src/lib/uilib/ui4.cpp @@ -98,6 +98,10 @@ void DomUI::read(QXmlStreamReader &reader) setAttributeIdbasedtr(attribute.value() == QLatin1String("true")); continue; } + if (name == QLatin1String("connectslotsbyname")) { + setAttributeConnectslotsbyname(attribute.value() == QLatin1String("true")); + continue; + } if (name == QLatin1String("stdsetdef")) { setAttributeStdsetdef(attribute.value().toInt()); continue; @@ -231,6 +235,9 @@ void DomUI::write(QXmlStreamWriter &writer, const QString &tagName) const if (hasAttributeIdbasedtr()) writer.writeAttribute(QStringLiteral("idbasedtr"), (attributeIdbasedtr() ? QLatin1String("true") : QLatin1String("false"))); + if (hasAttributeConnectslotsbyname()) + writer.writeAttribute(QStringLiteral("connectslotsbyname"), (attributeConnectslotsbyname() ? QLatin1String("true") : QLatin1String("false"))); + if (hasAttributeStdsetdef()) writer.writeAttribute(QStringLiteral("stdsetdef"), QString::number(attributeStdsetdef())); |