diff options
Diffstat (limited to 'src/corelib/global/qglobal.h')
-rw-r--r-- | src/corelib/global/qglobal.h | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index cb8bd15d8d..e93bfbcc4a 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -35,13 +35,17 @@ #ifndef QGLOBAL_H #define QGLOBAL_H -#include <stddef.h> +#ifdef __cplusplus +# include <cstddef> +#else +# include <stddef.h> +#endif -#define QT_VERSION_STR "5.4.1" +#define QT_VERSION_STR "5.5.0" /* QT_VERSION is (major << 16) + (minor << 8) + patch. */ -#define QT_VERSION 0x050401 +#define QT_VERSION 0x050500 /* can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0)) */ @@ -655,7 +659,7 @@ Q_CORE_EXPORT void qt_assert(const char *assertion, const char *file, int line) #if !defined(Q_ASSERT) # if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS) -# define Q_ASSERT(cond) qt_noop() +# define Q_ASSERT(cond) do { } while (false && (cond)) # else # define Q_ASSERT(cond) ((!(cond)) ? qt_assert(#cond,__FILE__,__LINE__) : qt_noop()) # endif @@ -834,22 +838,22 @@ Q_CORE_EXPORT void qFreeAligned(void *ptr); #endif #if defined(QT_NO_WARNINGS) # if defined(Q_CC_MSVC) -# pragma warning(disable: 4251) /* class 'type' needs to have dll-interface to be used by clients of class 'type2' */ -# pragma warning(disable: 4244) /* conversion from 'type1' to 'type2', possible loss of data */ -# pragma warning(disable: 4275) /* non - DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier' */ -# pragma warning(disable: 4514) /* unreferenced inline function has been removed */ -# pragma warning(disable: 4800) /* 'type' : forcing value to bool 'true' or 'false' (performance warning) */ -# pragma warning(disable: 4097) /* typedef-name 'identifier1' used as synonym for class-name 'identifier2' */ -# pragma warning(disable: 4706) /* assignment within conditional expression */ +QT_WARNING_DISABLE_MSVC(4251) /* class 'type' needs to have dll-interface to be used by clients of class 'type2' */ +QT_WARNING_DISABLE_MSVC(4244) /* conversion from 'type1' to 'type2', possible loss of data */ +QT_WARNING_DISABLE_MSVC(4275) /* non - DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier' */ +QT_WARNING_DISABLE_MSVC(4514) /* unreferenced inline function has been removed */ +QT_WARNING_DISABLE_MSVC(4800) /* 'type' : forcing value to bool 'true' or 'false' (performance warning) */ +QT_WARNING_DISABLE_MSVC(4097) /* typedef-name 'identifier1' used as synonym for class-name 'identifier2' */ +QT_WARNING_DISABLE_MSVC(4706) /* assignment within conditional expression */ # if _MSC_VER <= 1310 // MSVC 2003 -# pragma warning(disable: 4786) /* 'identifier' : identifier was truncated to 'number' characters in the debug information */ +QT_WARNING_DISABLE_MSVC(4786) /* 'identifier' : identifier was truncated to 'number' characters in the debug information */ # endif -# pragma warning(disable: 4355) /* 'this' : used in base member initializer list */ +QT_WARNING_DISABLE_MSVC(4355) /* 'this' : used in base member initializer list */ # if _MSC_VER < 1800 // MSVC 2013 -# pragma warning(disable: 4231) /* nonstandard extension used : 'identifier' before template explicit instantiation */ +QT_WARNING_DISABLE_MSVC(4231) /* nonstandard extension used : 'identifier' before template explicit instantiation */ # endif -# pragma warning(disable: 4710) /* function not inlined */ -# pragma warning(disable: 4530) /* C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc */ +QT_WARNING_DISABLE_MSVC(4710) /* function not inlined */ +QT_WARNING_DISABLE_MSVC(4530) /* C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc */ # elif defined(Q_CC_BOR) # pragma option -w-inl # pragma option -w-aus @@ -1027,6 +1031,7 @@ Q_CORE_EXPORT bool qunsetenv(const char *varName); Q_CORE_EXPORT bool qEnvironmentVariableIsEmpty(const char *varName) Q_DECL_NOEXCEPT; Q_CORE_EXPORT bool qEnvironmentVariableIsSet(const char *varName) Q_DECL_NOEXCEPT; +Q_CORE_EXPORT int qEnvironmentVariableIntValue(const char *varName, bool *ok=0) Q_DECL_NOEXCEPT; inline int qIntCast(double f) { return int(f); } inline int qIntCast(float f) { return int(f); } |