From 83291e6a07a9b6dc6c2d05b4fd4492df79796bbf Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 19 May 2011 14:43:53 +0200 Subject: Add QtPrivate::QEnableIf Needed for QtConcurrent. Like the new std::enable_if (in c++0x) Reviewed-by: Joao (cherry picked from commit 837f18f043b18410c1d93b9f1156acf729dad510) Change-Id: I837f18f043b18410c1d93b9f1156acf729dad510 Reviewed-on: http://codereview.qt.nokia.com/141 Reviewed-by: Olivier Goffart --- src/corelib/global/qglobal.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/corelib/global/qglobal.h') diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 3cc12aaf82..445b65ba0d 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -2790,6 +2790,12 @@ QT_LICENSED_MODULE(Sensors) # define QT_NO_RAWFONT #endif +namespace QtPrivate { +//like std::enable_if +template struct QEnableIf; +template struct QEnableIf { typedef T Type; }; +} + QT_END_NAMESPACE QT_END_HEADER -- cgit v1.2.3 From d3e5fc0220e57d5a9bba35780915c53790ff249f Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 18 Apr 2011 14:07:32 +0200 Subject: Support of lambdas in QtConcurrent::run Reviewed-by: Joao (cherry picked from commit 917f2ff617209bcc283eb3590b422bcf239c0537) Change-Id: I837f18f043b18410c1d93b9f1156acf729dad510 Reviewed-on: http://codereview.qt.nokia.com/142 Reviewed-by: Olivier Goffart --- src/corelib/global/qglobal.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/corelib/global/qglobal.h') diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 445b65ba0d..3282390354 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -428,6 +428,7 @@ namespace QT_NAMESPACE {} # define Q_COMPILER_INITIALIZER_LISTS # define Q_COMPILER_AUTO_TYPE # define Q_COMPILER_LAMBDA +# define Q_COMPILER_DECLTYPE //# define Q_COMPILER_VARIADIC_TEMPLATES //# define Q_COMPILER_CLASS_ENUM //# define Q_COMPILER_DEFAULT_DELETE_MEMBERS @@ -524,6 +525,7 @@ namespace QT_NAMESPACE {} # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403 /* C++0x features supported in GCC 4.3: */ # define Q_COMPILER_RVALUE_REFS +# define Q_COMPILER_DECLTYPE # endif # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 /* C++0x features supported in GCC 4.4: */ @@ -791,6 +793,7 @@ namespace QT_NAMESPACE {} # if __INTEL_COMPILER >= 1100 # define Q_COMPILER_RVALUE_REFS # define Q_COMPILER_EXTERN_TEMPLATES +# define Q_COMPILER_DECLTYPE # elif __INTEL_COMPILER >= 1200 # define Q_COMPILER_VARIADIC_TEMPLATES # define Q_COMPILER_AUTO_TYPE -- cgit v1.2.3 From cc6faee69e48fb81a1cb8d9d2102997106914f82 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 20 Apr 2011 13:49:19 +0200 Subject: MSVC do not really support initilizer_list std::initializer_list exists, but it is not possible to do bracket initialisation Reviewed-by: Joao (cherry picked from commit a09f5c425079405e72078813bdb7b103c29a5221) Change-Id: I837f18f043b18410c1d93b9f1156acf729dad510 Reviewed-on: http://codereview.qt.nokia.com/143 Reviewed-by: Olivier Goffart --- src/corelib/global/qglobal.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/corelib/global/qglobal.h') diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 3282390354..b3eeff78f8 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -425,15 +425,11 @@ namespace QT_NAMESPACE {} #if defined(Q_CC_MSVC) && _MSC_VER >= 1600 # define Q_COMPILER_RVALUE_REFS -# define Q_COMPILER_INITIALIZER_LISTS # define Q_COMPILER_AUTO_TYPE # define Q_COMPILER_LAMBDA # define Q_COMPILER_DECLTYPE -//# define Q_COMPILER_VARIADIC_TEMPLATES -//# define Q_COMPILER_CLASS_ENUM -//# define Q_COMPILER_DEFAULT_DELETE_MEMBERS -//# define Q_COMPILER_UNICODE_STRINGS -//# define Q_COMPILER_EXTERN_TEMPLATES +// MSCV has std::initilizer_list, but do not support the braces initilization +//# define Q_COMPILER_INITIALIZER_LISTS # endif -- cgit v1.2.3 From bbbea1fa966525ae8417297ce5579c5f2011ad2c Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 20 May 2011 09:31:16 +0200 Subject: Fix typo in comment (cherry picked from commit c8a3c427e96ee11907592f5c7f72046795c027ed) Change-Id: I837f18f043b18410c1d93b9f1156acf729dad510 Reviewed-on: http://codereview.qt.nokia.com/145 Reviewed-by: Olivier Goffart Reviewed-by: axis --- src/corelib/global/qglobal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/global/qglobal.h') diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index b3eeff78f8..64baf3a026 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -428,7 +428,7 @@ namespace QT_NAMESPACE {} # define Q_COMPILER_AUTO_TYPE # define Q_COMPILER_LAMBDA # define Q_COMPILER_DECLTYPE -// MSCV has std::initilizer_list, but do not support the braces initilization +// MSCV has std::initilizer_list, but do not support the braces initialization //# define Q_COMPILER_INITIALIZER_LISTS # endif -- cgit v1.2.3