Fix data() with long datatype for Mimer SQL

Calling data() for parameters of the type bigint
failed in combination with stored procedures with
output parameters. Cast the result to qlonglong to
fix it.

Pick-to: 6.7 6.6
Change-Id: I84ef04ed26821b92ef7c5bcdf12b778e91450e0b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This commit is contained in:
Fredrik Ålund 2024-03-26 16:41:33 +01:00
parent 95dabd0696
commit ad84754b58

View File

@ -690,7 +690,7 @@ QVariant QMimerSQLResult::data(int i)
err, QSqlError::StatementError, d->drv_d_func()));
return QVariant(QMetaType(type), nullptr);
}
return QString::number(resLongLong).toLongLong();
return (qlonglong)resLongLong;
}
case MimerColumnTypes::Boolean: {
err = MimerGetBoolean(d->statementhandle, static_cast<std::int16_t>(i) + 1);