mirror of
https://github.com/fralx/LimeReport.git
synced 2025-09-23 08:29:07 +03:00
Turn off translation for object properties ability has been added to the object inspector
This commit is contained in:
@@ -162,7 +162,7 @@ void EnumPropItem::setModelData(QWidget *propertyEditor, QAbstractItemModel *mod
|
||||
QString EnumPropItem::nameByType(int value) const
|
||||
{
|
||||
QMetaEnum propEnum = object()->metaObject()->property(object()->metaObject()->indexOfProperty(propertyName().toLatin1())).enumerator();
|
||||
return tr(propEnum.valueToKey(value));
|
||||
return isTranslateProperty() ? tr(propEnum.valueToKey(value)) : propEnum.valueToKey(value);
|
||||
}
|
||||
|
||||
int EnumPropItem::typeByName(const QString &value) const
|
||||
|
@@ -97,8 +97,8 @@ QString FlagsPropItem::displayValue() const
|
||||
{
|
||||
if ((propEnum.keyToValue(propEnum.key(i)) == 0) ? propertyValue().toInt() == 0 : (propertyValue().toInt() & propEnum.keyToValue(propEnum.key(i))) == propEnum.keyToValue(propEnum.key(i)))
|
||||
{
|
||||
if (result.isEmpty()) result+= tr(propEnum.key(i));
|
||||
else result=result+" | "+tr(propEnum.key(i));
|
||||
if (result.isEmpty()) result+= isTranslateProperty() ? tr(propEnum.key(i)) : propEnum.key(i);
|
||||
else result=result+" | "+ (isTranslateProperty() ? tr(propEnum.key(i)) : propEnum.key(i));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user