0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-11-25 08:28:06 +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

@@ -519,17 +519,32 @@ QString ScriptEngineManager::expandDataFields(QString context, ExpandType expand
fieldValue="\"\"";
} else {
fieldValue = escapeSimbols(varValue.toString());
switch (dataManager()->fieldData(field).type()) {
case QVariant::Char:
case QVariant::String:
case QVariant::StringList:
case QVariant::Date:
case QVariant::DateTime:
fieldValue = "\""+fieldValue+"\"";
break;
default:
break;
//TODO: Migrate to QMetaType
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
switch (dataManager()->fieldData(field).typeId()) {
case QMetaType::QChar:
case QMetaType::QString:
case QMetaType::QStringList:
case QMetaType::QDate:
case QMetaType::QDateTime:
fieldValue = "\""+fieldValue+"\"";
break;
default:
break;
}
#else
switch (dataManager()->fieldData(field).type()) {
case QVariant::Char:
case QVariant::String:
case QVariant::StringList:
case QVariant::Date:
case QVariant::DateTime:
fieldValue = "\""+fieldValue+"\"";
break;
default:
break;
}
#endif
}
} else {
if (expandType == ReplaceHTMLSymbols)