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());
|
||||
if (privateNode)
|
||||
privateNode->setIsHiddenInEditor(b);
|
||||
#else
|
||||
Q_UNUSED(b);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -355,11 +355,14 @@ bool compareJavaScriptExpression(const QString &expression1, const QString &expr
|
||||
}
|
||||
|
||||
bool smartVeryFuzzyCompare(const QVariant &value1, const QVariant &value2)
|
||||
{ //we ignore slight changes on doubles and only check three digits
|
||||
if ((value1.type() == QMetaType::Double)
|
||||
|| (value2.type() == QMetaType::Double)
|
||||
|| (value1.type() == QMetaType::Float)
|
||||
|| (value2.type() == QMetaType::Float)) {
|
||||
{
|
||||
//we ignore slight changes on doubles and only check three digits
|
||||
const auto type1 = static_cast<QMetaType::Type>(value1.type());
|
||||
const auto type2 = static_cast<QMetaType::Type>(value2.type());
|
||||
if (type1 == QMetaType::Double
|
||||
|| type2 == QMetaType::Double
|
||||
|| type1 == QMetaType::Float
|
||||
|| type2 == QMetaType::Float) {
|
||||
bool ok1, ok2;
|
||||
qreal a = value1.toDouble(&ok1);
|
||||
qreal b = value2.toDouble(&ok2);
|
||||
|
Reference in New Issue
Block a user