From: Manuel Nickschas Date: Wed, 11 Feb 2015 22:22:31 +0000 (+0100) Subject: Work around weirdly broken MOCs X-Git-Tag: 0.12-beta1~16 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=2fabb938a014186c2aa7aa1a1b885c6afa353f1e Work around weirdly broken MOCs 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... --- diff --git a/src/qtui/chatviewsearchcontroller.h b/src/qtui/chatviewsearchcontroller.h index 66e09085..2ad0edaa 100644 --- a/src/qtui/chatviewsearchcontroller.h +++ b/src/qtui/chatviewsearchcontroller.h @@ -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);