0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-10-04 04:06:43 +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

@@ -107,11 +107,22 @@ void SVGItem::updateItemSize(DataSourceManager *dataManager, RenderPass pass, in
m_resourcePath = expandDataFields(m_resourcePath, NoEscapeSymbols, dataManager);
m_image = imageFromResource(m_resourcePath);
} else if (!m_variable.isEmpty()){
//TODO: Migrate to QMetaType
QVariant data = dataManager->variable(m_variable);
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
if (data.typeId() == QMetaType::QString){
#else
if (data.type() == QVariant::String){
#endif
m_image = imageFromResource(data.toString());
} else if (data.type() == QVariant::ByteArray) {
m_image = data.value<QByteArray>() ;
} else {
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
if (data.typeId() == QMetaType::QByteArray) {
#else
if (data.type() == QVariant::ByteArray) {
#endif
m_image = data.value<QByteArray>() ;
}
}
}
}