QmlDesigner: Hardcode hints for SwipeView

the hints will be added to Qt 5.10.

Change-Id: I5e9ee09c99376e69c2890923834ee6b4141e48e8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2017-03-08 15:17:56 +01:00
parent 23d9d05d2c
commit ee403cb013

View File

@@ -51,6 +51,16 @@
namespace QmlDesigner {
static bool isSwipeView(const ModelNode &node)
{
if (node.metaInfo().isValid()
&& node.metaInfo().isSubclassOf("QtQuick.Controls.SwipeView"))
return true;
return false;
}
namespace Internal {
static std::once_flag s_singletonFlag;
@@ -111,6 +121,9 @@ bool NodeHints::forceClip() const
if (!isValid())
return false;
if (isSwipeView(modelNode()))
return true;
return evaluateBooleanExpression("forceClip", false);
}
@@ -119,6 +132,9 @@ bool NodeHints::doesLayoutChildren() const
if (!isValid())
return false;
if (isSwipeView(modelNode()))
return true;
return evaluateBooleanExpression("doesLayoutChildren", false);
}
@@ -150,6 +166,9 @@ bool NodeHints::isStackedContainer() const
if (!isValid())
return false;
if (isSwipeView(modelNode()))
return true;
return evaluateBooleanExpression("isStackedContainer", false);
}