UI: Fix build with Qt 6.0

This commit is contained in:
Nodir Temirkhodjaev 2020-01-15 17:54:37 +05:00
parent ae63d7d4e9
commit 4497c7b936

View File

@ -188,9 +188,15 @@ QVariant AppListModel::data(const QModelIndex &index, int role) const
const auto appRow = appRowAt(index.row()); const auto appRow = appRowAt(index.row());
switch (appRowStateByGroup(appRow)) { switch (appRowStateByGroup(appRow)) {
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
case AppAlert: return QColorConstants::Svg::orange; case AppAlert: return QColorConstants::Svg::orange;
case AppAllow: return QColorConstants::Svg::green; case AppAllow: return QColorConstants::Svg::green;
case AppBlock: return QColorConstants::Svg::red; case AppBlock: return QColorConstants::Svg::red;
#else
case AppAlert: return QColor{QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xa5 * 0x101, 0x00 * 0x101};
case AppAllow: return QColor{QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x80 * 0x101, 0x00 * 0x101};
case AppBlock: return QColor{QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101};
#endif
} }
} }