Work around weirdly broken MOCs
authorManuel Nickschas <sputnick@quassel-irc.org>
Wed, 11 Feb 2015 22:22:31 +0000 (23:22 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 11 Feb 2015 22:22:31 +0000 (23:22 +0100)
Apparently, Debian Wheezy ships Qt 4.8.2 with a MOC that thinks it's older
than 4.6, or something. Not sure what's going on, but if we remove
that "#if QT_VERSION" that checks for versions older than 4.6 (and thus does
not make any sense now that we require 4.8 anyway), the MOC on (some?)
Wheezy installations fails to deal with the Q_INTERFACES call.

I guess it doesn't hurt to keep the guard around, but this issue still leaves
me scratching my head...

src/qtui/chatviewsearchcontroller.h

index 66e0908..2ad0eda 100644 (file)
@@ -90,7 +90,11 @@ private:
 class SearchHighlightItem : public QObject, public QGraphicsItem
 {
     Q_OBJECT
+
+// Apparently, there are broken Qt 4.8.2 mocs around that will fail without this (otherwise useless) #if... looking at you, Wheezy!
+#if QT_VERSION >= 0x040600
     Q_INTERFACES(QGraphicsItem)
+#endif
 
 public :
         SearchHighlightItem(QRectF wordRect, QGraphicsItem *parent = 0);