summaryrefslogtreecommitdiffstats
path: root/src/tools/uic/customwidgetsinfo.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-11-10 12:52:03 (GMT)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-11-10 13:02:11 (GMT)
commitd1c5585faa066a6693c24600cf8a1c42a285fe3b (patch)
tree089ec414e6181c12d44d0f417ec33ee5541e8018 /src/tools/uic/customwidgetsinfo.cpp
parent5067c64c2356196f2086a97304f1a99309c09d69 (diff)
downloadQt-d1c5585faa066a6693c24600cf8a1c42a285fe3b.zip
Qt-d1c5585faa066a6693c24600cf8a1c42a285fe3b.tar.gz
Qt-d1c5585faa066a6693c24600cf8a1c42a285fe3b.tar.bz2
uic/Designer: Use correct margin defaults for custom page-based containers.
Designer-formbuilder/uic incorrectly considered custom containers that do not inherit a known page-based container (say QTabWidget) as instances of QLayoutWidget, giving them a default margin of 0. Add a check for the custom widget <container>-element to the checks for QLayoutWidget in uic/formbuilder. In the formbuilder, introduce a new data structure to store custom widget information instead of using 3 separate hashes. Adapt one autotest baseline (Qt 3). Reviewed-by: Jarek Kobus <jkobus@trolltech.com> Task-number: QTBUG-5335
Diffstat (limited to 'src/tools/uic/customwidgetsinfo.cpp')
-rw-r--r--src/tools/uic/customwidgetsinfo.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tools/uic/customwidgetsinfo.cpp b/src/tools/uic/customwidgetsinfo.cpp
index 70adba2..ca3fd19 100644
--- a/src/tools/uic/customwidgetsinfo.cpp
+++ b/src/tools/uic/customwidgetsinfo.cpp
@@ -88,6 +88,14 @@ bool CustomWidgetsInfo::extends(const QString &classNameIn, const QLatin1String
return false;
}
+bool CustomWidgetsInfo::isCustomWidgetContainer(const QString &className) const
+{
+ if (const DomCustomWidget *dcw = m_customWidgets.value(className, 0))
+ if (dcw->hasElementContainer())
+ return dcw->elementContainer() != 0;
+ return false;
+}
+
QString CustomWidgetsInfo::realClassName(const QString &className) const
{
if (className == QLatin1String("Line"))