mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Ref T210, boolToEnabledDisabled
This commit is contained in:
@@ -44,6 +44,12 @@ namespace BlackMisc
|
||||
return v ? "true" : "false";
|
||||
}
|
||||
|
||||
QString boolToEnabledDisabled(bool v, bool i18n)
|
||||
{
|
||||
Q_UNUSED(i18n);
|
||||
return v ? "enabled" : "disabled";
|
||||
}
|
||||
|
||||
bool stringToBool(const QString &string)
|
||||
{
|
||||
QString s(string.trimmed().toLower());
|
||||
|
||||
@@ -129,6 +129,9 @@ namespace BlackMisc
|
||||
//! Bool to true/false
|
||||
BLACKMISC_EXPORT QString boolToTrueFalse(bool v, bool i18n = false);
|
||||
|
||||
//! Bool to enabled/disabled
|
||||
BLACKMISC_EXPORT QString boolToEnabledDisabled(bool v, bool i18n = false);
|
||||
|
||||
//! Convert string to bool
|
||||
BLACKMISC_EXPORT bool stringToBool(const QString &boolString);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user