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,6 +4,8 @@
#include <cstdint>
#include <iostream>
#include <QTextStream>
struct ColorRgb;
///
@@ -49,6 +51,19 @@ inline std::ostream& operator<<(std::ostream& os, const ColorRgb& color)
return os;
}
///
/// Stream operator to write ColorRgb to a QTextStream (format "'{'[red]','[green]','[blue]'}'")
///
/// @param os The output stream
/// @param color The color to write
/// @return The output stream (with the color written to it)
///
inline QTextStream& operator<<(QTextStream &os, const ColorRgb& color)
{
os << "{" << unsigned(color.red) << "," << unsigned(color.green) << "," << unsigned(color.blue) << "}";
return os;
}
/// Compare operator to check if a color is 'smaller' than another color
inline bool operator<(const ColorRgb & lhs, const ColorRgb & rhs)
{