refactor: Address (Windows) compile warnings (#840)

* Windows compile errors and (Qt 5.15 deprecation) warnings

* Usability - Enable/Disable Instance button

Co-authored-by: brindosch <edeltraud70@gmx.de>
This commit is contained in:
LordGrey
2020-06-28 23:05:32 +02:00
committed by GitHub
parent e365a2839d
commit bfb50b8d91
61 changed files with 530 additions and 365 deletions

View File

@@ -552,7 +552,7 @@ private:
/// buffer for leds (with adjustment)
std::vector<ColorRgb> _ledBuffer;
VideoMode _currVideoMode = VIDEO_2D;
VideoMode _currVideoMode = VideoMode::VIDEO_2D;
/// Boblight instance
BoblightServer* _boblightServer;

View File

@@ -15,7 +15,7 @@
namespace Json { class Value; }
/// Enumeration containing the possible orders of device color byte data
enum ColorOrder
enum class ColorOrder
{
ORDER_RGB, ORDER_RBG, ORDER_GRB, ORDER_BRG, ORDER_GBR, ORDER_BGR
};
@@ -24,17 +24,17 @@ inline QString colorOrderToString(const ColorOrder colorOrder)
{
switch (colorOrder)
{
case ORDER_RGB:
case ColorOrder::ORDER_RGB:
return "rgb";
case ORDER_RBG:
case ColorOrder::ORDER_RBG:
return "rbg";
case ORDER_GRB:
case ColorOrder::ORDER_GRB:
return "grb";
case ORDER_BRG:
case ColorOrder::ORDER_BRG:
return "brg";
case ORDER_GBR:
case ColorOrder::ORDER_GBR:
return "gbr";
case ORDER_BGR:
case ColorOrder::ORDER_BGR:
return "bgr";
default:
return "not-a-colororder";
@@ -44,31 +44,31 @@ inline ColorOrder stringToColorOrder(const QString & order)
{
if (order == "rgb")
{
return ORDER_RGB;
return ColorOrder::ORDER_RGB;
}
else if (order == "bgr")
{
return ORDER_BGR;
return ColorOrder::ORDER_BGR;
}
else if (order == "rbg")
{
return ORDER_RBG;
return ColorOrder::ORDER_RBG;
}
else if (order == "brg")
{
return ORDER_BRG;
return ColorOrder::ORDER_BRG;
}
else if (order == "gbr")
{
return ORDER_GBR;
return ColorOrder::ORDER_GBR;
}
else if (order == "grb")
{
return ORDER_GRB;
return ColorOrder::ORDER_GRB;
}
std::cout << "Unknown color order defined (" << order.toStdString() << "). Using RGB." << std::endl;
return ORDER_RGB;
return ColorOrder::ORDER_RGB;
}
///