diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-10-31 22:20:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-10-31 22:20:54 +0300 |
commit | 8c11a0235e6ed4e3ed6370014cff3cd0322ed6c5 (patch) | |
tree | c800007dc9b9904b3b235c4663abda8b14c8e94c /src/gui/widgets/setupitem.cpp | |
parent | 06720edd93b51a84650e2d385a24043cc4fb932e (diff) | |
download | manaplus-8c11a0235e6ed4e3ed6370014cff3cd0322ed6c5.tar.gz manaplus-8c11a0235e6ed4e3ed6370014cff3cd0322ed6c5.tar.bz2 manaplus-8c11a0235e6ed4e3ed6370014cff3cd0322ed6c5.tar.xz manaplus-8c11a0235e6ed4e3ed6370014cff3cd0322ed6c5.zip |
Add strong typed bool enum usebase64.
Diffstat (limited to 'src/gui/widgets/setupitem.cpp')
-rw-r--r-- | src/gui/widgets/setupitem.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp index c066c55eb..6e9e2bf96 100644 --- a/src/gui/widgets/setupitem.cpp +++ b/src/gui/widgets/setupitem.cpp @@ -275,7 +275,7 @@ SetupItemTextField::SetupItemTextField(const std::string &restrict text, SetupTabScroll *restrict const parent, const std::string &restrict eventName, const MainConfig mainConfig, - const bool useBase64) : + const UseBase64 useBase64) : SetupItem(text, description, keyName, parent, eventName, mainConfig), mHorizont(nullptr), mLabel(nullptr), @@ -295,7 +295,7 @@ SetupItemTextField::SetupItemTextField(const std::string &restrict text, const std::string &restrict eventName, const std::string &restrict def, const MainConfig mainConfig, - const bool useBase64) : + const UseBase64 useBase64) : SetupItem(text, description, keyName, parent, eventName, def, mainConfig), mHorizont(nullptr), mLabel(nullptr), @@ -319,7 +319,7 @@ SetupItemTextField::~SetupItemTextField() void SetupItemTextField::save() { - if (mUseBase64) + if (mUseBase64 == UseBase64_true) { std::string normalValue = mValue; mValue = encodeBase64String(mValue); @@ -335,7 +335,7 @@ void SetupItemTextField::save() void SetupItemTextField::cancel(const std::string &eventName A_UNUSED) { load(); - if (mUseBase64) + if (mUseBase64 == UseBase64_true) mValue = decodeBase64String(mValue); toWidget(); } @@ -343,7 +343,7 @@ void SetupItemTextField::cancel(const std::string &eventName A_UNUSED) void SetupItemTextField::externalUpdated(const std::string &eventName A_UNUSED) { load(); - if (mUseBase64) + if (mUseBase64 == UseBase64_true) mValue = decodeBase64String(mValue); toWidget(); } @@ -351,7 +351,7 @@ void SetupItemTextField::externalUpdated(const std::string &eventName A_UNUSED) void SetupItemTextField::rereadValue() { load(); - if (mUseBase64) + if (mUseBase64 == UseBase64_true) mValue = decodeBase64String(mValue); toWidget(); } @@ -359,7 +359,7 @@ void SetupItemTextField::rereadValue() void SetupItemTextField::createControls() { load(); - if (mUseBase64) + if (mUseBase64 == UseBase64_true) mValue = decodeBase64String(mValue); mHorizont = new HorizontContainer(this, 32, 2); |