Move Q_DECL_{IMPORT,EXPORT,HIDDEN} to qcompilerdetection.h
authorThiago Macieira <thiago.macieira@intel.com>
Wed, 28 Mar 2012 19:21:40 +0000 (16:21 -0300)
committerQt by Nokia <qt-info@nokia.com>
Sat, 21 Apr 2012 03:09:20 +0000 (05:09 +0200)
commit4d55ba046c8485e632fd7d86152c8f505e4145c7
tree3472990610ec13d8305b26684314c9bd8b5d9e4f
parent32758d917e3a7fd0d2e344d89d9ccaf0361326d8
Move Q_DECL_{IMPORT,EXPORT,HIDDEN} to qcompilerdetection.h

Mindful of QT_VISIBILITY_AVAILABLE and Q_OS_WIN for GCC: when GCC is
used on Windows (i.e., MinGW or potentially Cygwin), use the declspec
variant so we produce proper DLL imports and exports.

When used on other platforms, rely on configure adding
QT_VISIBILITY_AVAILABLE to qconfig.h, which confirms that the
-fvisibility argument is available. That flag has been available since
GCC 4.0 on ELF targets, but it could be missing on some other targets.

Change-Id: I3dbc0043c1eaee0c469c5b1dc8bf05842fe9cd47
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
src/corelib/global/qcompilerdetection.h
src/corelib/global/qglobal.h