Rename function

This commit is contained in:
Juergen Spitzmueller 2022-08-09 09:31:46 +02:00
parent 5b496f897c
commit 60b539e544
3 changed files with 7 additions and 7 deletions

View File

@ -75,7 +75,7 @@ QValidator::State LengthValidator::validate(QString & qtext, int &) const
if (isValidGlueLength(text, &gl))
return QValidator::Acceptable;
// Also check for localized variant
if (isValidGlueLength(fromqstr(unlocString(qtext)), &gl))
if (isValidGlueLength(fromqstr(unlocLengthString(qtext)), &gl))
return QValidator::Acceptable;
return QValidator::Intermediate;
}

View File

@ -100,8 +100,8 @@ string widgetsToLength(QLineEdit const * input, LengthCombo const * combo)
if (isValidGlueLength(fromqstr(length)))
return fromqstr(length);
// Also try with localized version
if (isValidGlueLength(fromqstr(unlocString(length))))
return fromqstr(unlocString(length));
if (isValidGlueLength(fromqstr(unlocLengthString(length))))
return fromqstr(unlocLengthString(length));
Length::UNIT const unit = combo->currentLengthItem();
@ -119,8 +119,8 @@ Length widgetsToLength(QLineEdit const * input, QComboBox const * combo)
if (isValidGlueLength(fromqstr(length)))
return Length(fromqstr(length));
// Also try with localized version
if (isValidGlueLength(fromqstr(unlocString(length))))
return Length(fromqstr(unlocString(length)));
if (isValidGlueLength(fromqstr(unlocLengthString(length))))
return Length(fromqstr(unlocLengthString(length)));
Length::UNIT unit = Length::UNIT_NONE;
QString const item = combo->currentText();
@ -214,7 +214,7 @@ QString formatLocFPNumber(double d)
}
QString unlocString(QString const & str)
QString unlocLengthString(QString const & str)
{
QLocale loc;
QString res = str;

View File

@ -73,7 +73,7 @@ void doubleToWidget(QLineEdit * input, std::string const & value,
QString formatLocFPNumber(double d);
// Method to replace localized decimal separator by dot
QString unlocString(QString const & str);
QString unlocLengthString(QString const & str);
/// Method to sort QStrings locale-aware (e.g. in combo widgets)
bool SortLocaleAware(QString const & lhs, QString const & rhs);