On segunda-feira, 14 de janeiro de 2013 23.09.48, Ahumada Sergio wrote: > Hi, > > While I was trying to mark tst_headers as significant again > <https://bugreports.qt-project.org/browse/QTQAINFRA-324> I found out that I > had to add some QT_{BEGIN,END}_HEADER macros to some headers. > > After some investigation and talks with Thiago, I realized this macro > expands to nothing, so I decided to remove the check in tst_headers instead > of adding the missing QT_{BEGIN,END}_HEADER macros > <https://codereview.qt-project.org/44076>. > > So far, this change does not affect Qt in any way, but I now want to go a > little bit further and remove the check in 'syncqt' > <https://codereview.qt-project.org/44810> > > As the commit message says, this macro "might be removed", which is why I > writing this email now. > > What do you think about removing QT_{BEGIN,END}_HEADER all over the place > for 5.1 ?
I support taking the next step and removing the macro usage completely. We may
not be able to remove the definitions from qglobal.h, though.
Background:
QT_BEGIN_HEADER was introduced so that it could expand to extern "C++" { on
Mac OS X, but I don't remember the reason why that was desired.
However, the macro was never used as such, because it does (in Qt 4):
#if defined(Q_OS_MAC) && !defined(Q_CC_INTEL)
Before Q_OS_MAC is ever defined. When I still had access to the old Qt history,
I remember checking when this mistake cropped up and it turns out that it was
like that in all released versions that had QT_BEGIN_HEADER. I don't remember
now if the code was *added* like that or if it got moved around in a later
commit, but still before the release.
Therefore, in Qt 5 (in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb), we changed
to an unconditional #define to empty.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
