0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-10-02 03:53:19 +03:00

Fixed some deprecation warnings

This commit is contained in:
Arin Alex
2022-07-19 00:43:54 +03:00
parent 1b1c0d52bc
commit a865e92a23
14 changed files with 141 additions and 31 deletions

View File

@@ -487,6 +487,7 @@ QString TextItem::formatFieldValue()
}
}
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
switch (value.type()) {
case QVariant::Date:
case QVariant::DateTime:
@@ -496,6 +497,17 @@ QString TextItem::formatFieldValue()
default:
return value.toString();
}
#else
switch (value.typeId()) {
case QMetaType::QDate:
case QMetaType::QDateTime:
return formatDateTime(value.toDateTime());
case QMetaType::Double:
return formatNumber(value.toDouble());
default:
return value.toString();
}
#endif
}