mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-14 01:04:13 +02:00
Merge pull request #998 from ispyisail/revive/785-case-insensitive-flags
Make auto_num_locked/potential_isolating case-insensitive
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user