From 5a99e0ed90e0f53ef634b5776babc87a2a3397bf Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 21 Feb 2011 20:22:37 +0100 Subject: Remove the assignment-move operator that was a bad copy-paste Reviewed-By: Olivier Goffart --- src/corelib/tools/qshareddata.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/corelib/tools/qshareddata.h b/src/corelib/tools/qshareddata.h index 2b97d2d..1494373 100644 --- a/src/corelib/tools/qshareddata.h +++ b/src/corelib/tools/qshareddata.h @@ -201,8 +201,6 @@ public: inline QExplicitlySharedDataPointer(QExplicitlySharedDataPointer &&o) : d(o.d) { o.d = 0; } inline QExplicitlySharedDataPointer &operator=(QExplicitlySharedDataPointer &&other) { qSwap(d, other.d); return *this; } - inline QExplicitlySharedDataPointer &operator=(QSharedDataPointer &&other) - { qSwap(d, other.d); return *this; } #endif inline bool operator!() const { return !d; } -- cgit v0.12 From 40ef3923c8fb352db7c911ac8b264408724710ca Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 21 Feb 2011 20:34:46 +0100 Subject: Add Intel Compiler's C++0x feature support macros --- src/corelib/global/qglobal.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 960fe6e..c7abe1d 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -460,7 +460,6 @@ namespace QT_NAMESPACE {} # if defined(__INTEL_COMPILER) /* Intel C++ also masquerades as GCC 3.2.0 */ # define Q_CC_INTEL -# define Q_NO_TEMPLATE_FRIENDS # endif # if defined(__clang__) /* Clang also masquerades as GCC 4.2.1 */ @@ -763,6 +762,22 @@ namespace QT_NAMESPACE {} # error "Qt has not been tested with this compiler - talk to qt-bugs@trolltech.com" #endif +#ifdef Q_CC_INTEL +# if __INTEL_COMPILER < 1200 +# define Q_NO_TEMPLATE_FRIENDS +# endif +# if __INTEL_COMPILER >= 1100 +# define Q_COMPILER_RVALUE_REFS +# define Q_COMPILER_EXTERN_TEMPLATES +# elif __INTEL_COMPILER >= 1200 +# define Q_COMPILER_VARIADIC_TEMPLATES +# define Q_COMPILER_AUTO_TYPE +# define Q_COMPILER_DEFAULT_DELETE_MEMBERS +# define Q_COMPILER_CLASS_ENUM +# define Q_COMPILER_LAMBDA +# endif +#endif + #ifndef Q_PACKED # define Q_PACKED # undef Q_NO_PACKED_REFERENCE -- cgit v0.12 From 7388fcb83592a90aace054314e0c3e7e7a94fdae Mon Sep 17 00:00:00 2001 From: Cristiano di Flora Date: Tue, 22 Feb 2011 05:27:51 +0200 Subject: Fix QNetworkConfigurationManager crash due to null private pointer. Reviewed-by: Aaron McCarthy Task-Number: QTBUG-17305 --- src/network/bearer/qnetworkconfigmanager.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/network/bearer/qnetworkconfigmanager.cpp b/src/network/bearer/qnetworkconfigmanager.cpp index 9927f29..a3b278c 100644 --- a/src/network/bearer/qnetworkconfigmanager.cpp +++ b/src/network/bearer/qnetworkconfigmanager.cpp @@ -57,16 +57,17 @@ QT_BEGIN_NAMESPACE { \ delete this_##NAME.pointer; \ this_##NAME.pointer = 0; \ - this_##NAME.destroyed = true; \ } \ static TYPE *NAME() \ { \ - if (!this_##NAME.pointer && !this_##NAME.destroyed) { \ + if (!this_##NAME.pointer) { \ TYPE *x = new TYPE; \ if (!this_##NAME.pointer.testAndSetOrdered(0, x)) \ delete x; \ - else \ + else { \ qAddPostRoutine(NAME##_cleanup); \ + this_##NAME.pointer->updateConfigurations(); \ + } \ } \ return this_##NAME.pointer; \ } @@ -75,15 +76,7 @@ Q_GLOBAL_STATIC_QAPP_DESTRUCTION(QNetworkConfigurationManagerPrivate, connManage QNetworkConfigurationManagerPrivate *qNetworkConfigurationManagerPrivate() { - static bool initialized = false; - - QNetworkConfigurationManagerPrivate *m = connManager(); - if (!initialized) { - initialized = true; - m->updateConfigurations(); - } - - return m; + return connManager(); } /*! -- cgit v0.12 From 44373d71dde16c4899377703e724d46d803ade9e Mon Sep 17 00:00:00 2001 From: Cristiano di Flora Date: Tue, 22 Feb 2011 05:32:10 +0200 Subject: Removing tabs from 7388fcb83592a90aace054314e0c3e7e7a94fdae changeset --- src/network/bearer/qnetworkconfigmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/bearer/qnetworkconfigmanager.cpp b/src/network/bearer/qnetworkconfigmanager.cpp index a3b278c..2a46229 100644 --- a/src/network/bearer/qnetworkconfigmanager.cpp +++ b/src/network/bearer/qnetworkconfigmanager.cpp @@ -67,7 +67,7 @@ QT_BEGIN_NAMESPACE else { \ qAddPostRoutine(NAME##_cleanup); \ this_##NAME.pointer->updateConfigurations(); \ - } \ + } \ } \ return this_##NAME.pointer; \ } -- cgit v0.12 From aded88bcc706019e3f18cc4a47682d04725a0f3b Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 22 Feb 2011 08:45:15 +0100 Subject: Unbreak compilation with ICC when in C++98 mode. ICC 11 used __GXX_EXPERIMENTAL_CPP0X__ (i.e., different spelling than GCC). ICC 12 seems to have no macro indicating that C++0x mode is enabled. Needs clarification from Intel. --- src/corelib/global/qglobal.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index c7abe1d..d849349 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -766,15 +766,17 @@ namespace QT_NAMESPACE {} # if __INTEL_COMPILER < 1200 # define Q_NO_TEMPLATE_FRIENDS # endif -# if __INTEL_COMPILER >= 1100 -# define Q_COMPILER_RVALUE_REFS -# define Q_COMPILER_EXTERN_TEMPLATES -# elif __INTEL_COMPILER >= 1200 -# define Q_COMPILER_VARIADIC_TEMPLATES -# define Q_COMPILER_AUTO_TYPE -# define Q_COMPILER_DEFAULT_DELETE_MEMBERS -# define Q_COMPILER_CLASS_ENUM -# define Q_COMPILER_LAMBDA +# if defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CPP0X__) +# if __INTEL_COMPILER >= 1100 +# define Q_COMPILER_RVALUE_REFS +# define Q_COMPILER_EXTERN_TEMPLATES +# elif __INTEL_COMPILER >= 1200 +# define Q_COMPILER_VARIADIC_TEMPLATES +# define Q_COMPILER_AUTO_TYPE +# define Q_COMPILER_DEFAULT_DELETE_MEMBERS +# define Q_COMPILER_CLASS_ENUM +# define Q_COMPILER_LAMBDA +# endif # endif #endif -- cgit v0.12