#622176 libglib2.0-dev: /usr/include/glib-2.0/gio/gdbusintrospection.h: conflicts with Qt

Package:
libqt4-dev
Source:
qt4-x11
Submitter:
Daniel Schepler
Date:
2024-08-05 03:33:28 UTC
Severity:
normal
Tags:
#622176#5
Date:
2011-04-10 17:48:27 UTC
From:
To:
Package: libglib2.0-dev
Version: 2.28.4-1
Severity: normal

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).

#622176#10
Date:
2011-04-11 08:49:53 UTC
From:
To:
How is this a GLib bug and not a Qt one?
#622176#15
Date:
2011-04-14 09:39:14 UTC
From:
To:
reassign 622176 libqt4-dev
thanks

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.

Cheers,
Emilio

#622176#24
Date:
2011-05-08 16:38:34 UTC
From:
To:
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).

#622176#29
Date:
2011-05-08 17:28:01 UTC
From:
To:
Yup. the signals, slots and emit words are very common across Qt sourcecode.
There is also the Q_SIGNALS, Q_SLOTS , Q_EMIT, Q_FOREACH and other such
keywords.

It has happened upstream that it now builds with QT_NO_KEYWORDS, and I'm
trying my best to advice people to use the Q_version of the 'keywords'.

/Sune

#622176#36
Date:
2024-08-04 17:02:39 UTC
From:
To:
-- 
Greeting,

I have access to very vital information that can be used to
move huge amounts of money.

If it was possible for me to do it alone I would not
have bothered contacting you. Ultimately I need you to play an
important role in the completion of this business transaction.

Regards,
Mr Alexander Bulyanda