forked from qt-creator/qt-creator
QmlDesigner: Fix some warnings
Change-Id: Ice9c29409b53457c20cef272b6a5dd6feb97adb3 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -96,6 +96,8 @@ void Quick3DNodeInstance::setHideInEditor(bool b)
|
|||||||
QQuick3DNodePrivate *privateNode = QQuick3DNodePrivate::get(quick3DNode());
|
QQuick3DNodePrivate *privateNode = QQuick3DNodePrivate::get(quick3DNode());
|
||||||
if (privateNode)
|
if (privateNode)
|
||||||
privateNode->setIsHiddenInEditor(b);
|
privateNode->setIsHiddenInEditor(b);
|
||||||
|
#else
|
||||||
|
Q_UNUSED(b);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -355,11 +355,14 @@ bool compareJavaScriptExpression(const QString &expression1, const QString &expr
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool smartVeryFuzzyCompare(const QVariant &value1, const QVariant &value2)
|
bool smartVeryFuzzyCompare(const QVariant &value1, const QVariant &value2)
|
||||||
{ //we ignore slight changes on doubles and only check three digits
|
{
|
||||||
if ((value1.type() == QMetaType::Double)
|
//we ignore slight changes on doubles and only check three digits
|
||||||
|| (value2.type() == QMetaType::Double)
|
const auto type1 = static_cast<QMetaType::Type>(value1.type());
|
||||||
|| (value1.type() == QMetaType::Float)
|
const auto type2 = static_cast<QMetaType::Type>(value2.type());
|
||||||
|| (value2.type() == QMetaType::Float)) {
|
if (type1 == QMetaType::Double
|
||||||
|
|| type2 == QMetaType::Double
|
||||||
|
|| type1 == QMetaType::Float
|
||||||
|
|| type2 == QMetaType::Float) {
|
||||||
bool ok1, ok2;
|
bool ok1, ok2;
|
||||||
qreal a = value1.toDouble(&ok1);
|
qreal a = value1.toDouble(&ok1);
|
||||||
qreal b = value2.toDouble(&ok2);
|
qreal b = value2.toDouble(&ok2);
|
||||||
|
Reference in New Issue
Block a user