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

@@ -4,7 +4,7 @@
Grabber::Grabber(QString grabberName, int width, int height, int cropLeft, int cropRight, int cropTop, int cropBottom)
: _imageResampler()
, _useImageResampler(true)
, _videoMode(VIDEO_2D)
, _videoMode(VideoMode::VIDEO_2D)
, _width(width)
, _height(height)
, _fps(15)
@@ -16,7 +16,7 @@ Grabber::Grabber(QString grabberName, int width, int height, int cropLeft, int c
, _enabled(true)
, _log(Logger::getInstance(grabberName))
{
Grabber::setVideoMode(VIDEO_2D);
Grabber::setVideoMode(VideoMode::VIDEO_2D);
Grabber::setCropping(cropLeft, cropRight, cropTop, cropBottom);
}

View File

@@ -568,24 +568,24 @@ void Hyperion::update()
// correct the color byte order
switch (_ledStringColorOrder.at(i))
{
case ORDER_RGB:
case ColorOrder::ORDER_RGB:
// leave as it is
break;
case ORDER_BGR:
case ColorOrder::ORDER_BGR:
std::swap(color.red, color.blue);
break;
case ORDER_RBG:
case ColorOrder::ORDER_RBG:
std::swap(color.green, color.blue);
break;
case ORDER_GRB:
case ColorOrder::ORDER_GRB:
std::swap(color.red, color.green);
break;
case ORDER_GBR:
case ColorOrder::ORDER_GBR:
std::swap(color.red, color.green);
std::swap(color.green, color.blue);
break;
case ORDER_BRG:
case ColorOrder::ORDER_BRG:
std::swap(color.red, color.blue);
std::swap(color.green, color.blue);
break;

View File

@@ -14,6 +14,7 @@ MultiColorAdjustment::~MultiColorAdjustment()
for (ColorAdjustment * adjustment : _adjustment)
{
delete adjustment;
// BUG: Calling pop_back while iterating is invalid
_adjustment.pop_back();
}
}