Gui: propertyeditor: add setPropertyValue with std::string argument
This commit is contained in:
@@ -598,7 +598,7 @@ void PropertyItem::setPropertyName(const QString& name, const QString& realName)
|
||||
displayText = str;
|
||||
}
|
||||
|
||||
void PropertyItem::setPropertyValue(const QString& value)
|
||||
void PropertyItem::setPropertyValue(const std::string& value)
|
||||
{
|
||||
// Construct command for property assignment in one go, in case of any
|
||||
// intermediate changes caused by property change that may potentially
|
||||
@@ -631,8 +631,7 @@ void PropertyItem::setPropertyValue(const QString& value)
|
||||
continue;
|
||||
}
|
||||
|
||||
ss << parent->getPropertyPrefix() << prop->getName() << " = " << value.toUtf8().constData()
|
||||
<< '\n';
|
||||
ss << parent->getPropertyPrefix() << prop->getName() << " = " << value << '\n';
|
||||
}
|
||||
|
||||
std::string cmd = ss.str();
|
||||
@@ -655,6 +654,11 @@ void PropertyItem::setPropertyValue(const QString& value)
|
||||
}
|
||||
}
|
||||
|
||||
void PropertyItem::setPropertyValue(const QString& value)
|
||||
{
|
||||
setPropertyValue(value.toStdString());
|
||||
}
|
||||
|
||||
QVariant PropertyItem::dataProperty(int role) const
|
||||
{
|
||||
if (role == Qt::ForegroundRole && linked) {
|
||||
|
||||
@@ -203,6 +203,7 @@ public:
|
||||
protected:
|
||||
PropertyItem();
|
||||
|
||||
void setPropertyValue(const std::string& value);
|
||||
virtual QVariant displayName() const;
|
||||
virtual QVariant decoration(const QVariant&) const;
|
||||
virtual QVariant toolTip(const App::Property*) const;
|
||||
|
||||
Reference in New Issue
Block a user