From 437f268f562fa6024c6080db6651c97572cd4acc Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Thu, 13 Nov 2014 16:30:03 +0100 Subject: [PATCH 1/6] Document Qt.application.supportsMultipleWindows property. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The documentation was not added in 0df606e2ab8f3b60e1ad57dba245acf2e7810612. Change-Id: I0a5802a66021e17d1280f3969981c9e8a62c8119 Reviewed-by: Topi Reiniƶ Reviewed-by: Shawn Rutledge --- src/qml/qml/qqmlengine.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index a187c76042..04a2f9cadd 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -491,6 +491,12 @@ The following functions are also on the Qt object. \li \c application.domain \li This is the organization domain set on the QCoreApplication instance. This property can be written to in order to set the organization domain. + + \row + \li \c application.supportsMultipleWindows + \li This read-only property can be used to determine whether or not the + platform supports multiple windows. Some embedded platforms do not support + multiple windows, for example. \endtable The object also has one signal, aboutToQuit(), which is the same as \l QCoreApplication::aboutToQuit(). From ca5e643ea9d2878f4a00546ed63a004e10da6ae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 25 Nov 2014 14:22:15 +0100 Subject: [PATCH 2/6] Make effectiveDevicePixelRatio() return a qreal. Fractional scale factors are not as broken as previously believed, especially for Qt Quick. Keep the door open for finding a way to support it at some point in the future. Change-Id: Ifeadcc53175ac6c25ea0288d5fe1966e3de408f9 Reviewed-by: Laszlo Agocs --- src/quick/items/qquickwindow.cpp | 2 +- src/quick/items/qquickwindow.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 262e227b16..10e63430ae 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -3945,7 +3945,7 @@ void QQuickWindow::runJobsAfterSwap() * * \sa QWindow::devicePixelRatio() */ -int QQuickWindow::effectiveDevicePixelRatio() const +qreal QQuickWindow::effectiveDevicePixelRatio() const { QWindow *w = QQuickRenderControl::renderWindowFor(const_cast(this)); return w ? w->devicePixelRatio() : devicePixelRatio(); diff --git a/src/quick/items/qquickwindow.h b/src/quick/items/qquickwindow.h index 3cac691963..ddf9722313 100644 --- a/src/quick/items/qquickwindow.h +++ b/src/quick/items/qquickwindow.h @@ -142,7 +142,7 @@ public: void scheduleRenderJob(QRunnable *job, RenderStage schedule); - int effectiveDevicePixelRatio() const; + qreal effectiveDevicePixelRatio() const; Q_SIGNALS: void frameSwapped(); From 64c9cbf3046ca62281aac284271a13f5340f8e21 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 24 Nov 2014 15:52:42 +0100 Subject: [PATCH 3/6] Fix loading of .ui.qml form files with cached compilation units Simplify the type loading logic and try the Type -> Type.qml and Type -> Type.ui.qml mapping in a simple loop that tries off-disk and cached compilation unit loading. Change-Id: I537feabd0a158a71f330bede9e6988291298ae81 Reviewed-by: Lars Knoll --- src/qml/qml/qqmlimport.cpp | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp index df4006d3c2..807eb05362 100644 --- a/src/qml/qml/qqmlimport.cpp +++ b/src/qml/qml/qqmlimport.cpp @@ -63,7 +63,8 @@ static const QLatin1Char Backslash('\\'); static const QLatin1Char Colon(':'); static const QLatin1String Slash_qmldir("/qmldir"); static const QLatin1String String_qmldir("qmldir"); -static const QString dotqml_string(QLatin1String(".qml")); +static const QString dotqml_string(QStringLiteral(".qml")); +static const QString dotuidotqml_string(QStringLiteral(".ui.qml")); static bool designerSupportRequired = false; namespace { @@ -657,23 +658,28 @@ bool QQmlImportNamespace::Import::resolveType(QQmlTypeLoader *typeLoader, return (*type_return != 0); } } else if (!isLibrary) { - QString qmlUrl = url + QString::fromRawData(type.constData(), type.length()) + dotqml_string; - + QString qmlUrl; bool exists = false; - if (QQmlFile::isBundle(qmlUrl)) { - exists = QQmlFile::bundleFileExists(qmlUrl, typeLoader->engine()); - } else { - exists = !typeLoader->absoluteFilePath(QQmlFile::urlToLocalFileOrQrc(qmlUrl)).isEmpty(); - if (!exists) { - QString formUrl = url + QString::fromRawData(type.constData(), type.length()) + QStringLiteral(".ui.qml"); - if (!typeLoader->absoluteFilePath(QQmlFile::urlToLocalFileOrQrc(formUrl)).isEmpty()) { - exists = true; - qmlUrl = formUrl; - } + const QString urlsToTry[2] = { + url + QString::fromRawData(type.constData(), type.length()) + dotqml_string, // Type -> Type.qml + url + QString::fromRawData(type.constData(), type.length()) + dotuidotqml_string // Type -> Type.ui.qml + }; + for (uint i = 0; i < sizeof(urlsToTry) / sizeof(urlsToTry[0]); ++i) { + const QString url = urlsToTry[i]; + + if (QQmlFile::isBundle(url)) { + exists = QQmlFile::bundleFileExists(url, typeLoader->engine()); + } else { + exists = !typeLoader->absoluteFilePath(QQmlFile::urlToLocalFileOrQrc(url)).isEmpty(); + if (!exists) + exists = QQmlMetaType::findCachedCompilationUnit(QUrl(url)); + } + + if (exists) { + qmlUrl = url; + break; } - if (!exists) - exists = QQmlMetaType::findCachedCompilationUnit(QUrl(qmlUrl)); } if (exists) { From 06fc202e81bfbf619ceebb9cef803270590f9e7f Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 1 Dec 2014 10:45:00 +0100 Subject: [PATCH 4/6] Skip tst_qquickwindow::headless() when using ANGLE/Windows. The test crashes frequently. Task-number: QTBUG-42967 Change-Id: Ic17c6187bfa657154a9b04eb9c5b9a3de291cb1e Reviewed-by: Andrew Knight Reviewed-by: Laszlo Agocs --- tests/auto/quick/qquickwindow/tst_qquickwindow.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp index a25ed9bf9c..7c94cf6d17 100644 --- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp +++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp @@ -1209,6 +1209,11 @@ void tst_qquickwindow::headless() QVERIFY(window->openglContext() == 0); } + if (QGuiApplication::platformName() == QLatin1String("windows") + && QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES) { + QSKIP("Crashes on Windows/ANGLE, QTBUG-42967"); + } + // Destroy the native windowing system buffers window->destroy(); QVERIFY(window->handle() == 0); From 1eedf91fcde959f5ac799f339384f44c6a9d0fd9 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 1 Dec 2014 10:21:27 +0100 Subject: [PATCH 5/6] Regression: Fix array data corruption When inserting into a sparse JS array, we may have to re-allocate the underlying data vector. When that happens we must reload the ArrayData pointer, to avoid returning a wrong pointer in ArrayData::insert. This patch also fixes the valgrind support in the memory allocator by correctly marking the mmap'ed memory region as inaccessible. Change-Id: I86aabc2cec74a4f3c8396463910d90c8968a741d Task-number: QTBUG-42956 Reviewed-by: Lars Knoll --- src/qml/jsruntime/qv4arraydata.cpp | 4 +++- src/qml/jsruntime/qv4mm.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qml/jsruntime/qv4arraydata.cpp b/src/qml/jsruntime/qv4arraydata.cpp index 35bd6e5501..0aaf50a43c 100644 --- a/src/qml/jsruntime/qv4arraydata.cpp +++ b/src/qml/jsruntime/qv4arraydata.cpp @@ -637,8 +637,10 @@ Property *ArrayData::insert(Object *o, uint index, bool isAccessor) o->initSparseArray(); SparseArrayData *s = static_cast(o->arrayData()); SparseArrayNode *n = s->sparse()->insert(index); - if (n->value == UINT_MAX) + if (n->value == UINT_MAX) { n->value = SparseArrayData::allocate(o, isAccessor); + s = static_cast(o->arrayData()); + } return reinterpret_cast(s->arrayData() + n->value); } diff --git a/src/qml/jsruntime/qv4mm.cpp b/src/qml/jsruntime/qv4mm.cpp index b9a4a55b4a..975a5d5833 100644 --- a/src/qml/jsruntime/qv4mm.cpp +++ b/src/qml/jsruntime/qv4mm.cpp @@ -245,7 +245,7 @@ Managed *MemoryManager::allocData(std::size_t size) m_d->availableItems[pos] += uint(increase); m_d->totalItems += int(increase); #ifdef V4_USE_VALGRIND - VALGRIND_MAKE_MEM_NOACCESS(allocation.memory, allocation.chunkSize); + VALGRIND_MAKE_MEM_NOACCESS(allocation.memory.base(), allocSize); #endif } From d40fcf19f7768e6ae80532ff3d8a416132594f87 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Sat, 29 Nov 2014 09:55:50 +0100 Subject: [PATCH 6/6] Added change log for 5.4.0 Change-Id: Ie3e238a3ccac1d95978229316977d131be3010d6 Reviewed-by: Lars Knoll --- dist/changes-5.4.0 | 144 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 dist/changes-5.4.0 diff --git a/dist/changes-5.4.0 b/dist/changes-5.4.0 new file mode 100644 index 0000000000..748ec8f371 --- /dev/null +++ b/dist/changes-5.4.0 @@ -0,0 +1,144 @@ +Qt 5.4 introduces many new features and improvements as well as bugfixes +over the 5.3.x series. 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 + +The Qt version 5.4 series is binary compatible with the 5.3.x series. +Applications compiled for 5.3 will continue to run with 5.4. + +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. + +**************************************************************************** +* General * +**************************************************************************** + +General Improvements +-------------------- + + - The Declarative State Machine Framework extends Qt's State Machine + Framework (QSM) into QML. This gives you the power of deterministic + state machines, but declaratively. + + - Added QML linter tool. + +Third party components +---------------------- + +**************************************************************************** +* Important Behavior Changes * +**************************************************************************** + + - [QTBUG-40431] When a JavaScript object/array is passed to C++ through + a QVariant, the engine no longer immediately converts the object + recursively into a QVariantMap or QVariantList but instead stores a + QJSValue in the QVariant. This prevents a loss of data when the JS + object contains non-primitive types such as function objects for + example. Code that expects the variant type to be exactly + QVariant::Map or QVariant::List may need to be adapted. Registered + conversion functions however ensure that code that merely calls + toMap() or toList() continues to work. + - [QTBUG-39971] Qt 5.3 changed the mapping of "var" parameters in QML + declared signals to QJSValue. This was reverted to the behavior of + earlier Qt versions to use QVariant. The original issue of not being + able to pass function objects through var parameters of QML declared + signals is solved by wrapping a QJSValue inside the QVariant. + + + +**************************************************************************** +* Library * +**************************************************************************** + +QtQml +----- + + - qmldir: + [QTBUG-41489] added the ability to declare dependencies on other + modules in a module definition qmldir file + + +QtQuick +------- + + - Accessibility for Qt Quick is now included in the qtquick library + instead of being a separate plugin. + - QQuickWindow will compresses touch events and delivers at most one touch + event per frame. + - [QTBUG-38539] Added property MouseArea.drag.smoothed for toggling + whether the drag target is moved to the current mouse position after a + drag operation has started. + - [QTBUG-37944] Introduced QQuickRenderControl as a public API. + - [QTBUG-37589] Added QQuickWidget::grabFramebuffer() for capturing the + content into a QImage. + - tools and examples consistently use the QtProject organization name + - [QTBUG-40130] Add containsPress property to MouseArea + - Added QQuickFontMetrics, which provides a subset of QFontMetricsF's API. + - Added QQuickTextMetrics, which provides a declarative API for the + functions in QFontMetricsF which take arguments. + - Introduced OpenGLInfo attached type that provides information about the + currently used OpenGL version. + - Images exceeding GL_MAX_TEXTURE_SIZE will be downscaled to fit so they + will still show. + - [QTBUG-42096] Fixed nodes sometimes disappearing when adding many new + nodes to the tree. + + - Canvas: + * Implement antialiasing on FramebufferObject based render targets + through super-sampling (SSAA) when framebuffer multisampling is not + available. + + - Important Behavior Changes: + * Drag and Drop events now propagate to child items before their + parents. + * [QTBUG-40329] TextInput::displayText now includes also partial input + from an input method and thus matches with the actual displayed text. + + - Item: + * Added functions QQuickItem::grabToImage() and Item::grabToImage() to + allow grabbing of items into system-memory images. + * When Item.opacity is set to a value outside the range of 0 to 1, it + will be clamped. + + - ListView: + * Introduced headerPositioning and footerPositioning properties to + control whether header and footer are positioned inline, as overlays, + or so that they slide away and can be pulled back regardless of the + content position. + + - QQuickItem: + * Added signals sceneGraphInitialized and sceneGraphInvalidated + + - QQuickWindow: + * Added QQuickWindow::scheduleRenderJob(), a convenience alternative to + the equivalent signals for one-shot tasks. + + - SceneGraph: + * There might not be an OpenGL context bound when + QQuickWindow::sceneGraphInvalidated() is emitted if an error occurs + while cleaning up the scene graph (such as EGL_CONTEXT_LOST). This is + according to the documentation, but has never occurred in practice + before. + + - TextInput: + * Added passwordMaskDelay property + * [QTBUG-38934] Added TextInput::ensureVisible(int pos) method to be + able to control the scrolling position of a TextInput that has + automatic scrolling enabled. + + - Window: + * Added Item.Window attached property + +QtQuick.Dialogs +--------------- + + - [QTBUG-39365] FontDialog: support keyboard navigation + - [QTBUG-39231] FileDialog: added sidebarVisible property and button + +