summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-23 14:57:20 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-23 14:57:20 +0300
commit856aad9aea556aafd2ddd9645352b81f4cd2af53 (patch)
tree439de077614e086170db64ea1c6a7e6d7201bd7a /src/gui/widgets
parent5448377e2a38bf1186f17d9ae035cbcc68b9dc11 (diff)
downloadmanaverse-856aad9aea556aafd2ddd9645352b81f4cd2af53.tar.gz
manaverse-856aad9aea556aafd2ddd9645352b81f4cd2af53.tar.bz2
manaverse-856aad9aea556aafd2ddd9645352b81f4cd2af53.tar.xz
manaverse-856aad9aea556aafd2ddd9645352b81f4cd2af53.zip
Add pragmas for disable -Wswitch-bool in some places.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/dropdown.cpp3
-rw-r--r--src/gui/widgets/tabs/setup_colors.cpp3
-rw-r--r--src/gui/widgets/textbox.cpp3
-rw-r--r--src/gui/widgets/textfield.cpp6
4 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index 8f1a811e2..9648b97c0 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -332,6 +332,8 @@ void DropDown::keyPressed(KeyEvent& event)
return;
const InputActionT actionId = event.getActionId();
+ PRAGMA("GCC diagnostic push")
+ PRAGMA("GCC diagnostic ignored \"-Wswitch-enum\"")
switch (actionId)
{
case InputAction::GUI_SELECT:
@@ -362,6 +364,7 @@ void DropDown::keyPressed(KeyEvent& event)
default:
return;
}
+ PRAGMA("GCC diagnostic pop")
event.consume();
}
diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp
index 8ad0958e1..8235aab2b 100644
--- a/src/gui/widgets/tabs/setup_colors.cpp
+++ b/src/gui/widgets/tabs/setup_colors.cpp
@@ -288,6 +288,8 @@ void Setup_Colors::valueChanged(const SelectionEvent &event A_UNUSED)
// probably need combite both switches and add all mssing color ids.
+ PRAGMA("GCC diagnostic push")
+ PRAGMA("GCC diagnostic ignored \"-Wswitch-enum\"")
switch (type)
{
case UserColorId::AIR_COLLISION_HIGHLIGHT:
@@ -362,6 +364,7 @@ void Setup_Colors::valueChanged(const SelectionEvent &event A_UNUSED)
mGradDelaySlider->setScale(20, 100);
break;
}
+ PRAGMA("GCC diagnostic pop")
if (grad != GradientType::STATIC && grad != GradientType::PULSE)
{ // If nonstatic color, don't display the current, but the committed
// color at the sliders
diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp
index d1c10be67..abb03a1ca 100644
--- a/src/gui/widgets/textbox.cpp
+++ b/src/gui/widgets/textbox.cpp
@@ -257,6 +257,8 @@ void TextBox::keyPressed(KeyEvent& event)
const Key &key = event.getKey();
const InputActionT action = event.getActionId();
+ PRAGMA("GCC diagnostic push")
+ PRAGMA("GCC diagnostic ignored \"-Wswitch-enum\"")
switch (action)
{
case InputAction::GUI_LEFT:
@@ -430,6 +432,7 @@ void TextBox::keyPressed(KeyEvent& event)
break;
}
}
+ PRAGMA("GCC diagnostic pop")
adjustSize();
scrollToCaret();
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index f9fec2852..34c088540 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -396,6 +396,8 @@ void TextField::keyPressed(KeyEvent &event)
bool TextField::handleNormalKeys(const InputActionT action, bool &consumed)
{
+ PRAGMA("GCC diagnostic push")
+ PRAGMA("GCC diagnostic ignored \"-Wswitch-enum\"")
switch (action)
{
case InputAction::GUI_LEFT:
@@ -475,11 +477,14 @@ bool TextField::handleNormalKeys(const InputActionT action, bool &consumed)
default:
break;
}
+ PRAGMA("GCC diagnostic pop")
return true;
}
void TextField::handleCtrlKeys(const InputActionT action, bool &consumed)
{
+ PRAGMA("GCC diagnostic push")
+ PRAGMA("GCC diagnostic ignored \"-Wswitch-enum\"")
switch (action)
{
case InputAction::GUI_LEFT:
@@ -570,6 +575,7 @@ void TextField::handleCtrlKeys(const InputActionT action, bool &consumed)
default:
break;
}
+ PRAGMA("GCC diagnostic pop")
}
void TextField::moveCaretBack()