summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-12-15 03:03:05 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-12-15 03:03:05 +0100
commitd8f3fb7438bbbe0b807b124f26fe3204ce50c1ec (patch)
tree0a08a13c7e6aeed42fa26f2825ddd317a1f2470d
parent9c3f0688a549c0e57c08d4715b277e05e35849d9 (diff)
parent5e2dfd09b3ace43c2f3dc75c56933c7c723b50fb (diff)
downloadqtquickcontrols-d8f3fb7438bbbe0b807b124f26fe3204ce50c1ec.tar.gz
Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: Ia98756445b50decfd50f6bdeb94a004fa90d3a05
-rw-r--r--dist/changes-5.11.320
-rw-r--r--dist/changes-5.12.025
-rw-r--r--src/controls/Private/qquickcontrolsettings.cpp2
-rw-r--r--src/controls/Private/qquicktreemodeladaptor.cpp13
-rw-r--r--src/controls/Styles/styles.pri3
-rw-r--r--src/controls/controls.pro1
-rw-r--r--src/controls/doc/qtquickcontrols1.qdocconf4
-rw-r--r--src/controls/plugin.cpp49
8 files changed, 110 insertions, 7 deletions
diff --git a/dist/changes-5.11.3 b/dist/changes-5.11.3
new file mode 100644
index 00000000..f71fa341
--- /dev/null
+++ b/dist/changes-5.11.3
@@ -0,0 +1,20 @@
+Qt 5.11.3 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.11.0 through 5.11.2.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+http://doc.qt.io/qt-5/index.html
+
+The Qt version 5.11 series is binary compatible with the 5.10.x series.
+Applications compiled for 5.10 will continue to run with 5.11.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+ - This release contains only minor code improvements.
diff --git a/dist/changes-5.12.0 b/dist/changes-5.12.0
new file mode 100644
index 00000000..0453ff44
--- /dev/null
+++ b/dist/changes-5.12.0
@@ -0,0 +1,25 @@
+Qt 5.12 introduces many new features and improvements as well as bugfixes
+over the 5.11.x series. For more details, refer to the online documentation
+included in this distribution. The documentation is also available online:
+
+https://doc.qt.io/qt-5/index.html
+
+The Qt version 5.12 series is binary compatible with the 5.11.x series.
+Applications compiled for 5.11 will continue to run with 5.12.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* Dialogs *
+****************************************************************************
+
+ - [QTBUG-69095] Add a signal to the Dialog class to allow the client to
+ intercept the button presses and optionally prevent further processing
+ of the event. This allows performing some validation on the fields
+ before dismissing the dialog.
diff --git a/src/controls/Private/qquickcontrolsettings.cpp b/src/controls/Private/qquickcontrolsettings.cpp
index 95c656b2..d06f931a 100644
--- a/src/controls/Private/qquickcontrolsettings.cpp
+++ b/src/controls/Private/qquickcontrolsettings.cpp
@@ -161,7 +161,7 @@ QQmlComponent *QQuickControlSettings1::styleComponent(const QUrl &styleDirUrl, c
styleFileUrl = makeStyleComponentUrl(controlStyleName, m_styleMap.value(QStringLiteral("Base")).m_styleDirPath);
}
- return new QQmlComponent(qmlEngine(control), styleFileUrl);
+ return new QQmlComponent(qmlEngine(control), styleFileUrl, this);
}
static QString relativeStyleImportPath(QQmlEngine *engine, const QString &styleName)
diff --git a/src/controls/Private/qquicktreemodeladaptor.cpp b/src/controls/Private/qquicktreemodeladaptor.cpp
index 495abc9c..287b388f 100644
--- a/src/controls/Private/qquicktreemodeladaptor.cpp
+++ b/src/controls/Private/qquicktreemodeladaptor.cpp
@@ -283,6 +283,8 @@ QItemSelection QQuickTreeModelAdaptor1::selectionForRowRange(const QModelIndex
return QItemSelection();
return QItemSelection(toIndex, toIndex);
}
+
+ to = qMax(to, 0);
if (from > to)
qSwap(from, to);
@@ -360,8 +362,15 @@ void QQuickTreeModelAdaptor1::showModelChildItems(const TreeItem &parentItem, in
if (start == 0) {
startIdx = rowIdx;
} else {
- const QModelIndex &prevSiblingIdx = m_model->index(start - 1, 0, parentIndex);
- startIdx = lastChildIndex(prevSiblingIdx) + 1;
+ // Prefer to insert before next sibling instead of after last child of previous, as
+ // the latter is potentially buggy, see QTBUG-66062
+ const QModelIndex &nextSiblingIdx = m_model->index(end + 1, 0, parentIndex);
+ if (nextSiblingIdx.isValid()) {
+ startIdx = itemIndex(nextSiblingIdx);
+ } else {
+ const QModelIndex &prevSiblingIdx = m_model->index(start - 1, 0, parentIndex);
+ startIdx = lastChildIndex(prevSiblingIdx) + 1;
+ }
}
int rowDepth = rowIdx == 0 ? 0 : parentItem.depth + 1;
diff --git a/src/controls/Styles/styles.pri b/src/controls/Styles/styles.pri
index 67c1ab76..c29cebfd 100644
--- a/src/controls/Styles/styles.pri
+++ b/src/controls/Styles/styles.pri
@@ -108,6 +108,7 @@ STYLES_QML_FILES += \
$$PWD/Base/images/knob.png \
$$PWD/Base/images/needle.png
-STYLES_QML_FILES += $$PWD/qmldir
+AUX_QML_FILES += $$PWD/qmldir
+static: QML_FILES += $$AUX_QML_FILES
ios:static: include(iOS/iOS.pri)
!qtquickcompiler|static: QML_FILES += $$STYLES_QML_FILES
diff --git a/src/controls/controls.pro b/src/controls/controls.pro
index 75871bf0..3119d33d 100644
--- a/src/controls/controls.pro
+++ b/src/controls/controls.pro
@@ -45,6 +45,7 @@ qtquickcompiler {
} else {
QML_FILES += $$CONTROLS_QML_FILES
!static: CONFIG += qmlcache
+ else: CONTROLS_QML_FILES += qmldir
}
SOURCES += $$PWD/plugin.cpp
diff --git a/src/controls/doc/qtquickcontrols1.qdocconf b/src/controls/doc/qtquickcontrols1.qdocconf
index 29a01ae2..d2ea0c47 100644
--- a/src/controls/doc/qtquickcontrols1.qdocconf
+++ b/src/controls/doc/qtquickcontrols1.qdocconf
@@ -69,7 +69,9 @@ excludefiles += ../TableView.qml \
excludedirs += ../Styles/Desktop \
../Styles/Android \
- ../Styles/iOS
+ ../Styles/iOS \
+ ../Styles/WinRT
+
imagedirs += images \
../../extras/doc/images
diff --git a/src/controls/plugin.cpp b/src/controls/plugin.cpp
index 8aca0c49..82eef800 100644
--- a/src/controls/plugin.cpp
+++ b/src/controls/plugin.cpp
@@ -73,10 +73,12 @@
QT_BEGIN_NAMESPACE
-static const struct {
+struct QmldirStruct {
const char *type;
int major, minor;
-} qmldir [] = {
+};
+
+static const QmldirStruct qmldir [] = {
{ "ApplicationWindow", 1, 0 },
{ "Button", 1, 0 },
{ "Calendar", 1, 2 },
@@ -119,6 +121,43 @@ static const struct {
{ "Slider", 1, 6 }
};
+static const QmldirStruct stylesQmldir [] = {
+ { "ApplicationWindowStyle", 1, 3 },
+ { "ButtonStyle", 1, 0 },
+ { "BusyIndicatorStyle", 1, 1 },
+ { "CalendarStyle", 1, 1 },
+ { "CheckBoxStyle", 1, 0 },
+ { "ComboBoxStyle", 1, 0 },
+ { "MenuStyle", 1, 2 },
+ { "MenuBarStyle", 1, 2 },
+ { "ProgressBarStyle", 1, 0 },
+ { "RadioButtonStyle", 1, 0 },
+ { "ScrollViewStyle", 1, 0 },
+ { "SliderStyle", 1, 0 },
+ { "SpinBoxStyle", 1, 1 },
+ { "SwitchStyle", 1, 1 },
+ { "TabViewStyle", 1, 0 },
+ { "TableViewStyle", 1, 0 },
+ { "TreeViewStyle", 1, 4 },
+ { "TextAreaStyle", 1, 1 },
+ { "TextFieldStyle", 1, 0 },
+ { "ToolBarStyle", 1, 0 },
+ { "StatusBarStyle", 1, 0 },
+ { "CircularGaugeStyle", 1, 0 },
+ { "CircularButtonStyle", 1, 0 },
+ { "CircularTickmarkLabelStyle", 1, 0 },
+ { "CommonStyleHelper", 1, 0 },
+ { "DelayButtonStyle", 1, 0 },
+ { "DialStyle", 1, 1 },
+ { "GaugeStyle", 1, 0 },
+ { "HandleStyle", 1, 0 },
+ { "HandleStyleHelper", 1, 0 },
+ { "PieMenuStyle", 1, 3 },
+ { "StatusIndicatorStyle", 1, 1 },
+ { "ToggleButtonStyle", 1, 0 },
+ { "TumblerStyle", 1, 2 }
+};
+
QtQuickControls1Plugin::QtQuickControls1Plugin(QObject *parent) : QQmlExtensionPlugin(parent)
{
}
@@ -172,6 +211,12 @@ void QtQuickControls1Plugin::registerTypes(const char *uri)
#ifdef QT_WIDGETS_LIB
qmlRegisterType<QQuickStyleItem1>(private_uri, 1, 0, "StyleItem");
#endif
+
+ const char *styles_uri = "QtQuick.Controls.Styles";
+ const QString baseStyleLocation = filesLocation + "/Styles/Base";
+ for (int i = 0; i < int(sizeof(stylesQmldir)/sizeof(stylesQmldir[0])); i++)
+ qmlRegisterType(QUrl(baseStyleLocation + "/" + stylesQmldir[i].type + ".qml"), styles_uri,
+ stylesQmldir[i].major, stylesQmldir[i].minor, stylesQmldir[i].type);
}
void QtQuickControls1Plugin::initializeEngine(QQmlEngine *engine, const char *uri)