Base: UnitsSchema: return std::string

This commit is contained in:
Ladislav Michl
2024-07-13 17:19:27 +02:00
committed by Yorik van Havre
parent 2ea8a633ac
commit 4d6ed9d531
25 changed files with 493 additions and 589 deletions

View File

@@ -239,19 +239,13 @@ Quantity Quantity::operator-() const
std::string Quantity::getUserString(double& factor, std::string& unitString) const
{
QString str = QString::fromStdString(unitString);
QString ret = Base::UnitsApi::schemaTranslate(*this, factor, str);
unitString = str.toStdString();
return ret.toStdString();
return Base::UnitsApi::schemaTranslate(*this, factor, unitString);
}
std::string
Quantity::getUserString(UnitsSchema* schema, double& factor, std::string& unitString) const
{
QString str = QString::fromStdString(unitString);
QString ret = schema->schemaTranslate(*this, factor, str);
unitString = str.toStdString();
return ret.toStdString();
return schema->schemaTranslate(*this, factor, unitString);
}
std::string Quantity::getSafeUserString() const