Bug#622176: libglib2.0-dev: /usr/include/glib-2.0/gio/gdbusintrospection.h: conflicts with Qt
On Thursday 14 April 2011 02:39:14 Emilio Pozuelo Monfort wrote:
> reassign 622176 libqt4-dev
> thanks
>
> On 11/04/11 10:49, Emilio Pozuelo Monfort wrote:
> > On 10/04/11 19:48, Daniel Schepler wrote:
> >> If you include Qt headers before this glib header, Qt's definition of
> >> "signals" to "protected" (for moc) causes an error at line 151. This
> >> is causing a build failure in polkit-qt-1 (see #614436).
> >
> > How is this a GLib bug and not a Qt one?
>
> AFAIK signals is not a reserved keyword in any standard, so IMHO the bug is
> in Qt. It shouldn't define random stuff in public headers, but use
> something like QT_SIGNALS or whatever (note the namespace). Also the
> convention is to use uppercase for definitions, not lowercase.
Sorry to take so long to respond to this... In theory, you're probably
correct. However, the "signals," "slots" and "emit" definitions are a
fundamental part of Qt programming that have been there at least since I
started working with Qt back in the Qt 3 days. It would be a major change and
break probably 90% or more of Qt-using programs to disable or rename those
definitions.
Looking at the headers, I see there is a QT_NO_KEYWORDS option which keeps
only the Q_SIGNALS, etc. versions of the defines. So I guess polkit-qt-1 could
be rewritten to #define QT_NO_KEYWORDS and update the source accordingly. But
I'm not sure how that would impact packages using polkit-qt-1 (notably
including kde4libs).
--
Daniel Schepler
Reply to: