summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2012-04-26 13:00:56 +0300
committerQt by Nokia <qt-info@nokia.com>2012-04-26 15:33:00 +0200
commitf3721d77067d4d0f81971a4bfb1bb135bf146d8a (patch)
tree33dbdff4faa162c5158fc5bf531b486213d4ded6 /src/corelib
parent93132154b5283bf26baee47c60471a245884382f (diff)
get rid of Q_*_EXPORT_INLINE macros
> Girish: > We should be able to remove the macro completely today, > just mark all those functions as plain inline. > With Qt5, we don't have to worry about bc yet. this fixes "import attribute ignored" warnings on mingw with -fno-keep-inline-dllexport Change-Id: I616e5de7c8d59953ce03a316b941a439fae56298 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/qglobal.h52
-rw-r--r--src/corelib/tools/qrect.h16
2 files changed, 8 insertions, 60 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 114857b32b..5f2445f930 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -634,58 +634,6 @@ class QDataStream;
# endif
#endif
-// Functions marked as Q_GUI_EXPORT_INLINE were exported and inlined by mistake.
-// Compilers like MinGW complain that the import attribute is ignored.
-#if defined(Q_CC_MINGW)
-# if defined(QT_BUILD_CORE_LIB)
-# define Q_CORE_EXPORT_INLINE Q_CORE_EXPORT inline
-# else
-# define Q_CORE_EXPORT_INLINE inline
-# endif
-# if defined(QT_BUILD_GUI_LIB)
-# define Q_GUI_EXPORT_INLINE Q_GUI_EXPORT inline
-# else
-# define Q_GUI_EXPORT_INLINE inline
-# endif
-# if defined(QT_BUILD_WIDGETS_LIB)
-# define Q_WIDGETS_EXPORT_INLINE Q_WIDGETS_EXPORT inline
-# else
-# define Q_WIDGETS_EXPORT_INLINE inline
-# endif
-# if defined(QT_BUILD_PLATFORMSUPPORT_LIB)
-# define Q_PLATFORMSUPPORT_EXPORT_INLINE Q_PLATFORMSUPPORT_EXPORT inline
-# else
-# define Q_PLATFORMSUPPORT_EXPORT_INLINE inline
-# endif
-# if defined(QT_BUILD_PRINTSUPPORT_LIB)
-# define Q_PRINTSUPPORT_EXPORT_INLINE Q_PRINTSUPPORT_EXPORT inline
-# else
-# define Q_PRINTSUPPORT_EXPORT_INLINE inline
-# endif
-# if defined(QT_BUILD_COMPAT_LIB)
-# define Q_COMPAT_EXPORT_INLINE Q_COMPAT_EXPORT inline
-# else
-# define Q_COMPAT_EXPORT_INLINE inline
-# endif
-#elif defined(Q_CC_RVCT)
-// we force RVCT not to export inlines by passing --visibility_inlines_hidden
-// so we need to just inline it, rather than exporting and inlining
-// note: this affects the contents of the DEF files (ie. these functions do not appear)
-# define Q_CORE_EXPORT_INLINE inline
-# define Q_GUI_EXPORT_INLINE inline
-# define Q_WIDGETS_EXPORT_INLINE inline
-# define Q_PLATFORMSUPPORT_EXPORT_INLINE inline
-# define Q_PRINTSUPPORT_EXPORT_INLINE inline
-# define Q_COMPAT_EXPORT_INLINE inline
-#else
-# define Q_CORE_EXPORT_INLINE Q_CORE_EXPORT inline
-# define Q_GUI_EXPORT_INLINE Q_GUI_EXPORT inline
-# define Q_WIDGETS_EXPORT_INLINE Q_WIDGETS_EXPORT inline
-# define Q_PLATFORMSUPPORT_EXPORT_INLINE Q_PLATFORMSUPPORT_EXPORT inline
-# define Q_PRINTSUPPORT_EXPORT_INLINE Q_PRINTSUPPORT_EXPORT inline
-# define Q_COMPAT_EXPORT_INLINE Q_COMPAT_EXPORT inline
-#endif
-
/*
No, this is not an evil backdoor. QT_BUILD_INTERNAL just exports more symbols
for Qt's internal unit tests. If you want slower loading times and more
diff --git a/src/corelib/tools/qrect.h b/src/corelib/tools/qrect.h
index 1186cf1fdd..ff318dbe6f 100644
--- a/src/corelib/tools/qrect.h
+++ b/src/corelib/tools/qrect.h
@@ -144,8 +144,8 @@ public:
QT_DEPRECATED QRect intersect(const QRect &r) const { return intersected(r); }
#endif
- friend Q_CORE_EXPORT_INLINE Q_DECL_CONSTEXPR bool operator==(const QRect &, const QRect &);
- friend Q_CORE_EXPORT_INLINE Q_DECL_CONSTEXPR bool operator!=(const QRect &, const QRect &);
+ friend Q_DECL_CONSTEXPR inline bool operator==(const QRect &, const QRect &);
+ friend Q_DECL_CONSTEXPR inline bool operator!=(const QRect &, const QRect &);
private:
int x1;
@@ -155,8 +155,8 @@ private:
};
Q_DECLARE_TYPEINFO(QRect, Q_MOVABLE_TYPE);
-Q_CORE_EXPORT_INLINE Q_DECL_CONSTEXPR bool operator==(const QRect &, const QRect &);
-Q_CORE_EXPORT_INLINE Q_DECL_CONSTEXPR bool operator!=(const QRect &, const QRect &);
+Q_DECL_CONSTEXPR inline bool operator==(const QRect &, const QRect &);
+Q_DECL_CONSTEXPR inline bool operator!=(const QRect &, const QRect &);
/*****************************************************************************
@@ -544,8 +544,8 @@ public:
QT_DEPRECATED QRectF intersect(const QRectF &r) const { return intersected(r); }
#endif
- friend Q_CORE_EXPORT_INLINE Q_DECL_CONSTEXPR bool operator==(const QRectF &, const QRectF &);
- friend Q_CORE_EXPORT_INLINE Q_DECL_CONSTEXPR bool operator!=(const QRectF &, const QRectF &);
+ friend Q_DECL_CONSTEXPR inline bool operator==(const QRectF &, const QRectF &);
+ friend Q_DECL_CONSTEXPR inline bool operator!=(const QRectF &, const QRectF &);
Q_DECL_CONSTEXPR inline QRect toRect() const;
QRect toAlignedRect() const;
@@ -558,8 +558,8 @@ private:
};
Q_DECLARE_TYPEINFO(QRectF, Q_MOVABLE_TYPE);
-Q_CORE_EXPORT_INLINE Q_DECL_CONSTEXPR bool operator==(const QRectF &, const QRectF &);
-Q_CORE_EXPORT_INLINE Q_DECL_CONSTEXPR bool operator!=(const QRectF &, const QRectF &);
+Q_DECL_CONSTEXPR inline bool operator==(const QRectF &, const QRectF &);
+Q_DECL_CONSTEXPR inline bool operator!=(const QRectF &, const QRectF &);
/*****************************************************************************