diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-04-11 14:36:55 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-04-11 14:36:55 +0200 |
commit | 98d3e40fb7c88b670a93e73dace2d0f05a5f903c (patch) | |
tree | b1292124a86c219fb434db4ec28e8f805ff52287 /src/corelib/global | |
parent | a74e4b85be83e2da47f4a1d8fcf0e78079335b80 (diff) | |
parent | bab494e4d046f5617d19f5fec35eeff94377c51f (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
mkspecs/qnx-armv7le-qcc/qplatformdefs.h
src/printsupport/kernel/qcups.cpp
src/widgets/styles/qstyle.h
tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
Change-Id: Ia41e13051169a6d4a8a1267548e7d47b859bb267
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qcompilerdetection.h | 10 | ||||
-rw-r--r-- | src/corelib/global/qglobal.h | 2 | ||||
-rw-r--r-- | src/corelib/global/qlibraryinfo.cpp | 4 | ||||
-rw-r--r-- | src/corelib/global/qlogging.cpp | 16 | ||||
-rw-r--r-- | src/corelib/global/qprocessordetection.h | 12 |
5 files changed, 27 insertions, 17 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index dfa3d83fb8..b62ae30fc5 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -485,6 +485,8 @@ * N3652 Q_COMPILER_RELAXED_CONSTEXPR_FUNCTIONS * N3386 N3638 Q_COMPILER_RETURN_TYPE_DEDUCTION * N3651 Q_COMPILER_VARIABLE_TEMPLATES + * + * C++14 Technical Specifications / C++17: * N3639 Q_COMPILER_VLA (see also Q_COMPILER_RESTRICTED_VLA) * */ @@ -776,7 +778,6 @@ //# define Q_COMPILER_BINARY_LITERALS // already supported since GCC 4.3 as an extension # define Q_COMPILER_LAMBDA_CAPTURES # define Q_COMPILER_RETURN_TYPE_DEDUCTION -# define Q_COMPILER_VLA # endif # endif #endif @@ -828,13 +829,18 @@ # define Q_COMPILER_DELEGATING_CONSTRUCTORS # define Q_COMPILER_EXPLICIT_CONVERSIONS # define Q_COMPILER_NONSTATIC_MEMBER_INIT -# define Q_COMPILER_INITIALIZER_LISTS +// implemented, but nested initialization fails (eg tst_qvector): http://connect.microsoft.com/VisualStudio/feedback/details/800364/initializer-list-calls-object-destructor-twice +// #define Q_COMPILER_INITIALIZER_LISTS // implemented in principle, but has a bug that makes it unusable: http://connect.microsoft.com/VisualStudio/feedback/details/802058/c-11-unified-initialization-fails-with-c-style-arrays // #define Q_COMPILER_UNIFORM_INIT # define Q_COMPILER_RAW_STRINGS # define Q_COMPILER_TEMPLATE_ALIAS # define Q_COMPILER_VARIADIC_TEMPLATES # endif /* VC 12 */ +# if _MSC_FULL_VER >= 180030324 // VC 12 SP 2 RC +# define Q_COMPILER_INITIALIZER_LISTS +# endif /* VC 12 SP 2 RC */ + #endif /* Q_CC_MSVC */ #ifdef __cplusplus diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index cd422dfd87..3832e70c94 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -995,7 +995,7 @@ Q_CORE_EXPORT QString qtTrId(const char *id, int n = -1); dynamic_cast to cause a compile failure. */ -#ifdef QT_NO_DYNAMIC_CAST +#if defined(QT_NO_DYNAMIC_CAST) && !defined(dynamic_cast) # define dynamic_cast QT_PREPEND_NAMESPACE(qt_dynamic_cast_check) template<typename T, typename X> diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index d31916abeb..a4bb8cfacb 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -500,7 +500,9 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group) if (urlRef) { QCFString path = CFURLCopyFileSystemPath(urlRef, kCFURLPOSIXPathStyle); #ifdef Q_OS_MACX - return QDir::cleanPath(QString(path) + QLatin1String("/Contents/") + ret); + QString bundleContentsDir = QString(path) + QLatin1String("/Contents/"); + if (QDir(bundleContentsDir).exists()) + return QDir::cleanPath(bundleContentsDir + ret); #else return QDir::cleanPath(QString(path) + QLatin1Char('/') + ret); // iOS #endif diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 8c1d8b867d..da26490d18 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -64,7 +64,9 @@ #endif #if defined(QT_USE_JOURNALD) && !defined(QT_BOOTSTRAPPED) +# define SD_JOURNAL_SUPPRESS_LOCATION # include <systemd/sd-journal.h> +# include <syslog.h> # include <unistd.h> #endif @@ -1170,13 +1172,13 @@ static void systemd_default_message_handler(QtMsgType type, break; } - char filebuf[PATH_MAX + sizeof("CODE_FILE=")]; - snprintf(filebuf, sizeof(filebuf), "CODE_FILE=%s", context.file ? context.file : "unknown"); - - char linebuf[20]; - snprintf(linebuf, sizeof(linebuf), "CODE_LINE=%d", context.line); - - sd_journal_print_with_location(priority, filebuf, linebuf, context.function ? context.function : "unknown", "%s", message.toUtf8().constData()); + sd_journal_send("MESSAGE=%s", message.toUtf8().constData(), + "PRIORITY=%i", priority, + "CODE_FUNC=%s", context.function ? context.function : "unknown", + "CODE_LINE=%d", context.line, + "CODE_FILE=%s", context.file ? context.file : "unknown", + "QT_CATEGORY=%s", context.category ? context.category : "unknown", + NULL); } #endif diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h index cf7ee1b7aa..384df8fd54 100644 --- a/src/corelib/global/qprocessordetection.h +++ b/src/corelib/global/qprocessordetection.h @@ -269,12 +269,12 @@ S390 is big-endian. */ -// #elif defined(__s390__) -// # define Q_PROCESSOR_S390 -// # if defined(__s390x__) -// # define Q_PROCESSOR_S390_X -// # endif -// # define Q_BYTE_ORDER Q_BIG_ENDIAN +#elif defined(__s390__) +# define Q_PROCESSOR_S390 +# if defined(__s390x__) +# define Q_PROCESSOR_S390_X +# endif +# define Q_BYTE_ORDER Q_BIG_ENDIAN /* SuperH family, optional revision: SH-4A |