diff options
Diffstat (limited to 'src')
54 files changed, 208 insertions, 208 deletions
diff --git a/src/3rdparty/sha3/KeccakF-1600-interface.h b/src/3rdparty/sha3/KeccakF-1600-interface.h index ce2710eeb2..39caaaecbd 100644 --- a/src/3rdparty/sha3/KeccakF-1600-interface.h +++ b/src/3rdparty/sha3/KeccakF-1600-interface.h @@ -14,7 +14,11 @@ http://creativecommons.org/publicdomain/zero/1.0/ #ifndef _KeccakPermutationInterface_h_ #define _KeccakPermutationInterface_h_ +#include <private/qglobal_p.h> + +#if QT_CONFIG(sha3_fast) #include "KeccakF-1600-int-set.h" +#endif static void KeccakInitialize( void ); static void KeccakInitializeState(unsigned char *state); diff --git a/src/corelib/configure.json b/src/corelib/configure.json index b0c78f5122..d0a3a13e48 100644 --- a/src/corelib/configure.json +++ b/src/corelib/configure.json @@ -353,6 +353,7 @@ }, "qeventtransition": { "label": "QEventTransition class", + "condition": "features.statemachine", "output": [ "publicFeature" ] }, "sharedmemory": { @@ -557,6 +558,12 @@ "purpose": "Provides a framework for gestures.", "section": "Utilities", "output": [ "publicFeature", "feature" ] + }, + "sha3-fast": { + "label": "Speed optimized SHA3", + "purpose": "Optimizes SHA3 for speed instead of size.", + "section": "Utilities", + "output": [ "privateFeature" ] } }, diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h new file mode 100644 index 0000000000..38b0cf2abf --- /dev/null +++ b/src/corelib/global/qconfig-bootstrapped.h @@ -0,0 +1,95 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://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$ +** +****************************************************************************/ + +// +// 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. +// +// Despite its file name, this really is not a public header. +// It is an implementation detail of the private bootstrap library. +// + +#if 0 +// silence syncqt warnings +#pragma qt_sync_skip_header_check +#pragma qt_sync_stop_processing +#endif + +#ifdef QT_BOOTSTRAPPED + +#ifndef QT_NO_EXCEPTIONS +#define QT_NO_EXCEPTIONS +#endif + +#define QT_NO_USING_NAMESPACE +#define QT_NO_DEPRECATED + +#define QT_CRYPTOGRAPHICHASH_ONLY_SHA1 +#define QT_NO_DATASTREAM +#define QT_NO_LIBRARY +#define QT_FEATURE_library -1 +#define QT_NO_QOBJECT +#define QT_NO_SYSTEMLOCALE +#define QT_NO_THREAD +#define QT_NO_TRANSLATION +#define QT_FEATURE_translation -1 +#define QT_NO_GEOM_VARIANT + +#if defined(QT_BUILD_QMAKE) || defined(QT_BUILD_CONFIGURE) +#define QT_NO_COMPRESS +#define QT_JSON_READONLY +#define QT_NO_TEXTCODEC +#define QT_FEATURE_textcodec -1 +#else +#define QT_FEATURE_textcodec 1 +#define QT_NO_CODECS +#define QT_FEATURE_codecs -1 +#endif + +#if defined(QT_BUILD_QMAKE) +#define QT_NO_STANDARDPATHS +#endif + +#endif // QT_BOOTSTRAPPED diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index dd8b6110b3..8b67f0d3ef 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -56,7 +56,9 @@ */ #define QT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch)) -#ifndef QT_BOOTSTRAPPED +#ifdef QT_BOOTSTRAPPED +#include <QtCore/qconfig-bootstrapped.h> +#else #include <QtCore/qconfig.h> #include <QtCore/qtcore-config.h> #endif diff --git a/src/corelib/statemachine/qabstractstate.cpp b/src/corelib/statemachine/qabstractstate.cpp index 13b669d3f6..13bf41faa9 100644 --- a/src/corelib/statemachine/qabstractstate.cpp +++ b/src/corelib/statemachine/qabstractstate.cpp @@ -38,9 +38,6 @@ ****************************************************************************/ #include "qabstractstate.h" - -#ifndef QT_NO_STATEMACHINE - #include "qabstractstate_p.h" #include "qstate.h" #include "qstate_p.h" @@ -237,5 +234,3 @@ bool QAbstractState::event(QEvent *e) } QT_END_NAMESPACE - -#endif //QT_NO_STATEMACHINE diff --git a/src/corelib/statemachine/qabstractstate.h b/src/corelib/statemachine/qabstractstate.h index 24e312ac5b..02c7d9e830 100644 --- a/src/corelib/statemachine/qabstractstate.h +++ b/src/corelib/statemachine/qabstractstate.h @@ -42,10 +42,9 @@ #include <QtCore/qobject.h> -QT_BEGIN_NAMESPACE - +QT_REQUIRE_CONFIG(statemachine); -#ifndef QT_NO_STATEMACHINE +QT_BEGIN_NAMESPACE class QState; class QStateMachine; @@ -84,8 +83,6 @@ private: Q_DECLARE_PRIVATE(QAbstractState) }; -#endif //QT_NO_STATEMACHINE - QT_END_NAMESPACE #endif diff --git a/src/corelib/statemachine/qabstractstate_p.h b/src/corelib/statemachine/qabstractstate_p.h index 552125f95a..11befc187e 100644 --- a/src/corelib/statemachine/qabstractstate_p.h +++ b/src/corelib/statemachine/qabstractstate_p.h @@ -51,13 +51,11 @@ // We mean it. // -#include <QtCore/qglobal.h> - -#ifndef QT_NO_STATEMACHINE - #include <private/qobject_p.h> #include <QtCore/qabstractstate.h> +QT_REQUIRE_CONFIG(statemachine); + QT_BEGIN_NAMESPACE class QStateMachine; @@ -98,6 +96,4 @@ public: QT_END_NAMESPACE -#endif // QT_NO_STATEMACHINE - #endif // QABSTRACTSTATE_P_H diff --git a/src/corelib/statemachine/qabstracttransition.cpp b/src/corelib/statemachine/qabstracttransition.cpp index 42d1342e10..8c30d5f11c 100644 --- a/src/corelib/statemachine/qabstracttransition.cpp +++ b/src/corelib/statemachine/qabstracttransition.cpp @@ -38,9 +38,6 @@ ****************************************************************************/ #include "qabstracttransition.h" - -#ifndef QT_NO_STATEMACHINE - #include "qabstracttransition_p.h" #include "qabstractstate.h" #include "qhistorystate.h" @@ -434,5 +431,3 @@ bool QAbstractTransition::event(QEvent *e) } QT_END_NAMESPACE - -#endif //QT_NO_STATEMACHINE diff --git a/src/corelib/statemachine/qabstracttransition.h b/src/corelib/statemachine/qabstracttransition.h index 41acaa643b..b86d26e969 100644 --- a/src/corelib/statemachine/qabstracttransition.h +++ b/src/corelib/statemachine/qabstracttransition.h @@ -44,10 +44,9 @@ #include <QtCore/qlist.h> -QT_BEGIN_NAMESPACE - +QT_REQUIRE_CONFIG(statemachine); -#ifndef QT_NO_STATEMACHINE +QT_BEGIN_NAMESPACE class QEvent; class QAbstractState; @@ -113,8 +112,6 @@ private: Q_DECLARE_PRIVATE(QAbstractTransition) }; -#endif //QT_NO_STATEMACHINE - QT_END_NAMESPACE #endif diff --git a/src/corelib/statemachine/qabstracttransition_p.h b/src/corelib/statemachine/qabstracttransition_p.h index fd7a9dc311..e11514670e 100644 --- a/src/corelib/statemachine/qabstracttransition_p.h +++ b/src/corelib/statemachine/qabstracttransition_p.h @@ -57,6 +57,8 @@ #include <QtCore/qvector.h> #include <QtCore/qsharedpointer.h> +QT_REQUIRE_CONFIG(statemachine); + QT_BEGIN_NAMESPACE class QAbstractState; diff --git a/src/corelib/statemachine/qeventtransition.cpp b/src/corelib/statemachine/qeventtransition.cpp index ecf40e9c9c..cd0cfe2f85 100644 --- a/src/corelib/statemachine/qeventtransition.cpp +++ b/src/corelib/statemachine/qeventtransition.cpp @@ -38,9 +38,6 @@ ****************************************************************************/ #include "qeventtransition.h" - -#ifndef QT_NO_STATEMACHINE - #include "qeventtransition_p.h" #include "qstate.h" #include "qstate_p.h" @@ -255,5 +252,3 @@ bool QEventTransition::event(QEvent *e) } QT_END_NAMESPACE - -#endif //QT_NO_STATEMACHINE diff --git a/src/corelib/statemachine/qeventtransition.h b/src/corelib/statemachine/qeventtransition.h index 454ad1199c..3c66e72658 100644 --- a/src/corelib/statemachine/qeventtransition.h +++ b/src/corelib/statemachine/qeventtransition.h @@ -43,10 +43,9 @@ #include <QtCore/qabstracttransition.h> #include <QtCore/qcoreevent.h> -QT_BEGIN_NAMESPACE - +QT_REQUIRE_CONFIG(qeventtransition); -#ifndef QT_NO_STATEMACHINE +QT_BEGIN_NAMESPACE class QEventTransitionPrivate; class Q_CORE_EXPORT QEventTransition : public QAbstractTransition @@ -81,8 +80,6 @@ private: Q_DECLARE_PRIVATE(QEventTransition) }; -#endif //QT_NO_STATEMACHINE - QT_END_NAMESPACE #endif diff --git a/src/corelib/statemachine/qeventtransition_p.h b/src/corelib/statemachine/qeventtransition_p.h index 020a2f9cba..e30e12bc8d 100644 --- a/src/corelib/statemachine/qeventtransition_p.h +++ b/src/corelib/statemachine/qeventtransition_p.h @@ -53,6 +53,8 @@ #include "private/qabstracttransition_p.h" +QT_REQUIRE_CONFIG(qeventtransition); + QT_BEGIN_NAMESPACE class QEventTransition; diff --git a/src/corelib/statemachine/qfinalstate.cpp b/src/corelib/statemachine/qfinalstate.cpp index efcb364794..bef9fc4239 100644 --- a/src/corelib/statemachine/qfinalstate.cpp +++ b/src/corelib/statemachine/qfinalstate.cpp @@ -39,8 +39,6 @@ #include "qfinalstate_p.h" -#ifndef QT_NO_STATEMACHINE - QT_BEGIN_NAMESPACE /*! @@ -139,5 +137,3 @@ bool QFinalState::event(QEvent *e) } QT_END_NAMESPACE - -#endif //QT_NO_STATEMACHINE diff --git a/src/corelib/statemachine/qfinalstate.h b/src/corelib/statemachine/qfinalstate.h index 9b6b193231..1563bef397 100644 --- a/src/corelib/statemachine/qfinalstate.h +++ b/src/corelib/statemachine/qfinalstate.h @@ -42,9 +42,9 @@ #include <QtCore/qabstractstate.h> -QT_BEGIN_NAMESPACE +QT_REQUIRE_CONFIG(statemachine); -#ifndef QT_NO_STATEMACHINE +QT_BEGIN_NAMESPACE class QFinalStatePrivate; class Q_CORE_EXPORT QFinalState : public QAbstractState @@ -68,8 +68,6 @@ private: Q_DECLARE_PRIVATE(QFinalState) }; -#endif //QT_NO_STATEMACHINE - QT_END_NAMESPACE #endif diff --git a/src/corelib/statemachine/qfinalstate_p.h b/src/corelib/statemachine/qfinalstate_p.h index 74640289f1..57de703fe9 100644 --- a/src/corelib/statemachine/qfinalstate_p.h +++ b/src/corelib/statemachine/qfinalstate_p.h @@ -48,7 +48,7 @@ #include "qfinalstate.h" #include "private/qabstractstate_p.h" -#ifndef QT_NO_STATEMACHINE +QT_REQUIRE_CONFIG(statemachine); QT_BEGIN_NAMESPACE @@ -63,6 +63,4 @@ public: QT_END_NAMESPACE -#endif // QT_NO_STATEMACHINE - #endif // QFINALSTATE_P_H diff --git a/src/corelib/statemachine/qhistorystate.cpp b/src/corelib/statemachine/qhistorystate.cpp index 338c89c688..b1c5a92d00 100644 --- a/src/corelib/statemachine/qhistorystate.cpp +++ b/src/corelib/statemachine/qhistorystate.cpp @@ -38,9 +38,6 @@ ****************************************************************************/ #include "qhistorystate.h" - -#ifndef QT_NO_STATEMACHINE - #include "qhistorystate_p.h" QT_BEGIN_NAMESPACE @@ -313,5 +310,3 @@ bool QHistoryState::event(QEvent *e) */ QT_END_NAMESPACE - -#endif //QT_NO_STATEMACHINE diff --git a/src/corelib/statemachine/qhistorystate.h b/src/corelib/statemachine/qhistorystate.h index 89d4d7a9e4..c20053abf6 100644 --- a/src/corelib/statemachine/qhistorystate.h +++ b/src/corelib/statemachine/qhistorystate.h @@ -42,10 +42,9 @@ #include <QtCore/qabstractstate.h> -QT_BEGIN_NAMESPACE - +QT_REQUIRE_CONFIG(statemachine); -#ifndef QT_NO_STATEMACHINE +QT_BEGIN_NAMESPACE class QAbstractTransition; class QHistoryStatePrivate; @@ -91,8 +90,6 @@ private: Q_DECLARE_PRIVATE(QHistoryState) }; -#endif //QT_NO_STATEMACHINE - QT_END_NAMESPACE #endif diff --git a/src/corelib/statemachine/qhistorystate_p.h b/src/corelib/statemachine/qhistorystate_p.h index ae9ed431cb..4a4442d7dd 100644 --- a/src/corelib/statemachine/qhistorystate_p.h +++ b/src/corelib/statemachine/qhistorystate_p.h @@ -52,13 +52,12 @@ // #include "private/qabstractstate_p.h" - -#ifndef QT_NO_STATEMACHINE - #include <QtCore/qabstracttransition.h> #include <QtCore/qhistorystate.h> #include <QtCore/qlist.h> +QT_REQUIRE_CONFIG(statemachine); + QT_BEGIN_NAMESPACE class QHistoryStatePrivate : public QAbstractStatePrivate @@ -95,6 +94,4 @@ protected: QT_END_NAMESPACE -#endif // QT_NO_STATEMACHINE - #endif // QHISTORYSTATE_P_H diff --git a/src/corelib/statemachine/qsignaleventgenerator_p.h b/src/corelib/statemachine/qsignaleventgenerator_p.h index 92b1ee3b70..271f6317bd 100644 --- a/src/corelib/statemachine/qsignaleventgenerator_p.h +++ b/src/corelib/statemachine/qsignaleventgenerator_p.h @@ -54,6 +54,8 @@ #include <QtCore/private/qglobal_p.h> #include <QtCore/qobject.h> +QT_REQUIRE_CONFIG(statemachine); + QT_BEGIN_NAMESPACE class QStateMachine; diff --git a/src/corelib/statemachine/qsignaltransition.cpp b/src/corelib/statemachine/qsignaltransition.cpp index c4ba8e5315..3b219bda53 100644 --- a/src/corelib/statemachine/qsignaltransition.cpp +++ b/src/corelib/statemachine/qsignaltransition.cpp @@ -38,9 +38,6 @@ ****************************************************************************/ #include "qsignaltransition.h" - -#ifndef QT_NO_STATEMACHINE - #include "qsignaltransition_p.h" #include "qstate.h" #include "qstate_p.h" @@ -287,5 +284,3 @@ void QSignalTransitionPrivate::callOnTransition(QEvent *e) QT_END_NAMESPACE - -#endif //QT_NO_STATEMACHINE diff --git a/src/corelib/statemachine/qsignaltransition.h b/src/corelib/statemachine/qsignaltransition.h index d7cf8584da..97c2916d9a 100644 --- a/src/corelib/statemachine/qsignaltransition.h +++ b/src/corelib/statemachine/qsignaltransition.h @@ -43,10 +43,9 @@ #include <QtCore/qabstracttransition.h> #include <QtCore/qmetaobject.h> -QT_BEGIN_NAMESPACE - +QT_REQUIRE_CONFIG(statemachine); -#ifndef QT_NO_STATEMACHINE +QT_BEGIN_NAMESPACE class QSignalTransitionPrivate; class Q_CORE_EXPORT QSignalTransition : public QAbstractTransition @@ -95,8 +94,6 @@ private: Q_DECLARE_PRIVATE(QSignalTransition) }; -#endif //QT_NO_STATEMACHINE - QT_END_NAMESPACE #endif diff --git a/src/corelib/statemachine/qsignaltransition_p.h b/src/corelib/statemachine/qsignaltransition_p.h index 6820bf3bcb..f270a5be4a 100644 --- a/src/corelib/statemachine/qsignaltransition_p.h +++ b/src/corelib/statemachine/qsignaltransition_p.h @@ -53,6 +53,8 @@ #include "private/qabstracttransition_p.h" +QT_REQUIRE_CONFIG(statemachine); + QT_BEGIN_NAMESPACE class QSignalTransition; diff --git a/src/corelib/statemachine/qstate.cpp b/src/corelib/statemachine/qstate.cpp index cae6474c32..48456424cf 100644 --- a/src/corelib/statemachine/qstate.cpp +++ b/src/corelib/statemachine/qstate.cpp @@ -38,9 +38,6 @@ ****************************************************************************/ #include "qstate_p.h" - -#ifndef QT_NO_STATEMACHINE - #include "qhistorystate.h" #include "qhistorystate_p.h" #include "qabstracttransition.h" @@ -602,5 +599,3 @@ bool QState::event(QEvent *e) */ QT_END_NAMESPACE - -#endif //QT_NO_STATEMACHINE diff --git a/src/corelib/statemachine/qstate.h b/src/corelib/statemachine/qstate.h index 7a9dc9c132..33f84c2de0 100644 --- a/src/corelib/statemachine/qstate.h +++ b/src/corelib/statemachine/qstate.h @@ -44,10 +44,9 @@ #include <QtCore/qlist.h> #include <QtCore/qmetaobject.h> -QT_BEGIN_NAMESPACE - +QT_REQUIRE_CONFIG(statemachine); -#ifndef QT_NO_STATEMACHINE +QT_BEGIN_NAMESPACE class QAbstractTransition; class QSignalTransition; @@ -130,8 +129,6 @@ private: Q_DECLARE_PRIVATE(QState) }; -#endif //QT_NO_STATEMACHINE - QT_END_NAMESPACE #endif diff --git a/src/corelib/statemachine/qstate_p.h b/src/corelib/statemachine/qstate_p.h index 913657e53b..7fb40392e7 100644 --- a/src/corelib/statemachine/qstate_p.h +++ b/src/corelib/statemachine/qstate_p.h @@ -59,7 +59,7 @@ #include <QtCore/qpointer.h> #include <QtCore/qvariant.h> -#ifndef QT_NO_STATEMACHINE +QT_REQUIRE_CONFIG(statemachine); QT_BEGIN_NAMESPACE @@ -124,6 +124,4 @@ public: QT_END_NAMESPACE -#endif // QT_NO_STATEMACHINE - #endif diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index db395b24dd..433f595611 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -38,9 +38,6 @@ ****************************************************************************/ #include "qstatemachine.h" - -#ifndef QT_NO_STATEMACHINE - #include "qstate.h" #include "qstate_p.h" #include "qstatemachine_p.h" @@ -3235,5 +3232,3 @@ QT_END_NAMESPACE #include "qstatemachine.moc" #include "moc_qstatemachine.cpp" - -#endif //QT_NO_STATEMACHINE diff --git a/src/corelib/statemachine/qstatemachine.h b/src/corelib/statemachine/qstatemachine.h index 031d9ceee2..4f31252eed 100644 --- a/src/corelib/statemachine/qstatemachine.h +++ b/src/corelib/statemachine/qstatemachine.h @@ -48,10 +48,9 @@ #include <QtCore/qset.h> #include <QtCore/qvariant.h> -QT_BEGIN_NAMESPACE - +QT_REQUIRE_CONFIG(statemachine); -#ifndef QT_NO_STATEMACHINE +QT_BEGIN_NAMESPACE class QStateMachinePrivate; class QAbstractAnimation; @@ -183,8 +182,6 @@ private: Q_PRIVATE_SLOT(d_func(), void _q_killDelayedEventTimer(int, int)) }; -#endif //QT_NO_STATEMACHINE - QT_END_NAMESPACE #endif diff --git a/src/corelib/statemachine/qstatemachine_p.h b/src/corelib/statemachine/qstatemachine_p.h index 45634e27fb..9418813afd 100644 --- a/src/corelib/statemachine/qstatemachine_p.h +++ b/src/corelib/statemachine/qstatemachine_p.h @@ -63,6 +63,8 @@ #include <QtCore/qvector.h> #include <private/qfreelist_p.h> +QT_REQUIRE_CONFIG(statemachine); + QT_BEGIN_NAMESPACE class QEvent; diff --git a/src/corelib/statemachine/statemachine.pri b/src/corelib/statemachine/statemachine.pri index 52df10a3bc..ee701ebc37 100644 --- a/src/corelib/statemachine/statemachine.pri +++ b/src/corelib/statemachine/statemachine.pri @@ -1,3 +1,5 @@ +!qtConfig(statemachine): return() + HEADERS += $$PWD/qstatemachine.h \ $$PWD/qstatemachine_p.h \ $$PWD/qsignaleventgenerator_p.h \ diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h index 2fd4be00a5..3b6c85ca8a 100644 --- a/src/corelib/tools/qsimd_p.h +++ b/src/corelib/tools/qsimd_p.h @@ -471,6 +471,9 @@ static inline quint64 qCpuFeatures() #define ALIGNMENT_PROLOGUE_32BYTES(ptr, i, length) \ for (; i < static_cast<int>(qMin(static_cast<quintptr>(length), ((8 - ((reinterpret_cast<quintptr>(ptr) >> 2) & 0x7)) & 0x7))); ++i) +#define SIMD_EPILOGUE(i, length, max) \ + for (int _i = 0; _i < max && i < length; ++i, ++_i) + QT_END_NAMESPACE #endif // QSIMD_P_H diff --git a/src/gui/configure.json b/src/gui/configure.json index d8969a1e4e..8df63c8ee0 100644 --- a/src/gui/configure.json +++ b/src/gui/configure.json @@ -54,6 +54,14 @@ "-lbcm_host" ] }, + "direct2d": { + "label": "Direct 2D", + "export": "", + "test": "qpa/direct2d", + "sources": [ + "-ld2d1 -ldwrite -ld3d11" + ] + }, "directfb": { "label": "DirectFB", "test": "qpa/directfb", @@ -294,12 +302,6 @@ }, "tests": { - "direct2d": { - "label": "Direct 2D", - "type": "compile", - "test": "qpa/direct2d", - "use": "direct2d" - }, "directwrite2": { "label": "DirectWrite 2", "type": "compile", @@ -442,7 +444,7 @@ "direct2d": { "label": "Direct 2D", "autoDetect": false, - "condition": "tests.direct2d", + "condition": "config.win32 && libs.direct2d", "output": [ "privateFeature" ] }, "evdev": { diff --git a/src/gui/image/qimage_ssse3.cpp b/src/gui/image/qimage_ssse3.cpp index 0fa0eecd80..9cdfba20e3 100644 --- a/src/gui/image/qimage_ssse3.cpp +++ b/src/gui/image/qimage_ssse3.cpp @@ -50,15 +50,11 @@ QT_BEGIN_NAMESPACE // dst must be at least len * 4 bytes Q_GUI_EXPORT void QT_FASTCALL qt_convert_rgb888_to_rgb32_ssse3(quint32 *dst, const uchar *src, int len) { - quint32 *const end = dst + len; + int i = 0; - // Prologue, align dst to 16 bytes. The alignment is done on dst because it has 4 store() - // for each 3 load() of src. - const int offsetToAlignOn16Bytes = (4 - ((reinterpret_cast<quintptr>(dst) >> 2) & 0x3)) & 0x3; - const int prologLength = qMin(len, offsetToAlignOn16Bytes); - - for (int i = 0; i < prologLength; ++i) { - *dst++ = qRgb(src[0], src[1], src[2]); + // Prologue, align dst to 16 bytes. + ALIGNMENT_PROLOGUE_16BYTES(dst, i, len) { + dst[i] = qRgb(src[0], src[1], src[2]); src += 3; } @@ -72,10 +68,9 @@ Q_GUI_EXPORT void QT_FASTCALL qt_convert_rgb888_to_rgb32_ssse3(quint32 *dst, con const __m128i alphaMask = _mm_set1_epi32(0xff000000); const __m128i *inVectorPtr = (const __m128i *)src; - __m128i *dstVectorPtr = (__m128i *)dst; + __m128i *dstVectorPtr = (__m128i *)(dst + i); - const int simdRoundCount = (len - prologLength) / 16; // one iteration in the loop converts 16 pixels - for (int i = 0; i < simdRoundCount; ++i) { + for (; i < (len - 15); i += 16) { // one iteration in the loop converts 16 pixels /* RGB888 has 5 pixels per vector, + 1 byte from the next pixel. The idea here is to load vectors of RGB888 and use palignr to select a vector out of two vectors. @@ -117,10 +112,9 @@ Q_GUI_EXPORT void QT_FASTCALL qt_convert_rgb888_to_rgb32_ssse3(quint32 *dst, con ++dstVectorPtr; } src = (const uchar *)inVectorPtr; - dst = (quint32 *)dstVectorPtr; - while (dst != end) { - *dst++ = qRgb(src[0], src[1], src[2]); + SIMD_EPILOGUE(i, len, 15) { + dst[i] = qRgb(src[0], src[1], src[2]); src += 3; } } diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h index db6eb92916..22fcbcb2a8 100644 --- a/src/gui/painting/qcolor.h +++ b/src/gui/painting/qcolor.h @@ -67,18 +67,18 @@ public: enum Spec { Invalid, Rgb, Hsv, Cmyk, Hsl }; enum NameFormat { HexRgb, HexArgb }; - QColor() Q_DECL_NOTHROW; + inline QColor() Q_DECL_NOTHROW; QColor(Qt::GlobalColor color) Q_DECL_NOTHROW; - QColor(int r, int g, int b, int a = 255); + inline QColor(int r, int g, int b, int a = 255); QColor(QRgb rgb) Q_DECL_NOTHROW; QColor(QRgba64 rgba64) Q_DECL_NOTHROW; - QColor(const QString& name); - QColor(const char *aname) : QColor(QLatin1String(aname)) {} - QColor(QLatin1String name); + inline QColor(const QString& name); + inline QColor(const char *aname) : QColor(QLatin1String(aname)) {} + inline QColor(QLatin1String name); QColor(Spec spec) Q_DECL_NOTHROW; #if QT_VERSION < QT_VERSION_CHECK(6,0,0) - QColor(const QColor &color) Q_DECL_NOTHROW; // ### Qt 6: remove all of these, the trivial ones are fine. + inline QColor(const QColor &color) Q_DECL_NOTHROW; // ### Qt 6: remove all of these, the trivial ones are fine. # ifdef Q_COMPILER_RVALUE_REFS QColor(QColor &&other) Q_DECL_NOTHROW : cspec(other.cspec), ct(other.ct) {} QColor &operator=(QColor &&other) Q_DECL_NOTHROW diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 3e01d34cb2..928a56fd2f 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -603,7 +603,7 @@ static inline void qConvertARGB32PMToARGB64PM_sse2(QRgba64 *buffer, const uint * buffer += 2; } - for (; i < count; ++i) { + SIMD_EPILOGUE(i, count, 3) { uint s = *src++; if (RGBA) s = RGBA2ARGB(s); @@ -766,7 +766,7 @@ static inline void qConvertA2RGB30PMToARGB64PM_sse2(QRgba64 *buffer, const uint buffer += 2; } - for (; i < count; ++i) + SIMD_EPILOGUE(i, count, 3) *buffer++ = qConvertA2rgb30ToRgb64<PixelOrder>(*src++); } #endif @@ -1397,7 +1397,7 @@ static inline void qConvertARGB64PMToA2RGB30PM_sse2(uint *dest, const QRgba64 *b } } - for (; i < count; ++i) + SIMD_EPILOGUE(i, count, 15) *dest++ = qConvertRgb64ToRgb30<PixelOrder>(*buffer++); } #endif diff --git a/src/gui/painting/qdrawhelper_avx2.cpp b/src/gui/painting/qdrawhelper_avx2.cpp index b3fa380dc0..acc9bc7ba1 100644 --- a/src/gui/painting/qdrawhelper_avx2.cpp +++ b/src/gui/painting/qdrawhelper_avx2.cpp @@ -201,7 +201,7 @@ inline static void BLEND_SOURCE_OVER_ARGB32_WITH_CONST_ALPHA_AVX2(quint32 *dst, _mm256_store_si256((__m256i *)&dst[x], dstVector); } } - for (; x < length; ++x) + SIMD_EPILOGUE(x, length, 7) blend_pixel(dst[x], src[x], const_alpha); } @@ -275,7 +275,7 @@ void qt_blend_rgb32_on_rgb32_avx2(uchar *destPixels, int dbpl, } // 3) Epilogue - for (; x < w; ++x) + SIMD_EPILOGUE(x, w, 7) dst[x] = INTERPOLATE_PIXEL_255(src[x], const_alpha, dst[x], one_minus_const_alpha); srcPixels += sbpl; @@ -322,7 +322,7 @@ void QT_FASTCALL comp_func_Source_avx2(uint *dst, const uint *src, int length, u } // 3) Epilogue - for (; x < length; ++x) + SIMD_EPILOGUE(x, length, 7) dst[x] = INTERPOLATE_PIXEL_255(src[x], const_alpha, dst[x], ialpha); } } @@ -353,7 +353,7 @@ void QT_FASTCALL comp_func_solid_SourceOver_avx2(uint *destPixels, int length, u dstVector = _mm256_add_epi8(colorVector, dstVector); _mm256_store_si256((__m256i *)&dst[x], dstVector); } - for (; x < length; ++x) + SIMD_EPILOGUE(x, length, 7) destPixels[x] = color + BYTE_MUL(destPixels[x], minusAlphaOfColor); } } diff --git a/src/gui/painting/qdrawhelper_neon.cpp b/src/gui/painting/qdrawhelper_neon.cpp index f5b794ace6..d51b43961c 100644 --- a/src/gui/painting/qdrawhelper_neon.cpp +++ b/src/gui/painting/qdrawhelper_neon.cpp @@ -817,7 +817,7 @@ void QT_FASTCALL comp_func_solid_SourceOver_neon(uint *destPixels, int length, u vst1q_u32(&dst[x], colorPlusBlendedPixels); } - for (;x < length; ++x) + SIMD_EPILOGUE(x, length, 3) destPixels[x] = color + BYTE_MUL(destPixels[x], minusAlphaOfColor); } } @@ -869,7 +869,7 @@ void QT_FASTCALL comp_func_Plus_neon(uint *dst, const uint *src, int length, uin vst1q_u32((uint32_t *)&dst[x], vcombine_u32(result32_low, result32_high)); } - for (; x < length; ++x) + SIMD_EPILOGUE(x, length, 3) dst[x] = comp_func_Plus_one_pixel_const_alpha(dst[x], src[x], const_alpha, one_minus_const_alpha); } } diff --git a/src/gui/painting/qdrawhelper_sse2.cpp b/src/gui/painting/qdrawhelper_sse2.cpp index 03abeed440..5ff08e8153 100644 --- a/src/gui/painting/qdrawhelper_sse2.cpp +++ b/src/gui/painting/qdrawhelper_sse2.cpp @@ -126,9 +126,8 @@ void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl, _mm_store_si128((__m128i *)&dst[x], result); } } - for (; x<w; ++x) { + SIMD_EPILOGUE(x, w, 3) dst[x] = INTERPOLATE_PIXEL_255(src[x], const_alpha, dst[x], one_minus_const_alpha); - } dst = (quint32 *)(((uchar *) dst) + dbpl); src = (const quint32 *)(((const uchar *) src) + sbpl); } @@ -177,7 +176,7 @@ void QT_FASTCALL comp_func_Plus_sse2(uint *dst, const uint *src, int length, uin } // 3) Epilogue: - for (; x < length; ++x) + SIMD_EPILOGUE(x, length, 3) dst[x] = comp_func_Plus_one_pixel(dst[x], src[x]); } else { const int one_minus_const_alpha = 255 - const_alpha; @@ -201,7 +200,7 @@ void QT_FASTCALL comp_func_Plus_sse2(uint *dst, const uint *src, int length, uin } // 3) Epilogue: - for (; x < length; ++x) + SIMD_EPILOGUE(x, length, 3) dst[x] = comp_func_Plus_one_pixel_const_alpha(dst[x], src[x], const_alpha, one_minus_const_alpha); } } @@ -232,7 +231,7 @@ void QT_FASTCALL comp_func_Source_sse2(uint *dst, const uint *src, int length, u } // 3) Epilogue - for (; x < length; ++x) + SIMD_EPILOGUE(x, length, 3) dst[x] = INTERPOLATE_PIXEL_255(src[x], const_alpha, dst[x], ialpha); } } @@ -313,7 +312,7 @@ void QT_FASTCALL comp_func_solid_SourceOver_sse2(uint *destPixels, int length, u dstVector = _mm_add_epi8(colorVector, dstVector); _mm_store_si128((__m128i *)&dst[x], dstVector); } - for (;x < length; ++x) + SIMD_EPILOGUE(x, length, 3) destPixels[x] = color + BYTE_MUL(destPixels[x], minusAlphaOfColor); } } @@ -592,7 +591,7 @@ void qt_scale_image_argb32_on_argb32_sse2(uchar *destPixels, int dbpl, BLEND_SOURCE_OVER_ARGB32_SSE2_helper(dst, srcVector, nullVector, half, one, colorMask, alphaMask); } - for (; x<w; x++) { + SIMD_EPILOGUE(x, w, 3) { uint s = src[(basex + x*ix) >> 16]; dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s)); } diff --git a/src/gui/painting/qdrawhelper_ssse3.cpp b/src/gui/painting/qdrawhelper_ssse3.cpp index 2026a4e656..45ecc8b422 100644 --- a/src/gui/painting/qdrawhelper_ssse3.cpp +++ b/src/gui/painting/qdrawhelper_ssse3.cpp @@ -215,7 +215,7 @@ static inline void store_uint24_ssse3(uchar *dst, const uint *src, int len) dst24 = reinterpret_cast<quint24*>(dstVectorPtr); src = reinterpret_cast<const uint*>(inVectorPtr); - for (; i < len; ++i) + SIMD_EPILOGUE(i, len, 15) *dst24++ = quint24(*src++); } diff --git a/src/gui/painting/qdrawingprimitive_sse2_p.h b/src/gui/painting/qdrawingprimitive_sse2_p.h index 7affc63b32..93e4b9f572 100644 --- a/src/gui/painting/qdrawingprimitive_sse2_p.h +++ b/src/gui/painting/qdrawingprimitive_sse2_p.h @@ -178,7 +178,7 @@ QT_BEGIN_NAMESPACE const __m128i srcVector = _mm_loadu_si128((const __m128i *)&src[x]); \ BLEND_SOURCE_OVER_ARGB32_SSE2_helper(dst, srcVector, nullVector, half, one, colorMask, alphaMask) \ } \ - for (; x < length; ++x) { \ + SIMD_EPILOGUE(x, length, 3) { \ blend_pixel(dst[x], src[x]); \ } \ } @@ -219,7 +219,7 @@ QT_BEGIN_NAMESPACE _mm_store_si128((__m128i *)&dst[x], result); \ } \ } \ - for (; x < length; ++x) { \ + SIMD_EPILOGUE(x, length, 3) { \ blend_pixel(dst[x], src[x], const_alpha); \ } \ } diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.cpp b/src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.cpp index 2d107a6e27..b5065ba380 100644 --- a/src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.cpp +++ b/src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.cpp @@ -80,7 +80,7 @@ public: bitmap.Reset(); D2D1_SIZE_U size = { - width, height + UINT32(width), UINT32(height) }; HRESULT hr = deviceContext->get()->CreateBitmap(size, data, pitch, diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp index bf96a7d683..f6b58d1ba6 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp @@ -86,7 +86,7 @@ int QEglFSKmsDevice::crtcForConnector(drmModeResPtr resources, drmModeConnectorP return -1; } -static const char * const connector_type_names[] = { +static const char * const connector_type_names[] = { // must match DRM_MODE_CONNECTOR_* "None", "VGA", "DVI", @@ -102,6 +102,8 @@ static const char * const connector_type_names[] = { "HDMI", "TV", "eDP", + "Virtual", + "DSI" }; static QByteArray nameForConnector(const drmModeConnectorPtr connector) diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index 8a1e1fd6e3..0e0a617f2b 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -11,22 +11,10 @@ MODULE_DEFINES = \ QT_VERSION_MINOR=$$QT_MINOR_VERSION \ QT_VERSION_PATCH=$$QT_PATCH_VERSION \ QT_BOOTSTRAPPED \ - QT_LITE_UNICODE \ - QT_NO_CAST_TO_ASCII \ - QT_NO_CODECS \ - QT_NO_DATASTREAM \ - QT_NO_LIBRARY \ - QT_NO_QOBJECT \ - QT_NO_SYSTEMLOCALE \ - QT_NO_THREAD \ - QT_NO_UNICODETABLES \ - QT_NO_USING_NAMESPACE \ - QT_NO_DEPRECATED \ - QT_NO_TRANSLATION + QT_NO_CAST_TO_ASCII DEFINES += \ $$MODULE_DEFINES \ - QT_CRYPTOGRAPHICHASH_ONLY_SHA1 \ QT_NO_FOREACH \ QT_NO_CAST_FROM_ASCII diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index 815ae7fe33..b94aa826d3 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -608,7 +608,7 @@ void qt_init_tooltip_palette() #endif } -#ifndef QT_NO_STATEMACHINE +#if QT_CONFIG(statemachine) void qRegisterGuiStateMachine(); void qUnregisterGuiStateMachine(); #endif @@ -634,7 +634,7 @@ void QApplicationPrivate::initialize() if (application_type != QApplicationPrivate::Tty) (void) QApplication::style(); // trigger creation of application style -#ifndef QT_NO_STATEMACHINE +#if QT_CONFIG(statemachine) // trigger registering of QStateMachine's GUI types qRegisterGuiStateMachine(); #endif @@ -862,7 +862,7 @@ QApplication::~QApplication() QApplicationPrivate::enabledAnimations = QPlatformTheme::GeneralUiEffect; QApplicationPrivate::widgetCount = false; -#ifndef QT_NO_STATEMACHINE +#if QT_CONFIG(statemachine) // trigger unregistering of QStateMachine's GUI types qUnregisterGuiStateMachine(); #endif diff --git a/src/widgets/statemachine/qbasickeyeventtransition.cpp b/src/widgets/statemachine/qbasickeyeventtransition.cpp index fe2edca613..c833e64822 100644 --- a/src/widgets/statemachine/qbasickeyeventtransition.cpp +++ b/src/widgets/statemachine/qbasickeyeventtransition.cpp @@ -39,8 +39,6 @@ #include "qbasickeyeventtransition_p.h" -#ifndef QT_NO_STATEMACHINE - #include <QtGui/qevent.h> #include <qdebug.h> #include <private/qabstracttransition_p.h> @@ -204,5 +202,3 @@ void QBasicKeyEventTransition::onTransition(QEvent *) QT_END_NAMESPACE #include "moc_qbasickeyeventtransition_p.cpp" - -#endif //QT_NO_STATEMACHINE diff --git a/src/widgets/statemachine/qbasickeyeventtransition_p.h b/src/widgets/statemachine/qbasickeyeventtransition_p.h index 576c5beb5d..d3b90f6104 100644 --- a/src/widgets/statemachine/qbasickeyeventtransition_p.h +++ b/src/widgets/statemachine/qbasickeyeventtransition_p.h @@ -51,13 +51,11 @@ // We mean it. // -#include <QtWidgets/private/qtwidgetsglobal_p.h> #include <QtCore/qabstracttransition.h> - -#ifndef QT_NO_STATEMACHINE - #include <QtGui/qevent.h> +QT_REQUIRE_CONFIG(qeventtransition); + QT_BEGIN_NAMESPACE class QBasicKeyEventTransitionPrivate; @@ -92,6 +90,4 @@ private: QT_END_NAMESPACE -#endif //QT_NO_STATEMACHINE - #endif diff --git a/src/widgets/statemachine/qbasicmouseeventtransition.cpp b/src/widgets/statemachine/qbasicmouseeventtransition.cpp index 39c69b95f5..f404c33a2f 100644 --- a/src/widgets/statemachine/qbasicmouseeventtransition.cpp +++ b/src/widgets/statemachine/qbasicmouseeventtransition.cpp @@ -38,9 +38,6 @@ ****************************************************************************/ #include "qbasicmouseeventtransition_p.h" - -#ifndef QT_NO_STATEMACHINE - #include <QtGui/qevent.h> #include <QtGui/qpainterpath.h> #include <qdebug.h> @@ -209,5 +206,3 @@ void QBasicMouseEventTransition::onTransition(QEvent *) QT_END_NAMESPACE #include "moc_qbasicmouseeventtransition_p.cpp" - -#endif //QT_NO_STATEMACHINE diff --git a/src/widgets/statemachine/qbasicmouseeventtransition_p.h b/src/widgets/statemachine/qbasicmouseeventtransition_p.h index 72320a52dc..d6d37eb03e 100644 --- a/src/widgets/statemachine/qbasicmouseeventtransition_p.h +++ b/src/widgets/statemachine/qbasicmouseeventtransition_p.h @@ -51,13 +51,11 @@ // We mean it. // -#include <QtWidgets/private/qtwidgetsglobal_p.h> #include <QtCore/qabstracttransition.h> - -#ifndef QT_NO_STATEMACHINE - #include <QtGui/qevent.h> +QT_REQUIRE_CONFIG(qeventtransition); + QT_BEGIN_NAMESPACE class QPainterPath; @@ -95,6 +93,4 @@ private: QT_END_NAMESPACE -#endif //QT_NO_STATEMACHINE - #endif diff --git a/src/widgets/statemachine/qguistatemachine.cpp b/src/widgets/statemachine/qguistatemachine.cpp index c909048213..8d722a4475 100644 --- a/src/widgets/statemachine/qguistatemachine.cpp +++ b/src/widgets/statemachine/qguistatemachine.cpp @@ -38,9 +38,6 @@ ****************************************************************************/ #include <QtCore/qstatemachine.h> - -#ifndef QT_NO_STATEMACHINE - #include <private/qstatemachine_p.h> #include <QtGui/qevent.h> #include <QtWidgets/qgraphicssceneevent.h> @@ -471,5 +468,3 @@ void qUnregisterGuiStateMachine() Q_DESTRUCTOR_FUNCTION(qUnregisterGuiStateMachine) QT_END_NAMESPACE - -#endif //QT_NO_STATEMACHINE diff --git a/src/widgets/statemachine/qkeyeventtransition.cpp b/src/widgets/statemachine/qkeyeventtransition.cpp index 0e9f8458c2..1578f294d5 100644 --- a/src/widgets/statemachine/qkeyeventtransition.cpp +++ b/src/widgets/statemachine/qkeyeventtransition.cpp @@ -38,9 +38,6 @@ ****************************************************************************/ #include "qkeyeventtransition.h" - -#ifndef QT_NO_STATEMACHINE - #include "qbasickeyeventtransition_p.h" #include <QtCore/qstatemachine.h> #include <private/qeventtransition_p.h> @@ -175,5 +172,3 @@ void QKeyEventTransition::onTransition(QEvent *event) QT_END_NAMESPACE #include "moc_qkeyeventtransition.cpp" - -#endif //QT_NO_STATEMACHINE diff --git a/src/widgets/statemachine/qkeyeventtransition.h b/src/widgets/statemachine/qkeyeventtransition.h index 1e3f02acd8..23ce3c40be 100644 --- a/src/widgets/statemachine/qkeyeventtransition.h +++ b/src/widgets/statemachine/qkeyeventtransition.h @@ -43,10 +43,9 @@ #include <QtWidgets/qtwidgetsglobal.h> #include <QtCore/qeventtransition.h> -QT_BEGIN_NAMESPACE - +QT_REQUIRE_CONFIG(qeventtransition); -#ifndef QT_NO_STATEMACHINE +QT_BEGIN_NAMESPACE class QKeyEventTransitionPrivate; class Q_WIDGETS_EXPORT QKeyEventTransition : public QEventTransition @@ -75,8 +74,6 @@ private: Q_DECLARE_PRIVATE(QKeyEventTransition) }; -#endif //QT_NO_STATEMACHINE - QT_END_NAMESPACE #endif diff --git a/src/widgets/statemachine/qmouseeventtransition.cpp b/src/widgets/statemachine/qmouseeventtransition.cpp index 047a9779fe..c58dae55a3 100644 --- a/src/widgets/statemachine/qmouseeventtransition.cpp +++ b/src/widgets/statemachine/qmouseeventtransition.cpp @@ -38,9 +38,6 @@ ****************************************************************************/ #include "qmouseeventtransition.h" - -#ifndef QT_NO_STATEMACHINE - #include "qbasicmouseeventtransition_p.h" #include <QtCore/qstatemachine.h> #include <QtGui/qpainterpath.h> @@ -203,5 +200,3 @@ void QMouseEventTransition::onTransition(QEvent *event) QT_END_NAMESPACE #include "moc_qmouseeventtransition.cpp" - -#endif //QT_NO_STATEMACHINE diff --git a/src/widgets/statemachine/qmouseeventtransition.h b/src/widgets/statemachine/qmouseeventtransition.h index 43185b140d..3f40224d8c 100644 --- a/src/widgets/statemachine/qmouseeventtransition.h +++ b/src/widgets/statemachine/qmouseeventtransition.h @@ -43,10 +43,9 @@ #include <QtWidgets/qtwidgetsglobal.h> #include <QtCore/qeventtransition.h> -QT_BEGIN_NAMESPACE - +QT_REQUIRE_CONFIG(qeventtransition); -#ifndef QT_NO_STATEMACHINE +QT_BEGIN_NAMESPACE class QMouseEventTransitionPrivate; class QPainterPath; @@ -79,8 +78,6 @@ private: Q_DECLARE_PRIVATE(QMouseEventTransition) }; -#endif //QT_NO_STATEMACHINE - QT_END_NAMESPACE #endif diff --git a/src/widgets/statemachine/statemachine.pri b/src/widgets/statemachine/statemachine.pri index 2eb1e05be6..7b6407bde5 100644 --- a/src/widgets/statemachine/statemachine.pri +++ b/src/widgets/statemachine/statemachine.pri @@ -1,5 +1,8 @@ -SOURCES += $$PWD/qguistatemachine.cpp -!contains(DEFINES, QT_NO_STATEMACHINE_EVENTFILTER) { + +qtConfig(statemachine): \ + SOURCES += $$PWD/qguistatemachine.cpp + +qtConfig(qeventtransition) { HEADERS += \ $$PWD/qkeyeventtransition.h \ $$PWD/qmouseeventtransition.h \ |