mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
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:
@@ -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;
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
///
|
||||
|
Reference in New Issue
Block a user