UI: Fix build with Qt 6.0

This commit is contained in:
Nodir Temirkhodjaev 2020-01-22 15:48:17 +05:00
parent ec09df403f
commit 7b6acf294a
2 changed files with 5 additions and 12 deletions

View File

@ -17,7 +17,7 @@ QVector<int> TableView::selectedRows() const
auto rows = rowsSet.values();
std::sort(rows.begin(), rows.end());
return rows;
return rows.toVector();
}
void TableView::currentChanged(const QModelIndex &current,

View File

@ -18,17 +18,10 @@
namespace {
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
const auto alertColor = QColorConstants::Svg::orange;
const auto allowColor = QColorConstants::Svg::green;
const auto blockColor = QColorConstants::Svg::red;
const auto inactiveColor = QColorConstants::Svg::slategray;
#else
const auto alertColor = QColor{QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0xa5 * 0x101, 0x00 * 0x101};
const auto allowColor = QColor{QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x80 * 0x101, 0x00 * 0x101};
const auto blockColor = QColor{QColor::Rgb, 0xff * 0x101, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101};
const auto inactiveColor = {QColor::Rgb, 0xff * 0x101, 0x70 * 0x101, 0x80 * 0x101, 0x90 * 0x101};
#endif
const auto alertColor = QColor("orange");
const auto allowColor = QColor("green");
const auto blockColor = QColor("red");
const auto inactiveColor = QColor("slategray");
}