]> git.sesse.net Git - kdenlive/blobdiff - thumbnailer/westleypreview.cpp
Fix compilation with Qt < 4.7
[kdenlive] / thumbnailer / westleypreview.cpp
index a68787526576115daa26996ed70062aeb002f6b1..8512b60f9d1b483dd90fd9edece4942924f13edc 100644 (file)
@@ -130,13 +130,21 @@ uint MltPreview::imageVariance(QImage image)
     // First pass: get pivots and taking average
     for( uint i=0; i<STEPS ; i++ ){
         pivot[i] = bits[2 * i];
+#if QT_VERSION >= 0x040700
         avg+=pivot.at(i);
+#else
+        avg+=pivot[i];
+#endif
     }
     avg=avg/STEPS;
     // Second Step: calculate delta (average?)
     for (uint i=0; i<STEPS; i++)
     {
+#if QT_VERSION >= 0x040700
         int curdelta=abs(int(avg - pivot.at(i)));
+#else
+        int curdelta=abs(int(avg - pivot[i]));
+#endif
         delta+=curdelta;
     }
     return delta / STEPS;