From 4a86cbe2ca426143bac4b533a1949a1e1514d65e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 6 May 2016 11:18:06 +0200 Subject: QAccessibleQuickItem: Implement QAccessibleInterface::window(). The window is required to be able to determine the correct scale factor for the screen when High DPI scaling is active. Task-number: QTBUG-52943 Change-Id: If74914659bd64395db23ccfc752ee35e8d43592f Reviewed-by: Frederik Gladhorn --- src/quick/accessible/qaccessiblequickitem.cpp | 5 +++++ src/quick/accessible/qaccessiblequickitem_p.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/quick/accessible/qaccessiblequickitem.cpp b/src/quick/accessible/qaccessiblequickitem.cpp index 44a2caecec..2ce914c0b6 100644 --- a/src/quick/accessible/qaccessiblequickitem.cpp +++ b/src/quick/accessible/qaccessiblequickitem.cpp @@ -48,6 +48,11 @@ QAccessibleQuickItem::QAccessibleQuickItem(QQuickItem *item) { } +QWindow *QAccessibleQuickItem::window() const +{ + return item()->window(); +} + int QAccessibleQuickItem::childCount() const { return childItems().count(); diff --git a/src/quick/accessible/qaccessiblequickitem_p.h b/src/quick/accessible/qaccessiblequickitem_p.h index 1ec569731e..af9f8db249 100644 --- a/src/quick/accessible/qaccessiblequickitem_p.h +++ b/src/quick/accessible/qaccessiblequickitem_p.h @@ -60,6 +60,8 @@ class QAccessibleQuickItem : public QAccessibleObject, public QAccessibleActionI public: QAccessibleQuickItem(QQuickItem *item); + QWindow *window() const Q_DECL_OVERRIDE; + QRect rect() const; QRect viewRect() const; -- cgit v1.2.3 From 65e642f13d5e21d104806179b73dddfeb7b6dc81 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 4 May 2016 13:51:05 +0200 Subject: Make it possible to call some benchmark functions directly Some benchmarks - such as "elements" - rely on QQmlMetaType::qmlTypeNames(), which is implicitly populated when other benchmarks import for example QtQuick. However when calling them directly, the benchmark data set is much smaller. Therefore let's add QtQuick to the "base" set that is always available. Change-Id: I4b3696a426854195deb1c31ad24d80427da7b340 Reviewed-by: Robin Burchell --- tests/benchmarks/qml/creation/tst_creation.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/benchmarks/qml/creation/tst_creation.cpp b/tests/benchmarks/qml/creation/tst_creation.cpp index 4b985d00f1..38ab577120 100644 --- a/tests/benchmarks/qml/creation/tst_creation.cpp +++ b/tests/benchmarks/qml/creation/tst_creation.cpp @@ -100,6 +100,12 @@ public: tst_creation::tst_creation() { qmlRegisterType("Qt.test", 1, 0, "TestType"); + + // Ensure QtQuick is loaded and imported. Some benchmark like elements() rely on QQmlMetaType::qmlTypeNames() to + // be populated. + QQmlComponent component(&engine); + component.setData("import QtQuick 2.0\nItem{}", QUrl()); + QScopedPointer obj(component.create()); } inline QUrl TEST_FILE(const QString &filename) -- cgit v1.2.3 From 2b9693bfa5241c96a0b20861d9700fc5e0b826df Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 9 May 2016 17:14:08 +0200 Subject: QmlDebug: Drop explicit Q_IMPORT_PLUGIN statements qmake is clever enough to include the plugins without this. Furthermore, the explicit imports duplicate the plugins in static builds and they lead to cross linking from QtQml to QtQuick. Task-number: QTBUG-50306 Change-Id: I822e000481f583f513b863f54f65eb8ff772c0c3 Reviewed-by: Simon Hausmann --- src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp | 2 -- src/qml/debugger/qqmldebugconnector.cpp | 5 ----- src/qml/debugger/qqmldebugpluginmanager_p.h | 9 --------- 3 files changed, 16 deletions(-) diff --git a/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp b/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp index 69d36beaca..2e895778f0 100644 --- a/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp +++ b/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp @@ -75,8 +75,6 @@ QT_BEGIN_NAMESPACE */ Q_QML_DEBUG_PLUGIN_LOADER(QQmlDebugServerConnection) -Q_QML_IMPORT_DEBUG_PLUGIN(QTcpServerConnectionFactory) -Q_QML_IMPORT_DEBUG_PLUGIN(QLocalClientConnectionFactory) const int protocolVersion = 1; diff --git a/src/qml/debugger/qqmldebugconnector.cpp b/src/qml/debugger/qqmldebugconnector.cpp index 64a8a49bb9..33bed958b5 100644 --- a/src/qml/debugger/qqmldebugconnector.cpp +++ b/src/qml/debugger/qqmldebugconnector.cpp @@ -47,14 +47,9 @@ QT_BEGIN_NAMESPACE // Connectors. We could add more plugins here, and distinguish by arguments to instance() Q_QML_DEBUG_PLUGIN_LOADER(QQmlDebugConnector) -Q_QML_IMPORT_DEBUG_PLUGIN(QQmlDebugServerFactory) -Q_QML_IMPORT_DEBUG_PLUGIN(QQmlNativeDebugConnectorFactory) // Services Q_QML_DEBUG_PLUGIN_LOADER(QQmlDebugService) -Q_QML_IMPORT_DEBUG_PLUGIN(QQmlInspectorServiceFactory) -Q_QML_IMPORT_DEBUG_PLUGIN(QQmlProfilerServiceFactory) -Q_QML_IMPORT_DEBUG_PLUGIN(QQmlDebuggerServiceFactory) struct QQmlDebugConnectorParams { QString pluginKey; diff --git a/src/qml/debugger/qqmldebugpluginmanager_p.h b/src/qml/debugger/qqmldebugpluginmanager_p.h index 6fffa67d7b..a5f5157793 100644 --- a/src/qml/debugger/qqmldebugpluginmanager_p.h +++ b/src/qml/debugger/qqmldebugpluginmanager_p.h @@ -68,15 +68,6 @@ QT_BEGIN_NAMESPACE #else // QT_NO_QML_DEBUGGER -#ifdef QT_STATIC -#define Q_QML_IMPORT_DEBUG_PLUGIN(className)\ - QT_END_NAMESPACE\ - Q_IMPORT_PLUGIN(className)\ - QT_BEGIN_NAMESPACE -#else -#define Q_QML_IMPORT_DEBUG_PLUGIN(className) -#endif // QT_STATIC - #define Q_QML_DEBUG_PLUGIN_LOADER(interfaceName)\ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, interfaceName##Loader,\ (interfaceName##Factory_iid, QLatin1String("/qmltooling")))\ -- cgit v1.2.3 From 48492b2ee5d2f9ad178982f4c16e895b3083d8df Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Thu, 21 Apr 2016 14:14:08 +0200 Subject: QML: add librarymetrics_performance to the builds. Also make sure that we can easily deploy this test to devices by putting all data inside a qrc file. Change-Id: I175830fde51332b13068b163eba3d68c0535b712 Reviewed-by: Simon Hausmann --- .../qml/librarymetrics_performance/librarymetrics_performance.pro | 2 ++ .../qml/librarymetrics_performance/tst_librarymetrics_performance.cpp | 2 +- tests/benchmarks/qml/qml.pro | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/benchmarks/qml/librarymetrics_performance/librarymetrics_performance.pro b/tests/benchmarks/qml/librarymetrics_performance/librarymetrics_performance.pro index 3bedc0ea18..67f9d3b395 100644 --- a/tests/benchmarks/qml/librarymetrics_performance/librarymetrics_performance.pro +++ b/tests/benchmarks/qml/librarymetrics_performance/librarymetrics_performance.pro @@ -7,3 +7,5 @@ macx:CONFIG -= app_bundle CONFIG += release SOURCES += tst_librarymetrics_performance.cpp + +RESOURCES += data diff --git a/tests/benchmarks/qml/librarymetrics_performance/tst_librarymetrics_performance.cpp b/tests/benchmarks/qml/librarymetrics_performance/tst_librarymetrics_performance.cpp index a83c1479f2..ad72ebc6f0 100644 --- a/tests/benchmarks/qml/librarymetrics_performance/tst_librarymetrics_performance.cpp +++ b/tests/benchmarks/qml/librarymetrics_performance/tst_librarymetrics_performance.cpp @@ -119,7 +119,7 @@ tst_librarymetrics_performance::~tst_librarymetrics_performance() static QUrl testFileUrl(const char * filename) { - return QUrl::fromLocalFile(QString(QLatin1String(filename))); + return QUrl(QLatin1String("qrc:///") + QLatin1String(filename)); } void tst_librarymetrics_performance::metrics_data() diff --git a/tests/benchmarks/qml/qml.pro b/tests/benchmarks/qml/qml.pro index 7969866673..d3ce69c713 100644 --- a/tests/benchmarks/qml/qml.pro +++ b/tests/benchmarks/qml/qml.pro @@ -8,6 +8,7 @@ SUBDIRS += \ qqmlcomponent \ qqmlimage \ qqmlmetaproperty \ + librarymetrics_performance \ # script \ ### FIXME: doesn't build js -- cgit v1.2.3 From 9b8d0bffdafeb4dd9b256113716c07f2c49f3903 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 3 May 2016 08:31:47 +0200 Subject: Flickable: start movementEndingTimer consistently only on OSX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Amends 1929fee8e17e9ca66e7fe08faa9ed9fa7fdbb127 to prevent extra bounce at the ends. Task-number: QTBUG-47697 Task-number: QTBUG-53177 Change-Id: I23e63d8e0555e1503ff028ad2f0767b05ef39432 Reviewed-by: Jan Arve Sæther --- src/quick/items/qquickflickable.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp index 26c4e66dd4..7d602db57e 100644 --- a/src/quick/items/qquickflickable.cpp +++ b/src/quick/items/qquickflickable.cpp @@ -1392,15 +1392,15 @@ void QQuickFlickable::wheelEvent(QWheelEvent *event) break; case Qt::NoScrollPhase: // default phase with an ordinary wheel mouse case Qt::ScrollUpdate: - if (d->scrollingPhase) { + if (d->scrollingPhase) d->pressed = true; - d->movementEndingTimer.start(MovementEndingTimerInterval, this); - } +#ifdef Q_OS_OSX + d->movementEndingTimer.start(MovementEndingTimerInterval, this); +#endif break; case Qt::ScrollEnd: d->pressed = false; d->scrollingPhase = false; - d->movementEndingTimer.start(MovementEndingTimerInterval, this); d->draggingEnding(); event->accept(); returnToBounds(); -- cgit v1.2.3 From 78ad5069d4925445a9d39579c1f73c7911fc3582 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Wed, 11 May 2016 12:49:52 +0200 Subject: Fix warning about mixing basic font type's pointSize and pixelSize We didn't properly read the font property of TextFieldStyle (which is declared in QML) before writing the pointSize property (see bug report), so it was using the value of a previous assignment. Change-Id: I7746c258d1f3a6e031583da7f007bd0dc4087082 Task-number: QTBUG-52920 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlvmemetaobject.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index e85b3dc82c..aed5f5af35 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -665,9 +665,10 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void * } else { QV4::MemberData *md = propertiesAsMemberData(); if (md) { - QV4::VariantObject *v = (md->data() + id)->as(); - if (v) - QQml_valueTypeProvider()->readValueType(v->d()->data, a[0], t); + QVariant propertyAsVariant; + if (QV4::VariantObject *v = (md->data() + id)->as()) + propertyAsVariant = v->d()->data; + QQml_valueTypeProvider()->readValueType(propertyAsVariant, a[0], t); } } break; -- cgit v1.2.3 From 74f75a3a120b07bbfe6904512b338db8850874e4 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Mon, 25 Apr 2016 15:01:04 +0200 Subject: V4: Limit call depth by count, not by checking the native stack. Getting the native stack size can be really expensive. For example, on Linux/x86_64 (Ubuntu 15.04), it is at least 200,000 instructions for a single-threaded application. With more threads (like qmlscene) it typically ends up around 1M(!) instructions. Worse, it is called twice in the ExecutionEngine constructor. So, now we limit the depth of JavaScript calls to a fixed number, 1234 by default. This can be changed by setting the environment variable QV4_MAX_CALL_DEPTH to the desired depth. Change-Id: Ic13c8efb2769e64fbc73deee6f6fa39d7c0b7af5 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4engine.cpp | 109 +++++----------------------------------- src/qml/jsruntime/qv4engine_p.h | 33 ++++++++---- 2 files changed, 36 insertions(+), 106 deletions(-) diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index 2560f065cf..49b6dce697 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -105,84 +105,6 @@ static ReturnedValue throwTypeError(CallContext *ctx) return ctx->engine()->throwTypeError(); } -const int MinimumStackSize = 256; // in kbytes - -QT_WARNING_PUSH -QT_WARNING_DISABLE_MSVC(4172) // MSVC 2015: warning C4172: returning address of local variable or temporary: dummy - -quintptr getStackLimit() -{ - quintptr stackLimit; -#if USE(PTHREADS) && !OS(QNX) -# if OS(DARWIN) - pthread_t thread_self = pthread_self(); - void *stackTop = pthread_get_stackaddr_np(thread_self); - stackLimit = reinterpret_cast(stackTop); - quintptr size = 0; - if (pthread_main_np()) { - rlimit limit; - getrlimit(RLIMIT_STACK, &limit); - size = limit.rlim_cur; - } else - size = pthread_get_stacksize_np(thread_self); - stackLimit -= size; -# elif defined(__hppa) - // On some architectures the stack grows upwards. All of these are rather exotic, so simply assume - // everything is fine there. - // Known examples: - // -HP PA-RISC - stackLimit = 0; - -# else - pthread_attr_t attr; -#if HAVE(PTHREAD_NP_H) && OS(FREEBSD) - // on FreeBSD pthread_attr_init() must be called otherwise getting the attrs crashes - if (pthread_attr_init(&attr) == 0 && pthread_attr_get_np(pthread_self(), &attr) == 0) { -#else - if (pthread_getattr_np(pthread_self(), &attr) == 0) { -#endif - void *stackBottom = Q_NULLPTR; - size_t stackSize = 0; - - pthread_attr_getstack(&attr, &stackBottom, &stackSize); - pthread_attr_destroy(&attr); - -# if defined(Q_OS_ANDROID) - // Bionic pretends that the main thread has a tiny stack; work around it - if (gettid() == getpid()) { - rlimit limit; - getrlimit(RLIMIT_STACK, &limit); - stackBottom = reinterpret_cast(reinterpret_cast(stackBottom) + stackSize - limit.rlim_cur); - } -# endif - - stackLimit = reinterpret_cast(stackBottom); - } else { - int dummy; - // this is inexact, as part of the stack is used when being called here, - // but let's simply default to 1MB from where the stack is right now - stackLimit = reinterpret_cast(&dummy) - 1024*1024; - } - -# endif -// This is wrong. StackLimit is the currently committed stack size, not the real end. -// only way to get that limit is apparently by using VirtualQuery (Yuck) -//#elif OS(WINDOWS) -// PNT_TIB tib = (PNT_TIB)NtCurrentTeb(); -// stackLimit = static_cast(tib->StackLimit); -#else - int dummy; - // this is inexact, as part of the stack is used when being called here, - // but let's simply default to 1MB from where the stack is right now - // (Note: triggers warning C4172 as of MSVC 2015, returning address of local variable) - stackLimit = reinterpret_cast(&dummy) - 1024*1024; -#endif - - // 256k slack - return stackLimit + MinimumStackSize*1024; -} - -QT_WARNING_POP QJSEngine *ExecutionEngine::jsEngine() const { @@ -194,9 +116,12 @@ QQmlEngine *ExecutionEngine::qmlEngine() const return v8Engine->engine(); } +qint32 ExecutionEngine::maxCallDepth = -1; + ExecutionEngine::ExecutionEngine(EvalISelFactory *factory) : current(0) , hasException(false) + , callDepth(0) , memoryManager(new QV4::MemoryManager(this)) , executableAllocator(new QV4::ExecutableAllocator) , regExpAllocator(new QV4::ExecutableAllocator) @@ -213,6 +138,15 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory) , regExpCache(0) , m_multiplyWrappedQObjects(0) { + if (maxCallDepth == -1) { + bool ok = false; + maxCallDepth = qEnvironmentVariableIntValue("QV4_MAX_CALL_DEPTH", &ok); + if (!ok || maxCallDepth <= 0) { + maxCallDepth = 1234; + } + } + Q_ASSERT(maxCallDepth > 0); + MemoryManager::GCBlocker gcBlocker(memoryManager); if (!factory) { @@ -251,9 +185,6 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory) // set up stack limits jsStackLimit = jsStackBase + JSStackLimit/sizeof(Value); - cStackLimit = getStackLimit(); - if (!recheckCStackLimits()) - qFatal("Fatal: Not enough stack space available for QML. Please increase the process stack size to more than %d KBytes.", MinimumStackSize); identifierTable = new IdentifierTable(this); @@ -1117,22 +1048,6 @@ QQmlError ExecutionEngine::catchExceptionAsQmlError() return error; } -bool ExecutionEngine::recheckCStackLimits() -{ - int dummy; -#ifdef Q_OS_WIN - // ### this is only required on windows, where we currently use heuristics to get the stack limit - if (cStackLimit - reinterpret_cast(&dummy) > 128*1024) - // we're more then 128k away from our stack limit, assume the thread has changed, and - // call getStackLimit -#endif - // this can happen after a thread change - cStackLimit = getStackLimit(); - - return (reinterpret_cast(&dummy) >= cStackLimit); -} - - // Variant conversion code typedef QSet V4ObjectSet; diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h index 4640f3f4cc..7fc880023f 100644 --- a/src/qml/jsruntime/qv4engine_p.h +++ b/src/qml/jsruntime/qv4engine_p.h @@ -75,15 +75,11 @@ namespace CompiledData { struct CompilationUnit; } -#define CHECK_STACK_LIMITS(v4) \ - if ((v4->jsStackTop <= v4->jsStackLimit) && (reinterpret_cast(&v4) >= v4->cStackLimit || v4->recheckCStackLimits())) {} \ - else \ - return v4->throwRangeError(QStringLiteral("Maximum call stack size exceeded.")) - - struct Q_QML_EXPORT ExecutionEngine { private: + static qint32 maxCallDepth; + friend struct ExecutionContextSaver; friend struct ExecutionContext; friend struct Heap::ExecutionContext; @@ -92,6 +88,7 @@ public: Value *jsStackTop; quint32 hasException; + qint32 callDepth; MemoryManager *memoryManager; ExecutableAllocator *executableAllocator; @@ -101,7 +98,6 @@ public: ExecutionContext *currentContext; Value *jsStackLimit; - quintptr cStackLimit; WTF::BumpPointerAllocator *bumperPointerAllocator; // Used by Yarr Regex engine. @@ -431,8 +427,6 @@ public: InternalClass *newClass(const InternalClass &other); - bool recheckCStackLimits(); - // Exception handling Value *exceptionValue; StackTrace exceptionStackTrace; @@ -465,6 +459,8 @@ public: QV4::ReturnedValue metaTypeToJS(int type, const void *data); void assertObjectBelongsToEngine(const Heap::Base &baseObject); + + bool checkStackLimits(ReturnedValue &exception); }; inline void ExecutionEngine::pushContext(Heap::ExecutionContext *context) @@ -517,7 +513,26 @@ inline void Value::mark(ExecutionEngine *e) o->mark(e); } +#define CHECK_STACK_LIMITS(v4) { ReturnedValue e; if ((v4)->checkStackLimits(e)) return e; } \ + ExecutionEngineCallDepthRecorder _executionEngineCallDepthRecorder(v4); + +struct ExecutionEngineCallDepthRecorder +{ + ExecutionEngine *ee; + ExecutionEngineCallDepthRecorder(ExecutionEngine *e): ee(e) { ++ee->callDepth; } + ~ExecutionEngineCallDepthRecorder() { --ee->callDepth; } +}; + +inline bool ExecutionEngine::checkStackLimits(ReturnedValue &exception) +{ + if (Q_UNLIKELY((jsStackTop > jsStackLimit) || (callDepth >= maxCallDepth))) { + exception = throwRangeError(QStringLiteral("Maximum call stack size exceeded.")); + return true; + } + + return false; +} } // namespace QV4 -- cgit v1.2.3 From 6bed1d55b38effa5ccee69423c104dfad374b484 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 26 Oct 2015 12:56:18 -0700 Subject: Remove workaround for the pointer size in bootstrapped tool builds The pointer size is now correctly set in qprocessordetection.h even for bootstrapped builds. Change-Id: I7e6338336dd6468ead24ffff1410d4ba8b1cbdad Reviewed-by: Simon Hausmann Reviewed-by: Erik Verbruggen --- src/qml/jsruntime/qv4value_p.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h index 723afcab54..6bd39355c5 100644 --- a/src/qml/jsruntime/qv4value_p.h +++ b/src/qml/jsruntime/qv4value_p.h @@ -50,11 +50,7 @@ #include "qv4global_p.h" #include -/* We cannot rely on QT_POINTER_SIZE to be set correctly on host builds. In qmldevtools the Value objects - are only used to store primitives, never object pointers. So we can use the 64-bit encoding. */ -#ifdef V4_BOOTSTRAP -#define QV4_USE_64_BIT_VALUE_ENCODING -#elif QT_POINTER_SIZE == 8 +#if QT_POINTER_SIZE == 8 #define QV4_USE_64_BIT_VALUE_ENCODING #endif -- cgit v1.2.3 From cd82f9d09e258cbf9d59a09cadf7914c216b459c Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 21 Apr 2016 17:08:20 +0200 Subject: purge unused image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit it's a duplicate from doc/images, so was presumably added by accident. Change-Id: Icfe75d4cb2682b42a2993e64f445295b10daca70 Reviewed-by: Topi Reiniö --- .../quickwidgets/quickwidget/qtquickwidgets-example.png | Bin 11287 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 examples/quick/quickwidgets/quickwidget/qtquickwidgets-example.png diff --git a/examples/quick/quickwidgets/quickwidget/qtquickwidgets-example.png b/examples/quick/quickwidgets/quickwidget/qtquickwidgets-example.png deleted file mode 100644 index d9e710b7e7..0000000000 Binary files a/examples/quick/quickwidgets/quickwidget/qtquickwidgets-example.png and /dev/null differ -- cgit v1.2.3 From 70d30cb2b9b9253f52b6330287c102310e8a0707 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 22 Apr 2016 20:47:51 +0200 Subject: prune unused assignment Change-Id: Iecb1e9cd4d068660a96ba98480e92d9aa3981671 Reviewed-by: Simon Hausmann --- tests/auto/qml/qqmlmoduleplugin/plugin.2/plugin.2.pro | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/auto/qml/qqmlmoduleplugin/plugin.2/plugin.2.pro b/tests/auto/qml/qqmlmoduleplugin/plugin.2/plugin.2.pro index 00c076d9cf..7cd63e0bfc 100644 --- a/tests/auto/qml/qqmlmoduleplugin/plugin.2/plugin.2.pro +++ b/tests/auto/qml/qqmlmoduleplugin/plugin.2/plugin.2.pro @@ -6,7 +6,6 @@ DESTDIR = ../imports/org/qtproject/AutoTestQmlPluginType.2 QT += core-private gui-private qml-private -IMPORT_DIR = DESTDIR IMPORT_FILES = \ qmldir -- cgit v1.2.3 From 11a184758c4fff1f634b294e22e8982ba9c43fc4 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 3 May 2016 19:26:34 +0200 Subject: decruft project file the "generated by qt creator" header is not supposed to be checked in. Change-Id: I379e91a44e693eb549c77517a482d1cee9153495 Reviewed-by: Frank Meerkoetter Reviewed-by: Michael Brasser --- examples/quick/scenegraph/graph/graph.pro | 6 ------ 1 file changed, 6 deletions(-) diff --git a/examples/quick/scenegraph/graph/graph.pro b/examples/quick/scenegraph/graph/graph.pro index 5991f799dc..dd77d76e4f 100644 --- a/examples/quick/scenegraph/graph/graph.pro +++ b/examples/quick/scenegraph/graph/graph.pro @@ -1,9 +1,3 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2013-06-11T13:13:18 -# -#------------------------------------------------- - QT += core gui quick TARGET = graph -- cgit v1.2.3 From e6f5f57c5349e42e1350b0d5ce2150e0a8743253 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 3 May 2016 20:59:19 +0200 Subject: move builtins.qmltypes to an own subdir shadowing doesn't actually work from within a subdirs project, so we need to put it into a separate aux project. it would be possible to put the project file in the same directory, but then a simple "make qmltypes" wouldn't work due to the different Makefile name. Change-Id: Ib90914e4ea5d75f7199399c7e2825690774081c5 Reviewed-by: Simon Hausmann --- src/imports/builtins.qmltypes | 1605 -------------------------------- src/imports/builtins/builtins.pro | 32 + src/imports/builtins/builtins.qmltypes | 1605 ++++++++++++++++++++++++++++++++ src/imports/imports.pro | 33 +- 4 files changed, 1638 insertions(+), 1637 deletions(-) delete mode 100644 src/imports/builtins.qmltypes create mode 100644 src/imports/builtins/builtins.pro create mode 100644 src/imports/builtins/builtins.qmltypes diff --git a/src/imports/builtins.qmltypes b/src/imports/builtins.qmltypes deleted file mode 100644 index cca1c20d54..0000000000 --- a/src/imports/builtins.qmltypes +++ /dev/null @@ -1,1605 +0,0 @@ -import QtQuick.tooling 1.2 - -// This file describes the plugin-supplied types contained in the library. -// It is used for QML tooling purposes only. -// -// This file was auto-generated by: -// 'qmlplugindump -nonrelocatable -builtins' - -Module { - dependencies: [] - Component { - name: "Qt" - Enum { - name: "GlobalColor" - values: { - "color0": 0, - "color1": 1, - "black": 2, - "white": 3, - "darkGray": 4, - "gray": 5, - "lightGray": 6, - "red": 7, - "green": 8, - "blue": 9, - "cyan": 10, - "magenta": 11, - "yellow": 12, - "darkRed": 13, - "darkGreen": 14, - "darkBlue": 15, - "darkCyan": 16, - "darkMagenta": 17, - "darkYellow": 18, - "transparent": 19 - } - } - Enum { - name: "KeyboardModifiers" - values: { - "NoModifier": 0, - "ShiftModifier": 33554432, - "ControlModifier": 67108864, - "AltModifier": 134217728, - "MetaModifier": 268435456, - "KeypadModifier": 536870912, - "GroupSwitchModifier": 1073741824, - "KeyboardModifierMask": -33554432 - } - } - Enum { - name: "MouseButtons" - values: { - "NoButton": 0, - "LeftButton": 1, - "RightButton": 2, - "MidButton": 4, - "MiddleButton": 4, - "BackButton": 8, - "XButton1": 8, - "ExtraButton1": 8, - "ForwardButton": 16, - "XButton2": 16, - "ExtraButton2": 16, - "TaskButton": 32, - "ExtraButton3": 32, - "ExtraButton4": 64, - "ExtraButton5": 128, - "ExtraButton6": 256, - "ExtraButton7": 512, - "ExtraButton8": 1024, - "ExtraButton9": 2048, - "ExtraButton10": 4096, - "ExtraButton11": 8192, - "ExtraButton12": 16384, - "ExtraButton13": 32768, - "ExtraButton14": 65536, - "ExtraButton15": 131072, - "ExtraButton16": 262144, - "ExtraButton17": 524288, - "ExtraButton18": 1048576, - "ExtraButton19": 2097152, - "ExtraButton20": 4194304, - "ExtraButton21": 8388608, - "ExtraButton22": 16777216, - "ExtraButton23": 33554432, - "ExtraButton24": 67108864, - "AllButtons": 134217727, - "MaxMouseButton": 67108864, - "MouseButtonMask": -1 - } - } - Enum { - name: "Orientation" - values: { - "Horizontal": 1, - "Vertical": 2 - } - } - Enum { - name: "Orientations" - values: { - "Horizontal": 1, - "Vertical": 2 - } - } - Enum { - name: "FocusPolicy" - values: { - "NoFocus": 0, - "TabFocus": 1, - "ClickFocus": 2, - "StrongFocus": 11, - "WheelFocus": 15 - } - } - Enum { - name: "TabFocusBehavior" - values: { - "NoTabFocus": 0, - "TabFocusTextControls": 1, - "TabFocusListControls": 2, - "TabFocusAllControls": 255 - } - } - Enum { - name: "SortOrder" - values: { - "AscendingOrder": 0, - "DescendingOrder": 1 - } - } - Enum { - name: "Alignment" - values: { - "AlignLeft": 1, - "AlignLeading": 1, - "AlignRight": 2, - "AlignTrailing": 2, - "AlignHCenter": 4, - "AlignJustify": 8, - "AlignAbsolute": 16, - "AlignHorizontal_Mask": 31, - "AlignTop": 32, - "AlignBottom": 64, - "AlignVCenter": 128, - "AlignBaseline": 256, - "AlignVertical_Mask": 480, - "AlignCenter": 132 - } - } - Enum { - name: "TextElideMode" - values: { - "ElideLeft": 0, - "ElideRight": 1, - "ElideMiddle": 2, - "ElideNone": 3 - } - } - Enum { - name: "WindowType" - values: { - "Widget": 0, - "Window": 1, - "Dialog": 3, - "Sheet": 5, - "Drawer": 7, - "Popup": 9, - "Tool": 11, - "ToolTip": 13, - "SplashScreen": 15, - "Desktop": 17, - "SubWindow": 18, - "ForeignWindow": 33, - "CoverWindow": 65, - "WindowType_Mask": 255, - "MSWindowsFixedSizeDialogHint": 256, - "MSWindowsOwnDC": 512, - "BypassWindowManagerHint": 1024, - "X11BypassWindowManagerHint": 1024, - "FramelessWindowHint": 2048, - "WindowTitleHint": 4096, - "WindowSystemMenuHint": 8192, - "WindowMinimizeButtonHint": 16384, - "WindowMaximizeButtonHint": 32768, - "WindowMinMaxButtonsHint": 49152, - "WindowContextHelpButtonHint": 65536, - "WindowShadeButtonHint": 131072, - "WindowStaysOnTopHint": 262144, - "WindowTransparentForInput": 524288, - "WindowOverridesSystemGestures": 1048576, - "WindowDoesNotAcceptFocus": 2097152, - "MaximizeUsingFullscreenGeometryHint": 4194304, - "CustomizeWindowHint": 33554432, - "WindowStaysOnBottomHint": 67108864, - "WindowCloseButtonHint": 134217728, - "MacWindowToolBarButtonHint": 268435456, - "BypassGraphicsProxyWidget": 536870912, - "NoDropShadowWindowHint": 1073741824, - "WindowFullscreenButtonHint": -2147483648, - "WindowOkButtonHint": 524288, - "WindowCancelButtonHint": 1048576 - } - } - Enum { - name: "WindowFlags" - values: { - "Widget": 0, - "Window": 1, - "Dialog": 3, - "Sheet": 5, - "Drawer": 7, - "Popup": 9, - "Tool": 11, - "ToolTip": 13, - "SplashScreen": 15, - "Desktop": 17, - "SubWindow": 18, - "ForeignWindow": 33, - "CoverWindow": 65, - "WindowType_Mask": 255, - "MSWindowsFixedSizeDialogHint": 256, - "MSWindowsOwnDC": 512, - "BypassWindowManagerHint": 1024, - "X11BypassWindowManagerHint": 1024, - "FramelessWindowHint": 2048, - "WindowTitleHint": 4096, - "WindowSystemMenuHint": 8192, - "WindowMinimizeButtonHint": 16384, - "WindowMaximizeButtonHint": 32768, - "WindowMinMaxButtonsHint": 49152, - "WindowContextHelpButtonHint": 65536, - "WindowShadeButtonHint": 131072, - "WindowStaysOnTopHint": 262144, - "WindowTransparentForInput": 524288, - "WindowOverridesSystemGestures": 1048576, - "WindowDoesNotAcceptFocus": 2097152, - "MaximizeUsingFullscreenGeometryHint": 4194304, - "CustomizeWindowHint": 33554432, - "WindowStaysOnBottomHint": 67108864, - "WindowCloseButtonHint": 134217728, - "MacWindowToolBarButtonHint": 268435456, - "BypassGraphicsProxyWidget": 536870912, - "NoDropShadowWindowHint": 1073741824, - "WindowFullscreenButtonHint": -2147483648, - "WindowOkButtonHint": 524288, - "WindowCancelButtonHint": 1048576 - } - } - Enum { - name: "WindowState" - values: { - "WindowNoState": 0, - "WindowMinimized": 1, - "WindowMaximized": 2, - "WindowFullScreen": 4, - "WindowActive": 8 - } - } - Enum { - name: "WindowStates" - values: { - "WindowNoState": 0, - "WindowMinimized": 1, - "WindowMaximized": 2, - "WindowFullScreen": 4, - "WindowActive": 8 - } - } - Enum { - name: "ApplicationState" - values: { - "ApplicationSuspended": 0, - "ApplicationHidden": 1, - "ApplicationInactive": 2, - "ApplicationActive": 4 - } - } - Enum { - name: "ScreenOrientation" - values: { - "PrimaryOrientation": 0, - "PortraitOrientation": 1, - "LandscapeOrientation": 2, - "InvertedPortraitOrientation": 4, - "InvertedLandscapeOrientation": 8 - } - } - Enum { - name: "ScreenOrientations" - values: { - "PrimaryOrientation": 0, - "PortraitOrientation": 1, - "LandscapeOrientation": 2, - "InvertedPortraitOrientation": 4, - "InvertedLandscapeOrientation": 8 - } - } - Enum { - name: "WidgetAttribute" - values: { - "WA_Disabled": 0, - "WA_UnderMouse": 1, - "WA_MouseTracking": 2, - "WA_ContentsPropagated": 3, - "WA_OpaquePaintEvent": 4, - "WA_NoBackground": 4, - "WA_StaticContents": 5, - "WA_LaidOut": 7, - "WA_PaintOnScreen": 8, - "WA_NoSystemBackground": 9, - "WA_UpdatesDisabled": 10, - "WA_Mapped": 11, - "WA_MacNoClickThrough": 12, - "WA_InputMethodEnabled": 14, - "WA_WState_Visible": 15, - "WA_WState_Hidden": 16, - "WA_ForceDisabled": 32, - "WA_KeyCompression": 33, - "WA_PendingMoveEvent": 34, - "WA_PendingResizeEvent": 35, - "WA_SetPalette": 36, - "WA_SetFont": 37, - "WA_SetCursor": 38, - "WA_NoChildEventsFromChildren": 39, - "WA_WindowModified": 41, - "WA_Resized": 42, - "WA_Moved": 43, - "WA_PendingUpdate": 44, - "WA_InvalidSize": 45, - "WA_MacBrushedMetal": 46, - "WA_MacMetalStyle": 46, - "WA_CustomWhatsThis": 47, - "WA_LayoutOnEntireRect": 48, - "WA_OutsideWSRange": 49, - "WA_GrabbedShortcut": 50, - "WA_TransparentForMouseEvents": 51, - "WA_PaintUnclipped": 52, - "WA_SetWindowIcon": 53, - "WA_NoMouseReplay": 54, - "WA_DeleteOnClose": 55, - "WA_RightToLeft": 56, - "WA_SetLayoutDirection": 57, - "WA_NoChildEventsForParent": 58, - "WA_ForceUpdatesDisabled": 59, - "WA_WState_Created": 60, - "WA_WState_CompressKeys": 61, - "WA_WState_InPaintEvent": 62, - "WA_WState_Reparented": 63, - "WA_WState_ConfigPending": 64, - "WA_WState_Polished": 66, - "WA_WState_DND": 67, - "WA_WState_OwnSizePolicy": 68, - "WA_WState_ExplicitShowHide": 69, - "WA_ShowModal": 70, - "WA_MouseNoMask": 71, - "WA_GroupLeader": 72, - "WA_NoMousePropagation": 73, - "WA_Hover": 74, - "WA_InputMethodTransparent": 75, - "WA_QuitOnClose": 76, - "WA_KeyboardFocusChange": 77, - "WA_AcceptDrops": 78, - "WA_DropSiteRegistered": 79, - "WA_ForceAcceptDrops": 79, - "WA_WindowPropagation": 80, - "WA_NoX11EventCompression": 81, - "WA_TintedBackground": 82, - "WA_X11OpenGLOverlay": 83, - "WA_AlwaysShowToolTips": 84, - "WA_MacOpaqueSizeGrip": 85, - "WA_SetStyle": 86, - "WA_SetLocale": 87, - "WA_MacShowFocusRect": 88, - "WA_MacNormalSize": 89, - "WA_MacSmallSize": 90, - "WA_MacMiniSize": 91, - "WA_LayoutUsesWidgetRect": 92, - "WA_StyledBackground": 93, - "WA_MSWindowsUseDirect3D": 94, - "WA_CanHostQMdiSubWindowTitleBar": 95, - "WA_MacAlwaysShowToolWindow": 96, - "WA_StyleSheet": 97, - "WA_ShowWithoutActivating": 98, - "WA_X11BypassTransientForHint": 99, - "WA_NativeWindow": 100, - "WA_DontCreateNativeAncestors": 101, - "WA_MacVariableSize": 102, - "WA_DontShowOnScreen": 103, - "WA_X11NetWmWindowTypeDesktop": 104, - "WA_X11NetWmWindowTypeDock": 105, - "WA_X11NetWmWindowTypeToolBar": 106, - "WA_X11NetWmWindowTypeMenu": 107, - "WA_X11NetWmWindowTypeUtility": 108, - "WA_X11NetWmWindowTypeSplash": 109, - "WA_X11NetWmWindowTypeDialog": 110, - "WA_X11NetWmWindowTypeDropDownMenu": 111, - "WA_X11NetWmWindowTypePopupMenu": 112, - "WA_X11NetWmWindowTypeToolTip": 113, - "WA_X11NetWmWindowTypeNotification": 114, - "WA_X11NetWmWindowTypeCombo": 115, - "WA_X11NetWmWindowTypeDND": 116, - "WA_MacFrameworkScaled": 117, - "WA_SetWindowModality": 118, - "WA_WState_WindowOpacitySet": 119, - "WA_TranslucentBackground": 120, - "WA_AcceptTouchEvents": 121, - "WA_WState_AcceptedTouchBeginEvent": 122, - "WA_TouchPadAcceptSingleTouchEvents": 123, - "WA_X11DoNotAcceptFocus": 126, - "WA_MacNoShadow": 127, - "WA_AlwaysStackOnTop": 128, - "WA_AttributeCount": 129 - } - } - Enum { - name: "ApplicationAttribute" - values: { - "AA_ImmediateWidgetCreation": 0, - "AA_MSWindowsUseDirect3DByDefault": 1, - "AA_DontShowIconsInMenus": 2, - "AA_NativeWindows": 3, - "AA_DontCreateNativeWidgetSiblings": 4, - "AA_MacPluginApplication": 5, - "AA_DontUseNativeMenuBar": 6, - "AA_MacDontSwapCtrlAndMeta": 7, - "AA_Use96Dpi": 8, - "AA_X11InitThreads": 10, - "AA_SynthesizeTouchForUnhandledMouseEvents": 11, - "AA_SynthesizeMouseForUnhandledTouchEvents": 12, - "AA_UseHighDpiPixmaps": 13, - "AA_ForceRasterWidgets": 14, - "AA_UseDesktopOpenGL": 15, - "AA_UseOpenGLES": 16, - "AA_UseSoftwareOpenGL": 17, - "AA_ShareOpenGLContexts": 18, - "AA_SetPalette": 19, - "AA_EnableHighDpiScaling": 20, - "AA_DisableHighDpiScaling": 21, - "AA_AttributeCount": 22 - } - } - Enum { - name: "ImageConversionFlags" - values: { - "ColorMode_Mask": 3, - "AutoColor": 0, - "ColorOnly": 3, - "MonoOnly": 2, - "AlphaDither_Mask": 12, - "ThresholdAlphaDither": 0, - "OrderedAlphaDither": 4, - "DiffuseAlphaDither": 8, - "NoAlpha": 12, - "Dither_Mask": 48, - "DiffuseDither": 0, - "OrderedDither": 16, - "ThresholdDither": 32, - "DitherMode_Mask": 192, - "AutoDither": 0, - "PreferDither": 64, - "AvoidDither": 128, - "NoOpaqueDetection": 256, - "NoFormatConversion": 512 - } - } - Enum { - name: "BGMode" - values: { - "TransparentMode": 0, - "OpaqueMode": 1 - } - } - Enum { - name: "Key" - values: { - "Key_Escape": 16777216, - "Key_Tab": 16777217, - "Key_Backtab": 16777218, - "Key_Backspace": 16777219, - "Key_Return": 16777220, - "Key_Enter": 16777221, - "Key_Insert": 16777222, - "Key_Delete": 16777223, - "Key_Pause": 16777224, - "Key_Print": 16777225, - "Key_SysReq": 16777226, - "Key_Clear": 16777227, - "Key_Home": 16777232, - "Key_End": 16777233, - "Key_Left": 16777234, - "Key_Up": 16777235, - "Key_Right": 16777236, - "Key_Down": 16777237, - "Key_PageUp": 16777238, - "Key_PageDown": 16777239, - "Key_Shift": 16777248, - "Key_Control": 16777249, - "Key_Meta": 16777250, - "Key_Alt": 16777251, - "Key_CapsLock": 16777252, - "Key_NumLock": 16777253, - "Key_ScrollLock": 16777254, - "Key_F1": 16777264, - "Key_F2": 16777265, - "Key_F3": 16777266, - "Key_F4": 16777267, - "Key_F5": 16777268, - "Key_F6": 16777269, - "Key_F7": 16777270, - "Key_F8": 16777271, - "Key_F9": 16777272, - "Key_F10": 16777273, - "Key_F11": 16777274, - "Key_F12": 16777275, - "Key_F13": 16777276, - "Key_F14": 16777277, - "Key_F15": 16777278, - "Key_F16": 16777279, - "Key_F17": 16777280, - "Key_F18": 16777281, - "Key_F19": 16777282, - "Key_F20": 16777283, - "Key_F21": 16777284, - "Key_F22": 16777285, - "Key_F23": 16777286, - "Key_F24": 16777287, - "Key_F25": 16777288, - "Key_F26": 16777289, - "Key_F27": 16777290, - "Key_F28": 16777291, - "Key_F29": 16777292, - "Key_F30": 16777293, - "Key_F31": 16777294, - "Key_F32": 16777295, - "Key_F33": 16777296, - "Key_F34": 16777297, - "Key_F35": 16777298, - "Key_Super_L": 16777299, - "Key_Super_R": 16777300, - "Key_Menu": 16777301, - "Key_Hyper_L": 16777302, - "Key_Hyper_R": 16777303, - "Key_Help": 16777304, - "Key_Direction_L": 16777305, - "Key_Direction_R": 16777312, - "Key_Space": 32, - "Key_Any": 32, - "Key_Exclam": 33, - "Key_QuoteDbl": 34, - "Key_NumberSign": 35, - "Key_Dollar": 36, - "Key_Percent": 37, - "Key_Ampersand": 38, - "Key_Apostrophe": 39, - "Key_ParenLeft": 40, - "Key_ParenRight": 41, - "Key_Asterisk": 42, - "Key_Plus": 43, - "Key_Comma": 44, - "Key_Minus": 45, - "Key_Period": 46, - "Key_Slash": 47, - "Key_0": 48, - "Key_1": 49, - "Key_2": 50, - "Key_3": 51, - "Key_4": 52, - "Key_5": 53, - "Key_6": 54, - "Key_7": 55, - "Key_8": 56, - "Key_9": 57, - "Key_Colon": 58, - "Key_Semicolon": 59, - "Key_Less": 60, - "Key_Equal": 61, - "Key_Greater": 62, - "Key_Question": 63, - "Key_At": 64, - "Key_A": 65, - "Key_B": 66, - "Key_C": 67, - "Key_D": 68, - "Key_E": 69, - "Key_F": 70, - "Key_G": 71, - "Key_H": 72, - "Key_I": 73, - "Key_J": 74, - "Key_K": 75, - "Key_L": 76, - "Key_M": 77, - "Key_N": 78, - "Key_O": 79, - "Key_P": 80, - "Key_Q": 81, - "Key_R": 82, - "Key_S": 83, - "Key_T": 84, - "Key_U": 85, - "Key_V": 86, - "Key_W": 87, - "Key_X": 88, - "Key_Y": 89, - "Key_Z": 90, - "Key_BracketLeft": 91, - "Key_Backslash": 92, - "Key_BracketRight": 93, - "Key_AsciiCircum": 94, - "Key_Underscore": 95, - "Key_QuoteLeft": 96, - "Key_BraceLeft": 123, - "Key_Bar": 124, - "Key_BraceRight": 125, - "Key_AsciiTilde": 126, - "Key_nobreakspace": 160, - "Key_exclamdown": 161, - "Key_cent": 162, - "Key_sterling": 163, - "Key_currency": 164, - "Key_yen": 165, - "Key_brokenbar": 166, - "Key_section": 167, - "Key_diaeresis": 168, - "Key_copyright": 169, - "Key_ordfeminine": 170, - "Key_guillemotleft": 171, - "Key_notsign": 172, - "Key_hyphen": 173, - "Key_registered": 174, - "Key_macron": 175, - "Key_degree": 176, - "Key_plusminus": 177, - "Key_twosuperior": 178, - "Key_threesuperior": 179, - "Key_acute": 180, - "Key_mu": 181, - "Key_paragraph": 182, - "Key_periodcentered": 183, - "Key_cedilla": 184, - "Key_onesuperior": 185, - "Key_masculine": 186, - "Key_guillemotright": 187, - "Key_onequarter": 188, - "Key_onehalf": 189, - "Key_threequarters": 190, - "Key_questiondown": 191, - "Key_Agrave": 192, - "Key_Aacute": 193, - "Key_Acircumflex": 194, - "Key_Atilde": 195, - "Key_Adiaeresis": 196, - "Key_Aring": 197, - "Key_AE": 198, - "Key_Ccedilla": 199, - "Key_Egrave": 200, - "Key_Eacute": 201, - "Key_Ecircumflex": 202, - "Key_Ediaeresis": 203, - "Key_Igrave": 204, - "Key_Iacute": 205, - "Key_Icircumflex": 206, - "Key_Idiaeresis": 207, - "Key_ETH": 208, - "Key_Ntilde": 209, - "Key_Ograve": 210, - "Key_Oacute": 211, - "Key_Ocircumflex": 212, - "Key_Otilde": 213, - "Key_Odiaeresis": 214, - "Key_multiply": 215, - "Key_Ooblique": 216, - "Key_Ugrave": 217, - "Key_Uacute": 218, - "Key_Ucircumflex": 219, - "Key_Udiaeresis": 220, - "Key_Yacute": 221, - "Key_THORN": 222, - "Key_ssharp": 223, - "Key_division": 247, - "Key_ydiaeresis": 255, - "Key_AltGr": 16781571, - "Key_Multi_key": 16781600, - "Key_Codeinput": 16781623, - "Key_SingleCandidate": 16781628, - "Key_MultipleCandidate": 16781629, - "Key_PreviousCandidate": 16781630, - "Key_Mode_switch": 16781694, - "Key_Kanji": 16781601, - "Key_Muhenkan": 16781602, - "Key_Henkan": 16781603, - "Key_Romaji": 16781604, - "Key_Hiragana": 16781605, - "Key_Katakana": 16781606, - "Key_Hiragana_Katakana": 16781607, - "Key_Zenkaku": 16781608, - "Key_Hankaku": 16781609, - "Key_Zenkaku_Hankaku": 16781610, - "Key_Touroku": 16781611, - "Key_Massyo": 16781612, - "Key_Kana_Lock": 16781613, - "Key_Kana_Shift": 16781614, - "Key_Eisu_Shift": 16781615, - "Key_Eisu_toggle": 16781616, - "Key_Hangul": 16781617, - "Key_Hangul_Start": 16781618, - "Key_Hangul_End": 16781619, - "Key_Hangul_Hanja": 16781620, - "Key_Hangul_Jamo": 16781621, - "Key_Hangul_Romaja": 16781622, - "Key_Hangul_Jeonja": 16781624, - "Key_Hangul_Banja": 16781625, - "Key_Hangul_PreHanja": 16781626, - "Key_Hangul_PostHanja": 16781627, - "Key_Hangul_Special": 16781631, - "Key_Dead_Grave": 16781904, - "Key_Dead_Acute": 16781905, - "Key_Dead_Circumflex": 16781906, - "Key_Dead_Tilde": 16781907, - "Key_Dead_Macron": 16781908, - "Key_Dead_Breve": 16781909, - "Key_Dead_Abovedot": 16781910, - "Key_Dead_Diaeresis": 16781911, - "Key_Dead_Abovering": 16781912, - "Key_Dead_Doubleacute": 16781913, - "Key_Dead_Caron": 16781914, - "Key_Dead_Cedilla": 16781915, - "Key_Dead_Ogonek": 16781916, - "Key_Dead_Iota": 16781917, - "Key_Dead_Voiced_Sound": 16781918, - "Key_Dead_Semivoiced_Sound": 16781919, - "Key_Dead_Belowdot": 16781920, - "Key_Dead_Hook": 16781921, - "Key_Dead_Horn": 16781922, - "Key_Back": 16777313, - "Key_Forward": 16777314, - "Key_Stop": 16777315, - "Key_Refresh": 16777316, - "Key_VolumeDown": 16777328, - "Key_VolumeMute": 16777329, - "Key_VolumeUp": 16777330, - "Key_BassBoost": 16777331, - "Key_BassUp": 16777332, - "Key_BassDown": 16777333, - "Key_TrebleUp": 16777334, - "Key_TrebleDown": 16777335, - "Key_MediaPlay": 16777344, - "Key_MediaStop": 16777345, - "Key_MediaPrevious": 16777346, - "Key_MediaNext": 16777347, - "Key_MediaRecord": 16777348, - "Key_MediaPause": 16777349, - "Key_MediaTogglePlayPause": 16777350, - "Key_HomePage": 16777360, - "Key_Favorites": 16777361, - "Key_Search": 16777362, - "Key_Standby": 16777363, - "Key_OpenUrl": 16777364, - "Key_LaunchMail": 16777376, - "Key_LaunchMedia": 16777377, - "Key_Launch0": 16777378, - "Key_Launch1": 16777379, - "Key_Launch2": 16777380, - "Key_Launch3": 16777381, - "Key_Launch4": 16777382, - "Key_Launch5": 16777383, - "Key_Launch6": 16777384, - "Key_Launch7": 16777385, - "Key_Launch8": 16777386, - "Key_Launch9": 16777387, - "Key_LaunchA": 16777388, - "Key_LaunchB": 16777389, - "Key_LaunchC": 16777390, - "Key_LaunchD": 16777391, - "Key_LaunchE": 16777392, - "Key_LaunchF": 16777393, - "Key_MonBrightnessUp": 16777394, - "Key_MonBrightnessDown": 16777395, - "Key_KeyboardLightOnOff": 16777396, - "Key_KeyboardBrightnessUp": 16777397, - "Key_KeyboardBrightnessDown": 16777398, - "Key_PowerOff": 16777399, - "Key_WakeUp": 16777400, - "Key_Eject": 16777401, - "Key_ScreenSaver": 16777402, - "Key_WWW": 16777403, - "Key_Memo": 16777404, - "Key_LightBulb": 16777405, - "Key_Shop": 16777406, - "Key_History": 16777407, - "Key_AddFavorite": 16777408, - "Key_HotLinks": 16777409, - "Key_BrightnessAdjust": 16777410, - "Key_Finance": 16777411, - "Key_Community": 16777412, - "Key_AudioRewind": 16777413, - "Key_BackForward": 16777414, - "Key_ApplicationLeft": 16777415, - "Key_ApplicationRight": 16777416, - "Key_Book": 16777417, - "Key_CD": 16777418, - "Key_Calculator": 16777419, - "Key_ToDoList": 16777420, - "Key_ClearGrab": 16777421, - "Key_Close": 16777422, - "Key_Copy": 16777423, - "Key_Cut": 16777424, - "Key_Display": 16777425, - "Key_DOS": 16777426, - "Key_Documents": 16777427, - "Key_Excel": 16777428, - "Key_Explorer": 16777429, - "Key_Game": 16777430, - "Key_Go": 16777431, - "Key_iTouch": 16777432, - "Key_LogOff": 16777433, - "Key_Market": 16777434, - "Key_Meeting": 16777435, - "Key_MenuKB": 16777436, - "Key_MenuPB": 16777437, - "Key_MySites": 16777438, - "Key_News": 16777439, - "Key_OfficeHome": 16777440, - "Key_Option": 16777441, - "Key_Paste": 16777442, - "Key_Phone": 16777443, - "Key_Calendar": 16777444, - "Key_Reply": 16777445, - "Key_Reload": 16777446, - "Key_RotateWindows": 16777447, - "Key_RotationPB": 16777448, - "Key_RotationKB": 16777449, - "Key_Save": 16777450, - "Key_Send": 16777451, - "Key_Spell": 16777452, - "Key_SplitScreen": 16777453, - "Key_Support": 16777454, - "Key_TaskPane": 16777455, - "Key_Terminal": 16777456, - "Key_Tools": 16777457, - "Key_Travel": 16777458, - "Key_Video": 16777459, - "Key_Word": 16777460, - "Key_Xfer": 16777461, - "Key_ZoomIn": 16777462, - "Key_ZoomOut": 16777463, - "Key_Away": 16777464, - "Key_Messenger": 16777465, - "Key_WebCam": 16777466, - "Key_MailForward": 16777467, - "Key_Pictures": 16777468, - "Key_Music": 16777469, - "Key_Battery": 16777470, - "Key_Bluetooth": 16777471, - "Key_WLAN": 16777472, - "Key_UWB": 16777473, - "Key_AudioForward": 16777474, - "Key_AudioRepeat": 16777475, - "Key_AudioRandomPlay": 16777476, - "Key_Subtitle": 16777477, - "Key_AudioCycleTrack": 16777478, - "Key_Time": 16777479, - "Key_Hibernate": 16777480, - "Key_View": 16777481, - "Key_TopMenu": 16777482, - "Key_PowerDown": 16777483, - "Key_Suspend": 16777484, - "Key_ContrastAdjust": 16777485, - "Key_LaunchG": 16777486, - "Key_LaunchH": 16777487, - "Key_TouchpadToggle": 16777488, - "Key_TouchpadOn": 16777489, - "Key_TouchpadOff": 16777490, - "Key_MicMute": 16777491, - "Key_Red": 16777492, - "Key_Green": 16777493, - "Key_Yellow": 16777494, - "Key_Blue": 16777495, - "Key_ChannelUp": 16777496, - "Key_ChannelDown": 16777497, - "Key_Guide": 16777498, - "Key_Info": 16777499, - "Key_Settings": 16777500, - "Key_MicVolumeUp": 16777501, - "Key_MicVolumeDown": 16777502, - "Key_New": 16777504, - "Key_Open": 16777505, - "Key_Find": 16777506, - "Key_Undo": 16777507, - "Key_Redo": 16777508, - "Key_MediaLast": 16842751, - "Key_Select": 16842752, - "Key_Yes": 16842753, - "Key_No": 16842754, - "Key_Cancel": 16908289, - "Key_Printer": 16908290, - "Key_Execute": 16908291, - "Key_Sleep": 16908292, - "Key_Play": 16908293, - "Key_Zoom": 16908294, - "Key_Exit": 16908298, - "Key_Context1": 17825792, - "Key_Context2": 17825793, - "Key_Context3": 17825794, - "Key_Context4": 17825795, - "Key_Call": 17825796, - "Key_Hangup": 17825797, - "Key_Flip": 17825798, - "Key_ToggleCallHangup": 17825799, - "Key_VoiceDial": 17825800, - "Key_LastNumberRedial": 17825801, - "Key_Camera": 17825824, - "Key_CameraFocus": 17825825, - "Key_unknown": 33554431 - } - } - Enum { - name: "ArrowType" - values: { - "NoArrow": 0, - "UpArrow": 1, - "DownArrow": 2, - "LeftArrow": 3, - "RightArrow": 4 - } - } - Enum { - name: "PenStyle" - values: { - "NoPen": 0, - "SolidLine": 1, - "DashLine": 2, - "DotLine": 3, - "DashDotLine": 4, - "DashDotDotLine": 5, - "CustomDashLine": 6 - } - } - Enum { - name: "PenCapStyle" - values: { - "FlatCap": 0, - "SquareCap": 16, - "RoundCap": 32, - "MPenCapStyle": 48 - } - } - Enum { - name: "PenJoinStyle" - values: { - "MiterJoin": 0, - "BevelJoin": 64, - "RoundJoin": 128, - "SvgMiterJoin": 256, - "MPenJoinStyle": 448 - } - } - Enum { - name: "BrushStyle" - values: { - "NoBrush": 0, - "SolidPattern": 1, - "Dense1Pattern": 2, - "Dense2Pattern": 3, - "Dense3Pattern": 4, - "Dense4Pattern": 5, - "Dense5Pattern": 6, - "Dense6Pattern": 7, - "Dense7Pattern": 8, - "HorPattern": 9, - "VerPattern": 10, - "CrossPattern": 11, - "BDiagPattern": 12, - "FDiagPattern": 13, - "DiagCrossPattern": 14, - "LinearGradientPattern": 15, - "RadialGradientPattern": 16, - "ConicalGradientPattern": 17, - "TexturePattern": 24 - } - } - Enum { - name: "SizeMode" - values: { - "AbsoluteSize": 0, - "RelativeSize": 1 - } - } - Enum { - name: "CursorShape" - values: { - "ArrowCursor": 0, - "UpArrowCursor": 1, - "CrossCursor": 2, - "WaitCursor": 3, - "IBeamCursor": 4, - "SizeVerCursor": 5, - "SizeHorCursor": 6, - "SizeBDiagCursor": 7, - "SizeFDiagCursor": 8, - "SizeAllCursor": 9, - "BlankCursor": 10, - "SplitVCursor": 11, - "SplitHCursor": 12, - "PointingHandCursor": 13, - "ForbiddenCursor": 14, - "WhatsThisCursor": 15, - "BusyCursor": 16, - "OpenHandCursor": 17, - "ClosedHandCursor": 18, - "DragCopyCursor": 19, - "DragMoveCursor": 20, - "DragLinkCursor": 21, - "LastCursor": 21, - "BitmapCursor": 24, - "CustomCursor": 25 - } - } - Enum { - name: "TextFormat" - values: { - "PlainText": 0, - "RichText": 1, - "AutoText": 2 - } - } - Enum { - name: "AspectRatioMode" - values: { - "IgnoreAspectRatio": 0, - "KeepAspectRatio": 1, - "KeepAspectRatioByExpanding": 2 - } - } - Enum { - name: "DockWidgetArea" - values: { - "LeftDockWidgetArea": 1, - "RightDockWidgetArea": 2, - "TopDockWidgetArea": 4, - "BottomDockWidgetArea": 8, - "DockWidgetArea_Mask": 15, - "AllDockWidgetAreas": 15, - "NoDockWidgetArea": 0 - } - } - Enum { - name: "DockWidgetAreas" - values: { - "LeftDockWidgetArea": 1, - "RightDockWidgetArea": 2, - "TopDockWidgetArea": 4, - "BottomDockWidgetArea": 8, - "DockWidgetArea_Mask": 15, - "AllDockWidgetAreas": 15, - "NoDockWidgetArea": 0 - } - } - Enum { - name: "ToolBarArea" - values: { - "LeftToolBarArea": 1, - "RightToolBarArea": 2, - "TopToolBarArea": 4, - "BottomToolBarArea": 8, - "ToolBarArea_Mask": 15, - "AllToolBarAreas": 15, - "NoToolBarArea": 0 - } - } - Enum { - name: "ToolBarAreas" - values: { - "LeftToolBarArea": 1, - "RightToolBarArea": 2, - "TopToolBarArea": 4, - "BottomToolBarArea": 8, - "ToolBarArea_Mask": 15, - "AllToolBarAreas": 15, - "NoToolBarArea": 0 - } - } - Enum { - name: "DateFormat" - values: { - "TextDate": 0, - "ISODate": 1, - "SystemLocaleDate": 2, - "LocalDate": 2, - "LocaleDate": 3, - "SystemLocaleShortDate": 4, - "SystemLocaleLongDate": 5, - "DefaultLocaleShortDate": 6, - "DefaultLocaleLongDate": 7, - "RFC2822Date": 8 - } - } - Enum { - name: "TimeSpec" - values: { - "LocalTime": 0, - "UTC": 1, - "OffsetFromUTC": 2, - "TimeZone": 3 - } - } - Enum { - name: "DayOfWeek" - values: { - "Monday": 1, - "Tuesday": 2, - "Wednesday": 3, - "Thursday": 4, - "Friday": 5, - "Saturday": 6, - "Sunday": 7 - } - } - Enum { - name: "ScrollBarPolicy" - values: { - "ScrollBarAsNeeded": 0, - "ScrollBarAlwaysOff": 1, - "ScrollBarAlwaysOn": 2 - } - } - Enum { - name: "CaseSensitivity" - values: { - "CaseInsensitive": 0, - "CaseSensitive": 1 - } - } - Enum { - name: "Corner" - values: { - "TopLeftCorner": 0, - "TopRightCorner": 1, - "BottomLeftCorner": 2, - "BottomRightCorner": 3 - } - } - Enum { - name: "Edge" - values: { - "TopEdge": 1, - "LeftEdge": 2, - "RightEdge": 4, - "BottomEdge": 8 - } - } - Enum { - name: "Edges" - values: { - "TopEdge": 1, - "LeftEdge": 2, - "RightEdge": 4, - "BottomEdge": 8 - } - } - Enum { - name: "ConnectionType" - values: { - "AutoConnection": 0, - "DirectConnection": 1, - "QueuedConnection": 2, - "BlockingQueuedConnection": 3, - "UniqueConnection": 128 - } - } - Enum { - name: "ShortcutContext" - values: { - "WidgetShortcut": 0, - "WindowShortcut": 1, - "ApplicationShortcut": 2, - "WidgetWithChildrenShortcut": 3 - } - } - Enum { - name: "FillRule" - values: { - "OddEvenFill": 0, - "WindingFill": 1 - } - } - Enum { - name: "MaskMode" - values: { - "MaskInColor": 0, - "MaskOutColor": 1 - } - } - Enum { - name: "ClipOperation" - values: { - "NoClip": 0, - "ReplaceClip": 1, - "IntersectClip": 2 - } - } - Enum { - name: "ItemSelectionMode" - values: { - "ContainsItemShape": 0, - "IntersectsItemShape": 1, - "ContainsItemBoundingRect": 2, - "IntersectsItemBoundingRect": 3 - } - } - Enum { - name: "ItemSelectionOperation" - values: { - "ReplaceSelection": 0, - "AddToSelection": 1 - } - } - Enum { - name: "TransformationMode" - values: { - "FastTransformation": 0, - "SmoothTransformation": 1 - } - } - Enum { - name: "Axis" - values: { - "XAxis": 0, - "YAxis": 1, - "ZAxis": 2 - } - } - Enum { - name: "FocusReason" - values: { - "MouseFocusReason": 0, - "TabFocusReason": 1, - "BacktabFocusReason": 2, - "ActiveWindowFocusReason": 3, - "PopupFocusReason": 4, - "ShortcutFocusReason": 5, - "MenuBarFocusReason": 6, - "OtherFocusReason": 7, - "NoFocusReason": 8 - } - } - Enum { - name: "ContextMenuPolicy" - values: { - "NoContextMenu": 0, - "DefaultContextMenu": 1, - "ActionsContextMenu": 2, - "CustomContextMenu": 3, - "PreventContextMenu": 4 - } - } - Enum { - name: "InputMethodQuery" - values: { - "ImEnabled": 1, - "ImCursorRectangle": 2, - "ImMicroFocus": 2, - "ImFont": 4, - "ImCursorPosition": 8, - "ImSurroundingText": 16, - "ImCurrentSelection": 32, - "ImMaximumTextLength": 64, - "ImAnchorPosition": 128, - "ImHints": 256, - "ImPreferredLanguage": 512, - "ImAbsolutePosition": 1024, - "ImTextBeforeCursor": 2048, - "ImTextAfterCursor": 4096, - "ImEnterKeyType": 8192, - "ImPlatformData": -2147483648, - "ImQueryInput": 186, - "ImQueryAll": -1 - } - } - Enum { - name: "InputMethodQueries" - values: { - "ImEnabled": 1, - "ImCursorRectangle": 2, - "ImMicroFocus": 2, - "ImFont": 4, - "ImCursorPosition": 8, - "ImSurroundingText": 16, - "ImCurrentSelection": 32, - "ImMaximumTextLength": 64, - "ImAnchorPosition": 128, - "ImHints": 256, - "ImPreferredLanguage": 512, - "ImAbsolutePosition": 1024, - "ImTextBeforeCursor": 2048, - "ImTextAfterCursor": 4096, - "ImEnterKeyType": 8192, - "ImPlatformData": -2147483648, - "ImQueryInput": 186, - "ImQueryAll": -1 - } - } - Enum { - name: "InputMethodHint" - values: { - "ImhNone": 0, - "ImhHiddenText": 1, - "ImhSensitiveData": 2, - "ImhNoAutoUppercase": 4, - "ImhPreferNumbers": 8, - "ImhPreferUppercase": 16, - "ImhPreferLowercase": 32, - "ImhNoPredictiveText": 64, - "ImhDate": 128, - "ImhTime": 256, - "ImhPreferLatin": 512, - "ImhMultiLine": 1024, - "ImhDigitsOnly": 65536, - "ImhFormattedNumbersOnly": 131072, - "ImhUppercaseOnly": 262144, - "ImhLowercaseOnly": 524288, - "ImhDialableCharactersOnly": 1048576, - "ImhEmailCharactersOnly": 2097152, - "ImhUrlCharactersOnly": 4194304, - "ImhLatinOnly": 8388608, - "ImhExclusiveInputMask": -65536 - } - } - Enum { - name: "InputMethodHints" - values: { - "ImhNone": 0, - "ImhHiddenText": 1, - "ImhSensitiveData": 2, - "ImhNoAutoUppercase": 4, - "ImhPreferNumbers": 8, - "ImhPreferUppercase": 16, - "ImhPreferLowercase": 32, - "ImhNoPredictiveText": 64, - "ImhDate": 128, - "ImhTime": 256, - "ImhPreferLatin": 512, - "ImhMultiLine": 1024, - "ImhDigitsOnly": 65536, - "ImhFormattedNumbersOnly": 131072, - "ImhUppercaseOnly": 262144, - "ImhLowercaseOnly": 524288, - "ImhDialableCharactersOnly": 1048576, - "ImhEmailCharactersOnly": 2097152, - "ImhUrlCharactersOnly": 4194304, - "ImhLatinOnly": 8388608, - "ImhExclusiveInputMask": -65536 - } - } - Enum { - name: "EnterKeyType" - values: { - "EnterKeyDefault": 0, - "EnterKeyReturn": 1, - "EnterKeyDone": 2, - "EnterKeyGo": 3, - "EnterKeySend": 4, - "EnterKeySearch": 5, - "EnterKeyNext": 6, - "EnterKeyPrevious": 7 - } - } - Enum { - name: "ToolButtonStyle" - values: { - "ToolButtonIconOnly": 0, - "ToolButtonTextOnly": 1, - "ToolButtonTextBesideIcon": 2, - "ToolButtonTextUnderIcon": 3, - "ToolButtonFollowStyle": 4 - } - } - Enum { - name: "LayoutDirection" - values: { - "LeftToRight": 0, - "RightToLeft": 1, - "LayoutDirectionAuto": 2 - } - } - Enum { - name: "DropAction" - values: { - "CopyAction": 1, - "MoveAction": 2, - "LinkAction": 4, - "ActionMask": 255, - "TargetMoveAction": 32770, - "IgnoreAction": 0 - } - } - Enum { - name: "DropActions" - values: { - "CopyAction": 1, - "MoveAction": 2, - "LinkAction": 4, - "ActionMask": 255, - "TargetMoveAction": 32770, - "IgnoreAction": 0 - } - } - Enum { - name: "CheckState" - values: { - "Unchecked": 0, - "PartiallyChecked": 1, - "Checked": 2 - } - } - Enum { - name: "ItemDataRole" - values: { - "DisplayRole": 0, - "DecorationRole": 1, - "EditRole": 2, - "ToolTipRole": 3, - "StatusTipRole": 4, - "WhatsThisRole": 5, - "FontRole": 6, - "TextAlignmentRole": 7, - "BackgroundColorRole": 8, - "BackgroundRole": 8, - "TextColorRole": 9, - "ForegroundRole": 9, - "CheckStateRole": 10, - "AccessibleTextRole": 11, - "AccessibleDescriptionRole": 12, - "SizeHintRole": 13, - "InitialSortOrderRole": 14, - "DisplayPropertyRole": 27, - "DecorationPropertyRole": 28, - "ToolTipPropertyRole": 29, - "StatusTipPropertyRole": 30, - "WhatsThisPropertyRole": 31, - "UserRole": 256 - } - } - Enum { - name: "ItemFlags" - values: { - "NoItemFlags": 0, - "ItemIsSelectable": 1, - "ItemIsEditable": 2, - "ItemIsDragEnabled": 4, - "ItemIsDropEnabled": 8, - "ItemIsUserCheckable": 16, - "ItemIsEnabled": 32, - "ItemIsAutoTristate": 64, - "ItemIsTristate": 64, - "ItemNeverHasChildren": 128, - "ItemIsUserTristate": 256 - } - } - Enum { - name: "MatchFlags" - values: { - "MatchExactly": 0, - "MatchContains": 1, - "MatchStartsWith": 2, - "MatchEndsWith": 3, - "MatchRegExp": 4, - "MatchWildcard": 5, - "MatchFixedString": 8, - "MatchCaseSensitive": 16, - "MatchWrap": 32, - "MatchRecursive": 64 - } - } - Enum { - name: "WindowModality" - values: { - "NonModal": 0, - "WindowModal": 1, - "ApplicationModal": 2 - } - } - Enum { - name: "TextInteractionFlag" - values: { - "NoTextInteraction": 0, - "TextSelectableByMouse": 1, - "TextSelectableByKeyboard": 2, - "LinksAccessibleByMouse": 4, - "LinksAccessibleByKeyboard": 8, - "TextEditable": 16, - "TextEditorInteraction": 19, - "TextBrowserInteraction": 13 - } - } - Enum { - name: "TextInteractionFlags" - values: { - "NoTextInteraction": 0, - "TextSelectableByMouse": 1, - "TextSelectableByKeyboard": 2, - "LinksAccessibleByMouse": 4, - "LinksAccessibleByKeyboard": 8, - "TextEditable": 16, - "TextEditorInteraction": 19, - "TextBrowserInteraction": 13 - } - } - Enum { - name: "SizeHint" - values: { - "MinimumSize": 0, - "PreferredSize": 1, - "MaximumSize": 2, - "MinimumDescent": 3, - "NSizeHints": 4 - } - } - Enum { - name: "TouchPointStates" - values: { - "TouchPointPressed": 1, - "TouchPointMoved": 2, - "TouchPointStationary": 4, - "TouchPointReleased": 8 - } - } - Enum { - name: "GestureState" - values: { - "NoGesture": 0, - "GestureStarted": 1, - "GestureUpdated": 2, - "GestureFinished": 3, - "GestureCanceled": 4 - } - } - Enum { - name: "GestureType" - values: { - "TapGesture": 1, - "TapAndHoldGesture": 2, - "PanGesture": 3, - "PinchGesture": 4, - "SwipeGesture": 5, - "CustomGesture": 256, - "LastGestureType": -1 - } - } - Enum { - name: "NativeGestureType" - values: { - "BeginNativeGesture": 0, - "EndNativeGesture": 1, - "PanNativeGesture": 2, - "ZoomNativeGesture": 3, - "SmartZoomNativeGesture": 4, - "RotateNativeGesture": 5, - "SwipeNativeGesture": 6 - } - } - Enum { - name: "CursorMoveStyle" - values: { - "LogicalMoveStyle": 0, - "VisualMoveStyle": 1 - } - } - Enum { - name: "TimerType" - values: { - "PreciseTimer": 0, - "CoarseTimer": 1, - "VeryCoarseTimer": 2 - } - } - Enum { - name: "ScrollPhase" - values: { - "ScrollBegin": 1, - "ScrollUpdate": 2, - "ScrollEnd": 3 - } - } - Enum { - name: "MouseEventSource" - values: { - "MouseEventNotSynthesized": 0, - "MouseEventSynthesizedBySystem": 1, - "MouseEventSynthesizedByQt": 2, - "MouseEventSynthesizedByApplication": 3 - } - } - Enum { - name: "MouseEventFlag" - values: { - "MouseEventCreatedDoubleClick": 1, - "MouseEventFlagMask": 255 - } - } - } - Component { name: "QEasingCurve"; prototype: "QQmlEasingValueType" } -} diff --git a/src/imports/builtins/builtins.pro b/src/imports/builtins/builtins.pro new file mode 100644 index 0000000000..efd6787e5c --- /dev/null +++ b/src/imports/builtins/builtins.pro @@ -0,0 +1,32 @@ +TEMPLATE = aux + +QMLTYPEFILE = builtins.qmltypes + +# install rule +builtins.files = $$QMLTYPEFILE +builtins.path = $$[QT_INSTALL_QML] +INSTALLS += builtins + +# copy to build directory +!force_independent:if(!debug_and_release|!build_all|CONFIG(release, debug|release)) { + defineReplace(qmlModStripSrcDir) { + return($$relative_path($$1, $$_PRO_FILE_PWD_)) + } + + qmltypes2build.input = QMLTYPEFILE + qmltypes2build.output = $$[QT_INSTALL_QML]/${QMAKE_FUNC_FILE_IN_qmlModStripSrcDir} + !contains(TEMPLATE, vc.*): qmltypes2build.variable_out = PRE_TARGETDEPS + qmltypes2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} + qmltypes2build.name = COPY ${QMAKE_FILE_IN} + qmltypes2build.CONFIG = no_link no_clean + + QMAKE_EXTRA_COMPILERS += qmltypes2build +} + +# qmltypes target +!cross_compile:if(build_pass|!debug_and_release) { + qtPrepareTool(QMLPLUGINDUMP, qmlplugindump) + + qmltypes.commands = $$QMLPLUGINDUMP -builtins > $$PWD/$$QMLTYPEFILE + QMAKE_EXTRA_TARGETS += qmltypes +} diff --git a/src/imports/builtins/builtins.qmltypes b/src/imports/builtins/builtins.qmltypes new file mode 100644 index 0000000000..cca1c20d54 --- /dev/null +++ b/src/imports/builtins/builtins.qmltypes @@ -0,0 +1,1605 @@ +import QtQuick.tooling 1.2 + +// This file describes the plugin-supplied types contained in the library. +// It is used for QML tooling purposes only. +// +// This file was auto-generated by: +// 'qmlplugindump -nonrelocatable -builtins' + +Module { + dependencies: [] + Component { + name: "Qt" + Enum { + name: "GlobalColor" + values: { + "color0": 0, + "color1": 1, + "black": 2, + "white": 3, + "darkGray": 4, + "gray": 5, + "lightGray": 6, + "red": 7, + "green": 8, + "blue": 9, + "cyan": 10, + "magenta": 11, + "yellow": 12, + "darkRed": 13, + "darkGreen": 14, + "darkBlue": 15, + "darkCyan": 16, + "darkMagenta": 17, + "darkYellow": 18, + "transparent": 19 + } + } + Enum { + name: "KeyboardModifiers" + values: { + "NoModifier": 0, + "ShiftModifier": 33554432, + "ControlModifier": 67108864, + "AltModifier": 134217728, + "MetaModifier": 268435456, + "KeypadModifier": 536870912, + "GroupSwitchModifier": 1073741824, + "KeyboardModifierMask": -33554432 + } + } + Enum { + name: "MouseButtons" + values: { + "NoButton": 0, + "LeftButton": 1, + "RightButton": 2, + "MidButton": 4, + "MiddleButton": 4, + "BackButton": 8, + "XButton1": 8, + "ExtraButton1": 8, + "ForwardButton": 16, + "XButton2": 16, + "ExtraButton2": 16, + "TaskButton": 32, + "ExtraButton3": 32, + "ExtraButton4": 64, + "ExtraButton5": 128, + "ExtraButton6": 256, + "ExtraButton7": 512, + "ExtraButton8": 1024, + "ExtraButton9": 2048, + "ExtraButton10": 4096, + "ExtraButton11": 8192, + "ExtraButton12": 16384, + "ExtraButton13": 32768, + "ExtraButton14": 65536, + "ExtraButton15": 131072, + "ExtraButton16": 262144, + "ExtraButton17": 524288, + "ExtraButton18": 1048576, + "ExtraButton19": 2097152, + "ExtraButton20": 4194304, + "ExtraButton21": 8388608, + "ExtraButton22": 16777216, + "ExtraButton23": 33554432, + "ExtraButton24": 67108864, + "AllButtons": 134217727, + "MaxMouseButton": 67108864, + "MouseButtonMask": -1 + } + } + Enum { + name: "Orientation" + values: { + "Horizontal": 1, + "Vertical": 2 + } + } + Enum { + name: "Orientations" + values: { + "Horizontal": 1, + "Vertical": 2 + } + } + Enum { + name: "FocusPolicy" + values: { + "NoFocus": 0, + "TabFocus": 1, + "ClickFocus": 2, + "StrongFocus": 11, + "WheelFocus": 15 + } + } + Enum { + name: "TabFocusBehavior" + values: { + "NoTabFocus": 0, + "TabFocusTextControls": 1, + "TabFocusListControls": 2, + "TabFocusAllControls": 255 + } + } + Enum { + name: "SortOrder" + values: { + "AscendingOrder": 0, + "DescendingOrder": 1 + } + } + Enum { + name: "Alignment" + values: { + "AlignLeft": 1, + "AlignLeading": 1, + "AlignRight": 2, + "AlignTrailing": 2, + "AlignHCenter": 4, + "AlignJustify": 8, + "AlignAbsolute": 16, + "AlignHorizontal_Mask": 31, + "AlignTop": 32, + "AlignBottom": 64, + "AlignVCenter": 128, + "AlignBaseline": 256, + "AlignVertical_Mask": 480, + "AlignCenter": 132 + } + } + Enum { + name: "TextElideMode" + values: { + "ElideLeft": 0, + "ElideRight": 1, + "ElideMiddle": 2, + "ElideNone": 3 + } + } + Enum { + name: "WindowType" + values: { + "Widget": 0, + "Window": 1, + "Dialog": 3, + "Sheet": 5, + "Drawer": 7, + "Popup": 9, + "Tool": 11, + "ToolTip": 13, + "SplashScreen": 15, + "Desktop": 17, + "SubWindow": 18, + "ForeignWindow": 33, + "CoverWindow": 65, + "WindowType_Mask": 255, + "MSWindowsFixedSizeDialogHint": 256, + "MSWindowsOwnDC": 512, + "BypassWindowManagerHint": 1024, + "X11BypassWindowManagerHint": 1024, + "FramelessWindowHint": 2048, + "WindowTitleHint": 4096, + "WindowSystemMenuHint": 8192, + "WindowMinimizeButtonHint": 16384, + "WindowMaximizeButtonHint": 32768, + "WindowMinMaxButtonsHint": 49152, + "WindowContextHelpButtonHint": 65536, + "WindowShadeButtonHint": 131072, + "WindowStaysOnTopHint": 262144, + "WindowTransparentForInput": 524288, + "WindowOverridesSystemGestures": 1048576, + "WindowDoesNotAcceptFocus": 2097152, + "MaximizeUsingFullscreenGeometryHint": 4194304, + "CustomizeWindowHint": 33554432, + "WindowStaysOnBottomHint": 67108864, + "WindowCloseButtonHint": 134217728, + "MacWindowToolBarButtonHint": 268435456, + "BypassGraphicsProxyWidget": 536870912, + "NoDropShadowWindowHint": 1073741824, + "WindowFullscreenButtonHint": -2147483648, + "WindowOkButtonHint": 524288, + "WindowCancelButtonHint": 1048576 + } + } + Enum { + name: "WindowFlags" + values: { + "Widget": 0, + "Window": 1, + "Dialog": 3, + "Sheet": 5, + "Drawer": 7, + "Popup": 9, + "Tool": 11, + "ToolTip": 13, + "SplashScreen": 15, + "Desktop": 17, + "SubWindow": 18, + "ForeignWindow": 33, + "CoverWindow": 65, + "WindowType_Mask": 255, + "MSWindowsFixedSizeDialogHint": 256, + "MSWindowsOwnDC": 512, + "BypassWindowManagerHint": 1024, + "X11BypassWindowManagerHint": 1024, + "FramelessWindowHint": 2048, + "WindowTitleHint": 4096, + "WindowSystemMenuHint": 8192, + "WindowMinimizeButtonHint": 16384, + "WindowMaximizeButtonHint": 32768, + "WindowMinMaxButtonsHint": 49152, + "WindowContextHelpButtonHint": 65536, + "WindowShadeButtonHint": 131072, + "WindowStaysOnTopHint": 262144, + "WindowTransparentForInput": 524288, + "WindowOverridesSystemGestures": 1048576, + "WindowDoesNotAcceptFocus": 2097152, + "MaximizeUsingFullscreenGeometryHint": 4194304, + "CustomizeWindowHint": 33554432, + "WindowStaysOnBottomHint": 67108864, + "WindowCloseButtonHint": 134217728, + "MacWindowToolBarButtonHint": 268435456, + "BypassGraphicsProxyWidget": 536870912, + "NoDropShadowWindowHint": 1073741824, + "WindowFullscreenButtonHint": -2147483648, + "WindowOkButtonHint": 524288, + "WindowCancelButtonHint": 1048576 + } + } + Enum { + name: "WindowState" + values: { + "WindowNoState": 0, + "WindowMinimized": 1, + "WindowMaximized": 2, + "WindowFullScreen": 4, + "WindowActive": 8 + } + } + Enum { + name: "WindowStates" + values: { + "WindowNoState": 0, + "WindowMinimized": 1, + "WindowMaximized": 2, + "WindowFullScreen": 4, + "WindowActive": 8 + } + } + Enum { + name: "ApplicationState" + values: { + "ApplicationSuspended": 0, + "ApplicationHidden": 1, + "ApplicationInactive": 2, + "ApplicationActive": 4 + } + } + Enum { + name: "ScreenOrientation" + values: { + "PrimaryOrientation": 0, + "PortraitOrientation": 1, + "LandscapeOrientation": 2, + "InvertedPortraitOrientation": 4, + "InvertedLandscapeOrientation": 8 + } + } + Enum { + name: "ScreenOrientations" + values: { + "PrimaryOrientation": 0, + "PortraitOrientation": 1, + "LandscapeOrientation": 2, + "InvertedPortraitOrientation": 4, + "InvertedLandscapeOrientation": 8 + } + } + Enum { + name: "WidgetAttribute" + values: { + "WA_Disabled": 0, + "WA_UnderMouse": 1, + "WA_MouseTracking": 2, + "WA_ContentsPropagated": 3, + "WA_OpaquePaintEvent": 4, + "WA_NoBackground": 4, + "WA_StaticContents": 5, + "WA_LaidOut": 7, + "WA_PaintOnScreen": 8, + "WA_NoSystemBackground": 9, + "WA_UpdatesDisabled": 10, + "WA_Mapped": 11, + "WA_MacNoClickThrough": 12, + "WA_InputMethodEnabled": 14, + "WA_WState_Visible": 15, + "WA_WState_Hidden": 16, + "WA_ForceDisabled": 32, + "WA_KeyCompression": 33, + "WA_PendingMoveEvent": 34, + "WA_PendingResizeEvent": 35, + "WA_SetPalette": 36, + "WA_SetFont": 37, + "WA_SetCursor": 38, + "WA_NoChildEventsFromChildren": 39, + "WA_WindowModified": 41, + "WA_Resized": 42, + "WA_Moved": 43, + "WA_PendingUpdate": 44, + "WA_InvalidSize": 45, + "WA_MacBrushedMetal": 46, + "WA_MacMetalStyle": 46, + "WA_CustomWhatsThis": 47, + "WA_LayoutOnEntireRect": 48, + "WA_OutsideWSRange": 49, + "WA_GrabbedShortcut": 50, + "WA_TransparentForMouseEvents": 51, + "WA_PaintUnclipped": 52, + "WA_SetWindowIcon": 53, + "WA_NoMouseReplay": 54, + "WA_DeleteOnClose": 55, + "WA_RightToLeft": 56, + "WA_SetLayoutDirection": 57, + "WA_NoChildEventsForParent": 58, + "WA_ForceUpdatesDisabled": 59, + "WA_WState_Created": 60, + "WA_WState_CompressKeys": 61, + "WA_WState_InPaintEvent": 62, + "WA_WState_Reparented": 63, + "WA_WState_ConfigPending": 64, + "WA_WState_Polished": 66, + "WA_WState_DND": 67, + "WA_WState_OwnSizePolicy": 68, + "WA_WState_ExplicitShowHide": 69, + "WA_ShowModal": 70, + "WA_MouseNoMask": 71, + "WA_GroupLeader": 72, + "WA_NoMousePropagation": 73, + "WA_Hover": 74, + "WA_InputMethodTransparent": 75, + "WA_QuitOnClose": 76, + "WA_KeyboardFocusChange": 77, + "WA_AcceptDrops": 78, + "WA_DropSiteRegistered": 79, + "WA_ForceAcceptDrops": 79, + "WA_WindowPropagation": 80, + "WA_NoX11EventCompression": 81, + "WA_TintedBackground": 82, + "WA_X11OpenGLOverlay": 83, + "WA_AlwaysShowToolTips": 84, + "WA_MacOpaqueSizeGrip": 85, + "WA_SetStyle": 86, + "WA_SetLocale": 87, + "WA_MacShowFocusRect": 88, + "WA_MacNormalSize": 89, + "WA_MacSmallSize": 90, + "WA_MacMiniSize": 91, + "WA_LayoutUsesWidgetRect": 92, + "WA_StyledBackground": 93, + "WA_MSWindowsUseDirect3D": 94, + "WA_CanHostQMdiSubWindowTitleBar": 95, + "WA_MacAlwaysShowToolWindow": 96, + "WA_StyleSheet": 97, + "WA_ShowWithoutActivating": 98, + "WA_X11BypassTransientForHint": 99, + "WA_NativeWindow": 100, + "WA_DontCreateNativeAncestors": 101, + "WA_MacVariableSize": 102, + "WA_DontShowOnScreen": 103, + "WA_X11NetWmWindowTypeDesktop": 104, + "WA_X11NetWmWindowTypeDock": 105, + "WA_X11NetWmWindowTypeToolBar": 106, + "WA_X11NetWmWindowTypeMenu": 107, + "WA_X11NetWmWindowTypeUtility": 108, + "WA_X11NetWmWindowTypeSplash": 109, + "WA_X11NetWmWindowTypeDialog": 110, + "WA_X11NetWmWindowTypeDropDownMenu": 111, + "WA_X11NetWmWindowTypePopupMenu": 112, + "WA_X11NetWmWindowTypeToolTip": 113, + "WA_X11NetWmWindowTypeNotification": 114, + "WA_X11NetWmWindowTypeCombo": 115, + "WA_X11NetWmWindowTypeDND": 116, + "WA_MacFrameworkScaled": 117, + "WA_SetWindowModality": 118, + "WA_WState_WindowOpacitySet": 119, + "WA_TranslucentBackground": 120, + "WA_AcceptTouchEvents": 121, + "WA_WState_AcceptedTouchBeginEvent": 122, + "WA_TouchPadAcceptSingleTouchEvents": 123, + "WA_X11DoNotAcceptFocus": 126, + "WA_MacNoShadow": 127, + "WA_AlwaysStackOnTop": 128, + "WA_AttributeCount": 129 + } + } + Enum { + name: "ApplicationAttribute" + values: { + "AA_ImmediateWidgetCreation": 0, + "AA_MSWindowsUseDirect3DByDefault": 1, + "AA_DontShowIconsInMenus": 2, + "AA_NativeWindows": 3, + "AA_DontCreateNativeWidgetSiblings": 4, + "AA_MacPluginApplication": 5, + "AA_DontUseNativeMenuBar": 6, + "AA_MacDontSwapCtrlAndMeta": 7, + "AA_Use96Dpi": 8, + "AA_X11InitThreads": 10, + "AA_SynthesizeTouchForUnhandledMouseEvents": 11, + "AA_SynthesizeMouseForUnhandledTouchEvents": 12, + "AA_UseHighDpiPixmaps": 13, + "AA_ForceRasterWidgets": 14, + "AA_UseDesktopOpenGL": 15, + "AA_UseOpenGLES": 16, + "AA_UseSoftwareOpenGL": 17, + "AA_ShareOpenGLContexts": 18, + "AA_SetPalette": 19, + "AA_EnableHighDpiScaling": 20, + "AA_DisableHighDpiScaling": 21, + "AA_AttributeCount": 22 + } + } + Enum { + name: "ImageConversionFlags" + values: { + "ColorMode_Mask": 3, + "AutoColor": 0, + "ColorOnly": 3, + "MonoOnly": 2, + "AlphaDither_Mask": 12, + "ThresholdAlphaDither": 0, + "OrderedAlphaDither": 4, + "DiffuseAlphaDither": 8, + "NoAlpha": 12, + "Dither_Mask": 48, + "DiffuseDither": 0, + "OrderedDither": 16, + "ThresholdDither": 32, + "DitherMode_Mask": 192, + "AutoDither": 0, + "PreferDither": 64, + "AvoidDither": 128, + "NoOpaqueDetection": 256, + "NoFormatConversion": 512 + } + } + Enum { + name: "BGMode" + values: { + "TransparentMode": 0, + "OpaqueMode": 1 + } + } + Enum { + name: "Key" + values: { + "Key_Escape": 16777216, + "Key_Tab": 16777217, + "Key_Backtab": 16777218, + "Key_Backspace": 16777219, + "Key_Return": 16777220, + "Key_Enter": 16777221, + "Key_Insert": 16777222, + "Key_Delete": 16777223, + "Key_Pause": 16777224, + "Key_Print": 16777225, + "Key_SysReq": 16777226, + "Key_Clear": 16777227, + "Key_Home": 16777232, + "Key_End": 16777233, + "Key_Left": 16777234, + "Key_Up": 16777235, + "Key_Right": 16777236, + "Key_Down": 16777237, + "Key_PageUp": 16777238, + "Key_PageDown": 16777239, + "Key_Shift": 16777248, + "Key_Control": 16777249, + "Key_Meta": 16777250, + "Key_Alt": 16777251, + "Key_CapsLock": 16777252, + "Key_NumLock": 16777253, + "Key_ScrollLock": 16777254, + "Key_F1": 16777264, + "Key_F2": 16777265, + "Key_F3": 16777266, + "Key_F4": 16777267, + "Key_F5": 16777268, + "Key_F6": 16777269, + "Key_F7": 16777270, + "Key_F8": 16777271, + "Key_F9": 16777272, + "Key_F10": 16777273, + "Key_F11": 16777274, + "Key_F12": 16777275, + "Key_F13": 16777276, + "Key_F14": 16777277, + "Key_F15": 16777278, + "Key_F16": 16777279, + "Key_F17": 16777280, + "Key_F18": 16777281, + "Key_F19": 16777282, + "Key_F20": 16777283, + "Key_F21": 16777284, + "Key_F22": 16777285, + "Key_F23": 16777286, + "Key_F24": 16777287, + "Key_F25": 16777288, + "Key_F26": 16777289, + "Key_F27": 16777290, + "Key_F28": 16777291, + "Key_F29": 16777292, + "Key_F30": 16777293, + "Key_F31": 16777294, + "Key_F32": 16777295, + "Key_F33": 16777296, + "Key_F34": 16777297, + "Key_F35": 16777298, + "Key_Super_L": 16777299, + "Key_Super_R": 16777300, + "Key_Menu": 16777301, + "Key_Hyper_L": 16777302, + "Key_Hyper_R": 16777303, + "Key_Help": 16777304, + "Key_Direction_L": 16777305, + "Key_Direction_R": 16777312, + "Key_Space": 32, + "Key_Any": 32, + "Key_Exclam": 33, + "Key_QuoteDbl": 34, + "Key_NumberSign": 35, + "Key_Dollar": 36, + "Key_Percent": 37, + "Key_Ampersand": 38, + "Key_Apostrophe": 39, + "Key_ParenLeft": 40, + "Key_ParenRight": 41, + "Key_Asterisk": 42, + "Key_Plus": 43, + "Key_Comma": 44, + "Key_Minus": 45, + "Key_Period": 46, + "Key_Slash": 47, + "Key_0": 48, + "Key_1": 49, + "Key_2": 50, + "Key_3": 51, + "Key_4": 52, + "Key_5": 53, + "Key_6": 54, + "Key_7": 55, + "Key_8": 56, + "Key_9": 57, + "Key_Colon": 58, + "Key_Semicolon": 59, + "Key_Less": 60, + "Key_Equal": 61, + "Key_Greater": 62, + "Key_Question": 63, + "Key_At": 64, + "Key_A": 65, + "Key_B": 66, + "Key_C": 67, + "Key_D": 68, + "Key_E": 69, + "Key_F": 70, + "Key_G": 71, + "Key_H": 72, + "Key_I": 73, + "Key_J": 74, + "Key_K": 75, + "Key_L": 76, + "Key_M": 77, + "Key_N": 78, + "Key_O": 79, + "Key_P": 80, + "Key_Q": 81, + "Key_R": 82, + "Key_S": 83, + "Key_T": 84, + "Key_U": 85, + "Key_V": 86, + "Key_W": 87, + "Key_X": 88, + "Key_Y": 89, + "Key_Z": 90, + "Key_BracketLeft": 91, + "Key_Backslash": 92, + "Key_BracketRight": 93, + "Key_AsciiCircum": 94, + "Key_Underscore": 95, + "Key_QuoteLeft": 96, + "Key_BraceLeft": 123, + "Key_Bar": 124, + "Key_BraceRight": 125, + "Key_AsciiTilde": 126, + "Key_nobreakspace": 160, + "Key_exclamdown": 161, + "Key_cent": 162, + "Key_sterling": 163, + "Key_currency": 164, + "Key_yen": 165, + "Key_brokenbar": 166, + "Key_section": 167, + "Key_diaeresis": 168, + "Key_copyright": 169, + "Key_ordfeminine": 170, + "Key_guillemotleft": 171, + "Key_notsign": 172, + "Key_hyphen": 173, + "Key_registered": 174, + "Key_macron": 175, + "Key_degree": 176, + "Key_plusminus": 177, + "Key_twosuperior": 178, + "Key_threesuperior": 179, + "Key_acute": 180, + "Key_mu": 181, + "Key_paragraph": 182, + "Key_periodcentered": 183, + "Key_cedilla": 184, + "Key_onesuperior": 185, + "Key_masculine": 186, + "Key_guillemotright": 187, + "Key_onequarter": 188, + "Key_onehalf": 189, + "Key_threequarters": 190, + "Key_questiondown": 191, + "Key_Agrave": 192, + "Key_Aacute": 193, + "Key_Acircumflex": 194, + "Key_Atilde": 195, + "Key_Adiaeresis": 196, + "Key_Aring": 197, + "Key_AE": 198, + "Key_Ccedilla": 199, + "Key_Egrave": 200, + "Key_Eacute": 201, + "Key_Ecircumflex": 202, + "Key_Ediaeresis": 203, + "Key_Igrave": 204, + "Key_Iacute": 205, + "Key_Icircumflex": 206, + "Key_Idiaeresis": 207, + "Key_ETH": 208, + "Key_Ntilde": 209, + "Key_Ograve": 210, + "Key_Oacute": 211, + "Key_Ocircumflex": 212, + "Key_Otilde": 213, + "Key_Odiaeresis": 214, + "Key_multiply": 215, + "Key_Ooblique": 216, + "Key_Ugrave": 217, + "Key_Uacute": 218, + "Key_Ucircumflex": 219, + "Key_Udiaeresis": 220, + "Key_Yacute": 221, + "Key_THORN": 222, + "Key_ssharp": 223, + "Key_division": 247, + "Key_ydiaeresis": 255, + "Key_AltGr": 16781571, + "Key_Multi_key": 16781600, + "Key_Codeinput": 16781623, + "Key_SingleCandidate": 16781628, + "Key_MultipleCandidate": 16781629, + "Key_PreviousCandidate": 16781630, + "Key_Mode_switch": 16781694, + "Key_Kanji": 16781601, + "Key_Muhenkan": 16781602, + "Key_Henkan": 16781603, + "Key_Romaji": 16781604, + "Key_Hiragana": 16781605, + "Key_Katakana": 16781606, + "Key_Hiragana_Katakana": 16781607, + "Key_Zenkaku": 16781608, + "Key_Hankaku": 16781609, + "Key_Zenkaku_Hankaku": 16781610, + "Key_Touroku": 16781611, + "Key_Massyo": 16781612, + "Key_Kana_Lock": 16781613, + "Key_Kana_Shift": 16781614, + "Key_Eisu_Shift": 16781615, + "Key_Eisu_toggle": 16781616, + "Key_Hangul": 16781617, + "Key_Hangul_Start": 16781618, + "Key_Hangul_End": 16781619, + "Key_Hangul_Hanja": 16781620, + "Key_Hangul_Jamo": 16781621, + "Key_Hangul_Romaja": 16781622, + "Key_Hangul_Jeonja": 16781624, + "Key_Hangul_Banja": 16781625, + "Key_Hangul_PreHanja": 16781626, + "Key_Hangul_PostHanja": 16781627, + "Key_Hangul_Special": 16781631, + "Key_Dead_Grave": 16781904, + "Key_Dead_Acute": 16781905, + "Key_Dead_Circumflex": 16781906, + "Key_Dead_Tilde": 16781907, + "Key_Dead_Macron": 16781908, + "Key_Dead_Breve": 16781909, + "Key_Dead_Abovedot": 16781910, + "Key_Dead_Diaeresis": 16781911, + "Key_Dead_Abovering": 16781912, + "Key_Dead_Doubleacute": 16781913, + "Key_Dead_Caron": 16781914, + "Key_Dead_Cedilla": 16781915, + "Key_Dead_Ogonek": 16781916, + "Key_Dead_Iota": 16781917, + "Key_Dead_Voiced_Sound": 16781918, + "Key_Dead_Semivoiced_Sound": 16781919, + "Key_Dead_Belowdot": 16781920, + "Key_Dead_Hook": 16781921, + "Key_Dead_Horn": 16781922, + "Key_Back": 16777313, + "Key_Forward": 16777314, + "Key_Stop": 16777315, + "Key_Refresh": 16777316, + "Key_VolumeDown": 16777328, + "Key_VolumeMute": 16777329, + "Key_VolumeUp": 16777330, + "Key_BassBoost": 16777331, + "Key_BassUp": 16777332, + "Key_BassDown": 16777333, + "Key_TrebleUp": 16777334, + "Key_TrebleDown": 16777335, + "Key_MediaPlay": 16777344, + "Key_MediaStop": 16777345, + "Key_MediaPrevious": 16777346, + "Key_MediaNext": 16777347, + "Key_MediaRecord": 16777348, + "Key_MediaPause": 16777349, + "Key_MediaTogglePlayPause": 16777350, + "Key_HomePage": 16777360, + "Key_Favorites": 16777361, + "Key_Search": 16777362, + "Key_Standby": 16777363, + "Key_OpenUrl": 16777364, + "Key_LaunchMail": 16777376, + "Key_LaunchMedia": 16777377, + "Key_Launch0": 16777378, + "Key_Launch1": 16777379, + "Key_Launch2": 16777380, + "Key_Launch3": 16777381, + "Key_Launch4": 16777382, + "Key_Launch5": 16777383, + "Key_Launch6": 16777384, + "Key_Launch7": 16777385, + "Key_Launch8": 16777386, + "Key_Launch9": 16777387, + "Key_LaunchA": 16777388, + "Key_LaunchB": 16777389, + "Key_LaunchC": 16777390, + "Key_LaunchD": 16777391, + "Key_LaunchE": 16777392, + "Key_LaunchF": 16777393, + "Key_MonBrightnessUp": 16777394, + "Key_MonBrightnessDown": 16777395, + "Key_KeyboardLightOnOff": 16777396, + "Key_KeyboardBrightnessUp": 16777397, + "Key_KeyboardBrightnessDown": 16777398, + "Key_PowerOff": 16777399, + "Key_WakeUp": 16777400, + "Key_Eject": 16777401, + "Key_ScreenSaver": 16777402, + "Key_WWW": 16777403, + "Key_Memo": 16777404, + "Key_LightBulb": 16777405, + "Key_Shop": 16777406, + "Key_History": 16777407, + "Key_AddFavorite": 16777408, + "Key_HotLinks": 16777409, + "Key_BrightnessAdjust": 16777410, + "Key_Finance": 16777411, + "Key_Community": 16777412, + "Key_AudioRewind": 16777413, + "Key_BackForward": 16777414, + "Key_ApplicationLeft": 16777415, + "Key_ApplicationRight": 16777416, + "Key_Book": 16777417, + "Key_CD": 16777418, + "Key_Calculator": 16777419, + "Key_ToDoList": 16777420, + "Key_ClearGrab": 16777421, + "Key_Close": 16777422, + "Key_Copy": 16777423, + "Key_Cut": 16777424, + "Key_Display": 16777425, + "Key_DOS": 16777426, + "Key_Documents": 16777427, + "Key_Excel": 16777428, + "Key_Explorer": 16777429, + "Key_Game": 16777430, + "Key_Go": 16777431, + "Key_iTouch": 16777432, + "Key_LogOff": 16777433, + "Key_Market": 16777434, + "Key_Meeting": 16777435, + "Key_MenuKB": 16777436, + "Key_MenuPB": 16777437, + "Key_MySites": 16777438, + "Key_News": 16777439, + "Key_OfficeHome": 16777440, + "Key_Option": 16777441, + "Key_Paste": 16777442, + "Key_Phone": 16777443, + "Key_Calendar": 16777444, + "Key_Reply": 16777445, + "Key_Reload": 16777446, + "Key_RotateWindows": 16777447, + "Key_RotationPB": 16777448, + "Key_RotationKB": 16777449, + "Key_Save": 16777450, + "Key_Send": 16777451, + "Key_Spell": 16777452, + "Key_SplitScreen": 16777453, + "Key_Support": 16777454, + "Key_TaskPane": 16777455, + "Key_Terminal": 16777456, + "Key_Tools": 16777457, + "Key_Travel": 16777458, + "Key_Video": 16777459, + "Key_Word": 16777460, + "Key_Xfer": 16777461, + "Key_ZoomIn": 16777462, + "Key_ZoomOut": 16777463, + "Key_Away": 16777464, + "Key_Messenger": 16777465, + "Key_WebCam": 16777466, + "Key_MailForward": 16777467, + "Key_Pictures": 16777468, + "Key_Music": 16777469, + "Key_Battery": 16777470, + "Key_Bluetooth": 16777471, + "Key_WLAN": 16777472, + "Key_UWB": 16777473, + "Key_AudioForward": 16777474, + "Key_AudioRepeat": 16777475, + "Key_AudioRandomPlay": 16777476, + "Key_Subtitle": 16777477, + "Key_AudioCycleTrack": 16777478, + "Key_Time": 16777479, + "Key_Hibernate": 16777480, + "Key_View": 16777481, + "Key_TopMenu": 16777482, + "Key_PowerDown": 16777483, + "Key_Suspend": 16777484, + "Key_ContrastAdjust": 16777485, + "Key_LaunchG": 16777486, + "Key_LaunchH": 16777487, + "Key_TouchpadToggle": 16777488, + "Key_TouchpadOn": 16777489, + "Key_TouchpadOff": 16777490, + "Key_MicMute": 16777491, + "Key_Red": 16777492, + "Key_Green": 16777493, + "Key_Yellow": 16777494, + "Key_Blue": 16777495, + "Key_ChannelUp": 16777496, + "Key_ChannelDown": 16777497, + "Key_Guide": 16777498, + "Key_Info": 16777499, + "Key_Settings": 16777500, + "Key_MicVolumeUp": 16777501, + "Key_MicVolumeDown": 16777502, + "Key_New": 16777504, + "Key_Open": 16777505, + "Key_Find": 16777506, + "Key_Undo": 16777507, + "Key_Redo": 16777508, + "Key_MediaLast": 16842751, + "Key_Select": 16842752, + "Key_Yes": 16842753, + "Key_No": 16842754, + "Key_Cancel": 16908289, + "Key_Printer": 16908290, + "Key_Execute": 16908291, + "Key_Sleep": 16908292, + "Key_Play": 16908293, + "Key_Zoom": 16908294, + "Key_Exit": 16908298, + "Key_Context1": 17825792, + "Key_Context2": 17825793, + "Key_Context3": 17825794, + "Key_Context4": 17825795, + "Key_Call": 17825796, + "Key_Hangup": 17825797, + "Key_Flip": 17825798, + "Key_ToggleCallHangup": 17825799, + "Key_VoiceDial": 17825800, + "Key_LastNumberRedial": 17825801, + "Key_Camera": 17825824, + "Key_CameraFocus": 17825825, + "Key_unknown": 33554431 + } + } + Enum { + name: "ArrowType" + values: { + "NoArrow": 0, + "UpArrow": 1, + "DownArrow": 2, + "LeftArrow": 3, + "RightArrow": 4 + } + } + Enum { + name: "PenStyle" + values: { + "NoPen": 0, + "SolidLine": 1, + "DashLine": 2, + "DotLine": 3, + "DashDotLine": 4, + "DashDotDotLine": 5, + "CustomDashLine": 6 + } + } + Enum { + name: "PenCapStyle" + values: { + "FlatCap": 0, + "SquareCap": 16, + "RoundCap": 32, + "MPenCapStyle": 48 + } + } + Enum { + name: "PenJoinStyle" + values: { + "MiterJoin": 0, + "BevelJoin": 64, + "RoundJoin": 128, + "SvgMiterJoin": 256, + "MPenJoinStyle": 448 + } + } + Enum { + name: "BrushStyle" + values: { + "NoBrush": 0, + "SolidPattern": 1, + "Dense1Pattern": 2, + "Dense2Pattern": 3, + "Dense3Pattern": 4, + "Dense4Pattern": 5, + "Dense5Pattern": 6, + "Dense6Pattern": 7, + "Dense7Pattern": 8, + "HorPattern": 9, + "VerPattern": 10, + "CrossPattern": 11, + "BDiagPattern": 12, + "FDiagPattern": 13, + "DiagCrossPattern": 14, + "LinearGradientPattern": 15, + "RadialGradientPattern": 16, + "ConicalGradientPattern": 17, + "TexturePattern": 24 + } + } + Enum { + name: "SizeMode" + values: { + "AbsoluteSize": 0, + "RelativeSize": 1 + } + } + Enum { + name: "CursorShape" + values: { + "ArrowCursor": 0, + "UpArrowCursor": 1, + "CrossCursor": 2, + "WaitCursor": 3, + "IBeamCursor": 4, + "SizeVerCursor": 5, + "SizeHorCursor": 6, + "SizeBDiagCursor": 7, + "SizeFDiagCursor": 8, + "SizeAllCursor": 9, + "BlankCursor": 10, + "SplitVCursor": 11, + "SplitHCursor": 12, + "PointingHandCursor": 13, + "ForbiddenCursor": 14, + "WhatsThisCursor": 15, + "BusyCursor": 16, + "OpenHandCursor": 17, + "ClosedHandCursor": 18, + "DragCopyCursor": 19, + "DragMoveCursor": 20, + "DragLinkCursor": 21, + "LastCursor": 21, + "BitmapCursor": 24, + "CustomCursor": 25 + } + } + Enum { + name: "TextFormat" + values: { + "PlainText": 0, + "RichText": 1, + "AutoText": 2 + } + } + Enum { + name: "AspectRatioMode" + values: { + "IgnoreAspectRatio": 0, + "KeepAspectRatio": 1, + "KeepAspectRatioByExpanding": 2 + } + } + Enum { + name: "DockWidgetArea" + values: { + "LeftDockWidgetArea": 1, + "RightDockWidgetArea": 2, + "TopDockWidgetArea": 4, + "BottomDockWidgetArea": 8, + "DockWidgetArea_Mask": 15, + "AllDockWidgetAreas": 15, + "NoDockWidgetArea": 0 + } + } + Enum { + name: "DockWidgetAreas" + values: { + "LeftDockWidgetArea": 1, + "RightDockWidgetArea": 2, + "TopDockWidgetArea": 4, + "BottomDockWidgetArea": 8, + "DockWidgetArea_Mask": 15, + "AllDockWidgetAreas": 15, + "NoDockWidgetArea": 0 + } + } + Enum { + name: "ToolBarArea" + values: { + "LeftToolBarArea": 1, + "RightToolBarArea": 2, + "TopToolBarArea": 4, + "BottomToolBarArea": 8, + "ToolBarArea_Mask": 15, + "AllToolBarAreas": 15, + "NoToolBarArea": 0 + } + } + Enum { + name: "ToolBarAreas" + values: { + "LeftToolBarArea": 1, + "RightToolBarArea": 2, + "TopToolBarArea": 4, + "BottomToolBarArea": 8, + "ToolBarArea_Mask": 15, + "AllToolBarAreas": 15, + "NoToolBarArea": 0 + } + } + Enum { + name: "DateFormat" + values: { + "TextDate": 0, + "ISODate": 1, + "SystemLocaleDate": 2, + "LocalDate": 2, + "LocaleDate": 3, + "SystemLocaleShortDate": 4, + "SystemLocaleLongDate": 5, + "DefaultLocaleShortDate": 6, + "DefaultLocaleLongDate": 7, + "RFC2822Date": 8 + } + } + Enum { + name: "TimeSpec" + values: { + "LocalTime": 0, + "UTC": 1, + "OffsetFromUTC": 2, + "TimeZone": 3 + } + } + Enum { + name: "DayOfWeek" + values: { + "Monday": 1, + "Tuesday": 2, + "Wednesday": 3, + "Thursday": 4, + "Friday": 5, + "Saturday": 6, + "Sunday": 7 + } + } + Enum { + name: "ScrollBarPolicy" + values: { + "ScrollBarAsNeeded": 0, + "ScrollBarAlwaysOff": 1, + "ScrollBarAlwaysOn": 2 + } + } + Enum { + name: "CaseSensitivity" + values: { + "CaseInsensitive": 0, + "CaseSensitive": 1 + } + } + Enum { + name: "Corner" + values: { + "TopLeftCorner": 0, + "TopRightCorner": 1, + "BottomLeftCorner": 2, + "BottomRightCorner": 3 + } + } + Enum { + name: "Edge" + values: { + "TopEdge": 1, + "LeftEdge": 2, + "RightEdge": 4, + "BottomEdge": 8 + } + } + Enum { + name: "Edges" + values: { + "TopEdge": 1, + "LeftEdge": 2, + "RightEdge": 4, + "BottomEdge": 8 + } + } + Enum { + name: "ConnectionType" + values: { + "AutoConnection": 0, + "DirectConnection": 1, + "QueuedConnection": 2, + "BlockingQueuedConnection": 3, + "UniqueConnection": 128 + } + } + Enum { + name: "ShortcutContext" + values: { + "WidgetShortcut": 0, + "WindowShortcut": 1, + "ApplicationShortcut": 2, + "WidgetWithChildrenShortcut": 3 + } + } + Enum { + name: "FillRule" + values: { + "OddEvenFill": 0, + "WindingFill": 1 + } + } + Enum { + name: "MaskMode" + values: { + "MaskInColor": 0, + "MaskOutColor": 1 + } + } + Enum { + name: "ClipOperation" + values: { + "NoClip": 0, + "ReplaceClip": 1, + "IntersectClip": 2 + } + } + Enum { + name: "ItemSelectionMode" + values: { + "ContainsItemShape": 0, + "IntersectsItemShape": 1, + "ContainsItemBoundingRect": 2, + "IntersectsItemBoundingRect": 3 + } + } + Enum { + name: "ItemSelectionOperation" + values: { + "ReplaceSelection": 0, + "AddToSelection": 1 + } + } + Enum { + name: "TransformationMode" + values: { + "FastTransformation": 0, + "SmoothTransformation": 1 + } + } + Enum { + name: "Axis" + values: { + "XAxis": 0, + "YAxis": 1, + "ZAxis": 2 + } + } + Enum { + name: "FocusReason" + values: { + "MouseFocusReason": 0, + "TabFocusReason": 1, + "BacktabFocusReason": 2, + "ActiveWindowFocusReason": 3, + "PopupFocusReason": 4, + "ShortcutFocusReason": 5, + "MenuBarFocusReason": 6, + "OtherFocusReason": 7, + "NoFocusReason": 8 + } + } + Enum { + name: "ContextMenuPolicy" + values: { + "NoContextMenu": 0, + "DefaultContextMenu": 1, + "ActionsContextMenu": 2, + "CustomContextMenu": 3, + "PreventContextMenu": 4 + } + } + Enum { + name: "InputMethodQuery" + values: { + "ImEnabled": 1, + "ImCursorRectangle": 2, + "ImMicroFocus": 2, + "ImFont": 4, + "ImCursorPosition": 8, + "ImSurroundingText": 16, + "ImCurrentSelection": 32, + "ImMaximumTextLength": 64, + "ImAnchorPosition": 128, + "ImHints": 256, + "ImPreferredLanguage": 512, + "ImAbsolutePosition": 1024, + "ImTextBeforeCursor": 2048, + "ImTextAfterCursor": 4096, + "ImEnterKeyType": 8192, + "ImPlatformData": -2147483648, + "ImQueryInput": 186, + "ImQueryAll": -1 + } + } + Enum { + name: "InputMethodQueries" + values: { + "ImEnabled": 1, + "ImCursorRectangle": 2, + "ImMicroFocus": 2, + "ImFont": 4, + "ImCursorPosition": 8, + "ImSurroundingText": 16, + "ImCurrentSelection": 32, + "ImMaximumTextLength": 64, + "ImAnchorPosition": 128, + "ImHints": 256, + "ImPreferredLanguage": 512, + "ImAbsolutePosition": 1024, + "ImTextBeforeCursor": 2048, + "ImTextAfterCursor": 4096, + "ImEnterKeyType": 8192, + "ImPlatformData": -2147483648, + "ImQueryInput": 186, + "ImQueryAll": -1 + } + } + Enum { + name: "InputMethodHint" + values: { + "ImhNone": 0, + "ImhHiddenText": 1, + "ImhSensitiveData": 2, + "ImhNoAutoUppercase": 4, + "ImhPreferNumbers": 8, + "ImhPreferUppercase": 16, + "ImhPreferLowercase": 32, + "ImhNoPredictiveText": 64, + "ImhDate": 128, + "ImhTime": 256, + "ImhPreferLatin": 512, + "ImhMultiLine": 1024, + "ImhDigitsOnly": 65536, + "ImhFormattedNumbersOnly": 131072, + "ImhUppercaseOnly": 262144, + "ImhLowercaseOnly": 524288, + "ImhDialableCharactersOnly": 1048576, + "ImhEmailCharactersOnly": 2097152, + "ImhUrlCharactersOnly": 4194304, + "ImhLatinOnly": 8388608, + "ImhExclusiveInputMask": -65536 + } + } + Enum { + name: "InputMethodHints" + values: { + "ImhNone": 0, + "ImhHiddenText": 1, + "ImhSensitiveData": 2, + "ImhNoAutoUppercase": 4, + "ImhPreferNumbers": 8, + "ImhPreferUppercase": 16, + "ImhPreferLowercase": 32, + "ImhNoPredictiveText": 64, + "ImhDate": 128, + "ImhTime": 256, + "ImhPreferLatin": 512, + "ImhMultiLine": 1024, + "ImhDigitsOnly": 65536, + "ImhFormattedNumbersOnly": 131072, + "ImhUppercaseOnly": 262144, + "ImhLowercaseOnly": 524288, + "ImhDialableCharactersOnly": 1048576, + "ImhEmailCharactersOnly": 2097152, + "ImhUrlCharactersOnly": 4194304, + "ImhLatinOnly": 8388608, + "ImhExclusiveInputMask": -65536 + } + } + Enum { + name: "EnterKeyType" + values: { + "EnterKeyDefault": 0, + "EnterKeyReturn": 1, + "EnterKeyDone": 2, + "EnterKeyGo": 3, + "EnterKeySend": 4, + "EnterKeySearch": 5, + "EnterKeyNext": 6, + "EnterKeyPrevious": 7 + } + } + Enum { + name: "ToolButtonStyle" + values: { + "ToolButtonIconOnly": 0, + "ToolButtonTextOnly": 1, + "ToolButtonTextBesideIcon": 2, + "ToolButtonTextUnderIcon": 3, + "ToolButtonFollowStyle": 4 + } + } + Enum { + name: "LayoutDirection" + values: { + "LeftToRight": 0, + "RightToLeft": 1, + "LayoutDirectionAuto": 2 + } + } + Enum { + name: "DropAction" + values: { + "CopyAction": 1, + "MoveAction": 2, + "LinkAction": 4, + "ActionMask": 255, + "TargetMoveAction": 32770, + "IgnoreAction": 0 + } + } + Enum { + name: "DropActions" + values: { + "CopyAction": 1, + "MoveAction": 2, + "LinkAction": 4, + "ActionMask": 255, + "TargetMoveAction": 32770, + "IgnoreAction": 0 + } + } + Enum { + name: "CheckState" + values: { + "Unchecked": 0, + "PartiallyChecked": 1, + "Checked": 2 + } + } + Enum { + name: "ItemDataRole" + values: { + "DisplayRole": 0, + "DecorationRole": 1, + "EditRole": 2, + "ToolTipRole": 3, + "StatusTipRole": 4, + "WhatsThisRole": 5, + "FontRole": 6, + "TextAlignmentRole": 7, + "BackgroundColorRole": 8, + "BackgroundRole": 8, + "TextColorRole": 9, + "ForegroundRole": 9, + "CheckStateRole": 10, + "AccessibleTextRole": 11, + "AccessibleDescriptionRole": 12, + "SizeHintRole": 13, + "InitialSortOrderRole": 14, + "DisplayPropertyRole": 27, + "DecorationPropertyRole": 28, + "ToolTipPropertyRole": 29, + "StatusTipPropertyRole": 30, + "WhatsThisPropertyRole": 31, + "UserRole": 256 + } + } + Enum { + name: "ItemFlags" + values: { + "NoItemFlags": 0, + "ItemIsSelectable": 1, + "ItemIsEditable": 2, + "ItemIsDragEnabled": 4, + "ItemIsDropEnabled": 8, + "ItemIsUserCheckable": 16, + "ItemIsEnabled": 32, + "ItemIsAutoTristate": 64, + "ItemIsTristate": 64, + "ItemNeverHasChildren": 128, + "ItemIsUserTristate": 256 + } + } + Enum { + name: "MatchFlags" + values: { + "MatchExactly": 0, + "MatchContains": 1, + "MatchStartsWith": 2, + "MatchEndsWith": 3, + "MatchRegExp": 4, + "MatchWildcard": 5, + "MatchFixedString": 8, + "MatchCaseSensitive": 16, + "MatchWrap": 32, + "MatchRecursive": 64 + } + } + Enum { + name: "WindowModality" + values: { + "NonModal": 0, + "WindowModal": 1, + "ApplicationModal": 2 + } + } + Enum { + name: "TextInteractionFlag" + values: { + "NoTextInteraction": 0, + "TextSelectableByMouse": 1, + "TextSelectableByKeyboard": 2, + "LinksAccessibleByMouse": 4, + "LinksAccessibleByKeyboard": 8, + "TextEditable": 16, + "TextEditorInteraction": 19, + "TextBrowserInteraction": 13 + } + } + Enum { + name: "TextInteractionFlags" + values: { + "NoTextInteraction": 0, + "TextSelectableByMouse": 1, + "TextSelectableByKeyboard": 2, + "LinksAccessibleByMouse": 4, + "LinksAccessibleByKeyboard": 8, + "TextEditable": 16, + "TextEditorInteraction": 19, + "TextBrowserInteraction": 13 + } + } + Enum { + name: "SizeHint" + values: { + "MinimumSize": 0, + "PreferredSize": 1, + "MaximumSize": 2, + "MinimumDescent": 3, + "NSizeHints": 4 + } + } + Enum { + name: "TouchPointStates" + values: { + "TouchPointPressed": 1, + "TouchPointMoved": 2, + "TouchPointStationary": 4, + "TouchPointReleased": 8 + } + } + Enum { + name: "GestureState" + values: { + "NoGesture": 0, + "GestureStarted": 1, + "GestureUpdated": 2, + "GestureFinished": 3, + "GestureCanceled": 4 + } + } + Enum { + name: "GestureType" + values: { + "TapGesture": 1, + "TapAndHoldGesture": 2, + "PanGesture": 3, + "PinchGesture": 4, + "SwipeGesture": 5, + "CustomGesture": 256, + "LastGestureType": -1 + } + } + Enum { + name: "NativeGestureType" + values: { + "BeginNativeGesture": 0, + "EndNativeGesture": 1, + "PanNativeGesture": 2, + "ZoomNativeGesture": 3, + "SmartZoomNativeGesture": 4, + "RotateNativeGesture": 5, + "SwipeNativeGesture": 6 + } + } + Enum { + name: "CursorMoveStyle" + values: { + "LogicalMoveStyle": 0, + "VisualMoveStyle": 1 + } + } + Enum { + name: "TimerType" + values: { + "PreciseTimer": 0, + "CoarseTimer": 1, + "VeryCoarseTimer": 2 + } + } + Enum { + name: "ScrollPhase" + values: { + "ScrollBegin": 1, + "ScrollUpdate": 2, + "ScrollEnd": 3 + } + } + Enum { + name: "MouseEventSource" + values: { + "MouseEventNotSynthesized": 0, + "MouseEventSynthesizedBySystem": 1, + "MouseEventSynthesizedByQt": 2, + "MouseEventSynthesizedByApplication": 3 + } + } + Enum { + name: "MouseEventFlag" + values: { + "MouseEventCreatedDoubleClick": 1, + "MouseEventFlagMask": 255 + } + } + } + Component { name: "QEasingCurve"; prototype: "QQmlEasingValueType" } +} diff --git a/src/imports/imports.pro b/src/imports/imports.pro index f7002f9ed5..a63ca0af41 100644 --- a/src/imports/imports.pro +++ b/src/imports/imports.pro @@ -1,6 +1,7 @@ TEMPLATE = subdirs SUBDIRS += \ + builtins \ qtqml \ folderlistmodel \ localstorage \ @@ -17,35 +18,3 @@ qtHaveModule(quick) { } qtHaveModule(xmlpatterns) : SUBDIRS += xmllistmodel - - -QMLTYPEFILE = builtins.qmltypes - -# install rule -builtins.files = $$QMLTYPEFILE -builtins.path = $$[QT_INSTALL_QML] -INSTALLS += builtins - -# copy to build directory -!force_independent:if(!debug_and_release|!build_all|CONFIG(release, debug|release)) { - defineReplace(qmlModStripSrcDir) { - return($$relative_path($$1, $$_PRO_FILE_PWD_)) - } - - qmltypes2build.input = QMLTYPEFILE - qmltypes2build.output = $$[QT_INSTALL_QML]/${QMAKE_FUNC_FILE_IN_qmlModStripSrcDir} - !contains(TEMPLATE, vc.*): qmltypes2build.variable_out = PRE_TARGETDEPS - qmltypes2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} - qmltypes2build.name = COPY ${QMAKE_FILE_IN} - qmltypes2build.CONFIG = no_link no_clean - - QMAKE_EXTRA_COMPILERS += qmltypes2build -} - -# qmltypes target -!cross_compile:if(build_pass|!debug_and_release) { - qtPrepareTool(QMLPLUGINDUMP, qmlplugindump) - - qmltypes.commands = $$QMLPLUGINDUMP -builtins > $$PWD/$$QMLTYPEFILE - QMAKE_EXTRA_TARGETS += qmltypes -} -- cgit v1.2.3 From 578d2717196cdf109d459c7a63b5085dc0791747 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 22 Apr 2016 20:47:58 +0200 Subject: make use of COPIES Change-Id: I479c9523a89be1d64364e8205daa5860e16882cc Reviewed-by: Simon Hausmann --- .../extending-qml/chapter6-plugins/import/import.pro | 4 +++- .../tutorials/gettingStartedQml/filedialog/filedialog.pro | 5 +++-- src/imports/builtins/builtins.pro | 15 +-------------- tests/auto/shared/imports.pri | 9 +++------ tests/manual/qmlplugindump/tests/dumper/Dummy/dummy.pro | 8 +++----- .../manual/qmlplugindump/tests/dumper/Imports/imports.pro | 8 +++----- .../qmlplugindump/tests/dumper/Versions/versions.pro | 8 +++----- 7 files changed, 19 insertions(+), 38 deletions(-) diff --git a/examples/qml/tutorials/extending-qml/chapter6-plugins/import/import.pro b/examples/qml/tutorials/extending-qml/chapter6-plugins/import/import.pro index cefcf3b477..43bf976f09 100644 --- a/examples/qml/tutorials/extending-qml/chapter6-plugins/import/import.pro +++ b/examples/qml/tutorials/extending-qml/chapter6-plugins/import/import.pro @@ -23,4 +23,6 @@ INSTALLS += target qmldir OTHER_FILES += qmldir # Copy the qmldir file to the same folder as the plugin binary -QMAKE_POST_LINK += $$QMAKE_COPY $$replace($$list($$quote($$PWD/qmldir) $$DESTDIR), /, $$QMAKE_DIR_SEP) +cpqmldir.files = qmldir +cpqmldir.path = $$DESTDIR +COPIES += cpqmldir diff --git a/examples/quick/tutorials/gettingStartedQml/filedialog/filedialog.pro b/examples/quick/tutorials/gettingStartedQml/filedialog/filedialog.pro index e88e8f670c..daac0e29eb 100644 --- a/examples/quick/tutorials/gettingStartedQml/filedialog/filedialog.pro +++ b/examples/quick/tutorials/gettingStartedQml/filedialog/filedialog.pro @@ -21,5 +21,6 @@ SOURCES += \ OTHER_FILES += qmldir # Copy the qmldir file to the same folder as the plugin binary -QMAKE_POST_LINK += $$QMAKE_COPY $$shell_quote($$shell_path($$PWD/qmldir)) \ - $$shell_quote($$shell_path($$DESTDIR)) $$escape_expand(\\n\\t) +cpqmldir.files = $$PWD/qmldir +cpqmldir.path = $$DESTDIR +COPIES += cpqmldir diff --git a/src/imports/builtins/builtins.pro b/src/imports/builtins/builtins.pro index efd6787e5c..112555b6de 100644 --- a/src/imports/builtins/builtins.pro +++ b/src/imports/builtins/builtins.pro @@ -8,20 +8,7 @@ builtins.path = $$[QT_INSTALL_QML] INSTALLS += builtins # copy to build directory -!force_independent:if(!debug_and_release|!build_all|CONFIG(release, debug|release)) { - defineReplace(qmlModStripSrcDir) { - return($$relative_path($$1, $$_PRO_FILE_PWD_)) - } - - qmltypes2build.input = QMLTYPEFILE - qmltypes2build.output = $$[QT_INSTALL_QML]/${QMAKE_FUNC_FILE_IN_qmlModStripSrcDir} - !contains(TEMPLATE, vc.*): qmltypes2build.variable_out = PRE_TARGETDEPS - qmltypes2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} - qmltypes2build.name = COPY ${QMAKE_FILE_IN} - qmltypes2build.CONFIG = no_link no_clean - - QMAKE_EXTRA_COMPILERS += qmltypes2build -} +!prefix_build: COPIES += builtins # qmltypes target !cross_compile:if(build_pass|!debug_and_release) { diff --git a/tests/auto/shared/imports.pri b/tests/auto/shared/imports.pri index 20e9bcb371..9cbf286386 100644 --- a/tests/auto/shared/imports.pri +++ b/tests/auto/shared/imports.pri @@ -1,7 +1,4 @@ -copyimportfiles.input = IMPORT_FILES -copyimportfiles.output = $$DESTDIR/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT} -copyimportfiles.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} -copyimportfiles.CONFIG += no_link_no_clean -copyimportfiles.variable_out = PRE_TARGETDEPS -QMAKE_EXTRA_COMPILERS += copyimportfiles +importfiles.files = $$IMPORT_FILES +importfiles.path = $$DESTDIR +COPIES += importfiles diff --git a/tests/manual/qmlplugindump/tests/dumper/Dummy/dummy.pro b/tests/manual/qmlplugindump/tests/dumper/Dummy/dummy.pro index 3e690d389f..81975ee01c 100644 --- a/tests/manual/qmlplugindump/tests/dumper/Dummy/dummy.pro +++ b/tests/manual/qmlplugindump/tests/dumper/Dummy/dummy.pro @@ -18,11 +18,9 @@ HEADERS += \ DISTFILES = qmldir !equals(_PRO_FILE_PWD_, $$OUT_PWD) { - copy_qmldir.target = $$OUT_PWD/qmldir - copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir - copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\" - QMAKE_EXTRA_TARGETS += copy_qmldir - PRE_TARGETDEPS += $$copy_qmldir.target + cpqmldir.files = qmldir + cpqmldir.path = $$OUT_PWD + COPIES += cpqmldir } qmldir.files = qmldir diff --git a/tests/manual/qmlplugindump/tests/dumper/Imports/imports.pro b/tests/manual/qmlplugindump/tests/dumper/Imports/imports.pro index fe9caea13a..1033c7a28f 100644 --- a/tests/manual/qmlplugindump/tests/dumper/Imports/imports.pro +++ b/tests/manual/qmlplugindump/tests/dumper/Imports/imports.pro @@ -18,11 +18,9 @@ HEADERS += \ DISTFILES = qmldir !equals(_PRO_FILE_PWD_, $$OUT_PWD) { - copy_qmldir.target = $$OUT_PWD/qmldir - copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir - copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\" - QMAKE_EXTRA_TARGETS += copy_qmldir - PRE_TARGETDEPS += $$copy_qmldir.target + cpqmldir.files = qmldir + cpqmldir.path = $$OUT_PWD + COPIES += cpqmldir } qmldir.files = qmldir diff --git a/tests/manual/qmlplugindump/tests/dumper/Versions/versions.pro b/tests/manual/qmlplugindump/tests/dumper/Versions/versions.pro index 951f886368..d59470862d 100644 --- a/tests/manual/qmlplugindump/tests/dumper/Versions/versions.pro +++ b/tests/manual/qmlplugindump/tests/dumper/Versions/versions.pro @@ -18,11 +18,9 @@ HEADERS += \ DISTFILES = qmldir !equals(_PRO_FILE_PWD_, $$OUT_PWD) { - copy_qmldir.target = $$OUT_PWD/qmldir - copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir - copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\" - QMAKE_EXTRA_TARGETS += copy_qmldir - PRE_TARGETDEPS += $$copy_qmldir.target + cpqmldir.files = qmldir + cpqmldir.path = $$OUT_PWD + COPIES += cpqmldir } qmldir.files = qmldir -- cgit v1.2.3 From e6581ed818b72e06afddce555be20bd10979ce5e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 11 May 2016 14:41:47 +0200 Subject: fix example installs Change-Id: Ie6a219392a48fd6b1a32037cc215dc20d408e819 Reviewed-by: Simon Hausmann --- examples/qml/qmlextensionplugins/qmlextensionplugins.pro | 2 ++ examples/quick/customitems/painteditem/painteditem.pro | 2 ++ examples/quick/imageprovider/imageprovider.pro | 2 ++ examples/quick/imageresponseprovider/imageresponseprovider.pro | 2 ++ examples/quick/quick-accessibility/quick-accessibility.pro | 3 +++ .../quick/quickwidgets/qquickviewcomparison/qquickviewcomparison.pro | 3 +++ examples/quick/quickwidgets/quickwidget/quickwidget.pro | 3 +++ examples/quick/scenegraph/graph/graph.pro | 2 ++ examples/quick/scenegraph/scenegraph.pro | 3 +++ examples/quick/window/window.pro | 3 ++- 10 files changed, 24 insertions(+), 1 deletion(-) diff --git a/examples/qml/qmlextensionplugins/qmlextensionplugins.pro b/examples/qml/qmlextensionplugins/qmlextensionplugins.pro index 64fd23af8d..946626cce7 100644 --- a/examples/qml/qmlextensionplugins/qmlextensionplugins.pro +++ b/examples/qml/qmlextensionplugins/qmlextensionplugins.pro @@ -21,3 +21,5 @@ target.path += $$[QT_INSTALL_EXAMPLES]/qml/qmlextensionplugins/imports/TimeExamp pluginfiles.path += $$[QT_INSTALL_EXAMPLES]/qml/qmlextensionplugins/imports/TimeExample INSTALLS += target qml pluginfiles + +CONFIG += install_ok # Do not cargo-cult this! diff --git a/examples/quick/customitems/painteditem/painteditem.pro b/examples/quick/customitems/painteditem/painteditem.pro index 3ec6420abf..bc7480ab9e 100644 --- a/examples/quick/customitems/painteditem/painteditem.pro +++ b/examples/quick/customitems/painteditem/painteditem.pro @@ -19,5 +19,7 @@ qmldir.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/painteditem/TextBalloonP INSTALLS += qmldir target +CONFIG += install_ok # Do not cargo-cult this! + OTHER_FILES += \ textballoons.qml diff --git a/examples/quick/imageprovider/imageprovider.pro b/examples/quick/imageprovider/imageprovider.pro index 5567a2d6d9..e54469b0d8 100644 --- a/examples/quick/imageprovider/imageprovider.pro +++ b/examples/quick/imageprovider/imageprovider.pro @@ -13,3 +13,5 @@ target.path = $$[QT_INSTALL_EXAMPLES]/quick/imageprovider/ImageProviderCore qml.files = ImageProviderCore/qmldir qml.path = $$[QT_INSTALL_EXAMPLES]/quick/imageprovider/ImageProviderCore INSTALLS = target qml + +CONFIG += install_ok # Do not cargo-cult this! diff --git a/examples/quick/imageresponseprovider/imageresponseprovider.pro b/examples/quick/imageresponseprovider/imageresponseprovider.pro index 856ddde863..8be4dbb658 100644 --- a/examples/quick/imageresponseprovider/imageresponseprovider.pro +++ b/examples/quick/imageresponseprovider/imageresponseprovider.pro @@ -13,3 +13,5 @@ target.path = $$[QT_INSTALL_EXAMPLES]/quick/imageresponseprovider/ImageResponseP qml.files = ImageResponseProviderCore/qmldir qml.path = $$[QT_INSTALL_EXAMPLES]/quick/imageresponseprovider/ImageResponseProviderCore INSTALLS = target qml + +CONFIG += install_ok # Do not cargo-cult this! diff --git a/examples/quick/quick-accessibility/quick-accessibility.pro b/examples/quick/quick-accessibility/quick-accessibility.pro index 70cf34b54c..cc9d48ac0f 100644 --- a/examples/quick/quick-accessibility/quick-accessibility.pro +++ b/examples/quick/quick-accessibility/quick-accessibility.pro @@ -6,3 +6,6 @@ RESOURCES += accessibility.qrc target.path = $$[QT_INSTALL_EXAMPLES]/quick/quick-accessibility INSTALLS += target + +EXAMPLE_FILES += \ + accessibility.qmlproject diff --git a/examples/quick/quickwidgets/qquickviewcomparison/qquickviewcomparison.pro b/examples/quick/quickwidgets/qquickviewcomparison/qquickviewcomparison.pro index 9d70f7aa5a..80216da346 100644 --- a/examples/quick/quickwidgets/qquickviewcomparison/qquickviewcomparison.pro +++ b/examples/quick/quickwidgets/qquickviewcomparison/qquickviewcomparison.pro @@ -15,3 +15,6 @@ HEADERS += mainwindow.h \ RESOURCES += qquickviewcomparison.qrc OTHER_FILES += test.qml + +target.path = $$[QT_INSTALL_EXAMPLES]/quick/quickwidgets/qquickviewcomparison +INSTALLS += target diff --git a/examples/quick/quickwidgets/quickwidget/quickwidget.pro b/examples/quick/quickwidgets/quickwidget/quickwidget.pro index 1aca22082e..04fb5541a7 100644 --- a/examples/quick/quickwidgets/quickwidget/quickwidget.pro +++ b/examples/quick/quickwidgets/quickwidget/quickwidget.pro @@ -6,3 +6,6 @@ TEMPLATE = app SOURCES += main.cpp RESOURCES += quickwidget.qrc + +target.path = $$[QT_INSTALL_EXAMPLES]/quick/quickwidgets/quickwidget +INSTALLS += target diff --git a/examples/quick/scenegraph/graph/graph.pro b/examples/quick/scenegraph/graph/graph.pro index 5991f799dc..4699001f6a 100644 --- a/examples/quick/scenegraph/graph/graph.pro +++ b/examples/quick/scenegraph/graph/graph.pro @@ -32,3 +32,5 @@ OTHER_FILES += \ shaders/line.fsh \ shaders/line.vsh +target.path = $$[QT_INSTALL_EXAMPLES]/quick/scenegraph/graph +INSTALLS += target diff --git a/examples/quick/scenegraph/scenegraph.pro b/examples/quick/scenegraph/scenegraph.pro index 1e7e74372d..b9665e6015 100644 --- a/examples/quick/scenegraph/scenegraph.pro +++ b/examples/quick/scenegraph/scenegraph.pro @@ -8,3 +8,6 @@ SUBDIRS += \ textureinthread \ threadedanimation \ twotextureproviders + +EXAMPLE_FILES += \ + shared diff --git a/examples/quick/window/window.pro b/examples/quick/window/window.pro index be35b24325..c3e9b080bb 100644 --- a/examples/quick/window/window.pro +++ b/examples/quick/window/window.pro @@ -6,7 +6,8 @@ RESOURCES += \ window.qrc \ ../shared/shared.qrc EXAMPLE_FILES = \ - window.qml + window.qml \ + resources target.path = $$[QT_INSTALL_EXAMPLES]/quick/window INSTALLS += target -- cgit v1.2.3 From ee874f7e0ac4a85d0e765ff5d134f8afd44bb8ae Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 21 Apr 2016 16:49:12 +0200 Subject: actually build and install the qml tutorials MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Idf81981140e210b29239e91ff5b6b7c40e2f36de Reviewed-by: Topi Reiniö Reviewed-by: Simon Hausmann --- examples/qml/qml.pro | 1 + .../tutorials/extending-qml/chapter3-bindings/chapter3-binding.qrc | 5 ----- .../tutorials/extending-qml/chapter3-bindings/chapter3-bindings.pro | 4 ++-- .../tutorials/extending-qml/chapter3-bindings/chapter3-bindings.qrc | 5 +++++ examples/qml/tutorials/extending-qml/chapter6-plugins/app.pro | 3 +++ .../qml/tutorials/extending-qml/chapter6-plugins/import/import.pro | 2 ++ examples/qml/tutorials/tutorials.pro | 3 +++ examples/quick/tutorials/gettingStartedQml/filedialog/filedialog.pro | 4 +++- examples/quick/tutorials/gettingStartedQml/gettingStartedQml.pro | 1 + 9 files changed, 20 insertions(+), 8 deletions(-) delete mode 100644 examples/qml/tutorials/extending-qml/chapter3-bindings/chapter3-binding.qrc create mode 100644 examples/qml/tutorials/extending-qml/chapter3-bindings/chapter3-bindings.qrc create mode 100644 examples/qml/tutorials/tutorials.pro diff --git a/examples/qml/qml.pro b/examples/qml/qml.pro index d5f9fa8a9e..eb4c98e5c4 100644 --- a/examples/qml/qml.pro +++ b/examples/qml/qml.pro @@ -7,6 +7,7 @@ qtHaveModule(quick): SUBDIRS += \ SUBDIRS += \ referenceexamples \ + tutorials \ shell EXAMPLE_FILES = \ diff --git a/examples/qml/tutorials/extending-qml/chapter3-bindings/chapter3-binding.qrc b/examples/qml/tutorials/extending-qml/chapter3-bindings/chapter3-binding.qrc deleted file mode 100644 index f1168aef3b..0000000000 --- a/examples/qml/tutorials/extending-qml/chapter3-bindings/chapter3-binding.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - app.qml - - diff --git a/examples/qml/tutorials/extending-qml/chapter3-bindings/chapter3-bindings.pro b/examples/qml/tutorials/extending-qml/chapter3-bindings/chapter3-bindings.pro index 0c31592eeb..1ae83f71eb 100644 --- a/examples/qml/tutorials/extending-qml/chapter3-bindings/chapter3-bindings.pro +++ b/examples/qml/tutorials/extending-qml/chapter3-bindings/chapter3-bindings.pro @@ -4,9 +4,9 @@ HEADERS += piechart.h SOURCES += piechart.cpp \ main.cpp -RESOURCES += chapter3-binding.qrc +RESOURCES += chapter3-bindings.qrc -DESTPATH = $$[QT_INSTALL_EXAMPLES]/qml/tutorials/extending-qml/chapter3-binding +DESTPATH = $$[QT_INSTALL_EXAMPLES]/qml/tutorials/extending-qml/chapter3-bindings target.path = $$DESTPATH qml.files = *.qml diff --git a/examples/qml/tutorials/extending-qml/chapter3-bindings/chapter3-bindings.qrc b/examples/qml/tutorials/extending-qml/chapter3-bindings/chapter3-bindings.qrc new file mode 100644 index 0000000000..f1168aef3b --- /dev/null +++ b/examples/qml/tutorials/extending-qml/chapter3-bindings/chapter3-bindings.qrc @@ -0,0 +1,5 @@ + + + app.qml + + diff --git a/examples/qml/tutorials/extending-qml/chapter6-plugins/app.pro b/examples/qml/tutorials/extending-qml/chapter6-plugins/app.pro index 4d0e807417..b340981e42 100644 --- a/examples/qml/tutorials/extending-qml/chapter6-plugins/app.pro +++ b/examples/qml/tutorials/extending-qml/chapter6-plugins/app.pro @@ -13,3 +13,6 @@ osx { SOURCES += main.cpp RESOURCES += app.qrc + +target.path = $$[QT_INSTALL_EXAMPLES]/qml/tutorials/extending-qml/chapter6-plugins +INSTALLS += target diff --git a/examples/qml/tutorials/extending-qml/chapter6-plugins/import/import.pro b/examples/qml/tutorials/extending-qml/chapter6-plugins/import/import.pro index 43bf976f09..5cf4621420 100644 --- a/examples/qml/tutorials/extending-qml/chapter6-plugins/import/import.pro +++ b/examples/qml/tutorials/extending-qml/chapter6-plugins/import/import.pro @@ -20,6 +20,8 @@ qmldir.files=$$PWD/qmldir qmldir.path=$$DESTPATH INSTALLS += target qmldir +CONFIG += install_ok # Do not cargo-cult this! + OTHER_FILES += qmldir # Copy the qmldir file to the same folder as the plugin binary diff --git a/examples/qml/tutorials/tutorials.pro b/examples/qml/tutorials/tutorials.pro new file mode 100644 index 0000000000..265b3b69cc --- /dev/null +++ b/examples/qml/tutorials/tutorials.pro @@ -0,0 +1,3 @@ +TEMPLATE = subdirs +qtHaveModule(quick): SUBDIRS += \ + extending-qml diff --git a/examples/quick/tutorials/gettingStartedQml/filedialog/filedialog.pro b/examples/quick/tutorials/gettingStartedQml/filedialog/filedialog.pro index daac0e29eb..8f8f4549aa 100644 --- a/examples/quick/tutorials/gettingStartedQml/filedialog/filedialog.pro +++ b/examples/quick/tutorials/gettingStartedQml/filedialog/filedialog.pro @@ -18,9 +18,11 @@ SOURCES += \ file.cpp \ dialogPlugin.cpp -OTHER_FILES += qmldir +EXAMPLE_FILES += qmldir # Copy the qmldir file to the same folder as the plugin binary cpqmldir.files = $$PWD/qmldir cpqmldir.path = $$DESTDIR COPIES += cpqmldir + +CONFIG += install_ok # Do not cargo-cult this! diff --git a/examples/quick/tutorials/gettingStartedQml/gettingStartedQml.pro b/examples/quick/tutorials/gettingStartedQml/gettingStartedQml.pro index 1fc74b69f3..725ff3bbac 100644 --- a/examples/quick/tutorials/gettingStartedQml/gettingStartedQml.pro +++ b/examples/quick/tutorials/gettingStartedQml/gettingStartedQml.pro @@ -7,4 +7,5 @@ EXAMPLE_FILES = \ images \ parts \ pics \ + texteditor.qmlproject \ texteditor.qml -- cgit v1.2.3 From fc3317caab0670df1774421b868376a0e218bd33 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 21 Apr 2016 16:51:53 +0200 Subject: actually build the textureprovider example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Idef70d65e6871fa995e680565424056c4caf4411 Reviewed-by: Topi Reiniö --- examples/quick/quick.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/quick/quick.pro b/examples/quick/quick.pro index c5ef46173c..e60150c13b 100644 --- a/examples/quick/quick.pro +++ b/examples/quick/quick.pro @@ -15,6 +15,7 @@ SUBDIRS = quick-accessibility \ scenegraph \ shadereffects \ text \ + textureprovider \ threading \ touchinteraction \ tutorials \ -- cgit v1.2.3 From cb8ed3b918c994c20d22040f19b73b27456f1e31 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 21 Apr 2016 16:59:53 +0200 Subject: actually build the 'graph' example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I297e302b4672bcd05543b88d7da9318ae81a00b4 Reviewed-by: Topi Reiniö --- examples/quick/scenegraph/scenegraph.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/quick/scenegraph/scenegraph.pro b/examples/quick/scenegraph/scenegraph.pro index b9665e6015..cf50cdb903 100644 --- a/examples/quick/scenegraph/scenegraph.pro +++ b/examples/quick/scenegraph/scenegraph.pro @@ -1,6 +1,7 @@ TEMPLATE = subdirs SUBDIRS += \ customgeometry \ + graph \ openglunderqml \ sgengine \ simplematerial \ -- cgit v1.2.3 From 3cdf72a7b53e189ad5ff67536a0c55eec04ebe6b Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 3 May 2016 13:16:32 +0200 Subject: adjust example naming convention test to "new" structure Change-Id: I42ec26bd3c2ffa32ae8c5323f7c0a0343d12ce2f Reviewed-by: Simon Hausmann --- tests/auto/quick/examples/tst_examples.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/auto/quick/examples/tst_examples.cpp b/tests/auto/quick/examples/tst_examples.cpp index 90c78ec942..fe1991772d 100644 --- a/tests/auto/quick/examples/tst_examples.cpp +++ b/tests/auto/quick/examples/tst_examples.cpp @@ -83,11 +83,11 @@ tst_examples::tst_examples() excludedFiles << "snippets/qml/listmodel/listmodel.qml"; //Just a ListModel, no root QQuickItem excludedFiles << "examples/quick/demos/photosurface/photosurface.qml"; // root item is Window rather than Item - // Add directories you want excluded here (don't add examples/, because they install to examples/qtdeclarative/) + // Add directories you want excluded here excludedDirs << "shared"; //Not an example excludedDirs << "quick/text/fonts"; // QTBUG-29004 excludedDirs << "snippets/qml/path"; //No root QQuickItem - excludedDirs << "tutorials/gettingStartedQml"; //C++ example, but no cpp files in root dir + excludedDirs << "examples/quick/tutorials/gettingStartedQml"; //C++ example, but no cpp files in root dir // These snippets are not expected to run on their own. excludedDirs << "snippets/qml/visualdatamodel_rootindex"; @@ -175,9 +175,8 @@ void tst_examples::namingConvention(const QDir &d) void tst_examples::namingConvention() { QStringList examplesLocations; - examplesLocations << QLibraryInfo::location(QLibraryInfo::ExamplesPath) + QLatin1String("/qtdeclarative"); - examplesLocations << QLibraryInfo::location(QLibraryInfo::ExamplesPath) + QLatin1String("/qtquick"); - examplesLocations << QLibraryInfo::location(QLibraryInfo::ExamplesPath) + QLatin1String("/qtqml"); + examplesLocations << QLibraryInfo::location(QLibraryInfo::ExamplesPath) + QLatin1String("/qml"); + examplesLocations << QLibraryInfo::location(QLibraryInfo::ExamplesPath) + QLatin1String("/quick"); foreach(const QString &examples, examplesLocations) { QDir d(examples); -- cgit v1.2.3 From 83d3611199ee1e4814ed94a16c9d3f9db9c3ce89 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 3 May 2016 18:31:32 +0200 Subject: remove blacklisting of tiger and fonts examples the associated bugs are marked as fixed for a long time. Change-Id: If8c8710bdf4b7b1962c9749b701cbd335d938fdb Reviewed-by: Simon Hausmann --- tests/auto/quick/examples/tst_examples.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/auto/quick/examples/tst_examples.cpp b/tests/auto/quick/examples/tst_examples.cpp index fe1991772d..4111f42d58 100644 --- a/tests/auto/quick/examples/tst_examples.cpp +++ b/tests/auto/quick/examples/tst_examples.cpp @@ -79,13 +79,11 @@ private: tst_examples::tst_examples() { // Add files to exclude here - excludedFiles << "examples/quick/canvas/tiger/tiger.qml"; // QTBUG-26528 excludedFiles << "snippets/qml/listmodel/listmodel.qml"; //Just a ListModel, no root QQuickItem excludedFiles << "examples/quick/demos/photosurface/photosurface.qml"; // root item is Window rather than Item // Add directories you want excluded here excludedDirs << "shared"; //Not an example - excludedDirs << "quick/text/fonts"; // QTBUG-29004 excludedDirs << "snippets/qml/path"; //No root QQuickItem excludedDirs << "examples/quick/tutorials/gettingStartedQml"; //C++ example, but no cpp files in root dir -- cgit v1.2.3 From 61c8539e2a3979f5ac30ea04a7c748877eb745f3 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 3 May 2016 19:09:08 +0200 Subject: blacklist the qmlextensionplugins example for testing it requires a special import search path. it would be possible to hack this into the test launcher, but that doesn't seem worth it (there are other plugin examples already). Change-Id: I147b802c690933803cb8f9cf35210618957a6998 Reviewed-by: Simon Hausmann --- tests/auto/quick/examples/tst_examples.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/quick/examples/tst_examples.cpp b/tests/auto/quick/examples/tst_examples.cpp index 4111f42d58..20031c24d9 100644 --- a/tests/auto/quick/examples/tst_examples.cpp +++ b/tests/auto/quick/examples/tst_examples.cpp @@ -85,6 +85,7 @@ tst_examples::tst_examples() // Add directories you want excluded here excludedDirs << "shared"; //Not an example excludedDirs << "snippets/qml/path"; //No root QQuickItem + excludedDirs << "examples/qml/qmlextensionplugins"; //Requires special import search path excludedDirs << "examples/quick/tutorials/gettingStartedQml"; //C++ example, but no cpp files in root dir // These snippets are not expected to run on their own. -- cgit v1.2.3 From fc9ede8246ed5cadcf9f303fc762bd6b9adc58a9 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 10 May 2016 15:14:14 +0200 Subject: Doc: Remove repository name from examplesinstallpath Examples in binary packages now directly match the install path. Change-Id: I8cbef85c8bef840d6ff87ac308e2e82a835adcc7 Task-number: QTBUG-52953 Reviewed-by: Antti Kokko --- src/qml/doc/qtqml.qdocconf | 2 +- src/quick/doc/qtquick.qdocconf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qml/doc/qtqml.qdocconf b/src/qml/doc/qtqml.qdocconf index 500754ead4..74b61fd6e1 100644 --- a/src/qml/doc/qtqml.qdocconf +++ b/src/qml/doc/qtqml.qdocconf @@ -4,7 +4,7 @@ project = QtQml description = Qt QML Reference Documentation version = $QT_VERSION -examplesinstallpath = qtdeclarative/qml +examplesinstallpath = qml qhp.projects = QtQml diff --git a/src/quick/doc/qtquick.qdocconf b/src/quick/doc/qtquick.qdocconf index 63ada10fce..14a70b3421 100644 --- a/src/quick/doc/qtquick.qdocconf +++ b/src/quick/doc/qtquick.qdocconf @@ -4,7 +4,7 @@ project = QtQuick description = Qt Quick Reference Documentation version = $QT_VERSION -examplesinstallpath = qtdeclarative/quick +examplesinstallpath = quick qhp.projects = QtQuick -- cgit v1.2.3 From 48888e9462a151aa22d4a1ec0a58d4746dbe50fb Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Fri, 13 May 2016 14:58:44 +0200 Subject: QML: Fix asynchronous cached loading. When calling CachedLoader::loadAsync, queue the load on the QML thread instead of asking the thread to load it synchronously. The problem showed when a QML file triggered a plugin load, that would ask the engine to create a component while initializing that plugin. Change-Id: I3714ef285e432eb1aa294c4fd0208ba188d97ee9 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmltypeloader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp index 0e0efcf753..c684c8602e 100644 --- a/src/qml/qml/qqmltypeloader.cpp +++ b/src/qml/qml/qqmltypeloader.cpp @@ -958,7 +958,7 @@ struct CachedLoader { } void loadAsync(QQmlTypeLoader *loader, QQmlDataBlob *blob) const { - loader->m_thread->loadWithCachedUnit(blob, unit); + loader->m_thread->loadWithCachedUnitAsync(blob, unit); } }; -- cgit v1.2.3 From 74628af12aa8f72a56635bf27e7361861c50f796 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 12 May 2016 11:40:24 +0200 Subject: Added changelog for 5.6.1 Change-Id: I272452ccc5f6154927b153d033683a0bf07e06c8 Reviewed-by: Robin Burchell --- dist/changes-5.6.1 | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 dist/changes-5.6.1 diff --git a/dist/changes-5.6.1 b/dist/changes-5.6.1 new file mode 100644 index 0000000000..5a3c9b62e6 --- /dev/null +++ b/dist/changes-5.6.1 @@ -0,0 +1,53 @@ +Qt 5.6.1 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.6.0. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + + http://qt-project.org/doc/qt-5.6 + +The Qt version 5.6 series is binary compatible with the 5.5.x series. +Applications compiled for 5.5 will continue to run with 5.6. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + + http://bugreports.qt-project.org/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Important Behavior Changes * +**************************************************************************** + +* [QTBUG-51746] When matching the method signature of a invokable method to + the slot in the metaobject, the matching function now assigns the best + match to a QJSValue if the parameter actually is a QJSValue. This corrects + the previous behavior, where QJSValue and int were given the same match + score even though QJSValue would have been the best match. +* [QTBUG-50604] Assigning NaN to an Item's x or y previously had the side effect + of making the item invisible (as well as warning about a bad + QTransform::translate call). Setting NaN will now be ignored (as it already + was for width and height), and no longer have any visual effect. +* [QTBUG-51231] TextInput with a non-Normal echoMode can now no longer cut or + copy text. + +**************************************************************************** +* Library * +**************************************************************************** + +QtQuick +----------------- + + - QQuickPaintedItem: When the device pixel ratio is changed for the screen the item is rendered + on then the item will be updated. + - [QTBUG-50085] Canvas: Fix crash when item has a negative width or height. + - [QTBUG-48870] GridView: Don't get "holes" in the grid if model updates occur + frequently. + +QtQml +----- + + - [QTBUG-52065] Fix crash with Array.unshift() + -- cgit v1.2.3 From 4b4cf31c7a4bcb89cabca09102c4e0a22ab0c6b1 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 13 May 2016 12:47:08 +0200 Subject: QQuickWidget: update() when resetting updatePending in showEvent() If updatePending is set, that means we want to call update() eventually. If we just reset updatePending without calling update(), we produce UI glitches. Change-Id: Ie7353b2f5da567e196dbee8c113920e0e4702304 Task-number: QTCREATORBUG-16022 Reviewed-by: Robert Loehning Reviewed-by: Laszlo Agocs --- src/quickwidgets/qquickwidget.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp index 2120be768c..1a840b44bd 100644 --- a/src/quickwidgets/qquickwidget.cpp +++ b/src/quickwidgets/qquickwidget.cpp @@ -1099,12 +1099,16 @@ void QQuickWidget::mouseDoubleClickEvent(QMouseEvent *e) void QQuickWidget::showEvent(QShowEvent *) { Q_D(QQuickWidget); - d->updatePending = false; d->createContext(); - if (d->offscreenWindow->openglContext()) + if (d->offscreenWindow->openglContext()) { d->render(true); - else + if (d->updatePending) { + d->updatePending = false; + update(); + } + } else { triggerUpdate(); + } QWindowPrivate *offscreenPrivate = QWindowPrivate::get(d->offscreenWindow); if (!offscreenPrivate->visible) { offscreenPrivate->visible = true; -- cgit v1.2.3 From 064dc6a29b09fa3bc7c57ed3f443befda510663f Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Fri, 13 May 2016 17:50:05 +0200 Subject: QQuickTextInput: Remove redundant centerPoint calculations. The default is to press/release in the center of the window, so we don't need to DIY. Change-Id: Id65b2b54c15d45e8d780a008d05275718f519a71 Reviewed-by: Friedemann Kleint --- .../quick/qquicktextinput/tst_qquicktextinput.cpp | 30 ++++++++++------------ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp index ce90e4c60a..70d3906ff3 100644 --- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp +++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp @@ -3409,16 +3409,15 @@ void tst_qquicktextinput::focusOnPress() QCOMPARE(textInputObject->hasFocus(), false); QCOMPARE(textInputObject->hasActiveFocus(), false); - QPoint centerPoint(window.width()/2, window.height()/2); Qt::KeyboardModifiers noModifiers = 0; - QTest::mousePress(&window, Qt::LeftButton, noModifiers, centerPoint); + QTest::mousePress(&window, Qt::LeftButton, noModifiers); QGuiApplication::processEvents(); QCOMPARE(textInputObject->hasFocus(), true); QCOMPARE(textInputObject->hasActiveFocus(), true); QCOMPARE(focusSpy.count(), 1); QCOMPARE(activeFocusSpy.count(), 1); QCOMPARE(textInputObject->selectedText(), QString()); - QTest::mouseRelease(&window, Qt::LeftButton, noModifiers, centerPoint); + QTest::mouseRelease(&window, Qt::LeftButton, noModifiers); textInputObject->setFocusOnPress(false); QCOMPARE(textInputObject->focusOnPress(), false); @@ -3432,13 +3431,13 @@ void tst_qquicktextinput::focusOnPress() // Wait for double click timeout to expire before clicking again. QTest::qWait(400); - QTest::mousePress(&window, Qt::LeftButton, noModifiers, centerPoint); + QTest::mousePress(&window, Qt::LeftButton, noModifiers); QGuiApplication::processEvents(); QCOMPARE(textInputObject->hasFocus(), false); QCOMPARE(textInputObject->hasActiveFocus(), false); QCOMPARE(focusSpy.count(), 2); QCOMPARE(activeFocusSpy.count(), 2); - QTest::mouseRelease(&window, Qt::LeftButton, noModifiers, centerPoint); + QTest::mouseRelease(&window, Qt::LeftButton, noModifiers); textInputObject->setFocusOnPress(true); QCOMPARE(textInputObject->focusOnPress(), true); @@ -3448,14 +3447,14 @@ void tst_qquicktextinput::focusOnPress() textInputObject->setProperty("selectOnFocus", true); QTest::qWait(400); - QTest::mousePress(&window, Qt::LeftButton, noModifiers, centerPoint); + QTest::mousePress(&window, Qt::LeftButton, noModifiers); QGuiApplication::processEvents(); QCOMPARE(textInputObject->hasFocus(), true); QCOMPARE(textInputObject->hasActiveFocus(), true); QCOMPARE(focusSpy.count(), 3); QCOMPARE(activeFocusSpy.count(), 3); QCOMPARE(textInputObject->selectedText(), textInputObject->text()); - QTest::mouseRelease(&window, Qt::LeftButton, noModifiers, centerPoint); + QTest::mouseRelease(&window, Qt::LeftButton, noModifiers); } void tst_qquicktextinput::openInputPanel() @@ -3479,23 +3478,22 @@ void tst_qquicktextinput::openInputPanel() QCOMPARE(qApp->inputMethod()->isVisible(), false); // input panel should open on focus - QPoint centerPoint(view.width()/2, view.height()/2); Qt::KeyboardModifiers noModifiers = 0; - QTest::mousePress(&view, Qt::LeftButton, noModifiers, centerPoint); + QTest::mousePress(&view, Qt::LeftButton, noModifiers); QGuiApplication::processEvents(); QVERIFY(input->hasActiveFocus()); QCOMPARE(qApp->focusObject(), input); QCOMPARE(qApp->inputMethod()->isVisible(), true); - QTest::mouseRelease(&view, Qt::LeftButton, noModifiers, centerPoint); + QTest::mouseRelease(&view, Qt::LeftButton, noModifiers); // input panel should be re-opened when pressing already focused TextInput qApp->inputMethod()->hide(); QCOMPARE(qApp->inputMethod()->isVisible(), false); QVERIFY(input->hasActiveFocus()); - QTest::mousePress(&view, Qt::LeftButton, noModifiers, centerPoint); + QTest::mousePress(&view, Qt::LeftButton, noModifiers); QGuiApplication::processEvents(); QCOMPARE(qApp->inputMethod()->isVisible(), true); - QTest::mouseRelease(&view, Qt::LeftButton, noModifiers, centerPoint); + QTest::mouseRelease(&view, Qt::LeftButton, noModifiers); // input panel should stay visible if focus is lost to another text inputor QSignalSpy inputPanelVisibilitySpy(qApp->inputMethod(), SIGNAL(visibleChanged())); @@ -3518,8 +3516,8 @@ void tst_qquicktextinput::openInputPanel() input->setReadOnly(true); input->setFocus(true); QCOMPARE(qApp->inputMethod()->isVisible(), false); - QTest::mousePress(&view, Qt::LeftButton, noModifiers, centerPoint); - QTest::mouseRelease(&view, Qt::LeftButton, noModifiers, centerPoint); + QTest::mousePress(&view, Qt::LeftButton, noModifiers); + QTest::mouseRelease(&view, Qt::LeftButton, noModifiers); QGuiApplication::processEvents(); QCOMPARE(qApp->inputMethod()->isVisible(), false); @@ -3528,8 +3526,8 @@ void tst_qquicktextinput::openInputPanel() input->setFocus(false); input->setFocus(true); QCOMPARE(qApp->inputMethod()->isVisible(), false); - QTest::mousePress(&view, Qt::LeftButton, noModifiers, centerPoint); - QTest::mouseRelease(&view, Qt::LeftButton, noModifiers, centerPoint); + QTest::mousePress(&view, Qt::LeftButton, noModifiers); + QTest::mouseRelease(&view, Qt::LeftButton, noModifiers); QCOMPARE(qApp->inputMethod()->isVisible(), false); } -- cgit v1.2.3 From 87cf6b7ae7fbaf61595311d04c7e2e99a124e3c6 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 11 May 2016 17:57:26 +0200 Subject: standardize on QT_CONFIG debug_and_release instead of build_all the two flags are equivalent. use the same one everywhere. Change-Id: I9ac0caad5a9a8d37813f8de4d81067e20656abc5 Reviewed-by: Joerg Bornemann --- tests/auto/qmldevtools/compile/compile.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/qmldevtools/compile/compile.pro b/tests/auto/qmldevtools/compile/compile.pro index 0ed113a031..819289f5f7 100644 --- a/tests/auto/qmldevtools/compile/compile.pro +++ b/tests/auto/qmldevtools/compile/compile.pro @@ -5,7 +5,7 @@ force_bootstrap { !build_pass: CONFIG += release } else { QT = core - !build_pass:contains(QT_CONFIG, build_all): CONFIG += release + !build_pass:contains(QT_CONFIG, debug_and_release): CONFIG += release } QT += qmldevtools-private macx:CONFIG -= app_bundle -- cgit v1.2.3 From 6371b208a9e55845090dcd34234e314c6587c105 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 17 May 2016 15:18:12 +0200 Subject: Revert "Remove this piece of code" This reverts commit bad007360a0f6fba304d8f4c99826a1250fd886c. The lookup in the global object is necessary to detect whether we've seen any unresolved properties. This is used for the optimization of skipping binding refresh updates when a context property changes. Task-number: QTBUG-53431 Change-Id: Idb39a32e4b58b915496bbb9d8a098dc17a6f688a Reviewed-by: Lars Knoll --- src/qml/qml/qqmlcontextwrapper.cpp | 13 +++++++++++-- tests/auto/qml/qqmlcontext/data/qtbug_53431.qml | 7 +++++++ tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp | 14 ++++++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 tests/auto/qml/qqmlcontext/data/qtbug_53431.qml diff --git a/src/qml/qml/qqmlcontextwrapper.cpp b/src/qml/qml/qqmlcontextwrapper.cpp index 0d84c3bb64..e3770a7ec5 100644 --- a/src/qml/qml/qqmlcontextwrapper.cpp +++ b/src/qml/qml/qqmlcontextwrapper.cpp @@ -99,14 +99,23 @@ ReturnedValue QmlContextWrapper::get(const Managed *m, String *name, bool *hasPr QV4::ExecutionEngine *v4 = resource->engine(); QV4::Scope scope(v4); + // In V8 the JS global object would come _before_ the QML global object, + // so simulate that here. + bool hasProp; + QV4::ScopedValue result(scope, v4->globalObject->get(name, &hasProp)); + if (hasProp) { + if (hasProperty) + *hasProperty = hasProp; + return result->asReturnedValue(); + } + if (resource->d()->isNullWrapper) return Object::get(m, name, hasProperty); if (v4->callingQmlContext() != resource->d()->context) return Object::get(m, name, hasProperty); - bool hasProp; - QV4::ScopedValue result(scope, Object::get(m, name, &hasProp)); + result = Object::get(m, name, &hasProp); if (hasProp) { if (hasProperty) *hasProperty = hasProp; diff --git a/tests/auto/qml/qqmlcontext/data/qtbug_53431.qml b/tests/auto/qml/qqmlcontext/data/qtbug_53431.qml new file mode 100644 index 0000000000..2ceee2bade --- /dev/null +++ b/tests/auto/qml/qqmlcontext/data/qtbug_53431.qml @@ -0,0 +1,7 @@ +import QtQml 2.0 +QtObject { + property int value: { + console.log("lookup in global object") + return 1 + } +} diff --git a/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp b/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp index 18ef7ac31d..d338e6f5ad 100644 --- a/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp +++ b/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp @@ -61,6 +61,7 @@ private slots: void refreshExpressions(); void refreshExpressionsCrash(); void refreshExpressionsRootContext(); + void skipExpressionRefresh_qtbug_53431(); void qtbug_22535(); void evalAfterInvalidate(); @@ -642,6 +643,19 @@ void tst_qqmlcontext::refreshExpressionsRootContext() delete o1; } +void tst_qqmlcontext::skipExpressionRefresh_qtbug_53431() +{ + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("qtbug_53431.qml")); + QScopedPointer object(component.create(0)); + QVERIFY(!object.isNull()); + QCOMPARE(object->property("value").toInt(), 1); + object->setProperty("value", 10); + QCOMPARE(object->property("value").toInt(), 10); + engine.rootContext()->setContextProperty("randomContextProperty", 42); + QCOMPARE(object->property("value").toInt(), 10); +} + void tst_qqmlcontext::qtbug_22535() { QQmlEngine engine; -- cgit v1.2.3 From 72515ebe5a63c201fde09471bc646dbe15110a6b Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 11 May 2016 15:22:51 +0200 Subject: Fix crashes when incubating objects asynchronously with initial properties This is a regression from commit 94e337fa95425d259e81b4d21f4d0853108553bd where we accidentally ended up not having a calling QML context set anymore when initializing the properties on newly incubated objects as provided by the caller. The QML context is necessary as for example when we set a URL property, the URL can be relative and it will be resolved to the base url of the context when written, such as in in QQmlPropertyPrivate::write. Change-Id: I1d896381fc92f653a7d76f4d82174bca48828f5e Reviewed-by: Lars Knoll --- src/qml/jsruntime/qv4context_p.h | 2 +- src/qml/jsruntime/qv4engine.cpp | 2 +- src/qml/qml/qqmlcomponent.cpp | 23 ++++++--- src/qml/qml/qqmlcomponent_p.h | 2 +- src/quick/items/qquickloader.cpp | 4 +- src/quick/items/qquickloader_p_p.h | 1 + .../qml/qqmlcomponent/data/callingQmlContext.qml | 13 +++++ .../data/callingQmlContextComponent.qml | 3 ++ tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp | 59 ++++++++++++++++++++++ 9 files changed, 99 insertions(+), 10 deletions(-) create mode 100644 tests/auto/qml/qqmlcomponent/data/callingQmlContext.qml create mode 100644 tests/auto/qml/qqmlcomponent/data/callingQmlContextComponent.qml diff --git a/src/qml/jsruntime/qv4context_p.h b/src/qml/jsruntime/qv4context_p.h index 6c360e7dda..c0c89a5c3d 100644 --- a/src/qml/jsruntime/qv4context_p.h +++ b/src/qml/jsruntime/qv4context_p.h @@ -241,7 +241,7 @@ struct WithContext : public ExecutionContext V4_MANAGED(WithContext, ExecutionContext) }; -struct QmlContext : public ExecutionContext +struct Q_QML_EXPORT QmlContext : public ExecutionContext { V4_MANAGED(QmlContext, ExecutionContext) diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index 49b6dce697..fefc5b6308 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -693,7 +693,7 @@ Heap::QmlContext *ExecutionEngine::qmlContext() const if (ctx->type == Heap::ExecutionContext::Type_SimpleCallContext && !ctx->outer) ctx = parentContext(currentContext)->d(); - if (!ctx->outer) + if (ctx->type != Heap::ExecutionContext::Type_QmlContext && !ctx->outer) return 0; while (ctx->outer && ctx->outer->type != Heap::ExecutionContext::Type_GlobalContext) diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index 9b52a951af..24abf52e38 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -1071,6 +1071,7 @@ struct QmlIncubatorObject : Object { QPointer parent; QV4::Value valuemap; QV4::Value statusChanged; + Pointer qmlContext; }; } @@ -1185,7 +1186,7 @@ static void QQmlComponent_setQmlParent(QObject *me, QObject *parent) */ -static void setInitialProperties(QV4::ExecutionEngine *engine, const QV4::Value &o, const QV4::Value &v) +static void setInitialProperties(QV4::ExecutionEngine *engine, QV4::QmlContext *qmlContext, const QV4::Value &o, const QV4::Value &v) { QV4::Scope scope(engine); QV4::ScopedObject object(scope); @@ -1196,6 +1197,9 @@ static void setInitialProperties(QV4::ExecutionEngine *engine, const QV4::Value if (engine->hasException) return; + QV4::ExecutionContextSaver saver(scope); + engine->pushContext(qmlContext); + while (1) { name = it.nextPropertyNameAsString(val); if (!name) @@ -1269,8 +1273,10 @@ void QQmlComponent::createObject(QQmlV4Function *args) QV4::ScopedValue object(scope, QV4::QObjectWrapper::wrap(v4, rv)); Q_ASSERT(object->isObject()); - if (!valuemap->isUndefined()) - setInitialProperties(v4, object, valuemap); + if (!valuemap->isUndefined()) { + QV4::Scoped qmlContext(scope, v4->qmlContext()); + setInitialProperties(v4, qmlContext, object, valuemap); + } d->completeCreate(); @@ -1387,6 +1393,7 @@ void QQmlComponent::incubateObject(QQmlV4Function *args) if (!valuemap->isUndefined()) r->d()->valuemap = valuemap; + r->d()->qmlContext = v4->qmlContext(); r->d()->parent = parent; QQmlIncubator *incubator = r->d()->incubator.data(); @@ -1400,7 +1407,7 @@ void QQmlComponent::incubateObject(QQmlV4Function *args) } // XXX used by QSGLoader -void QQmlComponentPrivate::initializeObjectWithInitialProperties(const QV4::Value &valuemap, QObject *toCreate) +void QQmlComponentPrivate::initializeObjectWithInitialProperties(QV4::QmlContext *qmlContext, const QV4::Value &valuemap, QObject *toCreate) { QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine); QV4::ExecutionEngine *v4engine = QV8Engine::getV4(ep->v8engine()); @@ -1410,7 +1417,7 @@ void QQmlComponentPrivate::initializeObjectWithInitialProperties(const QV4::Valu Q_ASSERT(object->as()); if (!valuemap.isUndefined()) - setInitialProperties(v4engine, object, valuemap); + setInitialProperties(v4engine, qmlContext, object, valuemap); } QQmlComponentExtension::QQmlComponentExtension(QV4::ExecutionEngine *v4) @@ -1487,6 +1494,7 @@ QQmlComponentExtension::~QQmlComponentExtension() QV4::Heap::QmlIncubatorObject::QmlIncubatorObject(QQmlIncubator::IncubationMode m) : valuemap(QV4::Primitive::undefinedValue()) , statusChanged(QV4::Primitive::undefinedValue()) + , qmlContext(0) { incubator.reset(new QQmlComponentIncubator(this, m)); } @@ -1499,7 +1507,8 @@ void QV4::QmlIncubatorObject::setInitialState(QObject *o) QV4::ExecutionEngine *v4 = engine(); QV4::Scope scope(v4); QV4::ScopedObject obj(scope, QV4::QObjectWrapper::wrap(v4, o)); - setInitialProperties(v4, obj, d()->valuemap); + QV4::Scoped qmlCtxt(scope, d()->qmlContext); + setInitialProperties(v4, qmlCtxt, obj, d()->valuemap); } } @@ -1508,6 +1517,8 @@ void QV4::QmlIncubatorObject::markObjects(QV4::Heap::Base *that, QV4::ExecutionE QmlIncubatorObject::Data *o = static_cast(that); o->valuemap.mark(e); o->statusChanged.mark(e); + if (o->qmlContext) + o->qmlContext->mark(e); Object::markObjects(that, e); } diff --git a/src/qml/qml/qqmlcomponent_p.h b/src/qml/qml/qqmlcomponent_p.h index 15ec88dd52..ff6969fcdc 100644 --- a/src/qml/qml/qqmlcomponent_p.h +++ b/src/qml/qml/qqmlcomponent_p.h @@ -82,7 +82,7 @@ public: QObject *beginCreate(QQmlContextData *); void completeCreate(); - void initializeObjectWithInitialProperties(const QV4::Value &valuemap, QObject *toCreate); + void initializeObjectWithInitialProperties(QV4::QmlContext *qmlContext, const QV4::Value &valuemap, QObject *toCreate); QQmlTypeData *typeData; virtual void typeDataReady(QQmlTypeData *); diff --git a/src/quick/items/qquickloader.cpp b/src/quick/items/qquickloader.cpp index 456eedd0be..7cac79bd46 100644 --- a/src/quick/items/qquickloader.cpp +++ b/src/quick/items/qquickloader.cpp @@ -577,6 +577,7 @@ void QQuickLoader::setSource(QQmlV4Function *args) d->disposeInitialPropertyValues(); d->initialPropertyValues.set(args->v4engine(), ipv); } + d->qmlCallingContext.set(scope.engine, scope.engine->qmlContext()); setSource(sourceUrl, false); // already cleared and set ipv above. } @@ -645,7 +646,8 @@ void QQuickLoaderPrivate::setInitialState(QObject *obj) Q_ASSERT(v4); QV4::Scope scope(v4); QV4::ScopedValue ipv(scope, initialPropertyValues.value()); - d->initializeObjectWithInitialProperties(ipv, obj); + QV4::Scoped qmlContext(scope, qmlCallingContext.value()); + d->initializeObjectWithInitialProperties(qmlContext, ipv, obj); } void QQuickLoaderIncubator::statusChanged(Status status) diff --git a/src/quick/items/qquickloader_p_p.h b/src/quick/items/qquickloader_p_p.h index 9677318b58..26a74be9d9 100644 --- a/src/quick/items/qquickloader_p_p.h +++ b/src/quick/items/qquickloader_p_p.h @@ -102,6 +102,7 @@ public: QQmlContext *itemContext; QQuickLoaderIncubator *incubator; QV4::PersistentValue initialPropertyValues; + QV4::PersistentValue qmlCallingContext; bool updatingSize: 1; bool active : 1; bool loadingFromSource : 1; diff --git a/tests/auto/qml/qqmlcomponent/data/callingQmlContext.qml b/tests/auto/qml/qqmlcomponent/data/callingQmlContext.qml new file mode 100644 index 0000000000..8193d0f36c --- /dev/null +++ b/tests/auto/qml/qqmlcomponent/data/callingQmlContext.qml @@ -0,0 +1,13 @@ +import QtQml 2.0 +import qqmlcomponenttest 1.0 +QtObject { + property Component factory + property QtObject incubatedObject + + Component.onCompleted: { + var incubatorState = factory.incubateObject(null, { value: 42 }) + incubatorState.onStatusChanged = function(status) { + incubatedObject = incubatorState.object + } + } +} diff --git a/tests/auto/qml/qqmlcomponent/data/callingQmlContextComponent.qml b/tests/auto/qml/qqmlcomponent/data/callingQmlContextComponent.qml new file mode 100644 index 0000000000..adf491c87e --- /dev/null +++ b/tests/auto/qml/qqmlcomponent/data/callingQmlContextComponent.qml @@ -0,0 +1,3 @@ +import qqmlcomponenttest 1.0 +CallingContextCheckingClass { +} diff --git a/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp b/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp index 85579a6019..680ea720a8 100644 --- a/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp +++ b/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include #include "../../shared/util.h" #include "testhttpserver.h" @@ -116,6 +117,7 @@ private slots: void onDestructionCount(); void recursion(); void recursionContinuation(); + void callingContextForInitialProperties(); private: QQmlEngine engine; @@ -523,6 +525,63 @@ void tst_qqmlcomponent::recursionContinuation() QVERIFY(object->property("success").toBool()); } +class CallingContextCheckingClass : public QObject +{ + Q_OBJECT + Q_PROPERTY(int value READ value WRITE setValue) +public: + CallingContextCheckingClass() + : m_value(0) + {} + + int value() const { return m_value; } + void setValue(int v) { + scopeObject.clear(); + callingContextData.setContextData(0); + + m_value = v; + QJSEngine *jsEngine = qjsEngine(this); + if (!jsEngine) + return; + QV4::ExecutionEngine *v4 = QV8Engine::getV4(jsEngine); + if (!v4) + return; + QV4::Scope scope(v4); + QV4::Scoped qmlContext(scope, v4->qmlContext()); + if (!qmlContext) + return; + callingContextData = qmlContext->qmlContext(); + scopeObject = qmlContext->qmlScope(); + } + + int m_value; + QQmlGuardedContextData callingContextData; + QPointer scopeObject; +}; + +void tst_qqmlcomponent::callingContextForInitialProperties() +{ + qmlRegisterType("qqmlcomponenttest", 1, 0, "CallingContextCheckingClass"); + + QQmlComponent testFactory(&engine, testFileUrl("callingQmlContextComponent.qml")); + + QQmlComponent component(&engine, testFileUrl("callingQmlContext.qml")); + QScopedPointer root(component.beginCreate(engine.rootContext())); + QVERIFY(!root.isNull()); + root->setProperty("factory", QVariant::fromValue(&testFactory)); + component.completeCreate(); + QTRY_VERIFY(qvariant_cast(root->property("incubatedObject"))); + QObject *o = qvariant_cast(root->property("incubatedObject")); + CallingContextCheckingClass *checker = qobject_cast(o); + QVERIFY(checker); + + QVERIFY(!checker->callingContextData.isNull()); + QVERIFY(checker->callingContextData->urlString().endsWith(QStringLiteral("callingQmlContext.qml"))); + + QVERIFY(!checker->scopeObject.isNull()); + QVERIFY(checker->scopeObject->metaObject()->indexOfProperty("incubatedObject") != -1); +} + QTEST_MAIN(tst_qqmlcomponent) #include "tst_qqmlcomponent.moc" -- cgit v1.2.3 From ad069828db14cbb9d657b482a802358924c6b947 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Fri, 20 May 2016 10:14:18 +0200 Subject: Fix compiler warnings. Fixed a whole bunch of the following warnings: warning: 'interface_cast' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] Change-Id: I6cd6c16a6465d23e5e7c61d04ba87652df727bc1 Reviewed-by: Simon Hausmann Reviewed-by: Frederik Gladhorn --- src/quick/accessible/qaccessiblequickitem_p.h | 69 ++++++++++++++------------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/src/quick/accessible/qaccessiblequickitem_p.h b/src/quick/accessible/qaccessiblequickitem_p.h index 8541734d39..7445fd1400 100644 --- a/src/quick/accessible/qaccessiblequickitem_p.h +++ b/src/quick/accessible/qaccessiblequickitem_p.h @@ -68,70 +68,71 @@ public: QWindow *window() const Q_DECL_OVERRIDE; - QRect rect() const; + QRect rect() const Q_DECL_OVERRIDE; QRect viewRect() const; bool clipsChildren() const; - QAccessibleInterface *childAt(int x, int y) const; + QAccessibleInterface *childAt(int x, int y) const Q_DECL_OVERRIDE; - QAccessibleInterface *parent() const; - QAccessibleInterface *child(int index) const; - int childCount() const; - int indexOfChild(const QAccessibleInterface *iface) const; + QAccessibleInterface *parent() const Q_DECL_OVERRIDE; + QAccessibleInterface *child(int index) const Q_DECL_OVERRIDE; + int childCount() const Q_DECL_OVERRIDE; + int indexOfChild(const QAccessibleInterface *iface) const Q_DECL_OVERRIDE; QList childItems() const; - QAccessible::State state() const; - QAccessible::Role role() const; - QString text(QAccessible::Text) const; + QAccessible::State state() const Q_DECL_OVERRIDE; + QAccessible::Role role() const Q_DECL_OVERRIDE; + QString text(QAccessible::Text) const Q_DECL_OVERRIDE; bool isAccessible() const; // Action Interface - QStringList actionNames() const; - void doAction(const QString &actionName); - QStringList keyBindingsForAction(const QString &actionName) const; + QStringList actionNames() const Q_DECL_OVERRIDE; + void doAction(const QString &actionName) Q_DECL_OVERRIDE; + QStringList keyBindingsForAction(const QString &actionName) const Q_DECL_OVERRIDE; // Value Interface - QVariant currentValue() const; - void setCurrentValue(const QVariant &value); - QVariant maximumValue() const; - QVariant minimumValue() const; - QVariant minimumStepSize() const; + QVariant currentValue() const Q_DECL_OVERRIDE; + void setCurrentValue(const QVariant &value) Q_DECL_OVERRIDE; + QVariant maximumValue() const Q_DECL_OVERRIDE; + QVariant minimumValue() const Q_DECL_OVERRIDE; + QVariant minimumStepSize() const Q_DECL_OVERRIDE; // Text Interface - void selection(int selectionIndex, int *startOffset, int *endOffset) const; - int selectionCount() const; - void addSelection(int startOffset, int endOffset); - void removeSelection(int selectionIndex); - void setSelection(int selectionIndex, int startOffset, int endOffset); + void selection(int selectionIndex, int *startOffset, int *endOffset) const Q_DECL_OVERRIDE; + int selectionCount() const Q_DECL_OVERRIDE; + void addSelection(int startOffset, int endOffset) Q_DECL_OVERRIDE; + void removeSelection(int selectionIndex) Q_DECL_OVERRIDE; + void setSelection(int selectionIndex, int startOffset, int endOffset) Q_DECL_OVERRIDE; // cursor - int cursorPosition() const; - void setCursorPosition(int position); + int cursorPosition() const Q_DECL_OVERRIDE; + void setCursorPosition(int position) Q_DECL_OVERRIDE; // text - QString text(int startOffset, int endOffset) const; + QString text(int startOffset, int endOffset) const Q_DECL_OVERRIDE; QString textBeforeOffset(int offset, QAccessible::TextBoundaryType boundaryType, - int *startOffset, int *endOffset) const; + int *startOffset, int *endOffset) const Q_DECL_OVERRIDE; QString textAfterOffset(int offset, QAccessible::TextBoundaryType boundaryType, - int *startOffset, int *endOffset) const; + int *startOffset, int *endOffset) const Q_DECL_OVERRIDE; QString textAtOffset(int offset, QAccessible::TextBoundaryType boundaryType, - int *startOffset, int *endOffset) const; - int characterCount() const; + int *startOffset, int *endOffset) const Q_DECL_OVERRIDE; + int characterCount() const Q_DECL_OVERRIDE; // character <-> geometry - QRect characterRect(int /* offset */) const { return QRect(); } - int offsetAtPoint(const QPoint & /* point */) const { return -1; } + QRect characterRect(int /* offset */) const Q_DECL_OVERRIDE { return QRect(); } + int offsetAtPoint(const QPoint & /* point */) const Q_DECL_OVERRIDE { return -1; } - void scrollToSubstring(int /* startIndex */, int /* endIndex */) {} - QString attributes(int /* offset */, int *startOffset, int *endOffset) const { *startOffset = 0; *endOffset = 0; return QString(); } + void scrollToSubstring(int /* startIndex */, int /* endIndex */) Q_DECL_OVERRIDE {} + QString attributes(int /* offset */, int *startOffset, int *endOffset) const Q_DECL_OVERRIDE + { *startOffset = 0; *endOffset = 0; return QString(); } QTextDocument *textDocument() const; protected: QQuickItem *item() const { return static_cast(object()); } - void *interface_cast(QAccessible::InterfaceType t); + void *interface_cast(QAccessible::InterfaceType t) Q_DECL_OVERRIDE; private: QTextDocument *m_doc; -- cgit v1.2.3 From afd01a7341df6ab5629469d9b55ab4f1b195cff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kari=20Hautam=C3=A4ki?= Date: Mon, 20 Apr 2015 15:05:59 +0300 Subject: Don't render when width is zero and elide is not None Works now similarly as with very small text lengths (smaller than elide characted length). Change-Id: I0c4aafbcc50343bb0ec8b5f335045e1048a499fd Task-number: QTBUG-34990 Reviewed-by: Frederik Gladhorn --- src/quick/items/qquicktext.cpp | 5 +++++ tests/auto/quick/qquicktext/data/ellipsisText.qml | 17 +++++++++++++++++ tests/auto/quick/qquicktext/tst_qquicktext.cpp | 23 +++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 tests/auto/quick/qquicktext/data/ellipsisText.qml diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp index f3254cf8d7..8b1d47ac0b 100644 --- a/src/quick/items/qquicktext.cpp +++ b/src/quick/items/qquicktext.cpp @@ -650,6 +650,11 @@ QRectF QQuickTextPrivate::setupTextLayout(qreal *const baseline) emit q->lineCountChanged(); } + if (qFuzzyIsNull(q->width())) { + layout.setText(QString()); + textHasChanged = true; + } + QFontMetricsF fm(font); qreal height = (lineHeightMode() == QQuickText::FixedHeight) ? lineHeight() : qCeil(fm.height()) * lineHeight(); *baseline = fm.ascent(); diff --git a/tests/auto/quick/qquicktext/data/ellipsisText.qml b/tests/auto/quick/qquicktext/data/ellipsisText.qml new file mode 100644 index 0000000000..37faafcbf3 --- /dev/null +++ b/tests/auto/quick/qquicktext/data/ellipsisText.qml @@ -0,0 +1,17 @@ +import QtQuick 2.0 + +Text { + width: 0 + height: 10 + text: "Meaningless text" + elide: Text.ElideRight + + Text { + objectName: "elidedRef" + width: 10 + height: 10 + text: "Meaningless text" + elide: Text.ElideRight + } +} + diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp index 46ec099501..d0fc36936a 100644 --- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp +++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp @@ -147,6 +147,9 @@ private slots: void padding(); + void zeroWidthAndElidedDoesntRender(); + + private: QStringList standard; QStringList richText; @@ -4146,6 +4149,26 @@ void tst_qquicktext::padding() delete root; } +void tst_qquicktext::zeroWidthAndElidedDoesntRender() +{ + // Tests QTBUG-34990 + + QQmlComponent component(&engine, testFile("ellipsisText.qml")); + + QScopedPointer object(component.create()); + + QQuickText *text = qobject_cast(object.data()); + QVERIFY(text); + + QCOMPARE(text->contentWidth(), 0.0); + + QQuickText *reference = text->findChild("elidedRef"); + QVERIFY(reference); + + text->setWidth(10); + QCOMPARE(text->contentWidth(), reference->contentWidth()); +} + QTEST_MAIN(tst_qquicktext) #include "tst_qquicktext.moc" -- cgit v1.2.3 From 541eb6b704b53a6e889ea206d8e058ec3017100c Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 4 May 2016 11:45:48 +0200 Subject: qmlplugindump: Allow dumping of WebEngine plugins WebEngineView requires a shared opengl context. The plugin checks for this when initializing. Change-Id: I686b9c22be95f7ef16ea68ea49b8f9aee47789ae Reviewed-by: Marco Benelli --- tools/qmlplugindump/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index d0d70fd0fe..395b3cd195 100644 --- a/tools/qmlplugindump/main.cpp +++ b/tools/qmlplugindump/main.cpp @@ -972,6 +972,7 @@ int main(int argc, char *argv[]) if (!requireWindowManager) qputenv("QT_QPA_PLATFORM", QByteArrayLiteral("minimal")); + QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); QGuiApplication app(argc, argv); const QStringList args = app.arguments(); const QString appName = QFileInfo(app.applicationFilePath()).baseName(); -- cgit v1.2.3 From 106054d3f5e002d46e18a8c01bc660af8959a71c Mon Sep 17 00:00:00 2001 From: Ralf Nolden Date: Fri, 20 May 2016 09:49:32 +0200 Subject: Always use ::copysign instead of std::copysign where available Change to remove the Q_OS_ANDROID define for using ::copysign there instead of std::copysign as other systems are affected as well (FreeBSD 9.3 with gcc 4.8 in particular). The distinction does cause more problems than simply using ::copysign everywhere. Change-Id: I1fe42fdee9c1c1bbb3e5930573ff29c600dfb5e0 Reviewed-by: Erik Verbruggen --- src/qml/jsruntime/qv4mathobject.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/qml/jsruntime/qv4mathobject.cpp b/src/qml/jsruntime/qv4mathobject.cpp index 50b81098b2..cb17583b98 100644 --- a/src/qml/jsruntime/qv4mathobject.cpp +++ b/src/qml/jsruntime/qv4mathobject.cpp @@ -85,18 +85,10 @@ Heap::MathObject::MathObject() m->defineDefaultProperty(QStringLiteral("tan"), QV4::MathObject::method_tan, 1); } -#ifdef Q_OS_ANDROID -// C++11's std::copysign is missing in the std namespace, so get it from the root namespace (math.h) static Q_ALWAYS_INLINE double copySign(double x, double y) { return ::copysign(x, y); } -#else // Ok, we have a proper C++11 standard library -static Q_ALWAYS_INLINE double copySign(double x, double y) -{ - return std::copysign(x, y); -} -#endif ReturnedValue MathObject::method_abs(CallContext *context) { -- cgit v1.2.3 From 41a426d78177b704cdf321fdf0b36b7cabc29a56 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Wed, 30 Mar 2016 14:01:40 +0200 Subject: V4: create a fast-path for QObjectWrapper::wrap The typical case is that there's already a QQmlData for a QObject, so fast-path this, and fall back to the general case if there is none (or it is deleted, etc.) Change-Id: I00c890e5fe7abdd743c4e99316a7ce93eb3db9df Reviewed-by: Lars Knoll --- src/qml/jsruntime/qv4qobjectwrapper.cpp | 7 ++----- src/qml/jsruntime/qv4qobjectwrapper_p.h | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp index 3be32c7920..462c4f3171 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper.cpp +++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp @@ -560,7 +560,7 @@ void QObjectWrapper::setProperty(ExecutionEngine *engine, QObject *object, QQmlP } } -ReturnedValue QObjectWrapper::wrap(ExecutionEngine *engine, QObject *object) +ReturnedValue QObjectWrapper::wrap_slowPath(ExecutionEngine *engine, QObject *object) { if (QQmlData::wasDeleted(object)) return QV4::Encode::null(); @@ -571,10 +571,7 @@ ReturnedValue QObjectWrapper::wrap(ExecutionEngine *engine, QObject *object) Scope scope(engine); - if (ddata->jsEngineId == engine->m_engineId && !ddata->jsWrapper.isUndefined()) { - // We own the JS object - return ddata->jsWrapper.value(); - } else if (ddata->jsWrapper.isUndefined() && + if (ddata->jsWrapper.isUndefined() && (ddata->jsEngineId == engine->m_engineId || // We own the QObject ddata->jsEngineId == 0 || // No one owns the QObject !ddata->hasTaintedV4Object)) { // Someone else has used the QObject, but it isn't tainted diff --git a/src/qml/jsruntime/qv4qobjectwrapper_p.h b/src/qml/jsruntime/qv4qobjectwrapper_p.h index d25279e783..d2650efd58 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper_p.h +++ b/src/qml/jsruntime/qv4qobjectwrapper_p.h @@ -145,8 +145,27 @@ protected: static ReturnedValue method_connect(CallContext *ctx); static ReturnedValue method_disconnect(CallContext *ctx); + +private: + static ReturnedValue wrap_slowPath(ExecutionEngine *engine, QObject *object); }; +inline ReturnedValue QObjectWrapper::wrap(ExecutionEngine *engine, QObject *object) +{ + if (Q_LIKELY(!QQmlData::wasDeleted(object))) { + QObjectPrivate *priv = QObjectPrivate::get(const_cast(object)); + if (Q_LIKELY(priv->declarativeData)) { + auto ddata = static_cast(priv->declarativeData); + if (Q_LIKELY(ddata->jsEngineId == engine->m_engineId && !ddata->jsWrapper.isUndefined())) { + // We own the JS object + return ddata->jsWrapper.value(); + } + } + } + + return wrap_slowPath(engine, object); +} + struct QQmlValueTypeWrapper; struct Q_QML_EXPORT QObjectMethod : public QV4::FunctionObject -- cgit v1.2.3 From 607320ca9fb2796a5f6f2578578fd314f7e8b99e Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Wed, 23 Mar 2016 13:17:10 +0100 Subject: V4: allow inlining of ExecutionEngine::{qml,js}Engine() All other changes are just to be able to include qv8engine_p.h in qv4engine_p.h Change-Id: I71ba2ec42cdc20d5c7d97a74b99b4d1ada1a5ed8 Reviewed-by: Simon Hausmann --- src/particles/qquickv4particledata_p.h | 2 +- src/qml/jsapi/qjsengine.cpp | 1 + src/qml/jsapi/qjsvalue.cpp | 2 +- src/qml/jsapi/qjsvalue_p.h | 1 - src/qml/jsruntime/qv4engine.cpp | 2 ++ src/qml/jsruntime/qv4engine_p.h | 9 +++++++++ src/qml/jsruntime/qv4runtime.cpp | 1 + src/qml/jsruntime/qv4runtime_p.h | 7 +++++++ src/qml/jsruntime/qv4serialize.cpp | 1 + src/qml/jsruntime/qv4variantobject.cpp | 1 + src/qml/qml/qqmlboundsignal.cpp | 1 + src/qml/qml/qqmlcomponent.cpp | 1 + src/qml/qml/qqmlcontextwrapper.cpp | 1 + src/qml/qml/qqmlcontextwrapper_p.h | 8 -------- src/qml/qml/qqmljavascriptexpression.cpp | 1 + src/qml/qml/qqmllistwrapper.cpp | 1 + src/qml/qml/qqmllocale_p.h | 1 + src/qml/qml/qqmlobjectcreator.cpp | 1 + src/qml/qml/qqmltypewrapper.cpp | 1 + src/qml/qml/qqmlvaluetypewrapper.cpp | 1 + src/qml/qml/qqmlvmemetaobject.cpp | 1 + src/qml/qml/v8/qqmlbuiltinfunctions.cpp | 1 + src/qml/qml/v8/qv8engine.cpp | 1 + src/qml/qml/v8/qv8engine_p.h | 8 +++----- src/qml/types/qqmldelegatemodel_p_p.h | 2 +- src/qml/types/qqmllistmodel_p_p.h | 1 + src/qml/types/qqmllistmodelworkeragent_p.h | 1 + src/qmltest/quicktestresult.cpp | 1 + src/quick/items/context2d/qquickcanvasitem.cpp | 1 + src/quick/items/context2d/qquickcanvasitem_p.h | 1 + src/quick/items/context2d/qquickcontext2d.cpp | 1 + src/quick/items/context2d/qquickcontext2d_p.h | 1 + src/quick/items/qquickimage.cpp | 1 + src/quick/items/qquickitem.cpp | 1 + tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp | 2 ++ tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp | 2 ++ 36 files changed, 53 insertions(+), 17 deletions(-) diff --git a/src/particles/qquickv4particledata_p.h b/src/particles/qquickv4particledata_p.h index 0d88f0f9cc..437491ff42 100644 --- a/src/particles/qquickv4particledata_p.h +++ b/src/particles/qquickv4particledata_p.h @@ -52,7 +52,7 @@ // #include - +#include #include QT_BEGIN_NAMESPACE diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp index 5bcc4600a2..9c952f0d42 100644 --- a/src/qml/jsapi/qjsengine.cpp +++ b/src/qml/jsapi/qjsengine.cpp @@ -50,6 +50,7 @@ #include "private/qv4runtime_p.h" #include #include +#include #include #include diff --git a/src/qml/jsapi/qjsvalue.cpp b/src/qml/jsapi/qjsvalue.cpp index e369842252..ec7848aba2 100644 --- a/src/qml/jsapi/qjsvalue.cpp +++ b/src/qml/jsapi/qjsvalue.cpp @@ -54,7 +54,7 @@ #include "private/qv8engine_p.h" #include #include - +#include /*! \since 5.0 diff --git a/src/qml/jsapi/qjsvalue_p.h b/src/qml/jsapi/qjsvalue_p.h index 9caeccec9d..25afd9275c 100644 --- a/src/qml/jsapi/qjsvalue_p.h +++ b/src/qml/jsapi/qjsvalue_p.h @@ -56,7 +56,6 @@ #include #include #include -#include #include #include #include diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index b42dc37b0f..d9692a0876 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -112,6 +112,7 @@ static ReturnedValue throwTypeError(CallContext *ctx) } +#ifdef V4_BOOTSTRAP QJSEngine *ExecutionEngine::jsEngine() const { return v8Engine->publicEngine(); @@ -121,6 +122,7 @@ QQmlEngine *ExecutionEngine::qmlEngine() const { return v8Engine->engine(); } +#endif // V4_BOOTSTRAP qint32 ExecutionEngine::maxCallDepth = -1; diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h index 73d506c4d2..aeb2533d35 100644 --- a/src/qml/jsruntime/qv4engine_p.h +++ b/src/qml/jsruntime/qv4engine_p.h @@ -57,6 +57,10 @@ #include "qv4internalclass_p.h" #include +#ifndef V4_BOOTSTRAP +# include +#endif + namespace WTF { class BumpPointerAllocator; class PageAllocation; @@ -135,8 +139,13 @@ public: Function *globalCode; +#ifdef V4_BOOTSTRAP QJSEngine *jsEngine() const; QQmlEngine *qmlEngine() const; +#else // !V4_BOOTSTRAP + QJSEngine *jsEngine() const { return v8Engine->publicEngine(); } + QQmlEngine *qmlEngine() const { return v8Engine->engine(); } +#endif // V4_BOOTSTRAP QV8Engine *v8Engine; enum JSObjects { diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index 4bc81e414a..0e10f7699e 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -38,6 +38,7 @@ ****************************************************************************/ #include "qv4global_p.h" +#include "qv4engine_p.h" #include "qv4runtime_p.h" #ifndef V4_BOOTSTRAP #include "qv4object_p.h" diff --git a/src/qml/jsruntime/qv4runtime_p.h b/src/qml/jsruntime/qv4runtime_p.h index 51cc4f50b0..b63777e164 100644 --- a/src/qml/jsruntime/qv4runtime_p.h +++ b/src/qml/jsruntime/qv4runtime_p.h @@ -61,6 +61,8 @@ QT_BEGIN_NAMESPACE +class QQmlAccessors; + #undef QV4_COUNT_RUNTIME_FUNCTIONS namespace QV4 { @@ -100,9 +102,14 @@ enum TypeHint { // This is a trick to tell the code generators that functions taking a NoThrowContext won't // throw exceptions and therefore don't need a check after the call. + +#ifndef V4_BOOTSTRAP struct NoThrowEngine : public ExecutionEngine { }; +#else +struct NoThrowEngine; +#endif struct Q_QML_PRIVATE_EXPORT Runtime { // call diff --git a/src/qml/jsruntime/qv4serialize.cpp b/src/qml/jsruntime/qv4serialize.cpp index f803f2fb06..14def49d0a 100644 --- a/src/qml/jsruntime/qv4serialize.cpp +++ b/src/qml/jsruntime/qv4serialize.cpp @@ -48,6 +48,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE diff --git a/src/qml/jsruntime/qv4variantobject.cpp b/src/qml/jsruntime/qv4variantobject.cpp index 743a11d31e..444c0a37e0 100644 --- a/src/qml/jsruntime/qv4variantobject.cpp +++ b/src/qml/jsruntime/qv4variantobject.cpp @@ -42,6 +42,7 @@ #include "qv4objectproto_p.h" #include #include +#include QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp index 9879763c72..dc215ba8a5 100644 --- a/src/qml/qml/qqmlboundsignal.cpp +++ b/src/qml/qml/qqmlboundsignal.cpp @@ -55,6 +55,7 @@ #include "qqmlinfo.h" #include +#include #include #include diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index 2f4d9ec909..28eaae190b 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -60,6 +60,7 @@ #include #include #include +#include #include #include diff --git a/src/qml/qml/qqmlcontextwrapper.cpp b/src/qml/qml/qqmlcontextwrapper.cpp index 02d7f1f6e3..2d0ebad764 100644 --- a/src/qml/qml/qqmlcontextwrapper.cpp +++ b/src/qml/qml/qqmlcontextwrapper.cpp @@ -53,6 +53,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/qqmlcontextwrapper_p.h b/src/qml/qml/qqmlcontextwrapper_p.h index d2c7ecdea2..ca7fcf1d75 100644 --- a/src/qml/qml/qqmlcontextwrapper_p.h +++ b/src/qml/qml/qqmlcontextwrapper_p.h @@ -54,21 +54,13 @@ #include #include -#include #include #include -#include QT_BEGIN_NAMESPACE namespace QV4 { -namespace CompiledData { -struct Function; -} - -struct QmlContextWrapper; - namespace Heap { struct QmlContextWrapper : Object { diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp index 069dadd1c9..8ba4b5eba1 100644 --- a/src/qml/qml/qqmljavascriptexpression.cpp +++ b/src/qml/qml/qqmljavascriptexpression.cpp @@ -47,6 +47,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/qqmllistwrapper.cpp b/src/qml/qml/qqmllistwrapper.cpp index f203dd3607..5c35866274 100644 --- a/src/qml/qml/qqmllistwrapper.cpp +++ b/src/qml/qml/qqmllistwrapper.cpp @@ -44,6 +44,7 @@ #include #include +#include QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/qqmllocale_p.h b/src/qml/qml/qqmllocale_p.h index 6769a9a123..652a3ca0d4 100644 --- a/src/qml/qml/qqmllocale_p.h +++ b/src/qml/qml/qqmllocale_p.h @@ -56,6 +56,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index cfe1c86eba..eec9e5e2c9 100644 --- a/src/qml/qml/qqmlobjectcreator.cpp +++ b/src/qml/qml/qqmlobjectcreator.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include diff --git a/src/qml/qml/qqmltypewrapper.cpp b/src/qml/qml/qqmltypewrapper.cpp index 33fe655368..7892555f08 100644 --- a/src/qml/qml/qqmltypewrapper.cpp +++ b/src/qml/qml/qqmltypewrapper.cpp @@ -47,6 +47,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/qqmlvaluetypewrapper.cpp b/src/qml/qml/qqmlvaluetypewrapper.cpp index d313557e98..04a556f46c 100644 --- a/src/qml/qml/qqmlvaluetypewrapper.cpp +++ b/src/qml/qml/qqmlvaluetypewrapper.cpp @@ -50,6 +50,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index f3d1c4121f..775309d04a 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -55,6 +55,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp index ecfc817d3b..b9fb1f4ffe 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp +++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp @@ -62,6 +62,7 @@ #include #include #include +#include #include #include diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp index 6949eb43e8..46fd4fbbeb 100644 --- a/src/qml/qml/v8/qv8engine.cpp +++ b/src/qml/qml/v8/qv8engine.cpp @@ -70,6 +70,7 @@ #include #include #include +#include #include #include #include diff --git a/src/qml/qml/v8/qv8engine_p.h b/src/qml/qml/v8/qv8engine_p.h index 4ffd36ca34..2cfa996409 100644 --- a/src/qml/qml/v8/qv8engine_p.h +++ b/src/qml/qml/v8/qv8engine_p.h @@ -60,22 +60,20 @@ #include #include -#include +#include #include "private/qintrusivelist_p.h" -#include -#include #include -#include #include -#include +#include QT_BEGIN_NAMESPACE namespace QV4 { struct ArrayObject; struct ExecutionEngine; + struct QObjectMethod; } // Uncomment the following line to enable global handle debugging. When enabled, all the persistent diff --git a/src/qml/types/qqmldelegatemodel_p_p.h b/src/qml/types/qqmldelegatemodel_p_p.h index 76e55f718d..bf9fd99f19 100644 --- a/src/qml/types/qqmldelegatemodel_p_p.h +++ b/src/qml/types/qqmldelegatemodel_p_p.h @@ -41,7 +41,7 @@ #define QQMLDATAMODEL_P_P_H #include "qqmldelegatemodel_p.h" - +#include #include #include diff --git a/src/qml/types/qqmllistmodel_p_p.h b/src/qml/types/qqmllistmodel_p_p.h index a59b8de525..f519b5ff61 100644 --- a/src/qml/types/qqmllistmodel_p_p.h +++ b/src/qml/types/qqmllistmodel_p_p.h @@ -54,6 +54,7 @@ #include "qqmllistmodel_p.h" #include #include +#include #include QT_BEGIN_NAMESPACE diff --git a/src/qml/types/qqmllistmodelworkeragent_p.h b/src/qml/types/qqmllistmodelworkeragent_p.h index f9872a6ad4..1a891c0f25 100644 --- a/src/qml/types/qqmllistmodelworkeragent_p.h +++ b/src/qml/types/qqmllistmodelworkeragent_p.h @@ -53,6 +53,7 @@ #include +#include #include #include diff --git a/src/qmltest/quicktestresult.cpp b/src/qmltest/quicktestresult.cpp index 235b532dbb..0a820b79db 100644 --- a/src/qmltest/quicktestresult.cpp +++ b/src/qmltest/quicktestresult.cpp @@ -57,6 +57,7 @@ #include #include #include +#include #include diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index 68f465cc5a..4abcc722d1 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -55,6 +55,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE diff --git a/src/quick/items/context2d/qquickcanvasitem_p.h b/src/quick/items/context2d/qquickcanvasitem_p.h index b99fcf869d..4f94393a45 100644 --- a/src/quick/items/context2d/qquickcanvasitem_p.h +++ b/src/quick/items/context2d/qquickcanvasitem_p.h @@ -53,6 +53,7 @@ #include #include +#include #include #include diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index ced4d2a6c4..b2117d3eb9 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -57,6 +57,7 @@ #include #include #include +#include #include #include diff --git a/src/quick/items/context2d/qquickcontext2d_p.h b/src/quick/items/context2d/qquickcontext2d_p.h index 818db0868c..cfb62ee052 100644 --- a/src/quick/items/context2d/qquickcontext2d_p.h +++ b/src/quick/items/context2d/qquickcontext2d_p.h @@ -66,6 +66,7 @@ #include #include +#include //#define QQUICKCONTEXT2D_DEBUG //enable this for just DEBUG purpose! diff --git a/src/quick/items/qquickimage.cpp b/src/quick/items/qquickimage.cpp index c04a526bd0..a168b43fd1 100644 --- a/src/quick/items/qquickimage.cpp +++ b/src/quick/items/qquickimage.cpp @@ -44,6 +44,7 @@ #include #include +#include #include #include diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 95b4e09aa5..3573788855 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -71,6 +71,7 @@ #include #include +#include #include #ifndef QT_NO_CURSOR diff --git a/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp b/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp index 1b2df62b76..3f89913f3b 100644 --- a/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp +++ b/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp @@ -39,6 +39,8 @@ #include #include #include +#include +#include using namespace QV4; using namespace QV4::Debugging; diff --git a/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp b/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp index 83bf783cf4..723f575330 100644 --- a/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp +++ b/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp @@ -36,6 +36,8 @@ #include #include #include +#include +#include #include #include "../../shared/util.h" #include "testhttpserver.h" -- cgit v1.2.3 From 70c536b0473529710d36f32e516e6d962a0cb3dc Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 23 May 2016 14:39:01 +0200 Subject: Get rid of QQmlVMEMetaData::AliasData The remaining signal index for the changed signal of the alias target is something that we need only once (when doing the initial alias endpoint connection) and then we can retrieve it from the property cache. Change-Id: Ifbd4625f9af3ca00c9b916eee5c82f58450d54ef Reviewed-by: Lars Knoll --- src/qml/compiler/qqmltypecompiler.cpp | 16 +--------------- src/qml/qml/qqmlvmemetaobject.cpp | 14 +++++++++++--- src/qml/qml/qqmlvmemetaobject_p.h | 8 -------- tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp | 1 - 4 files changed, 12 insertions(+), 27 deletions(-) diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp index 097d072734..c984d7a1c3 100644 --- a/src/qml/compiler/qqmltypecompiler.cpp +++ b/src/qml/compiler/qqmltypecompiler.cpp @@ -659,9 +659,7 @@ bool QQmlPropertyCacheCreator::createMetaObject(int objectIndex, const QmlIR::Ob COMPILE_EXCEPTION(a, tr("Cannot override FINAL property")); } - typedef QQmlVMEMetaData VMD; - - vmeMetaObjects[objectIndex] = QByteArray(sizeof(QQmlVMEMetaData) + obj->aliasCount() * sizeof(VMD::AliasData), 0); + vmeMetaObjects[objectIndex] = QByteArray(sizeof(QQmlVMEMetaData), 0); int effectivePropertyIndex = cache->propertyIndexCacheStart; int effectiveMethodIndex = cache->methodIndexCacheStart; @@ -1559,7 +1557,6 @@ bool QQmlComponentAndAliasResolver::resolveAliases() int effectiveSignalIndex = propertyCache->signalHandlerIndexCacheStart + propertyCache->propertyIndexCache.count(); int effectivePropertyIndex = propertyCache->propertyIndexCacheStart + propertyCache->propertyIndexCache.count(); - int effectiveAliasIndex = 0; int aliasIndex = 0; for (QmlIR::Alias *alias = obj->firstAlias(); alias; alias = alias->next, ++aliasIndex) { @@ -1587,7 +1584,6 @@ bool QQmlComponentAndAliasResolver::resolveAliases() property = QStringRef(&aliasPropertyValue, 0, aliasPropertyValue.length()); int propIdx = -1; - int notifySignal = -1; int type = 0; bool writable = false; bool resettable = false; @@ -1622,7 +1618,6 @@ bool QQmlComponentAndAliasResolver::resolveAliases() writable = targetProperty->isWritable(); resettable = targetProperty->isResettable(); - notifySignal = targetProperty->notifyIndex; if (!subProperty.isEmpty()) { const QMetaObject *valueTypeMetaObject = QQmlValueTypeFactory::metaObjectForMetaType(type); @@ -1662,15 +1657,6 @@ bool QQmlComponentAndAliasResolver::resolveAliases() } alias->encodedMetaPropertyIndex = propIdx; - QQmlVMEMetaData::AliasData aliasData = { notifySignal }; - - typedef QQmlVMEMetaData VMD; - QByteArray &dynamicData = (*vmeMetaObjectData)[objectIndex]; - Q_ASSERT(!dynamicData.isEmpty()); - VMD *vmd = (QQmlVMEMetaData *)dynamicData.data(); - *(vmd->aliasData() + effectiveAliasIndex++) = aliasData; - - Q_ASSERT(dynamicData.isDetached()); if (!(alias->flags & QV4::CompiledData::Property::IsReadOnly) && writable) propertyFlags |= QQmlPropertyData::IsWritable; diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index 1eb49c1c3f..674cd075e1 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -150,15 +150,23 @@ void QQmlVMEMetaObjectEndpoint::tryConnect() metaObject->activate(metaObject->object, sigIdx, 0); } else { const QV4::CompiledData::Alias *aliasData = &metaObject->compiledObject->aliasTable()[aliasId]; - QQmlVMEMetaData::AliasData *d = metaObject->metaData->aliasData() + aliasId; if (!aliasData->isObjectAlias()) { QQmlContextData *ctxt = metaObject->ctxt; QObject *target = ctxt->idValues[aliasData->targetObjectId].data(); if (!target) return; - if (d->notifySignal != -1) - connect(target, d->notifySignal, ctxt->engine); + QQmlData *targetDData = QQmlData::get(target, /*create*/false); + if (!targetDData) + return; + int coreIndex; + QQmlPropertyData::decodeValueTypePropertyIndex(aliasData->encodedMetaPropertyIndex, &coreIndex); + const QQmlPropertyData *pd = targetDData->propertyCache->property(coreIndex); + if (!pd) + return; + + if (pd->notifyIndex != -1) + connect(target, pd->notifyIndex, ctxt->engine); } metaObject.setFlag(); diff --git a/src/qml/qml/qqmlvmemetaobject_p.h b/src/qml/qml/qqmlvmemetaobject_p.h index f9f9ec47af..d8c3b9a248 100644 --- a/src/qml/qml/qqmlvmemetaobject_p.h +++ b/src/qml/qml/qqmlvmemetaobject_p.h @@ -78,14 +78,6 @@ struct QQmlVMEMetaData { // Make sure this structure is always aligned to int int dummy; - - struct AliasData { - int notifySignal; - }; - - AliasData *aliasData() const { - return (AliasData *)(((char *)const_cast(this)) + sizeof(QQmlVMEMetaData)); - } }; class QQmlVMEMetaObject; diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp index 98a97ebd66..8f1b84940e 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -4134,7 +4134,6 @@ void tst_qqmllanguage::earlyIdObjectAccess() void tst_qqmllanguage::dataAlignment() { QVERIFY(sizeof(QQmlVMEMetaData) % sizeof(int) == 0); - QVERIFY(sizeof(QQmlVMEMetaData::AliasData) % sizeof(int) == 0); } void tst_qqmllanguage::deleteSingletons() -- cgit v1.2.3 From 6f4c8ff34526c62995f98c804ab2b7113ff4c6b8 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 24 May 2016 11:00:34 +0200 Subject: Fix compilation Add missing qdebug.h include after some header file changes in qtbase. Change-Id: Ie3bc9469650c954596a03fb471765767149b8f05 Reviewed-by: Allan Sandfeld Jensen --- src/qml/animations/qanimationgroupjob_p.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qml/animations/qanimationgroupjob_p.h b/src/qml/animations/qanimationgroupjob_p.h index 4b94e79d40..9bcd63127a 100644 --- a/src/qml/animations/qanimationgroupjob_p.h +++ b/src/qml/animations/qanimationgroupjob_p.h @@ -52,6 +52,7 @@ // #include "private/qabstractanimationjob_p.h" +#include QT_BEGIN_NAMESPACE -- cgit v1.2.3 From a6814650232825663f33fe4f11a362c397385350 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 23 May 2016 15:20:29 +0200 Subject: Get rid of QQmlVMEMetaData It is unused now and we can remove it as well as its QByteArray based storage. The non-emptyness of the meta-data QByteArray was also used to indicate whether it is necessary to create a VME meta-object when instantiating an object. This bit is now folded into the flag of the QFlagPointer storing the property caches. Change-Id: I3c3604c61ff16a4e76912e68b1c19afdb0f2bd9d Reviewed-by: Lars Knoll --- src/qml/compiler/qqmltypecompiler.cpp | 71 +++++++++++------------- src/qml/compiler/qqmltypecompiler_p.h | 28 ++++------ src/qml/qml/qqmlcompileddata.cpp | 2 +- src/qml/qml/qqmlcompiler_p.h | 9 ++- src/qml/qml/qqmlobjectcreator.cpp | 12 ++-- src/qml/qml/qqmlobjectcreator_p.h | 3 +- src/qml/qml/qqmlvmemetaobject.cpp | 5 +- src/qml/qml/qqmlvmemetaobject_p.h | 9 +-- src/quick/designer/qqmldesignermetaobject.cpp | 16 +----- tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp | 7 --- 10 files changed, 60 insertions(+), 102 deletions(-) diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp index c984d7a1c3..5f405cdcb8 100644 --- a/src/qml/compiler/qqmltypecompiler.cpp +++ b/src/qml/compiler/qqmltypecompiler.cpp @@ -137,7 +137,6 @@ bool QQmlTypeCompiler::compile() customParsers.insert(it.key(), customParser); } - compiledData->metaObjects.reserve(document->objects.count()); compiledData->propertyCaches.reserve(document->objects.count()); { @@ -336,32 +335,21 @@ int QQmlTypeCompiler::rootObjectIndex() const return document->indexOfRootObject; } -void QQmlTypeCompiler::setPropertyCaches(const QVector &caches) +void QQmlTypeCompiler::setPropertyCaches(const QQmlPropertyCacheVector &caches) { compiledData->propertyCaches = caches; Q_ASSERT(caches.count() >= document->indexOfRootObject); if (compiledData->rootPropertyCache) compiledData->rootPropertyCache->release(); - compiledData->rootPropertyCache = caches.at(document->indexOfRootObject); + compiledData->rootPropertyCache = caches.at(document->indexOfRootObject).data(); compiledData->rootPropertyCache->addref(); } -const QVector &QQmlTypeCompiler::propertyCaches() const +const QQmlPropertyCacheVector &QQmlTypeCompiler::propertyCaches() const { return compiledData->propertyCaches; } -void QQmlTypeCompiler::setVMEMetaObjects(const QVector &metaObjects) -{ - Q_ASSERT(compiledData->metaObjects.isEmpty()); - compiledData->metaObjects = metaObjects; -} - -QVector *QQmlTypeCompiler::vmeMetaObjects() const -{ - return &compiledData->metaObjects; -} - QHash *QQmlTypeCompiler::objectIndexToIdForRoot() { return &compiledData->objectIndexToIdForRoot; @@ -435,7 +423,7 @@ QQmlPropertyCacheCreator::QQmlPropertyCacheCreator(QQmlTypeCompiler *typeCompile QQmlPropertyCacheCreator::~QQmlPropertyCacheCreator() { for (int i = 0; i < propertyCaches.count(); ++i) - if (QQmlPropertyCache *cache = propertyCaches.at(i)) + if (QQmlPropertyCache *cache = propertyCaches.at(i).data()) cache->release(); propertyCaches.clear(); } @@ -443,12 +431,10 @@ QQmlPropertyCacheCreator::~QQmlPropertyCacheCreator() bool QQmlPropertyCacheCreator::buildMetaObjects() { propertyCaches.resize(qmlObjects.count()); - vmeMetaObjects.resize(qmlObjects.count()); if (!buildMetaObjectRecursively(compiler->rootObjectIndex(), /*referencing object*/-1, /*instantiating binding*/0)) return false; - compiler->setVMEMetaObjects(vmeMetaObjects); compiler->setPropertyCaches(propertyCaches); propertyCaches.clear(); @@ -463,7 +449,7 @@ bool QQmlPropertyCacheCreator::buildMetaObjectRecursively(int objectIndex, int r QQmlPropertyData *instantiatingProperty = 0; if (instantiatingBinding && instantiatingBinding->type == QV4::CompiledData::Binding::Type_GroupProperty) { Q_ASSERT(referencingObjectIndex >= 0); - QQmlPropertyCache *parentCache = propertyCaches.at(referencingObjectIndex); + QQmlPropertyCache *parentCache = propertyCaches.at(referencingObjectIndex).data(); Q_ASSERT(parentCache); Q_ASSERT(instantiatingBinding->propertyNameIndex != 0); @@ -494,7 +480,7 @@ bool QQmlPropertyCacheCreator::buildMetaObjectRecursively(int objectIndex, int r // because interceptors can't go to the shared value type instances. if (instantiatingProperty && QQmlValueTypeFactory::isValueType(instantiatingProperty->propType)) { needVMEMetaObject = false; - if (!ensureMetaObject(referencingObjectIndex)) + if (!ensureVMEMetaObject(referencingObjectIndex)) return false; } break; @@ -557,12 +543,14 @@ bool QQmlPropertyCacheCreator::buildMetaObjectRecursively(int objectIndex, int r if (!createMetaObject(objectIndex, obj, baseTypeCache)) return false; } else { + if (QQmlPropertyCache *oldCache = propertyCaches.at(objectIndex).data()) + oldCache->release(); propertyCaches[objectIndex] = baseTypeCache; baseTypeCache->addref(); } } - if (propertyCaches.at(objectIndex)) { + if (propertyCaches.at(objectIndex).data()) { for (const QmlIR::Binding *binding = obj->firstBinding(); binding; binding = binding->next) if (binding->type >= QV4::CompiledData::Binding::Type_Object) { if (!buildMetaObjectRecursively(binding->value.objectIndex, objectIndex, binding)) @@ -573,9 +561,10 @@ bool QQmlPropertyCacheCreator::buildMetaObjectRecursively(int objectIndex, int r return true; } -bool QQmlPropertyCacheCreator::ensureMetaObject(int objectIndex) +bool QQmlPropertyCacheCreator::ensureVMEMetaObject(int objectIndex) { - if (!vmeMetaObjects.at(objectIndex).isEmpty()) + const bool willCreateVMEMetaObject = propertyCaches.at(objectIndex).flag(); + if (willCreateVMEMetaObject) return true; const QmlIR::Object *obj = qmlObjects.at(objectIndex); QQmlCompiledData::TypeReference *typeRef = resolvedTypes->value(obj->inheritedTypeNameIndex); @@ -589,7 +578,12 @@ bool QQmlPropertyCacheCreator::createMetaObject(int objectIndex, const QmlIR::Ob QQmlPropertyCache *cache = baseTypeCache->copyAndReserve(obj->propertyCount() + obj->aliasCount(), obj->functionCount() + obj->propertyCount() + obj->aliasCount() + obj->signalCount(), obj->signalCount() + obj->propertyCount() + obj->aliasCount()); + + if (QQmlPropertyCache *oldCache = propertyCaches.at(objectIndex).data()) + oldCache->release(); propertyCaches[objectIndex] = cache; + // Indicate that this object also needs a VME meta-object at run-time + propertyCaches[objectIndex].setFlag(); struct TypeData { QV4::CompiledData::Property::Type dtype; @@ -659,8 +653,6 @@ bool QQmlPropertyCacheCreator::createMetaObject(int objectIndex, const QmlIR::Ob COMPILE_EXCEPTION(a, tr("Cannot override FINAL property")); } - vmeMetaObjects[objectIndex] = QByteArray(sizeof(QQmlVMEMetaData), 0); - int effectivePropertyIndex = cache->propertyIndexCacheStart; int effectiveMethodIndex = cache->methodIndexCacheStart; @@ -876,7 +868,7 @@ bool SignalHandlerConverter::convertSignalHandlerExpressionsToFunctionDeclaratio { for (int objectIndex = 0; objectIndex < qmlObjects.count(); ++objectIndex) { const QmlIR::Object * const obj = qmlObjects.at(objectIndex); - QQmlPropertyCache *cache = propertyCaches.at(objectIndex); + QQmlPropertyCache *cache = propertyCaches.at(objectIndex).data(); if (!cache) continue; if (QQmlCustomParser *customParser = customParsers.value(obj->inheritedTypeNameIndex)) { @@ -1084,7 +1076,7 @@ QQmlEnumTypeResolver::QQmlEnumTypeResolver(QQmlTypeCompiler *typeCompiler) bool QQmlEnumTypeResolver::resolveEnumBindings() { for (int i = 0; i < qmlObjects.count(); ++i) { - QQmlPropertyCache *propertyCache = propertyCaches.at(i); + QQmlPropertyCache *propertyCache = propertyCaches.at(i).data(); if (!propertyCache) continue; const QmlIR::Object *obj = qmlObjects.at(i); @@ -1270,7 +1262,7 @@ QQmlAliasAnnotator::QQmlAliasAnnotator(QQmlTypeCompiler *typeCompiler) void QQmlAliasAnnotator::annotateBindingsToAliases() { for (int i = 0; i < qmlObjects.count(); ++i) { - QQmlPropertyCache *propertyCache = propertyCaches.at(i); + QQmlPropertyCache *propertyCache = propertyCaches.at(i).data(); if (!propertyCache) continue; @@ -1302,7 +1294,7 @@ void QQmlScriptStringScanner::scan() { const int scriptStringMetaType = qMetaTypeId(); for (int i = 0; i < qmlObjects.count(); ++i) { - QQmlPropertyCache *propertyCache = propertyCaches.at(i); + QQmlPropertyCache *propertyCache = propertyCaches.at(i).data(); if (!propertyCache) continue; @@ -1339,7 +1331,6 @@ QQmlComponentAndAliasResolver::QQmlComponentAndAliasResolver(QQmlTypeCompiler *t , _objectIndexToIdInScope(0) , resolvedTypes(typeCompiler->resolvedTypes()) , propertyCaches(typeCompiler->propertyCaches()) - , vmeMetaObjectData(typeCompiler->vmeMetaObjects()) , objectIndexToIdForRoot(typeCompiler->objectIndexToIdForRoot()) , objectIndexToIdPerComponent(typeCompiler->objectIndexToIdPerComponent()) { @@ -1434,7 +1425,7 @@ bool QQmlComponentAndAliasResolver::resolve() const int objCountWithoutSynthesizedComponents = qmlObjects->count(); for (int i = 0; i < objCountWithoutSynthesizedComponents; ++i) { const QmlIR::Object *obj = qmlObjects->at(i); - QQmlPropertyCache *cache = propertyCaches.at(i); + QQmlPropertyCache *cache = propertyCaches.at(i).data(); if (obj->inheritedTypeNameIndex == 0 && !cache) continue; @@ -1552,7 +1543,7 @@ bool QQmlComponentAndAliasResolver::resolveAliases() foreach (int objectIndex, _objectsWithAliases) { const QmlIR::Object *obj = qmlObjects->at(objectIndex); - QQmlPropertyCache *propertyCache = propertyCaches.at(objectIndex); + QQmlPropertyCache *propertyCache = propertyCaches.at(objectIndex).data(); Q_ASSERT(propertyCache); int effectiveSignalIndex = propertyCache->signalHandlerIndexCacheStart + propertyCache->propertyIndexCache.count(); @@ -1603,7 +1594,7 @@ bool QQmlComponentAndAliasResolver::resolveAliases() alias->flags |= QV4::CompiledData::Alias::AliasPointsToPointerObject; propertyFlags |= QQmlPropertyData::IsQObjectDerived; } else { - QQmlPropertyCache *targetCache = propertyCaches.at(targetObjectIndex); + QQmlPropertyCache *targetCache = propertyCaches.at(targetObjectIndex).data(); Q_ASSERT(targetCache); QmlIR::PropertyResolver resolver(targetCache); @@ -1740,7 +1731,7 @@ bool QQmlPropertyValidator::validateObject(int objectIndex, const QV4::CompiledD return validateObject(componentBinding->value.objectIndex, componentBinding); } - QQmlPropertyCache *propertyCache = propertyCaches.at(objectIndex); + QQmlPropertyCache *propertyCache = propertyCaches.at(objectIndex).data(); if (!propertyCache) return true; @@ -2334,7 +2325,7 @@ bool QQmlPropertyValidator::validateObjectBinding(QQmlPropertyData *property, co } else if (property->isQList()) { const int listType = enginePrivate->listType(property->propType); if (!QQmlMetaType::isInterface(listType)) { - QQmlPropertyCache *source = propertyCaches.at(binding->value.objectIndex); + QQmlPropertyCache *source = propertyCaches.at(binding->value.objectIndex).data(); if (!canCoerce(listType, source)) { recordError(binding->valueLocation, tr("Cannot assign object to list property \"%1\"").arg(propertyName)); return false; @@ -2361,7 +2352,7 @@ bool QQmlPropertyValidator::validateObjectBinding(QQmlPropertyData *property, co bool isAssignable = false; // Determine isAssignable value if (propertyMetaObject) { - QQmlPropertyCache *c = propertyCaches.at(binding->value.objectIndex); + QQmlPropertyCache *c = propertyCaches.at(binding->value.objectIndex).data(); while (c && !isAssignable) { isAssignable |= c == propertyMetaObject; c = c->parent(); @@ -2421,7 +2412,7 @@ bool QQmlJSCodeGenerator::compileComponent(int contextObject, const QHashidIndex); m.idIndex = idIt.value(); - m.type = propertyCaches.at(objectIndex); + m.type = propertyCaches.at(objectIndex).data(); QQmlCompiledData::TypeReference *tref = resolvedTypes.value(obj->inheritedTypeNameIndex); if (tref && tref->isFullyDynamicType) @@ -2430,7 +2421,7 @@ bool QQmlJSCodeGenerator::compileComponent(int contextObject, const QHashbeginContextScope(idMapping, propertyCaches.at(contextObject)); + v4CodeGen->beginContextScope(idMapping, propertyCaches.at(contextObject).data()); if (!compileJavaScriptCodeInObjectsRecursively(contextObject, contextObject)) return false; @@ -2445,7 +2436,7 @@ bool QQmlJSCodeGenerator::compileJavaScriptCodeInObjectsRecursively(int objectIn QmlIR::Object *object = qmlObjects.at(objectIndex); if (object->functionsAndExpressions->count > 0) { - QQmlPropertyCache *scopeObject = propertyCaches.at(scopeObjectIndex); + QQmlPropertyCache *scopeObject = propertyCaches.at(scopeObjectIndex).data(); v4CodeGen->beginObjectScope(scopeObject); QList functionsToCompile; @@ -2498,7 +2489,7 @@ void QQmlDefaultPropertyMerger::mergeDefaultProperties() void QQmlDefaultPropertyMerger::mergeDefaultProperties(int objectIndex) { - QQmlPropertyCache *propertyCache = propertyCaches.at(objectIndex); + QQmlPropertyCache *propertyCache = propertyCaches.at(objectIndex).data(); if (!propertyCache) return; diff --git a/src/qml/compiler/qqmltypecompiler_p.h b/src/qml/compiler/qqmltypecompiler_p.h index 273ba01a88..968902dae1 100644 --- a/src/qml/compiler/qqmltypecompiler_p.h +++ b/src/qml/compiler/qqmltypecompiler_p.h @@ -99,10 +99,8 @@ public: QHash *resolvedTypes(); QList *qmlObjects(); int rootObjectIndex() const; - void setPropertyCaches(const QVector &caches); - const QVector &propertyCaches() const; - void setVMEMetaObjects(const QVector &metaObjects); - QVector *vmeMetaObjects() const; + void setPropertyCaches(const QQmlPropertyCacheVector &caches); + const QQmlPropertyCacheVector &propertyCaches() const; QHash *objectIndexToIdForRoot(); QHash > *objectIndexToIdPerComponent(); QHash *customParserBindings(); @@ -149,15 +147,14 @@ public: bool buildMetaObjects(); protected: bool buildMetaObjectRecursively(int objectIndex, int referencingObjectIndex, const QV4::CompiledData::Binding *instantiatingBinding); - bool ensureMetaObject(int objectIndex); + bool ensureVMEMetaObject(int objectIndex); bool createMetaObject(int objectIndex, const QmlIR::Object *obj, QQmlPropertyCache *baseTypeCache); QQmlEnginePrivate *enginePrivate; const QList &qmlObjects; const QQmlImports *imports; QHash *resolvedTypes; - QVector vmeMetaObjects; - QVector propertyCaches; + QQmlPropertyCacheVector propertyCaches; }; // "Converts" signal expressions to full-fleged function declarations with @@ -181,7 +178,7 @@ private: const QHash &customParsers; const QHash &resolvedTypes; const QSet &illegalNames; - const QVector &propertyCaches; + const QQmlPropertyCacheVector &propertyCaches; }; // ### This will go away when the codegen resolves all enums to constant expressions @@ -208,7 +205,7 @@ private: const QList &qmlObjects; - const QVector propertyCaches; + const QQmlPropertyCacheVector propertyCaches; const QQmlImports *imports; QHash *resolvedTypes; }; @@ -236,7 +233,7 @@ public: void annotateBindingsToAliases(); private: const QList &qmlObjects; - const QVector propertyCaches; + const QQmlPropertyCacheVector propertyCaches; }; class QQmlScriptStringScanner : public QQmlCompilePass @@ -248,7 +245,7 @@ public: private: const QList &qmlObjects; - const QVector propertyCaches; + const QQmlPropertyCacheVector propertyCaches; }; class QQmlComponentAndAliasResolver : public QQmlCompilePass @@ -282,8 +279,7 @@ protected: QList _objectsWithAliases; QHash *resolvedTypes; - QVector propertyCaches; - QVector *vmeMetaObjectData; + QQmlPropertyCacheVector propertyCaches; QHash *objectIndexToIdForRoot; QHash > *objectIndexToIdPerComponent; }; @@ -312,7 +308,7 @@ private: const QV4::CompiledData::Unit *qmlUnit; const QHash &resolvedTypes; const QHash &customParsers; - const QVector &propertyCaches; + const QQmlPropertyCacheVector &propertyCaches; const QHash > objectIndexToIdPerComponent; QHash *customParserBindingsPerObject; @@ -340,7 +336,7 @@ private: const QHash &resolvedTypes; const QHash &customParsers; const QList &qmlObjects; - const QVector &propertyCaches; + const QQmlPropertyCacheVector &propertyCaches; QmlIR::JSCodeGen * const v4CodeGen; }; @@ -355,7 +351,7 @@ private: void mergeDefaultProperties(int objectIndex); const QList &qmlObjects; - const QVector &propertyCaches; + const QQmlPropertyCacheVector &propertyCaches; }; class QQmlJavaScriptBindingExpressionSimplificationPass : public QQmlCompilePass, public QV4::IR::StmtVisitor diff --git a/src/qml/qml/qqmlcompileddata.cpp b/src/qml/qml/qqmlcompileddata.cpp index 28d599a593..0b44972491 100644 --- a/src/qml/qml/qqmlcompileddata.cpp +++ b/src/qml/qml/qqmlcompileddata.cpp @@ -87,7 +87,7 @@ QQmlCompiledData::~QQmlCompiledData() resolvedTypes.clear(); for (int ii = 0; ii < propertyCaches.count(); ++ii) - if (propertyCaches.at(ii)) + if (propertyCaches.at(ii).data()) propertyCaches.at(ii)->release(); for (int ii = 0; ii < scripts.count(); ++ii) diff --git a/src/qml/qml/qqmlcompiler_p.h b/src/qml/qml/qqmlcompiler_p.h index cbe70a7077..42b73fcaf5 100644 --- a/src/qml/qml/qqmlcompiler_p.h +++ b/src/qml/qml/qqmlcompiler_p.h @@ -80,6 +80,10 @@ class QQmlComponent; class QQmlContext; class QQmlContextData; +// The vector is indexed by QV4::CompiledData::Object index and the flag +// indicates whether instantiation of the object requires a VME meta-object. +typedef QVector> QQmlPropertyCacheVector; + // ### Merge with QV4::CompiledData::CompilationUnit class Q_AUTOTEST_EXPORT QQmlCompiledData : public QQmlRefCount, public QQmlCleanup { @@ -123,8 +127,7 @@ public: QHash resolvedTypes; QQmlPropertyCache *rootPropertyCache; - QVector metaObjects; - QVector propertyCaches; + QQmlPropertyCacheVector propertyCaches; QList scripts; QQmlRefPointer compilationUnit; @@ -139,7 +142,7 @@ public: int totalObjectCount; // Number of objects explicitly instantiated bool isComponent(int objectIndex) const { return objectIndexToIdPerComponent.contains(objectIndex); } - bool isCompositeType() const { return !metaObjects.at(compilationUnit->data->indexOfRootObject).isEmpty(); } + bool isCompositeType() const { return propertyCaches.at(compilationUnit->data->indexOfRootObject).flag(); } bool isInitialized() const { return hasEngine(); } void initialize(QQmlEngine *); diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index 775f8a9294..86693af3d3 100644 --- a/src/qml/qml/qqmlobjectcreator.cpp +++ b/src/qml/qml/qqmlobjectcreator.cpp @@ -74,7 +74,6 @@ QQmlObjectCreator::QQmlObjectCreator(QQmlContextData *parentContext, QQmlCompile , compiledData(compiledData) , resolvedTypes(compiledData->resolvedTypes) , propertyCaches(compiledData->propertyCaches) - , vmeMetaObjectData(compiledData->metaObjects) , activeVMEDataForRootContext(activeVMEDataForRootContext) { init(parentContext); @@ -99,7 +98,6 @@ QQmlObjectCreator::QQmlObjectCreator(QQmlContextData *parentContext, QQmlCompile , compiledData(compiledData) , resolvedTypes(compiledData->resolvedTypes) , propertyCaches(compiledData->propertyCaches) - , vmeMetaObjectData(compiledData->metaObjects) , activeVMEDataForRootContext(0) { init(parentContext); @@ -1152,7 +1150,7 @@ QObject *QQmlObjectCreator::createInstance(int index, QObject *parent, bool isCo return instance; } - QQmlRefPointer cache = propertyCaches.at(index); + QQmlRefPointer cache = propertyCaches.at(index).data(); Q_ASSERT(!cache.isNull()); if (installPropertyCache) { if (ddata->propertyCache) @@ -1283,14 +1281,14 @@ bool QQmlObjectCreator::populateInstance(int index, QObject *instance, QObject * QV4::Scope valueScope(v4); QV4::ScopedValue scopeObjectProtector(valueScope); - QQmlRefPointer cache = propertyCaches.at(_compiledObjectIndex); + QQmlRefPointer cache = propertyCaches.at(_compiledObjectIndex).data(); QQmlVMEMetaObject *vmeMetaObject = 0; - const QByteArray data = vmeMetaObjectData.value(_compiledObjectIndex); - if (!data.isEmpty()) { + const bool needVMEMetaObject = propertyCaches.at(_compiledObjectIndex).flag(); + if (needVMEMetaObject) { Q_ASSERT(!cache.isNull()); // install on _object - vmeMetaObject = new QQmlVMEMetaObject(_qobject, cache, reinterpret_cast(data.constData()), compiledData->compilationUnit, _compiledObjectIndex); + vmeMetaObject = new QQmlVMEMetaObject(_qobject, cache, compiledData->compilationUnit, _compiledObjectIndex); if (_ddata->propertyCache) _ddata->propertyCache->release(); _ddata->propertyCache = cache; diff --git a/src/qml/qml/qqmlobjectcreator_p.h b/src/qml/qml/qqmlobjectcreator_p.h index 3d743954c9..8045281cbb 100644 --- a/src/qml/qml/qqmlobjectcreator_p.h +++ b/src/qml/qml/qqmlobjectcreator_p.h @@ -142,8 +142,7 @@ private: QQmlGuardedContextData parentContext; QQmlContextData *context; const QHash &resolvedTypes; - const QVector &propertyCaches; - const QVector &vmeMetaObjectData; + const QQmlPropertyCacheVector &propertyCaches; QHash objectIndexToId; QExplicitlySharedDataPointer sharedState; bool topLevelCreator; diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index 674cd075e1..8697a291e2 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -314,10 +314,9 @@ QAbstractDynamicMetaObject *QQmlInterceptorMetaObject::toDynamicMetaObject(QObje } QQmlVMEMetaObject::QQmlVMEMetaObject(QObject *obj, - QQmlPropertyCache *cache, - const QQmlVMEMetaData *meta, QV4::CompiledData::CompilationUnit *qmlCompilationUnit, int qmlObjectId) + QQmlPropertyCache *cache, QV4::CompiledData::CompilationUnit *qmlCompilationUnit, int qmlObjectId) : QQmlInterceptorMetaObject(obj, cache), - ctxt(QQmlData::get(obj, true)->outerContext), metaData(meta), + ctxt(QQmlData::get(obj, true)->outerContext), aliasEndpoints(0), compilationUnit(qmlCompilationUnit), compiledObject(0) { cache->addref(); diff --git a/src/qml/qml/qqmlvmemetaobject_p.h b/src/qml/qml/qqmlvmemetaobject_p.h index d8c3b9a248..75e7ed6cb1 100644 --- a/src/qml/qml/qqmlvmemetaobject_p.h +++ b/src/qml/qml/qqmlvmemetaobject_p.h @@ -74,12 +74,6 @@ QT_BEGIN_NAMESPACE -struct QQmlVMEMetaData -{ - // Make sure this structure is always aligned to int - int dummy; -}; - class QQmlVMEMetaObject; class QQmlVMEVariantQObjectPtr : public QQmlGuard { @@ -139,7 +133,7 @@ class QQmlVMEMetaObjectEndpoint; class Q_QML_PRIVATE_EXPORT QQmlVMEMetaObject : public QQmlInterceptorMetaObject { public: - QQmlVMEMetaObject(QObject *obj, QQmlPropertyCache *cache, const QQmlVMEMetaData *data, QV4::CompiledData::CompilationUnit *qmlCompilationUnit, int qmlObjectId); + QQmlVMEMetaObject(QObject *obj, QQmlPropertyCache *cache, QV4::CompiledData::CompilationUnit *qmlCompilationUnit, int qmlObjectId); ~QQmlVMEMetaObject(); bool aliasTarget(int index, QObject **target, int *coreIndex, int *valueTypeIndex) const; @@ -161,7 +155,6 @@ protected: public: QQmlGuardedContextData ctxt; - const QQmlVMEMetaData *metaData; inline int propOffset() const; inline int methodOffset() const; inline int signalOffset() const; diff --git a/src/quick/designer/qqmldesignermetaobject.cpp b/src/quick/designer/qqmldesignermetaobject.cpp index 63b4102b10..23a29d5831 100644 --- a/src/quick/designer/qqmldesignermetaobject.cpp +++ b/src/quick/designer/qqmldesignermetaobject.cpp @@ -79,20 +79,6 @@ struct MetaPropertyData { QVector > m_data; }; -static QQmlVMEMetaData* fakeMetaData() -{ - return new QQmlVMEMetaData; -} - -static const QQmlVMEMetaData* vMEMetaDataForObject(QObject *object) -{ - QQmlVMEMetaObject *metaObject = QQmlVMEMetaObject::get(object); - if (metaObject) - return metaObject->metaData; - - return fakeMetaData(); -} - static QQmlPropertyCache *cacheForObject(QObject *object, QQmlEngine *engine) { QQmlVMEMetaObject *metaObject = QQmlVMEMetaObject::get(object); @@ -147,7 +133,7 @@ void QQmlDesignerMetaObject::init(QObject *object, QQmlEngine *engine) } QQmlDesignerMetaObject::QQmlDesignerMetaObject(QObject *object, QQmlEngine *engine) - : QQmlVMEMetaObject(object, cacheForObject(object, engine), vMEMetaDataForObject(object), /*qml compilation unit*/nullptr, /*qmlObjectId*/-1), + : QQmlVMEMetaObject(object, cacheForObject(object, engine), /*qml compilation unit*/nullptr, /*qmlObjectId*/-1), m_context(engine->contextForObject(object)), m_data(new MetaPropertyData), m_cache(0) diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp index 8f1b84940e..5bb129fbb8 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -248,8 +248,6 @@ private slots: void earlyIdObjectAccess(); - void dataAlignment(); - void deleteSingletons(); void arrayBuffer_data(); @@ -4131,11 +4129,6 @@ void tst_qqmllanguage::earlyIdObjectAccess() QVERIFY(o->property("success").toBool()); } -void tst_qqmllanguage::dataAlignment() -{ - QVERIFY(sizeof(QQmlVMEMetaData) % sizeof(int) == 0); -} - void tst_qqmllanguage::deleteSingletons() { QPointer singleton; -- cgit v1.2.3 From 0ba6dffd96a0dda8e3938b09395075c19e46644b Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 23 May 2016 15:35:52 +0200 Subject: Get rid of QQmlCompiledData::rootPropertyCache member This would not seem like a member variable that is hot enough to keep there and it is two loads away. Change-Id: Id7088771bd33545a2846cc3497e5904dd8ac4f5d Reviewed-by: Lars Knoll --- src/qml/compiler/qqmltypecompiler.cpp | 6 +----- src/qml/qml/qqmlcompileddata.cpp | 17 +++++++---------- src/qml/qml/qqmlcompiler_p.h | 2 +- src/qml/qml/qqmlengine.cpp | 10 +++++----- src/qml/qml/qqmlmetatype.cpp | 2 +- 5 files changed, 15 insertions(+), 22 deletions(-) diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp index 5f405cdcb8..0d98aa6e54 100644 --- a/src/qml/compiler/qqmltypecompiler.cpp +++ b/src/qml/compiler/qqmltypecompiler.cpp @@ -339,10 +339,6 @@ void QQmlTypeCompiler::setPropertyCaches(const QQmlPropertyCacheVector &caches) { compiledData->propertyCaches = caches; Q_ASSERT(caches.count() >= document->indexOfRootObject); - if (compiledData->rootPropertyCache) - compiledData->rootPropertyCache->release(); - compiledData->rootPropertyCache = caches.at(document->indexOfRootObject).data(); - compiledData->rootPropertyCache->addref(); } const QQmlPropertyCacheVector &QQmlTypeCompiler::propertyCaches() const @@ -1355,7 +1351,7 @@ void QQmlComponentAndAliasResolver::findAndRegisterImplicitComponents(const QmlI if (targetType->metaObject() == &QQmlComponent::staticMetaObject) continue; } else if (tr->component) { - if (tr->component->rootPropertyCache->firstCppMetaObject() == &QQmlComponent::staticMetaObject) + if (tr->component->rootPropertyCache()->firstCppMetaObject() == &QQmlComponent::staticMetaObject) continue; } diff --git a/src/qml/qml/qqmlcompileddata.cpp b/src/qml/qml/qqmlcompileddata.cpp index 0b44972491..1037b5da51 100644 --- a/src/qml/qml/qqmlcompileddata.cpp +++ b/src/qml/qml/qqmlcompileddata.cpp @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE QQmlCompiledData::QQmlCompiledData(QQmlEngine *engine) : engine(engine), importCache(0), metaTypeId(-1), listMetaTypeId(-1), isRegisteredWithEngine(false), - rootPropertyCache(0), totalBindingsCount(0), totalParserStatusCount(0) + totalBindingsCount(0), totalParserStatusCount(0) { Q_ASSERT(engine); } @@ -86,18 +86,15 @@ QQmlCompiledData::~QQmlCompiledData() qDeleteAll(resolvedTypes); resolvedTypes.clear(); - for (int ii = 0; ii < propertyCaches.count(); ++ii) - if (propertyCaches.at(ii).data()) - propertyCaches.at(ii)->release(); - for (int ii = 0; ii < scripts.count(); ++ii) scripts.at(ii)->release(); if (importCache) importCache->release(); - if (rootPropertyCache) - rootPropertyCache->release(); + for (int ii = 0; ii < propertyCaches.count(); ++ii) + if (propertyCaches.at(ii).data()) + propertyCaches.at(ii)->release(); } void QQmlCompiledData::clear() @@ -112,7 +109,7 @@ QQmlPropertyCache *QQmlCompiledData::TypeReference::propertyCache() const if (type) return typePropertyCache; else - return component->rootPropertyCache; + return component->rootPropertyCache(); } /*! @@ -127,7 +124,7 @@ QQmlPropertyCache *QQmlCompiledData::TypeReference::createPropertyCache(QQmlEngi typePropertyCache->addref(); return typePropertyCache; } else { - return component->rootPropertyCache; + return component->rootPropertyCache(); } } @@ -149,7 +146,7 @@ void QQmlCompiledData::TypeReference::doDynamicTypeCheck() else if (type) mo = type->metaObject(); else if (component) - mo = component->rootPropertyCache->firstCppMetaObject(); + mo = component->rootPropertyCache()->firstCppMetaObject(); isFullyDynamicType = qtTypeInherits(mo); } diff --git a/src/qml/qml/qqmlcompiler_p.h b/src/qml/qml/qqmlcompiler_p.h index 42b73fcaf5..c2b244f5e3 100644 --- a/src/qml/qml/qqmlcompiler_p.h +++ b/src/qml/qml/qqmlcompiler_p.h @@ -126,7 +126,7 @@ public: // map from name index QHash resolvedTypes; - QQmlPropertyCache *rootPropertyCache; + QQmlPropertyCache *rootPropertyCache() const { return propertyCaches.at(compilationUnit->data->indexOfRootObject).data(); } QQmlPropertyCacheVector propertyCaches; QList scripts; diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 99ae367773..2baca619cc 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -2227,7 +2227,7 @@ QQmlMetaObject QQmlEnginePrivate::rawMetaObjectForType(int t) const Locker locker(this); QHash::ConstIterator iter = m_compositeTypes.constFind(t); if (iter != m_compositeTypes.cend()) { - return QQmlMetaObject((*iter)->rootPropertyCache); + return QQmlMetaObject((*iter)->rootPropertyCache()); } else { QQmlType *type = QQmlMetaType::qmlType(t); return QQmlMetaObject(type?type->baseMetaObject():0); @@ -2239,7 +2239,7 @@ QQmlMetaObject QQmlEnginePrivate::metaObjectForType(int t) const Locker locker(this); QHash::ConstIterator iter = m_compositeTypes.constFind(t); if (iter != m_compositeTypes.cend()) { - return QQmlMetaObject((*iter)->rootPropertyCache); + return QQmlMetaObject((*iter)->rootPropertyCache()); } else { QQmlType *type = QQmlMetaType::qmlType(t); return QQmlMetaObject(type?type->metaObject():0); @@ -2251,7 +2251,7 @@ QQmlPropertyCache *QQmlEnginePrivate::propertyCacheForType(int t) Locker locker(this); QHash::ConstIterator iter = m_compositeTypes.constFind(t); if (iter != m_compositeTypes.cend()) { - return (*iter)->rootPropertyCache; + return (*iter)->rootPropertyCache(); } else { QQmlType *type = QQmlMetaType::qmlType(t); locker.unlock(); @@ -2264,7 +2264,7 @@ QQmlPropertyCache *QQmlEnginePrivate::rawPropertyCacheForType(int t) Locker locker(this); QHash::ConstIterator iter = m_compositeTypes.constFind(t); if (iter != m_compositeTypes.cend()) { - return (*iter)->rootPropertyCache; + return (*iter)->rootPropertyCache(); } else { QQmlType *type = QQmlMetaType::qmlType(t); locker.unlock(); @@ -2274,7 +2274,7 @@ QQmlPropertyCache *QQmlEnginePrivate::rawPropertyCacheForType(int t) void QQmlEnginePrivate::registerInternalCompositeType(QQmlCompiledData *data) { - QByteArray name = data->rootPropertyCache->className(); + QByteArray name = data->rootPropertyCache()->className(); QByteArray ptr = name + '*'; QByteArray lst = "QQmlListProperty<" + name + '>'; diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp index 1c5a7ad8c1..f3f4c41775 100644 --- a/src/qml/qml/qqmlmetatype.cpp +++ b/src/qml/qml/qqmlmetatype.cpp @@ -494,7 +494,7 @@ QQmlType *QQmlType::resolveCompositeBaseType(QQmlEnginePrivate *engine) const if (!td || !td->isComplete()) return 0; QQmlCompiledData *cd = td->compiledData(); - const QMetaObject *mo = cd->rootPropertyCache->firstCppMetaObject(); + const QMetaObject *mo = cd->rootPropertyCache()->firstCppMetaObject(); return QQmlMetaType::qmlType(mo); } -- cgit v1.2.3