mirror of
https://github.com/tnodir/fort
synced 2024-11-15 09:17:28 +00:00
UI: Fix build with Qt 6.0
This commit is contained in:
parent
ae63d7d4e9
commit
4497c7b936
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user