Merge pull request #998 from ispyisail/revive/785-case-insensitive-flags

Make auto_num_locked/potential_isolating case-insensitive
This commit is contained in:
Laurent Trinques
2026-09-23 18:38:38 +02:00
committed by GitHub
5 changed files with 41 additions and 5 deletions
+17
View File
@@ -255,6 +255,23 @@ bool QET::attributeIsAReal(
return(true);
}
/**
@brief QET::infoFlagIsTrue
@see the header comment for why this exists rather than a bare
== "true" comparison.
@param value the raw elementInformations string to test
@return true if @p value, trimmed and case-folded, is one of the
truthy spellings this codebase already accepts elsewhere
*/
bool QET::infoFlagIsTrue(const QString &value)
{
const QString v = value.trimmed().toLower();
return v == QLatin1String("true")
|| v == QLatin1String("1")
|| v == QLatin1String("yes")
|| v == QLatin1String("on");
}
/**
@brief QET::ElementsAndConductorsSentence
Permet de composer rapidement la proposition "x elements et y conducteurs"