summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-05-01 12:47:18 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-05-01 12:47:18 +0200
commit37d3ecfd3d1ddaff4b12e97926b2c94260164e4c (patch)
tree02d7e17187491b4fad4f049304aa5b77cd4c61ca
parentf8b75642343123ce355aa33ee8ef6697ff2075f5 (diff)
parent1bd60bec33458136efceac6c16abf2bc3976d984 (diff)
downloadqtquickcontrols-37d3ecfd3d1ddaff4b12e97926b2c94260164e4c.tar.gz
Merge remote-tracking branch 'origin/release' into stable
Change-Id: I7d6be51a5601fb90ed5e102b63173ccc01b39f36
-rw-r--r--dist/changes-5.3.0107
-rw-r--r--src/controls/controls.pro2
-rw-r--r--src/controls/plugins.qmltypes195
-rw-r--r--src/controls/qquickmenupopupwindow.cpp7
-rw-r--r--src/controls/qquickpopupwindow.cpp24
5 files changed, 329 insertions, 6 deletions
diff --git a/dist/changes-5.3.0 b/dist/changes-5.3.0
new file mode 100644
index 00000000..ff6df0d2
--- /dev/null
+++ b/dist/changes-5.3.0
@@ -0,0 +1,107 @@
+Qt 5.3 introduces many new features and improvements as well as bugfixes
+over the 5.2.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.3
+
+The Qt version 5.3 series is binary compatible with the 5.2.x series.
+Applications compiled for 5.2 will continue to run with 5.3.
+
+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 *
+****************************************************************************
+
+- TableView:
+ * [QTBUG-33107] The "model" property exposed to row and item delegates is
+ now consistent with the one exposed to ListView.
+ * TableView row and item delegates are now implicitly re-cycled for
+ improved scrolling performance. Note that this behavior change
+ can impact delegates that rely on "onCompleted" for initialization.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+QtQuickControls
+---------------
+
+ - [QTBUG-33493][QTBUG-34101][QTBUG-35763] Fixed support
+ for Keys attached property on controls allowing text input,
+ by forwarding key events from the internal control.
+
+ - [QTBUG-29948] A new Calendar control was added. Calendar
+ allows selection of dates from a grid of days, similar
+ to QCalendarWidget.
+
+ - Accessibility:
+ * ComboBox is labeled properly.
+ * CheckBox and RadioButton report their state correctly.
+ * TextField and TextArea now report password and readonly
+ states.
+
+ - CheckBox:
+ * [QTBUG-31627] Fixed a problem incorrectly causing bindings
+ to the checked state to break.
+
+ - Menu
+ * Added sloppy submenu navigation.
+
+ - ScrollView:
+ * [QTBUG-37387] Scrollbars are now non-interactive on
+ mobile/touch devices.
+
+ - Slider:
+ * Sliders no longer prevent stealing in flickables until
+ drag threshold is exceeded.
+
+ - SpinBox:
+ * [QTBUG-37619] SpinBox now only shows the numerical keys
+ in onscreen keyboards where possible.
+ * [QTBUG-36283] Fixed implicit width for SpinBox.
+
+ - Styles:
+ * Introduced MenuBarStyle to style MenuBar.
+ * Introduced MenuStyle to style Menu.
+ * [QTBUG-37021] Added styleData.totalWidth property for
+ TabViewStyle::tab component.
+
+ - TabView:
+ * [QTBUG-36356] Added support for enabling and disabling tabs.
+ * [QTBUG-38157] Fixed a graphics issue when initializing currentIndex to
+ a non-zero value.
+
+ - TableView:
+ * [QTBUG-33072] TableView headers now respect
+ TableViewColumn::textAlignment.
+ * [QTBUG-37180] Fixed an issue with the header overlay offset while
+ re-arranging TableViewColumns.
+ * [QTBUG-37941] Allow TableView headers to be resized in a flickable.
+
+QtQuickDialogs
+--------------
+ - [QTBUG-37860] When a modal dialog is shown on a display that doesn't
+ support windows, you can't dismiss it by tapping outside.
+
+ - Dialog is a new control for creating dialogs with standard buttons
+ and custom content.
+
+ - FileDialog:
+ * The File fallback QML implementation now uses QtQuick.Controls,
+ and has added features including a ComboBox for file extension
+ filters, and a sidebar with common paths, drives/volumes and favorite
+ paths.
+
+ - FontDialog:
+ * The FontDialog fallback QML implementation now uses QtQuick.Controls
+ and QtQuick.Layouts.
+ * [QTBUG-36574] Added currentFont property.
+
+
diff --git a/src/controls/controls.pro b/src/controls/controls.pro
index e7cd6ada..fd4aac0d 100644
--- a/src/controls/controls.pro
+++ b/src/controls/controls.pro
@@ -2,7 +2,7 @@ TARGET = qtquickcontrolsplugin
TARGETPATH = QtQuick/Controls
IMPORT_VERSION = 1.2
-QT += qml quick gui-private core-private
+QT += qml quick quick-private gui-private core-private
QMAKE_DOCS = $$PWD/doc/qtquickcontrols.qdocconf
diff --git a/src/controls/plugins.qmltypes b/src/controls/plugins.qmltypes
index 72cb8c2d..a9d6e527 100644
--- a/src/controls/plugins.qmltypes
+++ b/src/controls/plugins.qmltypes
@@ -779,7 +779,202 @@ Module {
}
}
Component {
+ name: "QQuickWindow"
+ defaultProperty: "data"
+ prototype: "QWindow"
+ exports: ["QtQuick.Window/Window 2.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "color"; type: "QColor" }
+ Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
+ Property {
+ name: "activeFocusItem"
+ revision: 1
+ type: "QQuickItem"
+ isReadonly: true
+ isPointer: true
+ }
+ Signal { name: "frameSwapped" }
+ Signal { name: "sceneGraphInitialized" }
+ Signal { name: "sceneGraphInvalidated" }
+ Signal { name: "beforeSynchronizing" }
+ Signal { name: "beforeRendering" }
+ Signal { name: "afterRendering" }
+ Signal {
+ name: "closing"
+ revision: 1
+ Parameter { name: "close"; type: "QQuickCloseEvent"; isPointer: true }
+ }
+ Signal {
+ name: "colorChanged"
+ Parameter { type: "QColor" }
+ }
+ Signal { name: "activeFocusItemChanged"; revision: 1 }
+ Method { name: "update" }
+ Method { name: "releaseResources" }
+ }
+ Component {
+ name: "QQuickWindowQmlImpl"
+ defaultProperty: "data"
+ prototype: "QQuickWindow"
+ exports: ["QtQuick.Window/Window 2.1"]
+ exportMetaObjectRevisions: [0]
+ }
+ Component {
+ name: "QWindow"
prototype: "QObject"
+ Enum {
+ name: "Visibility"
+ values: {
+ "Hidden": 0,
+ "AutomaticVisibility": 1,
+ "Windowed": 2,
+ "Minimized": 3,
+ "Maximized": 4,
+ "FullScreen": 5
+ }
+ }
+ Property { name: "title"; type: "string" }
+ Property { name: "modality"; type: "Qt::WindowModality" }
+ Property { name: "flags"; type: "Qt::WindowFlags" }
+ Property { name: "x"; type: "int" }
+ Property { name: "y"; type: "int" }
+ Property { name: "width"; type: "int" }
+ Property { name: "height"; type: "int" }
+ Property { name: "minimumWidth"; type: "int" }
+ Property { name: "minimumHeight"; type: "int" }
+ Property { name: "maximumWidth"; type: "int" }
+ Property { name: "maximumHeight"; type: "int" }
+ Property { name: "visible"; type: "bool" }
+ Property { name: "active"; revision: 1; type: "bool"; isReadonly: true }
+ Property { name: "visibility"; revision: 1; type: "Visibility" }
+ Property { name: "contentOrientation"; type: "Qt::ScreenOrientation" }
+ Property { name: "opacity"; revision: 1; type: "double" }
+ Signal {
+ name: "screenChanged"
+ Parameter { name: "screen"; type: "QScreen"; isPointer: true }
+ }
+ Signal {
+ name: "modalityChanged"
+ Parameter { name: "modality"; type: "Qt::WindowModality" }
+ }
+ Signal {
+ name: "windowStateChanged"
+ Parameter { name: "windowState"; type: "Qt::WindowState" }
+ }
+ Signal {
+ name: "xChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "yChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "widthChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "heightChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "minimumWidthChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "minimumHeightChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "maximumWidthChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "maximumHeightChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "visibleChanged"
+ Parameter { name: "arg"; type: "bool" }
+ }
+ Signal {
+ name: "visibilityChanged"
+ revision: 1
+ Parameter { name: "visibility"; type: "QWindow::Visibility" }
+ }
+ Signal { name: "activeChanged"; revision: 1 }
+ Signal {
+ name: "contentOrientationChanged"
+ Parameter { name: "orientation"; type: "Qt::ScreenOrientation" }
+ }
+ Signal {
+ name: "focusObjectChanged"
+ Parameter { name: "object"; type: "QObject"; isPointer: true }
+ }
+ Signal {
+ name: "opacityChanged"
+ revision: 1
+ Parameter { name: "opacity"; type: "double" }
+ }
+ Method { name: "requestActivate"; revision: 1 }
+ Method {
+ name: "setVisible"
+ Parameter { name: "visible"; type: "bool" }
+ }
+ Method { name: "show" }
+ Method { name: "hide" }
+ Method { name: "showMinimized" }
+ Method { name: "showMaximized" }
+ Method { name: "showFullScreen" }
+ Method { name: "showNormal" }
+ Method { name: "close"; type: "bool" }
+ Method { name: "raise" }
+ Method { name: "lower" }
+ Method {
+ name: "setTitle"
+ Parameter { type: "string" }
+ }
+ Method {
+ name: "setX"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Method {
+ name: "setY"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Method {
+ name: "setWidth"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Method {
+ name: "setHeight"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Method {
+ name: "setMinimumWidth"
+ Parameter { name: "w"; type: "int" }
+ }
+ Method {
+ name: "setMinimumHeight"
+ Parameter { name: "h"; type: "int" }
+ }
+ Method {
+ name: "setMaximumWidth"
+ Parameter { name: "w"; type: "int" }
+ }
+ Method {
+ name: "setMaximumHeight"
+ Parameter { name: "h"; type: "int" }
+ }
+ Method {
+ name: "alert"
+ revision: 1
+ Parameter { name: "msec"; type: "int" }
+ }
+ }
+ Component {
+ prototype: "QQuickWindow"
name: "QtQuick.Controls/ApplicationWindow"
exports: ["QtQuick.Controls/ApplicationWindow 1.0"]
exportMetaObjectRevisions: [0]
diff --git a/src/controls/qquickmenupopupwindow.cpp b/src/controls/qquickmenupopupwindow.cpp
index ec33b0c1..6a2a03bc 100644
--- a/src/controls/qquickmenupopupwindow.cpp
+++ b/src/controls/qquickmenupopupwindow.cpp
@@ -45,6 +45,7 @@
#include <qpa/qwindowsysteminterface.h>
#include <qquickitem.h>
#include <QtGui/QScreen>
+#include <QtQuick/private/qquickrendercontrol_p.h>
QT_BEGIN_NAMESPACE
@@ -84,8 +85,10 @@ void QQuickMenuPopupWindow::setItemAt(QQuickItem *menuItem)
void QQuickMenuPopupWindow::setParentWindow(QQuickWindow *parentWindow)
{
- if (transientParent() != parentWindow)
- setTransientParent(parentWindow);
+ QWindow *proxyWindow = QQuickRenderControl::renderWindowFor(parentWindow);
+ QWindow *renderWindow = proxyWindow ? proxyWindow : parentWindow;
+ if (transientParent() != renderWindow)
+ setTransientParent(renderWindow);
if (parentWindow) {
connect(parentWindow, SIGNAL(destroyed()), this, SLOT(dismissPopup()));
if (QQuickMenuPopupWindow *pw = qobject_cast<QQuickMenuPopupWindow *>(parentWindow))
diff --git a/src/controls/qquickpopupwindow.cpp b/src/controls/qquickpopupwindow.cpp
index a9e85ff3..56f4c351 100644
--- a/src/controls/qquickpopupwindow.cpp
+++ b/src/controls/qquickpopupwindow.cpp
@@ -44,6 +44,7 @@
#include <qguiapplication.h>
#include <qpa/qwindowsysteminterface.h>
#include <QtQuick/qquickitem.h>
+#include <QtQuick/private/qquickrendercontrol_p.h>
QT_BEGIN_NAMESPACE
@@ -84,6 +85,19 @@ void QQuickPopupWindow::show()
posx += parentWindow->geometry().left();
posy += parentWindow->geometry().top();
}
+ } else if (m_parentItem && m_parentItem->window()) {
+ QPoint offset;
+ QQuickWindow *quickWindow = m_parentItem->window();
+ QWindow *renderWindow = QQuickRenderControl::renderWindowFor(quickWindow, &offset);
+
+ QPointF pos = m_parentItem->mapToItem(quickWindow->contentItem(), QPointF(posx, posy));
+ posx = pos.x();
+ posy = pos.y();
+ if (renderWindow) {
+ QPoint parentWindowOffset = renderWindow->mapToGlobal(QPoint());
+ posx += offset.x() + parentWindowOffset.x();
+ posy += offset.y() + parentWindowOffset.y();
+ }
}
if (m_contentItem) {
@@ -95,11 +109,15 @@ void QQuickPopupWindow::show()
}
emit geometryChanged();
- if (!qobject_cast<QQuickPopupWindow *>(transientParent())) // No need for parent menu windows
- if (QQuickWindow *w = qobject_cast<QQuickWindow *>(transientParent()))
+ if (!qobject_cast<QQuickPopupWindow *>(transientParent())) { // No need for parent menu windows
+ if (QQuickWindow *w = qobject_cast<QQuickWindow *>(transientParent())) {
if (QQuickItem *mg = w->mouseGrabberItem())
mg->ungrabMouse();
-
+ } else if (m_parentItem && m_parentItem->window()) {
+ if (QQuickItem *mg = m_parentItem->window()->mouseGrabberItem())
+ mg->ungrabMouse();
+ }
+ }
QQuickWindow::show();
setMouseGrabEnabled(true); // Needs to be done after calling show()
setKeyboardGrabEnabled(true);