0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-10-05 04:14:48 +03:00

Fixed defined objectname changed after pasting items

This commit is contained in:
yanis60
2023-02-03 15:55:36 +01:00
parent 98ac5ce37f
commit 5e91fb0c33
62 changed files with 2760 additions and 2271 deletions

View File

@@ -85,6 +85,17 @@ LimeReport::RectPropItem::RectPropItem(QObject *object, ObjectsList* objects, co
QString LimeReport::RectPropItem::displayValue() const
{
//TODO: Migrate to QMetaType
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
switch(propertyValue().typeId()){
case QMetaType::QRect:
return rectToString(propertyValue().toRect());
case QMetaType::QRectF:
return rectToString(propertyValue().toRect());
default :
return ObjectPropItem::displayValue();
}
#else
switch(propertyValue().type()){
case QVariant::Rect:
return rectToString(propertyValue().toRect());
@@ -93,6 +104,7 @@ QString LimeReport::RectPropItem::displayValue() const
default :
return ObjectPropItem::displayValue();
}
#endif
}
LimeReport::RectUnitPropItem::RectUnitPropItem(QObject *object, ObjectsList* objects, const QString &name, const QString &displayName, const QVariant &value, ObjectPropItem *parent, bool /*readonly*/):