From 4497c7b9366ed519ba82c0ee1df17043b4bcc14c Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Wed, 15 Jan 2020 17:54:37 +0500 Subject: [PATCH] UI: Fix build with Qt 6.0 --- src/ui/log/model/applistmodel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ui/log/model/applistmodel.cpp b/src/ui/log/model/applistmodel.cpp index 75a9d598..5420fdf3 100644 --- a/src/ui/log/model/applistmodel.cpp +++ b/src/ui/log/model/applistmodel.cpp @@ -188,9 +188,15 @@ QVariant AppListModel::data(const QModelIndex &index, int role) const const auto appRow = appRowAt(index.row()); switch (appRowStateByGroup(appRow)) { +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) case AppAlert: return QColorConstants::Svg::orange; case AppAllow: return QColorConstants::Svg::green; 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 } }