summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz.qnx@kdab.com>2012-07-02 09:33:59 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-07-08 23:05:55 (GMT)
commit3e679c01d2a83c2daeb2a655abc70913093b96c2 (patch)
tree8e5a5b943f631ed18a33a9eeffb497f62ca5801b /src/corelib
parent4148c9aa516a073ec4ea391f6ea577cb235025e5 (diff)
downloadQt-3e679c01d2a83c2daeb2a655abc70913093b96c2.zip
Qt-3e679c01d2a83c2daeb2a655abc70913093b96c2.tar.gz
Qt-3e679c01d2a83c2daeb2a655abc70913093b96c2.tar.bz2
QNX: fix compilation with C++11 enabled
QNX uses GCC, but by default not libstdc++ as the standard library, but 'libcpp', a Dinkumware-derived implementation that doesn't sport many of the C++11 features, yet. Thus, the compiler detection sets Q_COMPILER_INITIALIZER_LIST, which is correct, in a way, but since we're lacking stdlib support the next #include <initializer_list> will fail. So, simply don't define Q_COMPILER_INITIALIZER_LIST if we're on QNX and detect a Dinkumware signature (taken from Boost.Config). This is a back-port of change Ieeb147251c2935517faba61f75d1580a9e1649c4 from Qt 5. Change-Id: Ic7cd11b19a01ae192f60aae33da5581ff8e4682c Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/qglobal.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 41f3a27..4e360fe 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -849,6 +849,18 @@ namespace QT_NAMESPACE {}
# endif
#endif
+#if defined(Q_OS_QNX) || defined(Q_OS_BLACKBERRY)
+# include <utility>
+# if defined(_YVALS) || defined(_LIBCPP_VER)
+// QNX: libcpp (Dinkumware-based) doesn't have the <initializer_list>
+// header, so the feature is useless, even if the compiler supports
+// it. Disable.
+# ifdef Q_COMPILER_INITIALIZER_LISTS
+# undef Q_COMPILER_INITIALIZER_LISTS
+# endif
+# endif
+#endif
+
/*
The window system, must be one of: (Q_WS_x)