From 5bfe794aaab34d6aa021b5640972509e3bc6ced8 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 16 Oct 2014 15:12:59 +0200 Subject: Remove trailing '\n' in qFormatLogMessage output Do not automatically add a \n to all messages formatted by qFormatLogMessage. Some backends require a final newline, some don't, so it's best to only append it where it's actually needed. The returned string will be null if the pattern is empty. This allows to differentiate between the case that the pattern just didn't apply (empty line is printed), and the case that qSetMessagePattern(QString()) have been called (nothing is printed). Change-Id: I17fde997a4074f58f82de6dea129948155c322d6 Reviewed-by: Oswald Buddenhagen Reviewed-by: Alex Blasche --- src/corelib/global/qlogging.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index f356bab42d..6def794d5e 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -1101,14 +1101,9 @@ QString qFormatLogMessage(QtMsgType type, const QMessageLogContext &context, con if (!pattern) { // after destruction of static QMessagePattern instance message.append(str); - message.append(QLatin1Char('\n')); return message; } - // don't print anything if pattern was empty - if (pattern->tokens[0] == 0) - return message; - bool skip = false; // we do not convert file, function, line literals to local encoding due to overhead @@ -1227,7 +1222,6 @@ QString qFormatLogMessage(QtMsgType type, const QMessageLogContext &context, con message.append(QLatin1String(token)); } } - message.append(QLatin1Char('\n')); return message; } @@ -1289,7 +1283,7 @@ static void android_default_message_handler(QtMsgType type, case QtFatalMsg: priority = ANDROID_LOG_FATAL; break; }; - __android_log_print(priority, "Qt", "%s:%d (%s): %s", + __android_log_print(priority, "Qt", "%s:%d (%s): %s\n", context.file, context.line, context.function, qPrintable(message)); } @@ -1303,16 +1297,21 @@ static void qDefaultMessageHandler(QtMsgType type, const QMessageLogContext &con { QString logMessage = qFormatLogMessage(type, context, buf); + // print nothing if message pattern didn't apply / was empty. + // (still print empty lines, e.g. because message itself was empty) + if (logMessage.isNull()) + return; + if (!qt_logging_to_console()) { #if defined(Q_OS_WIN) + logMessage.append(QLatin1Char('\n')); OutputDebugString(reinterpret_cast(logMessage.utf16())); return; #elif defined(QT_USE_SLOG2) + logMessage.append(QLatin1Char('\n')); slog2_default_handler(type, logMessage.toLocal8Bit().constData()); return; #elif defined(QT_USE_JOURNALD) && !defined(QT_BOOTSTRAPPED) - // remove trailing \n, systemd appears to want them newline-less - logMessage.chop(1); systemd_default_message_handler(type, context, logMessage); return; #elif defined(Q_OS_ANDROID) @@ -1320,7 +1319,7 @@ static void qDefaultMessageHandler(QtMsgType type, const QMessageLogContext &con return; #endif } - fprintf(stderr, "%s", logMessage.toLocal8Bit().constData()); + fprintf(stderr, "%s\n", logMessage.toLocal8Bit().constData()); fflush(stderr); } -- cgit v1.2.3 From 10800a3b4ccf9a57e73dd2e9e0e674d7ff3c2b1b Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Mon, 13 Oct 2014 10:22:22 +0200 Subject: Doc: Corrected autolink errors qtbase Task-number: QTBUG-40362 Change-Id: I054a4713bdd83280be51697689e0c3c3409b9601 Reviewed-by: Mitch Curtis --- src/corelib/global/qlogging.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 6def794d5e..9fced6ede6 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -1578,7 +1578,7 @@ void qErrnoWarning(int code, const char *msg, ...) The default \a pattern is "%{if-category}%{category}: %{endif}%{message}". The \a pattern can also be changed at runtime by setting the QT_MESSAGE_PATTERN - environment variable; if both qSetMessagePattern() is called and QT_MESSAGE_PATTERN is + environment variable; if both \l qSetMessagePattern() is called and QT_MESSAGE_PATTERN is set, the environment variable takes precedence. Custom message handlers can use qFormatLogMessage() to take \a pattern into account. -- cgit v1.2.3 From fe7c5feb0dece2bc56f0e32668d0193e0f3268c3 Mon Sep 17 00:00:00 2001 From: Volker Krause Date: Sun, 29 Jun 2014 13:25:01 +0200 Subject: Add missing newline in fallback debug output. This is hit in case of a recursion in the message handler, and message hasn't gone through qMessageFormatString at this point and thus lacks the newline. Change-Id: Ia098b6ccbcc1aff22a4695865f39143ba0152d9c Reviewed-by: Kai Koehne --- src/corelib/global/qlogging.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 51169eb963..c47e91e296 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -1329,7 +1329,7 @@ static void qt_message_print(QtMsgType msgType, const QMessageLogContext &contex } ungrabMessageHandler(); } else { - fprintf(stderr, "%s", message.toLocal8Bit().constData()); + fprintf(stderr, "%s\n", message.toLocal8Bit().constData()); } } -- cgit v1.2.3 From 1b961e8b5d508d054e31c0050f27891606714393 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 29 Oct 2014 14:23:19 -0700 Subject: Fix compilation of with ICC and libc++ The libc++ header does this: #if !__has_feature(cxx_atomic) #error is not implemented So we can't enable the feature until the compiler reports true for that test. Change-Id: I96f1c7eea8b93d93bd721fe5a85fa987339d091f Reviewed-by: Olivier Goffart --- src/corelib/global/qcompilerdetection.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 8e52c50322..d7d5699591 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -881,6 +881,13 @@ # undef Q_COMPILER_RVALUE_REFS # undef Q_COMPILER_REF_QUALIFIERS # endif +# if defined(_LIBCPP_VERSION) +// libc++ uses __has_feature(cxx_atomic), so disable the feature if the compiler +// doesn't support it. That's required for the Intel compiler on OS X, for example. +# if !__has_feature(cxx_atomic) +# undef Q_COMPILER_ATOMICS +# endif +# endif # if defined(Q_COMPILER_THREADSAFE_STATICS) && defined(Q_OS_MAC) // Mac OS X: Apple's low-level implementation of the C++ support library // (libc++abi.dylib, shared between libstdc++ and libc++) has deadlocks. The -- cgit v1.2.3 From 1e9db9f5e18123f2e686c10b39b586caf1307729 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 29 Oct 2014 16:43:54 -0700 Subject: Enable C++11 atomics with Clang I don't know why it was an #if 0. The __has_feature has been there for a while. But, just to be sure, we check the presence of the header too. Change-Id: I36e34c9e8fd4ce55c98966d2fad246b77eb16597 Reviewed-by: Olivier Goffart --- src/corelib/global/qcompilerdetection.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index d7d5699591..949617fa7c 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -581,7 +581,7 @@ # define Q_COMPILER_ALIGNAS # define Q_COMPILER_ALIGNOF # endif -# if 0 /* not implemented in clang yet */ +# if __has_feature(cxx_atomic) && __has_include() # define Q_COMPILER_ATOMICS # endif # if __has_feature(cxx_attributes) @@ -880,6 +880,8 @@ # undef Q_COMPILER_INITIALIZER_LISTS # undef Q_COMPILER_RVALUE_REFS # undef Q_COMPILER_REF_QUALIFIERS +// Also disable , since it's clearly not there +# undef Q_COMPILER_ATOMICS # endif # if defined(_LIBCPP_VERSION) // libc++ uses __has_feature(cxx_atomic), so disable the feature if the compiler -- cgit v1.2.3 From e8f1b9917008d978c29cda9a2b40b841bc7a9df4 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 20 Oct 2014 14:09:33 +0200 Subject: Don't delete QLibrarySettings configuration in ~QCoreApplication Do not clear the QLibrarySettings configuration information already in ~QCoreApplication (via qAddPostRoutine). This fixes issues where multiple QCoreApplication objects are created over time (in plugins). Task-number: QTBUG-34290 Change-Id: Ib5c58f825619ede484492e057e08d73b2b4c6101 Reviewed-by: Oswald Buddenhagen Reviewed-by: Friedemann Kleint Reviewed-by: Thiago Macieira --- src/corelib/global/qlibraryinfo.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index c3ec2bc7f6..7ca0aa7f0b 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -84,14 +84,7 @@ class QLibraryInfoPrivate { public: static QSettings *findConfiguration(); -#ifndef QT_BOOTSTRAPPED - static void cleanup() - { - QLibrarySettings *ls = qt_library_settings(); - if (ls) - ls->settings.reset(0); - } -#else +#ifdef QT_BOOTSTRAPPED static bool haveGroup(QLibraryInfo::PathGroup group) { QLibrarySettings *ls = qt_library_settings(); @@ -114,7 +107,6 @@ QLibrarySettings::QLibrarySettings() : settings(QLibraryInfoPrivate::findConfiguration()) { #ifndef QT_BOOTSTRAPPED - qAddPostRoutine(QLibraryInfoPrivate::cleanup); bool haveEffectivePaths; bool havePaths; #endif -- cgit v1.2.3 From 0d679261176aadb3dd8efdc8e130bcbe6f3ce6f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 3 Nov 2014 17:41:04 +0100 Subject: Use __aarch64__ instead of __arm64__ to detect AArch64 The latter name was used by Apple in their internal AArch64 LLVM backend, but has since been merged into LLVM upstream and renamed to AArch64. https://github.com/llvm-mirror/llvm/commit/29f94c72014eaa5d0d3b920686e68 Change-Id: I319f42f07c95dfbcd121134fbe6e554e2d36453d Reviewed-by: Thiago Macieira --- src/corelib/global/qprocessordetection.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h index 26ac56396b..55cb31c62b 100644 --- a/src/corelib/global/qprocessordetection.h +++ b/src/corelib/global/qprocessordetection.h @@ -87,9 +87,9 @@ ARM is bi-endian, detect using __ARMEL__ or __ARMEB__, falling back to auto-detection implemented below. */ -#if defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_M_ARM) || defined(__arm64__) +#if defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_M_ARM) || defined(__aarch64__) # define Q_PROCESSOR_ARM -# if defined(__arm64__) +# if defined(__aarch64__) # define Q_PROCESSOR_ARM_64 # else # define Q_PROCESSOR_ARM_32 -- cgit v1.2.3 From 85a71381145528d446416d2744734384dbe739b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 4 Nov 2014 18:12:46 +0100 Subject: Define Q_CC_CLANG to be the version of upstream Clang that's in use We map the Apple Clang versions to upstream, so that we have one define to compare against. Fixes build break on iOS due to qbasicatomic.h not defining QT_BASIC_ATOMIC_HAS_CONSTRUCTORS on Apple Clang versions, which is needed after 1e9db9f5e18123f2e686c10b Change-Id: I17493c0187c20abc5d22e71944d62bfd16afbad2 Reviewed-by: Thiago Macieira --- src/corelib/global/qcompilerdetection.h | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 949617fa7c..de8a53ea06 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -152,7 +152,26 @@ # endif # elif defined(__clang__) /* Clang also masquerades as GCC */ -# define Q_CC_CLANG +# if defined(__apple_build_version__) +# /* http://en.wikipedia.org/wiki/Xcode#Toolchain_Versions */ +# if __apple_build_version__ >= 600051 +# define Q_CC_CLANG 305 +# elif __apple_build_version__ >= 503038 +# define Q_CC_CLANG 304 +# elif __apple_build_version__ >= 500275 +# define Q_CC_CLANG 303 +# elif __apple_build_version__ >= 425024 +# define Q_CC_CLANG 302 +# elif __apple_build_version__ >= 318045 +# define Q_CC_CLANG 301 +# elif __apple_build_version__ >= 211101 +# define Q_CC_CLANG 300 +# else +# error "Unknown Apple Clang version" +# endif +# else +# define Q_CC_CLANG ((__clang_major__ * 100) + __clang_minor__) +# endif # define Q_ASSUME_IMPL(expr) if (expr){} else __builtin_unreachable() # define Q_UNREACHABLE_IMPL() __builtin_unreachable() # if !defined(__has_extension) @@ -566,7 +585,7 @@ # endif // Variadic macros are supported for gnu++98, c++11, c99 ... since 2.9 -# if ((__clang_major__ * 100) + __clang_minor__) >= 209 +# if Q_CC_CLANG >= 209 # if !defined(__STRICT_ANSI__) || defined(__GXX_EXPERIMENTAL_CXX0X__) \ || (defined(__cplusplus) && (__cplusplus >= 201103L)) \ || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) @@ -668,7 +687,7 @@ # define Q_COMPILER_VARIADIC_TEMPLATES # endif /* Features that have no __has_feature() check */ -# if ((__clang_major__ * 100) + __clang_minor__) >= 209 /* since clang 2.9 */ +# if Q_CC_CLANG >= 209 /* since clang 2.9 */ # define Q_COMPILER_EXTERN_TEMPLATES # endif # endif -- cgit v1.2.3 From 729541f7ca1129731a2ec79492d15e7ecb3cad80 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 4 Nov 2014 11:40:30 -0800 Subject: Store the GCC version number in Q_CC_GNU The sequence of (__GNUC__ * 100 + __GNUC_MINOR__) was used in quite a few places. Simplify it to make the code more readable. This follows the change done for Clang, which was quite necessary since Apple's version of Clang has different build numbers. Change-Id: I886271a5a5f21ae59485ecf8d140527723345a46 Reviewed-by: Oswald Buddenhagen --- src/corelib/global/qcompilerdetection.h | 24 ++++++++++++------------ src/corelib/global/qglobal.h | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index de8a53ea06..ef37f00189 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -137,7 +137,7 @@ # endif #elif defined(__GNUC__) -# define Q_CC_GNU +# define Q_CC_GNU (__GNUC__ * 100 + __GNUC_MINOR__) # define Q_C_CALLBACKS # if defined(__MINGW32__) # define Q_CC_MINGW @@ -187,7 +187,7 @@ # endif # else /* Plain GCC */ -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 +# if Q_CC_GNU >= 405 # define Q_ASSUME_IMPL(expr) if (expr){} else __builtin_unreachable() # define Q_UNREACHABLE_IMPL() __builtin_unreachable() # define Q_DECL_DEPRECATED_X(text) __attribute__ ((__deprecated__(text))) @@ -221,7 +221,7 @@ # define QT_NO_ARM_EABI # endif # endif -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403 && !defined(Q_CC_CLANG) +# if Q_CC_GNU >= 403 && !defined(Q_CC_CLANG) # define Q_ALLOC_SIZE(x) __attribute__((alloc_size(x))) # endif @@ -728,7 +728,7 @@ #if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_CC_CLANG) # define Q_COMPILER_RESTRICTED_VLA # define Q_COMPILER_THREADSAFE_STATICS -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403 +# if Q_CC_GNU >= 403 // GCC supports binary literals in C, C++98 and C++11 modes # define Q_COMPILER_BINARY_LITERALS # endif @@ -739,13 +739,13 @@ # define Q_COMPILER_VARIADIC_MACROS # endif # if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403 +# if Q_CC_GNU >= 403 /* C++11 features supported in GCC 4.3: */ # define Q_COMPILER_DECLTYPE # define Q_COMPILER_RVALUE_REFS # define Q_COMPILER_STATIC_ASSERT # endif -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 +# if Q_CC_GNU >= 404 /* C++11 features supported in GCC 4.4: */ # define Q_COMPILER_AUTO_FUNCTION # define Q_COMPILER_AUTO_TYPE @@ -754,7 +754,7 @@ # define Q_COMPILER_UNICODE_STRINGS # define Q_COMPILER_VARIADIC_TEMPLATES # endif -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 +# if Q_CC_GNU >= 405 /* C++11 features supported in GCC 4.5: */ # define Q_COMPILER_EXPLICIT_CONVERSIONS /* GCC 4.4 implements initializer_list but does not define typedefs required @@ -764,7 +764,7 @@ # define Q_COMPILER_RAW_STRINGS # define Q_COMPILER_CLASS_ENUM # endif -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 +# if Q_CC_GNU >= 406 /* Pre-4.6 compilers implement a non-final snapshot of N2346, hence default and delete * functions are supported only if they are public. Starting from 4.6, GCC handles * final version - the access modifier is not relevant. */ @@ -776,7 +776,7 @@ # define Q_COMPILER_UNRESTRICTED_UNIONS # define Q_COMPILER_RANGE_FOR # endif -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 +# if Q_CC_GNU >= 407 /* GCC 4.4 implemented and std::atomic using its old intrinsics. * However, the implementation is incomplete for most platforms until GCC 4.7: * instead, std::atomic would use an external lock. Since we need an std::atomic @@ -792,20 +792,20 @@ # define Q_COMPILER_TEMPLATE_ALIAS # define Q_COMPILER_UDL # endif -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 +# if Q_CC_GNU >= 408 # define Q_COMPILER_ATTRIBUTES # define Q_COMPILER_ALIGNAS # define Q_COMPILER_ALIGNOF # define Q_COMPILER_INHERITING_CONSTRUCTORS # define Q_COMPILER_THREAD_LOCAL -# if (__GNUC__ * 100 + __GNUC_MINOR__) > 408 || __GNUC_PATCHLEVEL__ >= 1 +# if Q_CC_GNU > 408 || __GNUC_PATCHLEVEL__ >= 1 # define Q_COMPILER_REF_QUALIFIERS # endif # endif /* C++11 features are complete as of GCC 4.8.1 */ # endif # if __cplusplus > 201103L -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 +# if Q_CC_GNU >= 409 /* C++1y features in GCC 4.9 - deprecated, do not update this list */ //# define Q_COMPILER_BINARY_LITERALS // already supported since GCC 4.3 as an extension # define Q_COMPILER_LAMBDA_CAPTURES diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 8bc489e509..f17ff3dea0 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -877,7 +877,7 @@ public: // (http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#382). // GCC 4.3 and 4.4 have support for decltype, but are affected by DR 382. # if defined(Q_COMPILER_DECLTYPE) && \ - (defined(Q_CC_CLANG) || defined(Q_CC_INTEL) || !defined(Q_CC_GNU) || (__GNUC__ * 100 + __GNUC_MINOR__) >= 405) + (defined(Q_CC_CLANG) || defined(Q_CC_INTEL) || !defined(Q_CC_GNU) || Q_CC_GNU >= 405) # define QT_FOREACH_DECLTYPE(x) typename QtPrivate::remove_reference::type # else # define QT_FOREACH_DECLTYPE(x) __typeof__((x)) -- cgit v1.2.3 From ffcad3244ff6e2429da1bf985d6d1116c251c2ec Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 4 Nov 2014 11:42:08 -0800 Subject: Define the Intel compiler and Microsoft C++ versions in the Q_CC_ macros This is for completeness, since we've done the same for Q_CC_GNU and Q_CC_CLANG. We won't really use the macros like this because both __INTEL_COMPILER and _MSC_VER are readily usable. Change-Id: I669c60166fa4839d43f84f339e6896321d62817f Reviewed-by: Oswald Buddenhagen --- src/corelib/global/qcompilerdetection.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index ef37f00189..4c84daae13 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -78,7 +78,7 @@ # define Q_NO_USING_KEYWORD #elif defined(_MSC_VER) -# define Q_CC_MSVC +# define Q_CC_MSVC (_MSC_VER) # define Q_CC_MSVC_NET # define Q_OUTOFLINE_TEMPLATE inline # if _MSC_VER < 1600 @@ -144,7 +144,7 @@ # endif # if defined(__INTEL_COMPILER) /* Intel C++ also masquerades as GCC */ -# define Q_CC_INTEL +# define Q_CC_INTEL (__INTEL_COMPILER) # define Q_ASSUME_IMPL(expr) __assume(expr) # define Q_UNREACHABLE_IMPL() __builtin_unreachable() # if __INTEL_COMPILER >= 1300 && !defined(__APPLE__) @@ -327,7 +327,7 @@ /* Using the `using' keyword avoids Intel C++ for Linux warnings */ # elif defined(__INTEL_COMPILER) -# define Q_CC_INTEL +# define Q_CC_INTEL (__INTEL_COMPILER) /* Uses CFront, make sure to read the manual how to tweak templates. */ # elif defined(__ghs) -- cgit v1.2.3 From f44eb5c57f28825e29425be339a00df5d99b68eb Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Fri, 17 Oct 2014 13:46:37 +0200 Subject: Doc: Solved link and autolink errs qnamespace.qdoc Task-number: QTBUG-40362 Change-Id: I81166dc3a54427e2d2d81f640162f6c338947849 Reviewed-by: Martin Smith --- src/corelib/global/qnamespace.qdoc | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 4e074bcdb5..8d6f7834b0 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -134,7 +134,7 @@ \value AA_MacDontSwapCtrlAndMeta On Mac OS X by default, Qt swaps the Control and Meta (Command) keys (i.e., whenever Control is pressed, Qt sends Meta, and whenever Meta is pressed Control is sent). When this - attribute is true, Qt will not do the flip. QKeySequence::StandardShortcuts + attribute is true, Qt will not do the flip. \l QKeySequence::StandardKey will also flip accordingly (i.e., QKeySequence::Copy will be Command+C on the keyboard regardless of the value set, though what is output for QKeySequence::toString(QKeySequence::PortableText) will be different). @@ -144,7 +144,7 @@ to be consistent in pixels-per-point across devices rather than defining 1 point as 1/72 inch. - \value AA_X11InitThreads Calls XInitThreads() as part of the QApplication + \value AA_X11InitThreads Calls \c XInitThreads() as part of the QApplication construction in order to make Xlib calls thread-safe. This attribute must be set before QApplication is constructed. @@ -159,10 +159,11 @@ \value AA_UseHighDpiPixmaps Make QIcon::pixmap() generate high-dpi pixmaps that can be larger than the requested size. Such pixmaps will have - devicePixelRatio set to a value higher than 1. After setting this - attribute application code that uses pixmap sizes in layout geometry - calculations should typically divide by QPixmap::devicePixelRatio() - to get device-independent layout geometry. + \l {QPixmap::devicePixelRatio}{devicePixelRatio()} set to a value higher than 1. + + After setting this attribute, application code that uses pixmap + sizes in layout geometry calculations should typically divide by + \l {QPixmap::devicePixelRatio}{devicePixelRatio()} to get device-independent layout geometry. \value AA_ForceRasterWidgets Make top-level widgets use pure raster surfaces, and do not support non-native GL-based child widgets. @@ -182,7 +183,7 @@ \l{http://www.mesa3d.org/llvmpipe.html}{Mesa llvmpipe}, providing OpenGL 2.1. The value may have no effect if no such OpenGL implementation is available. The default name of this library is - opengl32sw.dll and can be overridden by setting the environment + \c opengl32sw.dll and can be overridden by setting the environment variable \e QT_OPENGL_DLL. See the platform-specific pages, for instance \l{Qt for Windows}, for more information. This value has been added in Qt 5.4. @@ -221,7 +222,7 @@ \value AllButtons This value corresponds to a mask of all possible mouse buttons. Use to set the 'acceptedButtons' - property of a mouseArea to accept ALL mouse buttons. + property of a MouseArea to accept ALL mouse buttons. \value LeftButton The left button is pressed, or an event refers to the left button. (The left button may be the right button on @@ -2443,7 +2444,7 @@ \value ImhExclusiveInputMask This mask yields nonzero if any of the exclusive flags are used. - \note If several exclusive flags are ORed together, the resulting character set will + \note If several exclusive flags are OR-ed together, the resulting character set will consist of the union of the specified sets. For instance specifying \c ImhNumbersOnly and \c ImhUppercaseOnly would yield a set consisting of numbers and uppercase letters. @@ -2969,8 +2970,8 @@ This enum provides additional information concerning a QMouseEvent. \value MouseEventCreatedDoubleClick Indicates that Qt has created a - MouseButtonDblClick event from this event. The flag is set in the causing - MouseButtonPress, and not in the resulting MouseButtonDblCLick. + \l {QEvent::MouseButtonDblClick}{MouseButtonDblClick} event from this event. The flag is set in the causing + \l {QEvent::MouseButtonPress}{MouseButtonPress}, and not in the resulting \l {QEvent::MouseButtonDblClick}{MouseButtonDblClick}. \omitvalue MouseEventFlagMask */ -- cgit v1.2.3 From a1d61e70ca5db4a3c7e0008b0175197327c5d6b4 Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Fri, 24 Oct 2014 14:45:08 +0200 Subject: Doc: added NoGesture to GestureState enum Task-number: QTBUG-39988 Change-Id: I5481dfec75c90267a3a9be0d212df7384016e69d Reviewed-by: Martin Smith --- src/corelib/global/qnamespace.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 4e074bcdb5..28d26f848d 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -2803,11 +2803,11 @@ This enum type describes the state of a gesture. + \value NoGesture No gesture has been detected. \value GestureStarted A continuous gesture has started. \value GestureUpdated A gesture continues. \value GestureFinished A gesture has finished. \value GestureCanceled A gesture was canceled. - \omitvalue NoGesture \sa QGesture */ -- cgit v1.2.3