diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-06-06 15:35:06 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-06-06 19:00:41 +0200 |
commit | 2a302a73613d68475e667f69b8e36ce07853c813 (patch) | |
tree | 06de55baaed993b51af517dba8f230fab749882c /src/corelib/global | |
parent | 5505d25be972948db1621e1511b89b4144aa8bfc (diff) | |
parent | dea7110b29c5c68a5b09454c968324042ed1b607 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/qt6
Change-Id: Iac12a37fa6536ebe30e6548f7c54ec0c402c9f5d
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/global.pri | 1 | ||||
-rw-r--r-- | src/corelib/global/qfloat16.cpp | 13 | ||||
-rw-r--r-- | src/corelib/global/qfloat16.h | 4 | ||||
-rw-r--r-- | src/corelib/global/qglobal.cpp | 57 | ||||
-rw-r--r-- | src/corelib/global/qglobal.h | 11 | ||||
-rw-r--r-- | src/corelib/global/qlogging.cpp | 41 | ||||
-rw-r--r-- | src/corelib/global/qlogging.h | 21 | ||||
-rw-r--r-- | src/corelib/global/qmemory_p.h | 71 | ||||
-rw-r--r-- | src/corelib/global/qnamespace.h | 45 | ||||
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 23 | ||||
-rw-r--r-- | src/corelib/global/qoperatingsystemversion_win.cpp | 4 | ||||
-rw-r--r-- | src/corelib/global/qsystemdetection.h | 3 | ||||
-rw-r--r-- | src/corelib/global/qtypeinfo.h | 1 |
13 files changed, 249 insertions, 46 deletions
diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri index 428c674307..10af46b41a 100644 --- a/src/corelib/global/global.pri +++ b/src/corelib/global/global.pri @@ -7,6 +7,7 @@ HEADERS += \ global/qsystemdetection.h \ global/qcompilerdetection.h \ global/qprocessordetection.h \ + global/qmemory_p.h \ global/qnamespace.h \ global/qendian.h \ global/qendian_p.h \ diff --git a/src/corelib/global/qfloat16.cpp b/src/corelib/global/qfloat16.cpp index 2bf6ff00c2..68763c0606 100644 --- a/src/corelib/global/qfloat16.cpp +++ b/src/corelib/global/qfloat16.cpp @@ -67,6 +67,19 @@ QT_BEGIN_NAMESPACE */ /*! + \macro QT_NO_FLOAT16_OPERATORS + \relates <QFloat16> + \since 5.12.4 + + Defining this macro disables the arithmetic operators for qfloat16. + + This is only necessary on Visual Studio 2017 (and earlier) when including + \c {<QFloat16>} and \c{<bitset>} in the same translation unit, which would + otherwise cause a compilation error due to a toolchain bug (see + [QTBUG-72073]). +*/ + +/*! \fn bool qIsInf(qfloat16 f) \relates <QFloat16> diff --git a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h index 6f798f8b8f..4d1aa91349 100644 --- a/src/corelib/global/qfloat16.h +++ b/src/corelib/global/qfloat16.h @@ -106,7 +106,9 @@ private: Q_CORE_EXPORT static const quint32 shifttable[]; friend bool qIsNull(qfloat16 f) noexcept; +#if !defined(QT_NO_FLOAT16_OPERATORS) friend qfloat16 operator-(qfloat16 a) noexcept; +#endif }; Q_DECLARE_TYPEINFO(qfloat16, Q_PRIMITIVE_TYPE); @@ -191,6 +193,7 @@ inline qfloat16::operator float() const noexcept } #endif +#if !defined(QT_NO_FLOAT16_OPERATORS) inline qfloat16 operator-(qfloat16 a) noexcept { qfloat16 f; @@ -272,6 +275,7 @@ QF16_MAKE_BOOL_OP_INT(!=) #undef QF16_MAKE_BOOL_OP_INT QT_WARNING_POP +#endif // QT_NO_FLOAT16_OPERATORS /*! \internal diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 16d8d8b8ac..be01e5a605 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -1426,6 +1426,13 @@ bool qSharedBuild() noexcept */ /*! + \macro Q_OS_WINDOWS + \relates <QtGlobal> + + This is a synonym for Q_OS_WIN. +*/ + +/*! \macro Q_OS_WIN32 \relates <QtGlobal> @@ -3799,6 +3806,56 @@ bool qunsetenv(const char *varName) */ /*! + \fn template <typename T, typename U = T> T qExchange(T &obj, U &&newValue) + \relates <QtGlobal> + \since 5.14 + + Replaces the value of \a obj with \a newValue and returns the old value of \a obj. + + This is Qt's implementation of std::exchange(). It differs from std::exchange() + only in that it is \c constexpr already in C++14, and available on all supported + compilers. + + Here is how to use qExchange() to implement move constructors: + \code + MyClass(MyClass &&other) + : m_pointer{qExchange(other.m_pointer, nullptr)}, + m_int{qExchange(other.m_int, 0)}, + m_vector{std::move(other.m_vector)}, + ... + \endcode + + For members of class type, we can use std::move(), as their move-constructor will + do the right thing. But for scalar types such as raw pointers or integer type, move + is the same as copy, which, particularly for pointers, is not what we expect. So, we + cannot use std::move() for such types, but we can use std::exchange()/qExchange() to + make sure the source object's member is already reset by the time we get to the + initialization of our next data member, which might come in handy if the constructor + exits with an exception. + + Here is how to use qExchange() to write a loop that consumes the collection it + iterates over: + \code + for (auto &e : qExchange(collection, {}) + doSomethingWith(e); + \endcode + + Which is equivalent to the following, much more verbose code: + \code + { + auto tmp = std::move(collection); + collection = {}; // or collection.clear() + for (auto &e : tmp) + doSomethingWith(e); + } // destroys 'tmp' + \endcode + + This is perfectly safe, as the for-loop keeps the result of qExchange() alive for as + long as the loop runs, saving the declaration of a temporary variable. Be aware, though, + that qExchange() returns a non-const object, so Qt containers may detach. +*/ + +/*! \macro QT_TR_NOOP(sourceText) \relates <QtGlobal> diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 499558d7e6..630a3265e2 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -380,7 +380,7 @@ typedef double qreal; #define QT_DEPRECATED_VERSION_X_5(minor, text) QT_DEPRECATED_VERSION_X_5_##minor(text) #define QT_DEPRECATED_VERSION_X(major, minor, text) QT_DEPRECATED_VERSION_X_##major(minor, text) -#define QT_DEPRECATED_VERSION_5(minor) QT_DEPRECATED_VERSION_5_##minor() +#define QT_DEPRECATED_VERSION_5(minor) QT_DEPRECATED_VERSION_5_##minor #define QT_DEPRECATED_VERSION(major, minor) QT_DEPRECATED_VERSION_##major(minor) /* @@ -1009,6 +1009,15 @@ Q_DECL_CONSTEXPR typename std::add_const<T>::type &qAsConst(T &t) noexcept { ret template <typename T> void qAsConst(const T &&) = delete; +// like std::exchange +template <typename T, typename U = T> +Q_DECL_RELAXED_CONSTEXPR T qExchange(T &t, U &&newValue) +{ + T old = std::move(t); + t = std::forward<U>(newValue); + return old; +} + #ifndef QT_NO_FOREACH namespace QtPrivate { diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 23cb5ba61e..499ea3cdfb 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -439,7 +439,7 @@ void QMessageLogger::debug(const QLoggingCategory &cat, const char *msg, ...) co return; QMessageLogContext ctxt; - ctxt.copy(context); + ctxt.copyContextFrom(context); ctxt.category = cat.categoryName(); va_list ap; @@ -466,7 +466,7 @@ void QMessageLogger::debug(QMessageLogger::CategoryFunction catFunc, return; QMessageLogContext ctxt; - ctxt.copy(context); + ctxt.copyContextFrom(context); ctxt.category = cat.categoryName(); va_list ap; @@ -489,7 +489,7 @@ QDebug QMessageLogger::debug() const { QDebug dbg = QDebug(QtDebugMsg); QMessageLogContext &ctxt = dbg.stream->context; - ctxt.copy(context); + ctxt.copyContextFrom(context); return dbg; } @@ -506,7 +506,7 @@ QDebug QMessageLogger::debug(const QLoggingCategory &cat) const dbg.stream->message_output = false; QMessageLogContext &ctxt = dbg.stream->context; - ctxt.copy(context); + ctxt.copyContextFrom(context); ctxt.category = cat.categoryName(); return dbg; @@ -550,7 +550,7 @@ void QMessageLogger::info(const QLoggingCategory &cat, const char *msg, ...) con return; QMessageLogContext ctxt; - ctxt.copy(context); + ctxt.copyContextFrom(context); ctxt.category = cat.categoryName(); va_list ap; @@ -577,7 +577,7 @@ void QMessageLogger::info(QMessageLogger::CategoryFunction catFunc, return; QMessageLogContext ctxt; - ctxt.copy(context); + ctxt.copyContextFrom(context); ctxt.category = cat.categoryName(); va_list ap; @@ -601,7 +601,7 @@ QDebug QMessageLogger::info() const { QDebug dbg = QDebug(QtInfoMsg); QMessageLogContext &ctxt = dbg.stream->context; - ctxt.copy(context); + ctxt.copyContextFrom(context); return dbg; } @@ -618,7 +618,7 @@ QDebug QMessageLogger::info(const QLoggingCategory &cat) const dbg.stream->message_output = false; QMessageLogContext &ctxt = dbg.stream->context; - ctxt.copy(context); + ctxt.copyContextFrom(context); ctxt.category = cat.categoryName(); return dbg; @@ -668,7 +668,7 @@ void QMessageLogger::warning(const QLoggingCategory &cat, const char *msg, ...) return; QMessageLogContext ctxt; - ctxt.copy(context); + ctxt.copyContextFrom(context); ctxt.category = cat.categoryName(); va_list ap; @@ -695,7 +695,7 @@ void QMessageLogger::warning(QMessageLogger::CategoryFunction catFunc, return; QMessageLogContext ctxt; - ctxt.copy(context); + ctxt.copyContextFrom(context); ctxt.category = cat.categoryName(); va_list ap; @@ -717,7 +717,7 @@ QDebug QMessageLogger::warning() const { QDebug dbg = QDebug(QtWarningMsg); QMessageLogContext &ctxt = dbg.stream->context; - ctxt.copy(context); + ctxt.copyContextFrom(context); return dbg; } @@ -733,7 +733,7 @@ QDebug QMessageLogger::warning(const QLoggingCategory &cat) const dbg.stream->message_output = false; QMessageLogContext &ctxt = dbg.stream->context; - ctxt.copy(context); + ctxt.copyContextFrom(context); ctxt.category = cat.categoryName(); return dbg; @@ -784,7 +784,7 @@ void QMessageLogger::critical(const QLoggingCategory &cat, const char *msg, ...) return; QMessageLogContext ctxt; - ctxt.copy(context); + ctxt.copyContextFrom(context); ctxt.category = cat.categoryName(); va_list ap; @@ -811,7 +811,7 @@ void QMessageLogger::critical(QMessageLogger::CategoryFunction catFunc, return; QMessageLogContext ctxt; - ctxt.copy(context); + ctxt.copyContextFrom(context); ctxt.category = cat.categoryName(); va_list ap; @@ -833,7 +833,7 @@ QDebug QMessageLogger::critical() const { QDebug dbg = QDebug(QtCriticalMsg); QMessageLogContext &ctxt = dbg.stream->context; - ctxt.copy(context); + ctxt.copyContextFrom(context); return dbg; } @@ -850,7 +850,7 @@ QDebug QMessageLogger::critical(const QLoggingCategory &cat) const dbg.stream->message_output = false; QMessageLogContext &ctxt = dbg.stream->context; - ctxt.copy(context); + ctxt.copyContextFrom(context); ctxt.category = cat.categoryName(); return dbg; @@ -2108,15 +2108,20 @@ void qSetMessagePattern(const QString &pattern) /*! - Copies context information from \a logContext into this QMessageLogContext + Copies context information from \a logContext into this QMessageLogContext. + Returns a reference to this object. + + Note that the version is \b not copied, only the context information. + \internal */ -void QMessageLogContext::copy(const QMessageLogContext &logContext) +QMessageLogContext &QMessageLogContext::copyContextFrom(const QMessageLogContext &logContext) noexcept { this->category = logContext.category; this->file = logContext.file; this->line = logContext.line; this->function = logContext.function; + return *this; } /*! diff --git a/src/corelib/global/qlogging.h b/src/corelib/global/qlogging.h index 8f39780112..4a528a2973 100644 --- a/src/corelib/global/qlogging.h +++ b/src/corelib/global/qlogging.h @@ -63,20 +63,19 @@ class QMessageLogContext { Q_DISABLE_COPY(QMessageLogContext) public: - Q_DECL_CONSTEXPR QMessageLogContext() - : version(2), line(0), file(nullptr), function(nullptr), category(nullptr) {} - Q_DECL_CONSTEXPR QMessageLogContext(const char *fileName, int lineNumber, const char *functionName, const char *categoryName) - : version(2), line(lineNumber), file(fileName), function(functionName), category(categoryName) {} + Q_DECL_CONSTEXPR QMessageLogContext() noexcept = default; + Q_DECL_CONSTEXPR QMessageLogContext(const char *fileName, int lineNumber, const char *functionName, const char *categoryName) noexcept + : line(lineNumber), file(fileName), function(functionName), category(categoryName) {} - void copy(const QMessageLogContext &logContext); - - int version; - int line; - const char *file; - const char *function; - const char *category; + int version = 2; + int line = 0; + const char *file = nullptr; + const char *function = nullptr; + const char *category = nullptr; private: + QMessageLogContext ©ContextFrom(const QMessageLogContext &logContext) noexcept; + friend class QMessageLogger; friend class QDebug; }; diff --git a/src/corelib/global/qmemory_p.h b/src/corelib/global/qmemory_p.h new file mode 100644 index 0000000000..ac791385bd --- /dev/null +++ b/src/corelib/global/qmemory_p.h @@ -0,0 +1,71 @@ +/**************************************************************************** +** +** Copyright (C) 2019 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com> +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#ifndef QMEMORY_P_H +#define QMEMORY_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include <QtCore/qglobal.h> + +#include <memory> +#include <type_traits> +#include <utility> + +QT_BEGIN_NAMESPACE + +// Like std::make_unique, but less ambitious, so keep as private API, for use in Qt itself: +template <typename T, typename... Args> +typename std::enable_if<!std::is_array<T>::value, std::unique_ptr<T>>::type +qt_make_unique(Args &&...args) +{ + return std::unique_ptr<T>{new T(std::forward<Args>(args)...)}; +} + +QT_END_NAMESPACE + +#endif /* QMEMORY_P_H */ diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 06aef81afc..f5f7176670 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -194,6 +194,13 @@ public: DescendingOrder }; + enum SplitBehaviorFlags { + KeepEmptyParts = 0, + SkipEmptyParts = 0x1, + }; + Q_DECLARE_FLAGS(SplitBehavior, SplitBehaviorFlags) + Q_DECLARE_OPERATORS_FOR_FLAGS(SplitBehavior) + enum TileRule { StretchTile, RepeatTile, @@ -351,14 +358,18 @@ public: WA_MouseTracking = 2, WA_ContentsPropagated = 3, // ## deprecated WA_OpaquePaintEvent = 4, - WA_NoBackground = WA_OpaquePaintEvent, // ## deprecated +#if QT_DEPRECATED_SINCE(5, 14) + WA_NoBackground Q_DECL_ENUMERATOR_DEPRECATED = WA_OpaquePaintEvent, +#endif WA_StaticContents = 5, WA_LaidOut = 7, WA_PaintOnScreen = 8, WA_NoSystemBackground = 9, WA_UpdatesDisabled = 10, WA_Mapped = 11, - WA_MacNoClickThrough = 12, // Mac only +#if QT_DEPRECATED_SINCE(5, 14) + WA_MacNoClickThrough Q_DECL_ENUMERATOR_DEPRECATED = 12, +#endif WA_InputMethodEnabled = 14, WA_WState_Visible = 15, WA_WState_Hidden = 16, @@ -376,8 +387,10 @@ public: WA_Moved = 43, WA_PendingUpdate = 44, WA_InvalidSize = 45, - WA_MacBrushedMetal = 46, // Mac only - WA_MacMetalStyle = WA_MacBrushedMetal, // obsolete +#if QT_DEPRECATED_SINCE(5, 14) + WA_MacBrushedMetal Q_DECL_ENUMERATOR_DEPRECATED = 46, + WA_MacMetalStyle Q_DECL_ENUMERATOR_DEPRECATED = 46, +#endif WA_CustomWhatsThis = 47, WA_LayoutOnEntireRect = 48, WA_OutsideWSRange = 49, @@ -434,7 +447,9 @@ public: WA_LayoutUsesWidgetRect = 92, WA_StyledBackground = 93, // internal - WA_MSWindowsUseDirect3D = 94, // Win only +#if QT_DEPRECATED_SINCE(5, 14) + WA_MSWindowsUseDirect3D Q_DECL_ENUMERATOR_DEPRECATED = 94, +#endif WA_CanHostQMdiSubWindowTitleBar = 95, // Internal WA_MacAlwaysShowToolWindow = 96, // Mac only @@ -466,9 +481,9 @@ public: WA_X11NetWmWindowTypeNotification = 114, WA_X11NetWmWindowTypeCombo = 115, WA_X11NetWmWindowTypeDND = 116, - - WA_MacFrameworkScaled = 117, - +#if QT_DEPRECATED_SINCE(5, 14) + WA_MacFrameworkScaled Q_DECL_ENUMERATOR_DEPRECATED = 117, +#endif WA_SetWindowModality = 118, WA_WState_WindowOpacitySet = 119, // internal WA_TranslucentBackground = 120, @@ -495,7 +510,9 @@ public: enum ApplicationAttribute { AA_ImmediateWidgetCreation = 0, - AA_MSWindowsUseDirect3DByDefault = 1, // Win only +#if QT_DEPRECATED_SINCE(5, 14) + AA_MSWindowsUseDirect3DByDefault Q_DECL_ENUMERATOR_DEPRECATED = 1, +#endif AA_DontShowIconsInMenus = 2, AA_NativeWindows = 3, AA_DontCreateNativeWidgetSiblings = 4, @@ -506,7 +523,9 @@ public: AA_DontUseNativeMenuBar = 6, AA_MacDontSwapCtrlAndMeta = 7, AA_Use96Dpi = 8, - AA_X11InitThreads = 10, +#if QT_DEPRECATED_SINCE(5, 14) + AA_X11InitThreads Q_DECL_ENUMERATOR_DEPRECATED = 10, +#endif AA_SynthesizeTouchForUnhandledMouseEvents = 11, AA_SynthesizeMouseForUnhandledTouchEvents = 12, AA_UseHighDpiPixmaps = 13, @@ -527,6 +546,7 @@ public: AA_DontShowShortcutsInContextMenus = 28, AA_CompressTabletEvents = 29, AA_DisableWindowContextHelpButton = 30, // ### Qt 6: remove me + AA_DisableSessionManager = 31, // Add new attributes before this line AA_AttributeCount @@ -1380,7 +1400,9 @@ public: enum InputMethodQuery { ImEnabled = 0x1, ImCursorRectangle = 0x2, - ImMicroFocus = 0x2, // deprecated +#if QT_DEPRECATED_SINCE(5, 14) + ImMicroFocus Q_DECL_ENUMERATOR_DEPRECATED = 0x2, +#endif ImFont = 0x4, ImCursorPosition = 0x8, ImSurroundingText = 0x10, @@ -1758,6 +1780,7 @@ public: QT_Q_FLAG(Alignment) QT_Q_ENUM(TextFlag) QT_Q_FLAG(Orientations) + QT_Q_FLAG(SplitBehavior) QT_Q_FLAG(DropActions) QT_Q_FLAG(Edges) QT_Q_FLAG(DockWidgetAreas) diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 5bba8c5fe5..45d79902c7 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -286,6 +286,13 @@ This value was added in Qt 5.10. In Qt 6, WindowContextHelpButtonHint will not be set by default. + \value AA_DisableSessionManager Disables the QSessionManager. + By default Qt will connect to a running session manager for a GUI + application on supported platforms, use of a session manager may be + redundant for system services. + This attribute must be set before QGuiApplication is constructed. + This value was added in 5.13 + The following values are deprecated or obsolete: \value AA_ImmediateWidgetCreation This attribute is no longer fully @@ -2362,6 +2369,19 @@ */ /*! + \enum Qt::SplitBehavior + \since 5.14 + + This enum specifies how the split() functions should behave with + respect to empty strings. + + \value KeepEmptyParts If a field is empty, keep it in the result. + \value SkipEmptyParts If a field is empty, don't include it in the result. + + \sa QString::split() +*/ + +/*! \enum Qt::ClipOperation \value NoClip This operation turns clipping off. @@ -2464,6 +2484,9 @@ \value AutoText The text string is interpreted as for Qt::RichText if Qt::mightBeRichText() returns \c true, otherwise as Qt::PlainText. + + \value MarkdownText The text string is interpreted as Markdown-formatted text. + This enum value was added in Qt 5.14. */ /*! diff --git a/src/corelib/global/qoperatingsystemversion_win.cpp b/src/corelib/global/qoperatingsystemversion_win.cpp index 2da190da48..798d985a76 100644 --- a/src/corelib/global/qoperatingsystemversion_win.cpp +++ b/src/corelib/global/qoperatingsystemversion_win.cpp @@ -84,7 +84,6 @@ static inline OSVERSIONINFOEX determineWinOsVersion() #define pGetModuleHandle GetModuleHandleW #endif -#ifndef Q_OS_WINCE HMODULE ntdll = pGetModuleHandle(L"ntdll.dll"); if (Q_UNLIKELY(!ntdll)) return result; @@ -104,9 +103,6 @@ static inline OSVERSIONINFOEX determineWinOsVersion() // GetVersionEx() has been deprecated in Windows 8.1 and will return // only Windows 8 from that version on, so use the kernel API function. pRtlGetVersion(reinterpret_cast<LPOSVERSIONINFO>(&result)); // always returns STATUS_SUCCESS -#else // !Q_OS_WINCE - GetVersionEx(&result); -#endif return result; } diff --git a/src/corelib/global/qsystemdetection.h b/src/corelib/global/qsystemdetection.h index aabe46f3c2..02e2f77c6b 100644 --- a/src/corelib/global/qsystemdetection.h +++ b/src/corelib/global/qsystemdetection.h @@ -166,6 +166,8 @@ # define Q_OS_QNX #elif defined(__INTEGRITY) # define Q_OS_INTEGRITY +#elif defined(__rtems__) +# define Q_OS_RTEMS #elif defined(VXWORKS) /* there is no "real" VxWorks define - this has to be set in the mkspec! */ # define Q_OS_VXWORKS #elif defined(__HAIKU__) @@ -176,6 +178,7 @@ #endif #if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) || defined(Q_OS_WINRT) +# define Q_OS_WINDOWS # define Q_OS_WIN #endif diff --git a/src/corelib/global/qtypeinfo.h b/src/corelib/global/qtypeinfo.h index 636dc24c07..30be47296e 100644 --- a/src/corelib/global/qtypeinfo.h +++ b/src/corelib/global/qtypeinfo.h @@ -213,7 +213,6 @@ Q_DECLARE_MOVABLE_CONTAINER(QList); Q_DECLARE_MOVABLE_CONTAINER(QVector); Q_DECLARE_MOVABLE_CONTAINER(QQueue); Q_DECLARE_MOVABLE_CONTAINER(QStack); -Q_DECLARE_MOVABLE_CONTAINER(QLinkedList); Q_DECLARE_MOVABLE_CONTAINER(QSet); #undef Q_DECLARE_MOVABLE_CONTAINER |