summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-03-14 21:22:35 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-03-18 18:59:12 +0000
commit9b5c31944fb03eea6025186c27cf809cc4a9ae05 (patch)
tree5ba4b2761addfb4df727f12a2d3901f7d98a5e2e
parent11d01e3b74c84e465246a8f164b3f3b8ff92d8a4 (diff)
Designer: write out minimumSectionSize property before current size
Make sure that minimumSectionSize is handled before currentSectionSize so a current section size lower than the default minimum section is properly handled. The same is done for QtBase in 7aa1078ecb8afd96050771635c0d3fa4238d3338. Change-Id: Id33ff11ef35cc92e0adf13402dc847b8f45c38a9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r--src/designer/src/lib/uilib/abstractformbuilder.cpp34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/designer/src/lib/uilib/abstractformbuilder.cpp b/src/designer/src/lib/uilib/abstractformbuilder.cpp
index 061da9d48..8c7171bc6 100644
--- a/src/designer/src/lib/uilib/abstractformbuilder.cpp
+++ b/src/designer/src/lib/uilib/abstractformbuilder.cpp
@@ -2088,14 +2088,15 @@ void QAbstractFormBuilder::saveItemViewExtraInfo(const QAbstractItemView *itemVi
//
// Special handling for qtableview/qtreeview fake header attributes
//
- static const QStringList realPropertyNames =
- (QStringList() << QStringLiteral("visible")
- << QStringLiteral("cascadingSectionResizes")
- << QStringLiteral("defaultSectionSize")
- << QStringLiteral("highlightSections")
- << QStringLiteral("minimumSectionSize")
- << QStringLiteral("showSortIndicator")
- << QStringLiteral("stretchLastSection"));
+ static const QLatin1String realPropertyNames[] = {
+ QLatin1String("visible"),
+ QLatin1String("cascadingSectionResizes"),
+ QLatin1String("minimumSectionSize"), // before defaultSectionSize
+ QLatin1String("defaultSectionSize"),
+ QLatin1String("highlightSections"),
+ QLatin1String("showSortIndicator"),
+ QLatin1String("stretchLastSection"),
+ };
if (const QTreeView *treeView = qobject_cast<const QTreeView*>(itemView)) {
auto viewProperties = ui_widget->elementAttribute();
@@ -2465,14 +2466,15 @@ void QAbstractFormBuilder::loadItemViewExtraInfo(DomWidget *ui_widget, QAbstract
//
// Special handling for qtableview/qtreeview fake header attributes
//
- static const QStringList realPropertyNames =
- (QStringList() << QStringLiteral("visible")
- << QStringLiteral("cascadingSectionResizes")
- << QStringLiteral("defaultSectionSize")
- << QStringLiteral("highlightSections")
- << QStringLiteral("minimumSectionSize")
- << QStringLiteral("showSortIndicator")
- << QStringLiteral("stretchLastSection"));
+ static const QLatin1String realPropertyNames[] = {
+ QLatin1String("visible"),
+ QLatin1String("cascadingSectionResizes"),
+ QLatin1String("minimumSectionSize"), // before defaultSectionSize
+ QLatin1String("defaultSectionSize"),
+ QLatin1String("highlightSections"),
+ QLatin1String("showSortIndicator"),
+ QLatin1String("stretchLastSection"),
+ };
if (QTreeView *treeView = qobject_cast<QTreeView*>(itemView)) {
const auto &allAttributes = ui_widget->elementAttribute();