Suppress MinGW warning.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-09-05 14:59:22 +03:00
parent 20abb9979e
commit d791649170

View File

@ -685,19 +685,14 @@ void AbstractTest::ReadDoubleValue(const QJsonObject &itemObject, const QString
{
if (not defaultValue.isEmpty())
{
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wunused-but-set-variable")
bool ok = false;
qreal defVal = defaultValue.toDouble(&ok);
value = static_cast<T>(defaultValue.toDouble(&ok));
if (not ok)
{
const QString error = QStringLiteral("Cannot convert default value '%1' to double.").arg(defaultValue);
QFAIL(qUtf8Printable(error));
}
value = static_cast<T>(defVal);
QT_WARNING_POP
}
else
{