summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleix Pol <aleixpol@kde.org>2015-10-27 02:00:26 (GMT)
committerAleix Pol <aleixpol@kde.org>2015-10-27 02:00:26 (GMT)
commit886f3a8193f388555fa98cfdb5e8054592a40371 (patch)
tree485c5ad5d6bb45bccf6612092e8427d081b32d1d
parent1e8f40a82e577dfb9428579e817132936d75426b (diff)
Make it possible to build with Qt 5.5
-rw-r--r--discover/IconColors.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/discover/IconColors.cpp b/discover/IconColors.cpp
index e39682a..41894a2 100644
--- a/discover/IconColors.cpp
+++ b/discover/IconColors.cpp
@@ -53,7 +53,11 @@ QColor IconColors::dominantColor() const
for (int w=0, cw=img.width(); w<cw; ++w) {
for (int h=0, ch=img.height(); h<ch; ++h) {
+#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
const QColor c = img.pixelColor(w, h);
+#else
+ const QColor c(img.pixel(w, h));
+#endif
if (c.value()>150 && c.saturation()>20 && c.hue()>=0 && c.alpha()>200) {
hue[c.hue()/tolerance]++;