summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf2
-rw-r--r--dist/changes-5.10.038
-rw-r--r--dist/changes-5.10.126
-rw-r--r--examples/quickcontrols/controls/filesystembrowser/main.cpp6
-rw-r--r--examples/quickcontrols/controls/tableview/main.qml2
-rw-r--r--examples/quickcontrols/controls/tableview/src/sortfilterproxymodel.cpp4
-rw-r--r--examples/quickcontrols/extras/dashboard/qml/TurnIndicator.qml10
-rw-r--r--examples/quickcontrols/extras/dashboard/qml/ValueSource.qml6
-rw-r--r--examples/quickcontrols/extras/flat/Content.qml2
-rw-r--r--src/controls/Calendar.qml25
-rw-r--r--src/controls/Private/qquickcalendarmodel_p.h6
-rw-r--r--src/controls/Private/qquickrangemodel.cpp2
-rw-r--r--src/controls/Private/qquicktreemodeladaptor.cpp2
-rw-r--r--src/controls/Slider.qml10
-rw-r--r--src/controls/Styles/Android/CalendarStyle.qml2
-rw-r--r--src/controls/Styles/Android/qmldir25
-rw-r--r--src/controls/Styles/Base/CalendarStyle.qml16
-rw-r--r--src/controls/plugin.cpp18
-rw-r--r--src/controls/plugins.qmltypes171
-rw-r--r--src/controls/qquickmenupopupwindow.cpp2
-rw-r--r--src/controls/qquickpopupwindow_p.h12
-rw-r--r--src/dialogs/dialogs.pro2
-rw-r--r--src/dialogs/doc/qtquickdialogs.qdocconf2
-rw-r--r--src/dialogs/plugin.cpp5
-rw-r--r--src/dialogs/qquickabstractfiledialog.cpp8
-rw-r--r--src/dialogs/qquickabstractfiledialog_p.h4
-rw-r--r--src/dialogs/qquickfiledialog_p.h4
-rw-r--r--src/dialogs/qquickplatformfiledialog.cpp14
-rw-r--r--src/dialogs/qquickplatformfiledialog_p.h8
-rw-r--r--src/extras/Private/qquickmathutils.cpp8
-rw-r--r--src/extras/Styles/Flat/CalendarStyle.qml4
-rw-r--r--src/extras/Styles/Flat/qquicktexthandle.h2
-rw-r--r--src/extras/doc/qtquickextras.qdocconf3
-rw-r--r--src/extras/doc/src/qtquickextras-examples.qdoc37
-rw-r--r--src/extras/plugin.cpp10
-rw-r--r--src/extras/plugin.h1
-rw-r--r--src/extras/qquickpicture_p.h2
-rw-r--r--src/widgets/qquickqfiledialog_p.h26
-rw-r--r--tests/auto/auto.pro3
-rw-r--r--tests/auto/controls/data/tst_calendar.qml28
-rw-r--r--tests/auto/controls/data/tst_checkbox.qml4
-rw-r--r--tests/auto/controls/data/tst_combobox.qml7
-rw-r--r--tests/auto/controls/data/tst_radiobutton.qml12
-rw-r--r--tests/auto/controls/data/tst_slider.qml25
-rw-r--r--tests/auto/customcontrolsstyle/tst_customcontrolsstyle.cpp6
-rw-r--r--tests/auto/dialogs/tst_dialogs.cpp23
-rw-r--r--tests/auto/extras/data/tst_picture.qml6
-rw-r--r--tests/auto/extras/data/tst_statusindicator.qml6
-rw-r--r--tests/manual/viewinqwidget/main.qml16
49 files changed, 500 insertions, 163 deletions
diff --git a/.qmake.conf b/.qmake.conf
index ca73f734..c053efd7 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -2,4 +2,4 @@ load(qt_build_config)
CONFIG += warning_clean
android|ios|qnx|winrt|isEmpty(QT.widgets.name): CONFIG += no_desktop
-MODULE_VERSION = 5.9.5
+MODULE_VERSION = 5.11.0
diff --git a/dist/changes-5.10.0 b/dist/changes-5.10.0
new file mode 100644
index 00000000..9929a04b
--- /dev/null
+++ b/dist/changes-5.10.0
@@ -0,0 +1,38 @@
+Qt 5.10 introduces many new features and improvements as well as bugfixes
+over the 5.9.x series. 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.10 series is binary compatible with the 5.10.x series.
+Applications compiled for 5.9 will continue to run with 5.10.
+
+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.
+
+****************************************************************************
+* Qt 5.10.0 Changes *
+****************************************************************************
+
+Calendar
+--------
+
+ - [QTBUG-60217] Added locale property, which affects which day is shown as
+ the first day of the week, as well as date and day name localization.
+
+FileDialog
+----------
+
+ - [QTBUG-39230] Added defaultSuffix property, that is added to selected
+ files that have no suffix specified.
+
+Slider
+------
+
+ - [QTBUG-59271] Added wheelEnabled property, which makes it possible to
+ disable mouse wheel.
diff --git a/dist/changes-5.10.1 b/dist/changes-5.10.1
new file mode 100644
index 00000000..695c4e36
--- /dev/null
+++ b/dist/changes-5.10.1
@@ -0,0 +1,26 @@
+Qt 5.10.1 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.10.0.
+
+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.10 series is binary compatible with the 5.9.x series.
+Applications compiled for 5.9 will continue to run with 5.10.
+
+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 all fixes included in the Qt 5.9.4 release.
+
+****************************************************************************
+* Qt 5.10.1 Changes *
+****************************************************************************
+
+ - This release contains only minor code improvements.
diff --git a/examples/quickcontrols/controls/filesystembrowser/main.cpp b/examples/quickcontrols/controls/filesystembrowser/main.cpp
index 6027c828..d8599a2e 100644
--- a/examples/quickcontrols/controls/filesystembrowser/main.cpp
+++ b/examples/quickcontrols/controls/filesystembrowser/main.cpp
@@ -100,7 +100,7 @@ static inline QString sizeString(const QFileInfo &fi)
class DisplayFileSystemModel : public QFileSystemModel {
Q_OBJECT
public:
- explicit DisplayFileSystemModel(QObject *parent = Q_NULLPTR)
+ explicit DisplayFileSystemModel(QObject *parent = nullptr)
: QFileSystemModel(parent) {}
enum Roles {
@@ -111,7 +111,7 @@ public:
};
Q_ENUM(Roles)
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override
{
if (index.isValid() && role >= SizeRole) {
switch (role) {
@@ -130,7 +130,7 @@ public:
return QFileSystemModel::data(index, role);
}
- QHash<int,QByteArray> roleNames() const Q_DECL_OVERRIDE
+ QHash<int,QByteArray> roleNames() const override
{
QHash<int, QByteArray> result = QFileSystemModel::roleNames();
result.insert(SizeRole, QByteArrayLiteral("size"));
diff --git a/examples/quickcontrols/controls/tableview/main.qml b/examples/quickcontrols/controls/tableview/main.qml
index 006fad6d..39c1a8ce 100644
--- a/examples/quickcontrols/controls/tableview/main.qml
+++ b/examples/quickcontrols/controls/tableview/main.qml
@@ -130,7 +130,7 @@ ApplicationWindow {
author: "Kurt Vonnegut"
}
ListElement {
- title: "Farenheit 451"
+ title: "Fahrenheit 451"
author: "Ray Bradbury"
}
ListElement {
diff --git a/examples/quickcontrols/controls/tableview/src/sortfilterproxymodel.cpp b/examples/quickcontrols/controls/tableview/src/sortfilterproxymodel.cpp
index 55f76d67..b93641a9 100644
--- a/examples/quickcontrols/controls/tableview/src/sortfilterproxymodel.cpp
+++ b/examples/quickcontrols/controls/tableview/src/sortfilterproxymodel.cpp
@@ -54,8 +54,8 @@
SortFilterProxyModel::SortFilterProxyModel(QObject *parent) : QSortFilterProxyModel(parent), m_complete(false)
{
- connect(this, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SIGNAL(countChanged()));
- connect(this, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SIGNAL(countChanged()));
+ connect(this, &QSortFilterProxyModel::rowsInserted, this, &SortFilterProxyModel::countChanged);
+ connect(this, &QSortFilterProxyModel::rowsRemoved, this, &SortFilterProxyModel::countChanged);
}
int SortFilterProxyModel::count() const
diff --git a/examples/quickcontrols/extras/dashboard/qml/TurnIndicator.qml b/examples/quickcontrols/extras/dashboard/qml/TurnIndicator.qml
index b132510e..c0fb6720 100644
--- a/examples/quickcontrols/extras/dashboard/qml/TurnIndicator.qml
+++ b/examples/quickcontrols/extras/dashboard/qml/TurnIndicator.qml
@@ -59,7 +59,7 @@ Item {
property bool flashing: false
scale: direction === Qt.LeftArrow ? 1 : -1
-
+//! [1]
Timer {
id: flashTimer
interval: 500
@@ -67,7 +67,8 @@ Item {
repeat: true
onTriggered: flashing = !flashing
}
-
+//! [1]
+//! [2]
function paintOutlinePath(ctx) {
ctx.beginPath();
ctx.moveTo(0, height * 0.5);
@@ -79,7 +80,7 @@ Item {
ctx.lineTo(0.6 * width, height);
ctx.lineTo(0, height * 0.5);
}
-
+//! [2]
Canvas {
id: backgroundCanvas
anchors.fill: parent
@@ -95,7 +96,7 @@ Item {
ctx.stroke();
}
}
-
+//! [3]
Canvas {
id: foregroundCanvas
anchors.fill: parent
@@ -111,4 +112,5 @@ Item {
ctx.fill();
}
}
+//! [3]
}
diff --git a/examples/quickcontrols/extras/dashboard/qml/ValueSource.qml b/examples/quickcontrols/extras/dashboard/qml/ValueSource.qml
index 7225be48..44913621 100644
--- a/examples/quickcontrols/extras/dashboard/qml/ValueSource.qml
+++ b/examples/quickcontrols/extras/dashboard/qml/ValueSource.qml
@@ -49,7 +49,7 @@
****************************************************************************/
import QtQuick 2.2
-
+//! [0]
Item {
id: valueSource
property real kph: 0
@@ -79,6 +79,7 @@ Item {
property int turnSignal: gear == "P" && !start ? randomDirection() : -1
property real temperature: 0.6
property bool start: true
+//! [0]
function randomDirection() {
return Math.random() > 0.5 ? Qt.LeftArrow : Qt.RightArrow;
@@ -101,7 +102,7 @@ Item {
SequentialAnimation {
loops: Animation.Infinite
-
+//! [1]
ParallelAnimation {
NumberAnimation {
target: valueSource
@@ -120,6 +121,7 @@ Item {
duration: 3000
}
}
+//! [1]
ParallelAnimation {
// We changed gears so we lost a bit of speed.
NumberAnimation {
diff --git a/examples/quickcontrols/extras/flat/Content.qml b/examples/quickcontrols/extras/flat/Content.qml
index e9b3e869..4e5588c5 100644
--- a/examples/quickcontrols/extras/flat/Content.qml
+++ b/examples/quickcontrols/extras/flat/Content.qml
@@ -522,7 +522,7 @@ Item {
author: "Kurt Vonnegut"
}
ListElement {
- title: "Farenheit 451"
+ title: "Fahrenheit 451"
author: "Ray Bradbury"
}
ListElement {
diff --git a/src/controls/Calendar.qml b/src/controls/Calendar.qml
index c5347c51..a5b32210 100644
--- a/src/controls/Calendar.qml
+++ b/src/controls/Calendar.qml
@@ -37,8 +37,8 @@
**
****************************************************************************/
-import QtQuick 2.2
-import QtQuick.Controls 1.2
+import QtQuick 2.9
+import QtQuick.Controls 1.5
import QtQuick.Controls.Styles 1.1
import QtQuick.Controls.Private 1.0
@@ -202,20 +202,27 @@ Control {
property int dayOfWeekFormat: Locale.ShortFormat
/*!
- The locale that this calendar should use to display itself.
+ \qmlproperty object Calendar::locale
+ \since QtQuick.Controls 1.6
- Affects how dates and day names are localized, as well as which
- day is considered the first in a week.
+ This property controls the locale that this calendar uses to display
+ itself.
- To set an Australian locale, for example:
+ The locale affects how dates and day names are localized, as well as
+ which day is considered the first in a week.
+
+ The following example sets an Australian locale:
\code
locale: Qt.locale("en_AU")
\endcode
- The default locale is \c Qt.locale().
+ The default value is equivalent to \c Qt.locale().
*/
- property var __locale: Qt.locale()
+ property var locale: Qt.locale()
+
+ // left for compatibility reasons; can be removed in next minor version/Qt 6
+ property alias __locale: calendar.locale
/*!
\internal
@@ -224,7 +231,7 @@ Control {
populate the dates available to the user.
*/
property CalendarModel __model: CalendarModel {
- locale: calendar.__locale
+ locale: calendar.locale
// TODO: don't set the hour when QTBUG-56787 is fixed
visibleDate: new Date(visibleYear, visibleMonth, 1, 12)
diff --git a/src/controls/Private/qquickcalendarmodel_p.h b/src/controls/Private/qquickcalendarmodel_p.h
index 99ae9423..68fdea2e 100644
--- a/src/controls/Private/qquickcalendarmodel_p.h
+++ b/src/controls/Private/qquickcalendarmodel_p.h
@@ -69,11 +69,11 @@ public:
QLocale locale() const;
void setLocale(const QLocale &locale);
- QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
+ QVariant data(const QModelIndex &index, int role) const override;
- int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
- QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE;
+ QHash<int, QByteArray> roleNames() const override;
Q_INVOKABLE QDateTime dateAt(int index) const;
Q_INVOKABLE int indexAt(const QDate &visibleDate);
diff --git a/src/controls/Private/qquickrangemodel.cpp b/src/controls/Private/qquickrangemodel.cpp
index ca393c83..cdadb2ad 100644
--- a/src/controls/Private/qquickrangemodel.cpp
+++ b/src/controls/Private/qquickrangemodel.cpp
@@ -263,7 +263,7 @@ void QQuickRangeModel1::setRange(qreal min, qreal max)
d->minimum = min;
d->maximum = qMax(min, max);
- // Update internal position if it was changed. It can occurs if internal value changes, due to range update
+ // Update internal position if it was changed. It can occur if internal value changes, due to range update
d->pos = d->equivalentPosition(d->value);
if (emitMinimumChanged)
diff --git a/src/controls/Private/qquicktreemodeladaptor.cpp b/src/controls/Private/qquicktreemodeladaptor.cpp
index 26db62a3..495abc9c 100644
--- a/src/controls/Private/qquicktreemodeladaptor.cpp
+++ b/src/controls/Private/qquicktreemodeladaptor.cpp
@@ -529,7 +529,7 @@ void QQuickTreeModelAdaptor1::modelHasBeenDestroyed()
{
// The model has been deleted. This should behave as if no model was set
clearModelData();
- emit modelChanged(Q_NULLPTR);
+ emit modelChanged(nullptr);
}
void QQuickTreeModelAdaptor1::modelHasBeenReset()
diff --git a/src/controls/Slider.qml b/src/controls/Slider.qml
index aa5fe07e..e290640e 100644
--- a/src/controls/Slider.qml
+++ b/src/controls/Slider.qml
@@ -171,6 +171,16 @@ Control {
*/
property bool tickmarksEnabled: false
+ /*!
+ \qmlproperty bool Slider::wheelEnabled
+
+ This property determines whether the control handles wheel events.
+ The default value is \c true.
+
+ \since QtQuick.Controls 1.6
+ */
+ property alias wheelEnabled: wheelarea.enabled
+
/*! \internal */
property bool __horizontal: orientation === Qt.Horizontal
diff --git a/src/controls/Styles/Android/CalendarStyle.qml b/src/controls/Styles/Android/CalendarStyle.qml
index 449cc497..52b02bff 100644
--- a/src/controls/Styles/Android/CalendarStyle.qml
+++ b/src/controls/Styles/Android/CalendarStyle.qml
@@ -83,7 +83,7 @@ CalendarStyle {
LabelStyle {
id: dayOfWeek
anchors.centerIn: parent
- text: control.__locale.dayName(styleData.dayOfWeek, control.dayOfWeekFormat)
+ text: control.locale.dayName(styleData.dayOfWeek, control.dayOfWeekFormat)
focused: control.activeFocus
window_focused: control.Window.active
styleDef: AndroidStyle.styleDef.calendarViewStyle.CalendarView_weekDayTextAppearance
diff --git a/src/controls/Styles/Android/qmldir b/src/controls/Styles/Android/qmldir
index 21bff691..d07efdb6 100644
--- a/src/controls/Styles/Android/qmldir
+++ b/src/controls/Styles/Android/qmldir
@@ -2,3 +2,28 @@ module QtQuick.Controls.Styles.Android
plugin qtquickcontrolsandroidstyleplugin
classname QtQuickControlsAndroidStylePlugin
singleton AndroidStyle 1.0 AndroidStyle.qml
+internal ApplicationWindowStyle ApplicationWindowStyle.qml
+internal BusyIndicatorStyle BusyIndicatorStyle.qml
+internal ButtonStyle ButtonStyle.qml
+internal CalendarStyle CalendarStyle.qml
+internal CheckBoxStyle CheckBoxStyle.qml
+internal ComboBoxStyle ComboBoxStyle.qml
+internal CursorHandleStyle CursorHandleStyle.qml
+internal FocusFrameStyle FocusFrameStyle.qml
+internal GroupBoxStyle GroupBoxStyle.qml
+internal LabelStyle LabelStyle.qml
+internal MenuBarStyle MenuBarStyle.qml
+internal MenuStyle MenuStyle.qml
+internal ProgressBarStyle ProgressBarStyle.qml
+internal RadioButtonStyle RadioButtonStyle.qml
+internal ScrollViewStyle ScrollViewStyle.qml
+internal SliderStyle SliderStyle.qml
+internal SpinBoxStyle SpinBoxStyle.qml
+internal StatusBarStyle StatusBarStyle.qml
+internal SwitchStyle SwitchStyle.qml
+internal TableViewStyle TableViewStyle.qml
+internal TabViewStyle TabViewStyle.qml
+internal TextAreaStyle TextAreaStyle.qml
+internal TextFieldStyle TextFieldStyle.qml
+internal ToolBarStyle ToolBarStyle.qml
+internal ToolButtonStyle ToolButtonStyle.qml
diff --git a/src/controls/Styles/Base/CalendarStyle.qml b/src/controls/Styles/Base/CalendarStyle.qml
index 5999dcac..9da43ce5 100644
--- a/src/controls/Styles/Base/CalendarStyle.qml
+++ b/src/controls/Styles/Base/CalendarStyle.qml
@@ -320,7 +320,7 @@ Style {
color: gridVisible ? "#fcfcfc" : "transparent"
implicitHeight: Math.round(TextSingleton.implicitHeight * 2.25)
Label {
- text: control.__locale.dayName(styleData.dayOfWeek, control.dayOfWeekFormat)
+ text: control.locale.dayName(styleData.dayOfWeek, control.dayOfWeekFormat)
anchors.centerIn: parent
}
}
@@ -369,6 +369,7 @@ Style {
property int hoveredCellIndex: -1
property int pressedCellIndex: -1
property int pressCellIndex: -1
+ property var pressDate: null
Rectangle {
anchors.fill: parent
@@ -397,8 +398,8 @@ Style {
active: control.navigationBarVisible
property QtObject styleData: QtObject {
- readonly property string title: control.__locale.standaloneMonthName(control.visibleMonth)
- + new Date(control.visibleYear, control.visibleMonth, 1).toLocaleDateString(control.__locale, " yyyy")
+ readonly property string title: control.locale.standaloneMonthName(control.visibleMonth)
+ + new Date(control.visibleYear, control.visibleMonth, 1).toLocaleDateString(control.locale, " yyyy")
}
}
@@ -413,7 +414,7 @@ Style {
Repeater {
id: repeater
model: CalendarHeaderModel {
- locale: control.__locale
+ locale: control.locale
}
Loader {
id: dayOfWeekDelegateLoader
@@ -581,9 +582,11 @@ Style {
onPressed: {
pressCellIndex = cellIndexAt(mouse.x, mouse.y);
+ pressDate = null;
if (pressCellIndex !== -1) {
var date = view.model.dateAt(pressCellIndex);
pressedCellIndex = pressCellIndex;
+ pressDate = date;
if (__isValidDate(date)) {
control.selectedDate = date;
control.pressed(date);
@@ -608,9 +611,8 @@ Style {
onClicked: {
var indexOfCell = cellIndexAt(mouse.x, mouse.y);
if (indexOfCell !== -1 && indexOfCell === pressCellIndex) {
- var date = view.model.dateAt(indexOfCell);
- if (__isValidDate(date))
- control.clicked(date);
+ if (__isValidDate(pressDate))
+ control.clicked(pressDate);
}
}
diff --git a/src/controls/plugin.cpp b/src/controls/plugin.cpp
index 2590d892..4eb6c466 100644
--- a/src/controls/plugin.cpp
+++ b/src/controls/plugin.cpp
@@ -121,7 +121,10 @@ static const struct {
{ "TreeView", 1, 4 },
{ "TextArea", 1, 5 },
- { "TreeView", 1, 5 }
+ { "TreeView", 1, 5 },
+
+ { "Calendar", 1, 6 },
+ { "Slider", 1, 6 }
};
QtQuickControls1Plugin::QtQuickControls1Plugin(QObject *parent) : QQmlExtensionPlugin(parent)
@@ -146,11 +149,6 @@ void QtQuickControls1Plugin::registerTypes(const char *uri)
const QString filesLocation = fileLocation();
for (int i = 0; i < int(sizeof(qmldir)/sizeof(qmldir[0])); i++)
qmlRegisterType(QUrl(filesLocation + "/" + qmldir[i].type + ".qml"), uri, qmldir[i].major, qmldir[i].minor, qmldir[i].type);
-}
-
-void QtQuickControls1Plugin::initializeEngine(QQmlEngine *engine, const char *uri)
-{
- Q_UNUSED(uri);
// Register private API. Note that to use these types outside of the
// Qt Quick Controls module, both the public and private imports must be used.
@@ -182,6 +180,14 @@ void QtQuickControls1Plugin::initializeEngine(QQmlEngine *engine, const char *ur
#ifdef QT_WIDGETS_LIB
qmlRegisterType<QQuickStyleItem1>(private_uri, 1, 0, "StyleItem");
+#endif
+}
+
+void QtQuickControls1Plugin::initializeEngine(QQmlEngine *engine, const char *uri)
+{
+ Q_UNUSED(uri);
+
+#ifdef QT_WIDGETS_LIB
engine->addImageProvider("__tablerow", new QQuickTableRowImageProvider1);
#endif
engine->addImageProvider("desktoptheme", new QQuickDesktopIconProvider1);
diff --git a/src/controls/plugins.qmltypes b/src/controls/plugins.qmltypes
index cb509bcb..58b9c6cd 100644
--- a/src/controls/plugins.qmltypes
+++ b/src/controls/plugins.qmltypes
@@ -10,10 +10,9 @@ Module {
dependencies: [
"QtGraphicalEffects 1.0",
"QtQml.Models 2.2",
- "QtQuick 2.6",
+ "QtQuick 2.9",
"QtQuick.Controls.Styles 1.4",
"QtQuick.Extras 1.4",
- "QtQuick.Extras.Private.CppUtils 1.1",
"QtQuick.Layouts 1.1",
"QtQuick.Window 2.2"
]
@@ -673,7 +672,7 @@ Module {
exportMetaObjectRevisions: [0]
isComposite: true
defaultProperty: "data"
- Property { name: "menuBar"; type: "MenuBar_QMLTYPE_2"; isPointer: true }
+ Property { name: "menuBar"; type: "MenuBar_QMLTYPE_3"; isPointer: true }
Property { name: "toolBar"; type: "QQuickItem"; isPointer: true }
Property { name: "statusBar"; type: "QQuickItem"; isPointer: true }
Property { name: "style"; type: "QQmlComponent"; isPointer: true }
@@ -681,12 +680,7 @@ Module {
Property { name: "__qwindowsize_max"; type: "double"; isReadonly: true }
Property { name: "__width"; type: "double" }
Property { name: "__height"; type: "double" }
- Property {
- name: "contentItem"
- type: "ContentItem_QMLTYPE_10"
- isReadonly: true
- isPointer: true
- }
+ Property { name: "contentItem"; type: "ContentItem_QMLTYPE_1"; isReadonly: true; isPointer: true }
Property { name: "__style"; type: "QObject"; isReadonly: true; isPointer: true }
Property { name: "__panel"; type: "QObject"; isReadonly: true; isPointer: true }
Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
@@ -752,11 +746,73 @@ Module {
Property { name: "weekNumbersVisible"; type: "bool" }
Property { name: "navigationBarVisible"; type: "bool" }
Property { name: "dayOfWeekFormat"; type: "int" }
+ Property { name: "locale"; type: "QVariant" }
+ Property { name: "__model"; type: "QQuickCalendarModel1"; isPointer: true }
+ Property { name: "selectedDate"; type: "QDate" }
+ Property { name: "minimumDate"; type: "QDate" }
+ Property { name: "maximumDate"; type: "QDate" }
Property { name: "__locale"; type: "QVariant" }
+ Signal {
+ name: "hovered"
+ Parameter { name: "date"; type: "QDateTime" }
+ }
+ Signal {
+ name: "pressed"
+ Parameter { name: "date"; type: "QDateTime" }
+ }
+ Signal {
+ name: "released"
+ Parameter { name: "date"; type: "QDateTime" }
+ }
+ Signal {
+ name: "clicked"
+ Parameter { name: "date"; type: "QDateTime" }
+ }
+ Signal {
+ name: "doubleClicked"
+ Parameter { name: "date"; type: "QDateTime" }
+ }
+ Signal {
+ name: "pressAndHold"
+ Parameter { name: "date"; type: "QDateTime" }
+ }
+ Method { name: "showPreviousMonth"; type: "QVariant" }
+ Method { name: "showNextMonth"; type: "QVariant" }
+ Method { name: "showPreviousYear"; type: "QVariant" }
+ Method { name: "showNextYear"; type: "QVariant" }
+ Method { name: "__selectPreviousMonth"; type: "QVariant" }
+ Method { name: "__selectNextMonth"; type: "QVariant" }
+ Method { name: "__selectPreviousWeek"; type: "QVariant" }
+ Method { name: "__selectNextWeek"; type: "QVariant" }
+ Method { name: "__selectFirstDayOfMonth"; type: "QVariant" }
+ Method { name: "__selectLastDayOfMonth"; type: "QVariant" }
+ Method { name: "__selectPreviousDay"; type: "QVariant" }
+ Method { name: "__selectNextDay"; type: "QVariant" }
+ Property { name: "style"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "__style"; type: "QObject"; isPointer: true }
+ Property { name: "__panel"; type: "QQuickItem"; isPointer: true }
+ Property { name: "styleHints"; type: "QVariant" }
+ Property { name: "__styleData"; type: "QObject"; isPointer: true }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Controls/Calendar 1.6"
+ exports: ["QtQuick.Controls/Calendar 1.6"]
+ exportMetaObjectRevisions: [6]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "visibleMonth"; type: "int" }
+ Property { name: "visibleYear"; type: "int" }
+ Property { name: "frameVisible"; type: "bool" }
+ Property { name: "weekNumbersVisible"; type: "bool" }
+ Property { name: "navigationBarVisible"; type: "bool" }
+ Property { name: "dayOfWeekFormat"; type: "int" }
+ Property { name: "locale"; type: "QVariant" }
Property { name: "__model"; type: "QQuickCalendarModel1"; isPointer: true }
Property { name: "selectedDate"; type: "QDate" }
Property { name: "minimumDate"; type: "QDate" }
Property { name: "maximumDate"; type: "QDate" }
+ Property { name: "__locale"; type: "QVariant" }
Signal {
name: "hovered"
Parameter { name: "date"; type: "QDateTime" }
@@ -1364,14 +1420,14 @@ Module {
Property { name: "__scrollBarTopMargin"; type: "int" }
Property { name: "__viewTopMargin"; type: "int" }
Property { name: "style"; type: "QQmlComponent"; isPointer: true }
- Property { name: "__style"; type: "Style_QMLTYPE_1"; isPointer: true }
+ Property { name: "__style"; type: "Style_QMLTYPE_2"; isPointer: true }
Property { name: "horizontalScrollBarPolicy"; type: "int" }
Property { name: "verticalScrollBarPolicy"; type: "int" }
Property { name: "viewport"; type: "QQuickItem"; isReadonly: true; isPointer: true }
Property { name: "flickableItem"; type: "QQuickFlickable"; isReadonly: true; isPointer: true }
Property {
name: "__scroller"
- type: "ScrollViewHelper_QMLTYPE_26"
+ type: "ScrollViewHelper_QMLTYPE_27"
isReadonly: true
isPointer: true
}
@@ -1379,19 +1435,47 @@ Module {
Property { name: "__wheelAreaScrollSpeed"; type: "double" }
Property {
name: "__horizontalScrollBar"
- type: "ScrollBar_QMLTYPE_22"
+ type: "ScrollBar_QMLTYPE_23"
isReadonly: true
isPointer: true
}
Property {
name: "__verticalScrollBar"
- type: "ScrollBar_QMLTYPE_22"
+ type: "ScrollBar_QMLTYPE_23"
isReadonly: true
isPointer: true
}
}
Component {
prototype: "QQuickFocusScope"
+ name: "QtQuick.Controls/Slider 1.6"
+ exports: ["QtQuick.Controls/Slider 1.6"]
+ exportMetaObjectRevisions: [6]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "orientation"; type: "int" }
+ Property { name: "updateValueWhileDragging"; type: "bool" }
+ Property { name: "activeFocusOnPress"; type: "bool" }
+ Property { name: "tickmarksEnabled"; type: "bool" }
+ Property { name: "__horizontal"; type: "bool" }
+ Property { name: "__handlePos"; type: "double" }
+ Property { name: "minimumValue"; type: "double" }
+ Property { name: "maximumValue"; type: "double" }
+ Property { name: "pressed"; type: "bool"; isReadonly: true }
+ Property { name: "hovered"; type: "bool"; isReadonly: true }
+ Property { name: "stepSize"; type: "double" }
+ Property { name: "value"; type: "double" }
+ Property { name: "wheelEnabled"; type: "bool" }
+ Method { name: "accessibleIncreaseAction"; type: "QVariant" }
+ Method { name: "accessibleDecreaseAction"; type: "QVariant" }
+ Property { name: "style"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "__style"; type: "QObject"; isPointer: true }
+ Property { name: "__panel"; type: "QQuickItem"; isPointer: true }
+ Property { name: "styleHints"; type: "QVariant" }
+ Property { name: "__styleData"; type: "QObject"; isPointer: true }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
name: "QtQuick.Controls/Slider 1.0"
exports: ["QtQuick.Controls/Slider 1.0"]
exportMetaObjectRevisions: [0]
@@ -1409,6 +1493,7 @@ Module {
Property { name: "hovered"; type: "bool"; isReadonly: true }
Property { name: "stepSize"; type: "double" }
Property { name: "value"; type: "double" }
+ Property { name: "wheelEnabled"; type: "bool" }
Method { name: "accessibleIncreaseAction"; type: "QVariant" }
Method { name: "accessibleDecreaseAction"; type: "QVariant" }
Property { name: "style"; type: "QQmlComponent"; isPointer: true }
@@ -1603,9 +1688,9 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Extras/StatusIndicator 1.0"
- exports: ["QtQuick.Extras/StatusIndicator 1.0"]
- exportMetaObjectRevisions: [0]
+ name: "QtQuick.Extras/StatusIndicator 1.1"
+ exports: ["QtQuick.Extras/StatusIndicator 1.1"]
+ exportMetaObjectRevisions: [1]
isComposite: true
defaultProperty: "data"
Property { name: "active"; type: "bool" }
@@ -1619,9 +1704,9 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Extras/StatusIndicator 1.1"
- exports: ["QtQuick.Extras/StatusIndicator 1.1"]
- exportMetaObjectRevisions: [1]
+ name: "QtQuick.Extras/StatusIndicator 1.0"
+ exports: ["QtQuick.Extras/StatusIndicator 1.0"]
+ exportMetaObjectRevisions: [0]
isComposite: true
defaultProperty: "data"
Property { name: "active"; type: "bool" }
@@ -1822,14 +1907,14 @@ Module {
Property { name: "__scrollBarTopMargin"; type: "int" }
Property { name: "__viewTopMargin"; type: "int" }
Property { name: "style"; type: "QQmlComponent"; isPointer: true }
- Property { name: "__style"; type: "Style_QMLTYPE_1"; isPointer: true }
+ Property { name: "__style"; type: "Style_QMLTYPE_2"; isPointer: true }
Property { name: "horizontalScrollBarPolicy"; type: "int" }
Property { name: "verticalScrollBarPolicy"; type: "int" }
Property { name: "viewport"; type: "QQuickItem"; isReadonly: true; isPointer: true }
Property { name: "flickableItem"; type: "QQuickFlickable"; isReadonly: true; isPointer: true }
Property {
name: "__scroller"
- type: "ScrollViewHelper_QMLTYPE_26"
+ type: "ScrollViewHelper_QMLTYPE_27"
isReadonly: true
isPointer: true
}
@@ -1837,13 +1922,13 @@ Module {
Property { name: "__wheelAreaScrollSpeed"; type: "double" }
Property {
name: "__horizontalScrollBar"
- type: "ScrollBar_QMLTYPE_22"
+ type: "ScrollBar_QMLTYPE_23"
isReadonly: true
isPointer: true
}
Property {
name: "__verticalScrollBar"
- type: "ScrollBar_QMLTYPE_22"
+ type: "ScrollBar_QMLTYPE_23"
isReadonly: true
isPointer: true
}
@@ -1989,14 +2074,14 @@ Module {
Property { name: "__scrollBarTopMargin"; type: "int" }
Property { name: "__viewTopMargin"; type: "int" }
Property { name: "style"; type: "QQmlComponent"; isPointer: true }
- Property { name: "__style"; type: "Style_QMLTYPE_1"; isPointer: true }
+ Property { name: "__style"; type: "Style_QMLTYPE_2"; isPointer: true }
Property { name: "horizontalScrollBarPolicy"; type: "int" }
Property { name: "verticalScrollBarPolicy"; type: "int" }
Property { name: "viewport"; type: "QQuickItem"; isReadonly: true; isPointer: true }
Property { name: "flickableItem"; type: "QQuickFlickable"; isReadonly: true; isPointer: true }
Property {
name: "__scroller"
- type: "ScrollViewHelper_QMLTYPE_26"
+ type: "ScrollViewHelper_QMLTYPE_27"
isReadonly: true
isPointer: true
}
@@ -2004,13 +2089,13 @@ Module {
Property { name: "__wheelAreaScrollSpeed"; type: "double" }
Property {
name: "__horizontalScrollBar"
- type: "ScrollBar_QMLTYPE_22"
+ type: "ScrollBar_QMLTYPE_23"
isReadonly: true
isPointer: true
}
Property {
name: "__verticalScrollBar"
- type: "ScrollBar_QMLTYPE_22"
+ type: "ScrollBar_QMLTYPE_23"
isReadonly: true
isPointer: true
}
@@ -2137,14 +2222,14 @@ Module {
Property { name: "__scrollBarTopMargin"; type: "int" }
Property { name: "__viewTopMargin"; type: "int" }
Property { name: "style"; type: "QQmlComponent"; isPointer: true }
- Property { name: "__style"; type: "Style_QMLTYPE_1"; isPointer: true }
+ Property { name: "__style"; type: "Style_QMLTYPE_2"; isPointer: true }
Property { name: "horizontalScrollBarPolicy"; type: "int" }
Property { name: "verticalScrollBarPolicy"; type: "int" }
Property { name: "viewport"; type: "QQuickItem"; isReadonly: true; isPointer: true }
Property { name: "flickableItem"; type: "QQuickFlickable"; isReadonly: true; isPointer: true }
Property {
name: "__scroller"
- type: "ScrollViewHelper_QMLTYPE_26"
+ type: "ScrollViewHelper_QMLTYPE_27"
isReadonly: true
isPointer: true
}
@@ -2152,13 +2237,13 @@ Module {
Property { name: "__wheelAreaScrollSpeed"; type: "double" }
Property {
name: "__horizontalScrollBar"
- type: "ScrollBar_QMLTYPE_22"
+ type: "ScrollBar_QMLTYPE_23"
isReadonly: true
isPointer: true
}
Property {
name: "__verticalScrollBar"
- type: "ScrollBar_QMLTYPE_22"
+ type: "ScrollBar_QMLTYPE_23"
isReadonly: true
isPointer: true
}
@@ -2285,14 +2370,14 @@ Module {
Property { name: "__scrollBarTopMargin"; type: "int" }
Property { name: "__viewTopMargin"; type: "int" }
Property { name: "style"; type: "QQmlComponent"; isPointer: true }
- Property { name: "__style"; type: "Style_QMLTYPE_1"; isPointer: true }
+ Property { name: "__style"; type: "Style_QMLTYPE_2"; isPointer: true }
Property { name: "horizontalScrollBarPolicy"; type: "int" }
Property { name: "verticalScrollBarPolicy"; type: "int" }
Property { name: "viewport"; type: "QQuickItem"; isReadonly: true; isPointer: true }
Property { name: "flickableItem"; type: "QQuickFlickable"; isReadonly: true; isPointer: true }
Property {
name: "__scroller"
- type: "ScrollViewHelper_QMLTYPE_26"
+ type: "ScrollViewHelper_QMLTYPE_27"
isReadonly: true
isPointer: true
}
@@ -2300,13 +2385,13 @@ Module {
Property { name: "__wheelAreaScrollSpeed"; type: "double" }
Property {
name: "__horizontalScrollBar"
- type: "ScrollBar_QMLTYPE_22"
+ type: "ScrollBar_QMLTYPE_23"
isReadonly: true
isPointer: true
}
Property {
name: "__verticalScrollBar"
- type: "ScrollBar_QMLTYPE_22"
+ type: "ScrollBar_QMLTYPE_23"
isReadonly: true
isPointer: true
}
@@ -2602,14 +2687,14 @@ Module {
Property { name: "__scrollBarTopMargin"; type: "int" }
Property { name: "__viewTopMargin"; type: "int" }
Property { name: "style"; type: "QQmlComponent"; isPointer: true }
- Property { name: "__style"; type: "Style_QMLTYPE_1"; isPointer: true }
+ Property { name: "__style"; type: "Style_QMLTYPE_2"; isPointer: true }
Property { name: "horizontalScrollBarPolicy"; type: "int" }
Property { name: "verticalScrollBarPolicy"; type: "int" }
Property { name: "viewport"; type: "QQuickItem"; isReadonly: true; isPointer: true }
Property { name: "flickableItem"; type: "QQuickFlickable"; isReadonly: true; isPointer: true }
Property {
name: "__scroller"
- type: "ScrollViewHelper_QMLTYPE_26"
+ type: "ScrollViewHelper_QMLTYPE_27"
isReadonly: true
isPointer: true
}
@@ -2617,13 +2702,13 @@ Module {
Property { name: "__wheelAreaScrollSpeed"; type: "double" }
Property {
name: "__horizontalScrollBar"
- type: "ScrollBar_QMLTYPE_22"
+ type: "ScrollBar_QMLTYPE_23"
isReadonly: true
isPointer: true
}
Property {
name: "__verticalScrollBar"
- type: "ScrollBar_QMLTYPE_22"
+ type: "ScrollBar_QMLTYPE_23"
isReadonly: true
isPointer: true
}
@@ -2742,14 +2827,14 @@ Module {
Property { name: "__scrollBarTopMargin"; type: "int" }
Property { name: "__viewTopMargin"; type: "int" }
Property { name: "style"; type: "QQmlComponent"; isPointer: true }
- Property { name: "__style"; type: "Style_QMLTYPE_1"; isPointer: true }
+ Property { name: "__style"; type: "Style_QMLTYPE_2"; isPointer: true }
Property { name: "horizontalScrollBarPolicy"; type: "int" }
Property { name: "verticalScrollBarPolicy"; type: "int" }
Property { name: "viewport"; type: "QQuickItem"; isReadonly: true; isPointer: true }
Property { name: "flickableItem"; type: "QQuickFlickable"; isReadonly: true; isPointer: true }
Property {
name: "__scroller"
- type: "ScrollViewHelper_QMLTYPE_26"
+ type: "ScrollViewHelper_QMLTYPE_27"
isReadonly: true
isPointer: true
}
@@ -2757,13 +2842,13 @@ Module {
Property { name: "__wheelAreaScrollSpeed"; type: "double" }
Property {
name: "__horizontalScrollBar"
- type: "ScrollBar_QMLTYPE_22"
+ type: "ScrollBar_QMLTYPE_23"
isReadonly: true
isPointer: true
}
Property {
name: "__verticalScrollBar"
- type: "ScrollBar_QMLTYPE_22"
+ type: "ScrollBar_QMLTYPE_23"
isReadonly: true
isPointer: true
}
diff --git a/src/controls/qquickmenupopupwindow.cpp b/src/controls/qquickmenupopupwindow.cpp
index 937a5ea5..fb231510 100644
--- a/src/controls/qquickmenupopupwindow.cpp
+++ b/src/controls/qquickmenupopupwindow.cpp
@@ -182,7 +182,7 @@ bool QQuickMenuPopupWindow1::shouldForwardEventAfterDismiss(QMouseEvent *e) cons
{
// If the event falls inside this item the event should not be forwarded.
// For example for comboboxes or top menus of the menubar
- QQuickMenuBar1 *mb = m_menu ? m_menu->menuBar() : Q_NULLPTR;
+ QQuickMenuBar1 *mb = m_menu ? m_menu->menuBar() : nullptr;
QQuickItem *item = mb && !mb->isNative() ? mb->contentItem() : menu()->visualItem();
QWindow *window = transientParent();
if (item && window && item->window() == window) {
diff --git a/src/controls/qquickpopupwindow_p.h b/src/controls/qquickpopupwindow_p.h
index 1725bbe0..35c9df26 100644
--- a/src/controls/qquickpopupwindow_p.h
+++ b/src/controls/qquickpopupwindow_p.h
@@ -71,12 +71,12 @@ Q_SIGNALS:
void geometryChanged();
protected:
- void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *) Q_DECL_OVERRIDE;
- void exposeEvent(QExposeEvent *) Q_DECL_OVERRIDE;
- void hideEvent(QHideEvent *) Q_DECL_OVERRIDE;
- bool event(QEvent *) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *) override;
+ void mouseReleaseEvent(QMouseEvent *) override;
+ void mouseMoveEvent(QMouseEvent *) override;
+ void exposeEvent(QExposeEvent *) override;
+ void hideEvent(QHideEvent *) override;
+ bool event(QEvent *) override;
virtual bool shouldForwardEventAfterDismiss(QMouseEvent *) const;
protected Q_SLOTS:
diff --git a/src/dialogs/dialogs.pro b/src/dialogs/dialogs.pro
index ca5f408e..362f5584 100644
--- a/src/dialogs/dialogs.pro
+++ b/src/dialogs/dialogs.pro
@@ -3,7 +3,7 @@ requires(contains(QT_CONFIG, accessibility))
CXX_MODULE = qml
TARGET = dialogplugin
TARGETPATH = QtQuick/Dialogs
-IMPORT_VERSION = 1.2
+IMPORT_VERSION = 1.3
QMAKE_DOCS = $$PWD/doc/qtquickdialogs.qdocconf
diff --git a/src/dialogs/doc/qtquickdialogs.qdocconf b/src/dialogs/doc/qtquickdialogs.qdocconf
index ccb555a7..c617e27d 100644
--- a/src/dialogs/doc/qtquickdialogs.qdocconf
+++ b/src/dialogs/doc/qtquickdialogs.qdocconf
@@ -28,6 +28,8 @@ exampledirs += ../../../examples/quickcontrols/dialogs
examplesinstallpath = quickcontrols/dialogs
+manifestmeta.highlighted.names = "QtQuickDialogs/Qt Quick System Dialog Examples"
+
headerdirs += ..
sourcedirs += ..
diff --git a/src/dialogs/plugin.cpp b/src/dialogs/plugin.cpp
index a2fb1099..2e861fa5 100644
--- a/src/dialogs/plugin.cpp
+++ b/src/dialogs/plugin.cpp
@@ -72,7 +72,7 @@ static void initResources()
QT_BEGIN_NAMESPACE
/*!
- \qmlmodule QtQuick.Dialogs 1.2
+ \qmlmodule QtQuick.Dialogs 1.3
\title Qt Quick Dialogs QML Types
\ingroup qmlmodules
\brief Provides QML types for standard file, color picker and message dialogs
@@ -82,7 +82,7 @@ QT_BEGIN_NAMESPACE
To use the types in this module, import the module with the following line:
\code
- import QtQuick.Dialogs 1.2
+ import QtQuick.Dialogs 1.3
\endcode
*/
@@ -185,6 +185,7 @@ public:
#endif
qCDebug(lcRegistration) << " registering" << dialogQmlPath << "as Dialog";
qmlRegisterType(dialogQmlPath, uri, 1, 2, "Dialog");
+ qmlRegisterType(dialogQmlPath, uri, 1, 3, "Dialog");
}
}
diff --git a/src/dialogs/qquickabstractfiledialog.cpp b/src/dialogs/qquickabstractfiledialog.cpp
index 722838e2..7c4aa394 100644
--- a/src/dialogs/qquickabstractfiledialog.cpp
+++ b/src/dialogs/qquickabstractfiledialog.cpp
@@ -316,4 +316,12 @@ QJSValue QQuickAbstractFileDialog::__shortcuts()
return m_shortcutDetails;
}
+void QQuickAbstractFileDialog::setDefaultSuffix(const QString &suffix)
+{
+ if (suffix == m_options->defaultSuffix())
+ return;
+ m_options->setDefaultSuffix(suffix);
+ emit defaultSuffixChanged();
+}
+
QT_END_NAMESPACE
diff --git a/src/dialogs/qquickabstractfiledialog_p.h b/src/dialogs/qquickabstractfiledialog_p.h
index 84816d38..e00db5be 100644
--- a/src/dialogs/qquickabstractfiledialog_p.h
+++ b/src/dialogs/qquickabstractfiledialog_p.h
@@ -74,6 +74,7 @@ class QQuickAbstractFileDialog : public QQuickAbstractDialog
Q_PROPERTY(QUrl fileUrl READ fileUrl NOTIFY selectionAccepted)
Q_PROPERTY(QList<QUrl> fileUrls READ fileUrls NOTIFY selectionAccepted)
Q_PROPERTY(bool sidebarVisible READ sidebarVisible WRITE setSidebarVisible NOTIFY sidebarVisibleChanged)
+ Q_PROPERTY(QString defaultSuffix READ defaultSuffix WRITE setDefaultSuffix NOTIFY defaultSuffixChanged)
Q_PROPERTY(QJSValue shortcuts READ shortcuts CONSTANT) // map of QStandardDirectory names to QUrls
Q_PROPERTY(QJSValue __shortcuts READ __shortcuts CONSTANT) // map of details for QML dialog implementations
@@ -95,6 +96,7 @@ public:
bool sidebarVisible() const { return m_sidebarVisible; }
QJSValue shortcuts();
QJSValue __shortcuts();
+ QString defaultSuffix() const { return m_options->defaultSuffix(); }
public Q_SLOTS:
void setVisible(bool v);
@@ -107,6 +109,7 @@ public Q_SLOTS:
void selectNameFilter(const QString &f);
void setSelectedNameFilterIndex(int idx);
void setSidebarVisible(bool s);
+ void setDefaultSuffix(const QString &suffix);
Q_SIGNALS:
void folderChanged();
@@ -115,6 +118,7 @@ Q_SIGNALS:
void fileModeChanged();
void selectionAccepted();
void sidebarVisibleChanged();
+ void defaultSuffixChanged();
protected Q_SLOTS:
void updateFolder(const QUrl &f);
diff --git a/src/dialogs/qquickfiledialog_p.h b/src/dialogs/qquickfiledialog_p.h
index 5614e939..ae608d75 100644
--- a/src/dialogs/qquickfiledialog_p.h
+++ b/src/dialogs/qquickfiledialog_p.h
@@ -64,14 +64,14 @@ class QQuickFileDialog : public QQuickAbstractFileDialog
public:
explicit QQuickFileDialog(QObject *parent = 0);
~QQuickFileDialog();
- virtual QList<QUrl> fileUrls() const Q_DECL_OVERRIDE;
+ QList<QUrl> fileUrls() const override;
public Q_SLOTS:
void clearSelection();
bool addSelection(const QUrl &path);
protected:
- virtual QPlatformFileDialogHelper *helper() Q_DECL_OVERRIDE { return 0; }
+ QPlatformFileDialogHelper *helper() override { return 0; }
Q_INVOKABLE QString urlToPath(const QUrl &url) { return url.toLocalFile(); }
Q_INVOKABLE QUrl pathToUrl(const QString &path) { return QUrl::fromLocalFile(path); }
Q_INVOKABLE QUrl pathFolder(const QString &path);
diff --git a/src/dialogs/qquickplatformfiledialog.cpp b/src/dialogs/qquickplatformfiledialog.cpp
index ab228d1f..b30f2b2b 100644
--- a/src/dialogs/qquickplatformfiledialog.cpp
+++ b/src/dialogs/qquickplatformfiledialog.cpp
@@ -422,4 +422,18 @@ void QQuickPlatformFileDialog::accept()
\l {Qt.labs.settings}{Settings}.
*/
+/*!
+ \qmlproperty string FileDialog::defaultSuffix
+ \since 5.10
+
+ This property holds the suffix added to the filename if no other suffix was
+ specified.
+
+ This property specifies a string that will be added to the filename if it
+ has no suffix already. The suffix is typically used to indicate the file
+ type (e.g. "txt" indicates a text file).
+
+ If the first character is a dot ('.'), it is removed.
+*/
+
QT_END_NAMESPACE
diff --git a/src/dialogs/qquickplatformfiledialog_p.h b/src/dialogs/qquickplatformfiledialog_p.h
index 419843f4..600e9336 100644
--- a/src/dialogs/qquickplatformfiledialog_p.h
+++ b/src/dialogs/qquickplatformfiledialog_p.h
@@ -62,12 +62,12 @@ class QQuickPlatformFileDialog : public QQuickFileDialog
public:
QQuickPlatformFileDialog(QObject *parent = 0);
virtual ~QQuickPlatformFileDialog();
- virtual void setModality(Qt::WindowModality m) Q_DECL_OVERRIDE;
- virtual QList<QUrl> fileUrls() const Q_DECL_OVERRIDE;
+ void setModality(Qt::WindowModality m) override;
+ QList<QUrl> fileUrls() const override;
protected:
- QPlatformFileDialogHelper *helper() Q_DECL_OVERRIDE;
- virtual void accept() override;
+ QPlatformFileDialogHelper *helper() override;
+ void accept() override;
Q_DISABLE_COPY(QQuickPlatformFileDialog)
};
diff --git a/src/extras/Private/qquickmathutils.cpp b/src/extras/Private/qquickmathutils.cpp
index 165a6f92..e40d8b6f 100644
--- a/src/extras/Private/qquickmathutils.cpp
+++ b/src/extras/Private/qquickmathutils.cpp
@@ -55,7 +55,7 @@ qreal QQuickMathUtils::pi2() const
Converts the angle \a degrees to radians.
*/
qreal QQuickMathUtils::degToRad(qreal degrees) const {
- return degrees * (M_PI / 180);
+ return qDegreesToRadians(degrees);
}
/*!
@@ -68,14 +68,14 @@ qreal QQuickMathUtils::degToRad(qreal degrees) const {
for example.
*/
qreal QQuickMathUtils::degToRadOffset(qreal degrees) const {
- return (degrees - 90) * (M_PI / 180);
+ return qDegreesToRadians(degrees - 90);
}
/*!
Converts the angle \a radians to degrees.
*/
qreal QQuickMathUtils::radToDeg(qreal radians) const {
- return radians * (180 / M_PI);
+ return qRadiansToDegrees(radians);
}
/*!
@@ -88,7 +88,7 @@ qreal QQuickMathUtils::radToDeg(qreal radians) const {
expect.
*/
qreal QQuickMathUtils::radToDegOffset(qreal radians) const {
- return radians * (180 / M_PI) + 90;
+ return qRadiansToDegrees(radians) + 90;
}
/*!
diff --git a/src/extras/Styles/Flat/CalendarStyle.qml b/src/extras/Styles/Flat/CalendarStyle.qml
index 2598ce78..ece0548d 100644
--- a/src/extras/Styles/Flat/CalendarStyle.qml
+++ b/src/extras/Styles/Flat/CalendarStyle.qml
@@ -190,7 +190,7 @@ Base.CalendarStyle {
Label {
text: localeDayName.length == 0 || localeDayName.length > 1
- ? control.__locale.dayName(styleData.dayOfWeek, Locale.ShortFormat)[0]
+ ? control.locale.dayName(styleData.dayOfWeek, Locale.ShortFormat)[0]
: localeDayName
color: !control.enabled ? FlatStyle.disabledColor : FlatStyle.styleColor
opacity: !control.enabled ? FlatStyle.disabledOpacity : 1
@@ -202,7 +202,7 @@ Base.CalendarStyle {
font.pixelSize: control.height * __headerFontRatio
renderType: FlatStyle.__renderType
- property string localeDayName: control.__locale.dayName(styleData.dayOfWeek, Locale.NarrowFormat)
+ property string localeDayName: control.locale.dayName(styleData.dayOfWeek, Locale.NarrowFormat)
}
}
}
diff --git a/src/extras/Styles/Flat/qquicktexthandle.h b/src/extras/Styles/Flat/qquicktexthandle.h
index fa72786b..94df8e63 100644
--- a/src/extras/Styles/Flat/qquicktexthandle.h
+++ b/src/extras/Styles/Flat/qquicktexthandle.h
@@ -59,7 +59,7 @@ public:
QQuickTextHandle(QQuickItem *parent = 0);
~QQuickTextHandle();
- void paint(QPainter *painter) Q_DECL_OVERRIDE;
+ void paint(QPainter *painter) override;
TextHandleType type() const;
void setType(TextHandleType type);
diff --git a/src/extras/doc/qtquickextras.qdocconf b/src/extras/doc/qtquickextras.qdocconf
index 5c4dc472..4d6128db 100644
--- a/src/extras/doc/qtquickextras.qdocconf
+++ b/src/extras/doc/qtquickextras.qdocconf
@@ -43,3 +43,6 @@ imagedirs += images
navigation.landingpage = "Qt Quick Extras"
navigation.qmltypespage = "Qt Quick Extras QML Types"
+manifestmeta.highlighted.names = "QtQuickExtras/Qt Quick Extras - Dashboard" \
+ "QtQuickExtras/Qt Quick Extras - Flat" \
+ "QtQuickExtras/Qt Quick Extras - Gallery"
diff --git a/src/extras/doc/src/qtquickextras-examples.qdoc b/src/extras/doc/src/qtquickextras-examples.qdoc
index f54834fd..8ae35ef5 100644
--- a/src/extras/doc/src/qtquickextras-examples.qdoc
+++ b/src/extras/doc/src/qtquickextras-examples.qdoc
@@ -31,7 +31,7 @@
\title Qt Quick Extras Examples
\brief A collection of examples for \l{Qt Quick Extras}.
- Below is a listing of the examples for \l{Qt Quick Extras}.
+ Below you will find a list with examples for \l{Qt Quick Extras}.
*/
/*!
@@ -53,6 +53,41 @@
\image qtquickextras-example-dashboard.png
This example project demonstrates the use of \l CircularGauge to create a car dashboard.
+
+
+ The ValueSource type generates random data for testing the dashboard.
+ The data is random but there is a logical link between some of them,
+ for example, \c kph and \c rpm.
+
+
+ \snippet dashboard/qml/ValueSource.qml 0
+
+ It runs a looping SequentialAnimation that sets the values of
+ the properties over time.
+
+ The SequentialAnimation object consists of several ParallelAnimation
+ objects, which in turn consist of two NumberAnimations, one for
+ \c kph and one for \c rpm. Both let the value develop to a certain
+ value over a specified \c duration with the Easing type \c Easing.InOutSine
+
+ \snippet dashboard/qml/ValueSource.qml 1
+
+ The flashTimer object switches the turn signals \c on or \c off.
+
+ \snippet dashboard/qml/TurnIndicator.qml 1
+
+ The \c paintOutlinePath(ctx) method does the actual painting of the arrow
+ for the turn signal.
+
+ \snippet dashboard/qml/TurnIndicator.qml 2
+
+ The screen consists of a \c foregroundCanvas and a \c backgroundCanvas.
+ \c foregroundCanvas displays the green turn signal if the \c on and
+ \c flashing booleans are \c true.
+
+ \snippet dashboard/qml/TurnIndicator.qml 3
+*/
+
*/
/*!
diff --git a/src/extras/plugin.cpp b/src/extras/plugin.cpp
index 5133a4ac..68d6ca16 100644
--- a/src/extras/plugin.cpp
+++ b/src/extras/plugin.cpp
@@ -99,22 +99,12 @@ void QtQuickExtrasPlugin::registerTypes(const char *uri)
#if QT_CONFIG(picture)
qmlRegisterType<QQuickPicture>(uri, 1, 4, "Picture");
#endif
-}
-void QtQuickExtrasPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
-{
- Q_UNUSED(uri);
- Q_UNUSED(engine);
qmlRegisterType<QQuickMouseThief>("QtQuick.Extras.Private.CppUtils", 1, 0, "MouseThief");
qmlRegisterType<QQuickCircularProgressBar>("QtQuick.Extras.Private.CppUtils", 1, 1, "CircularProgressBar");
qmlRegisterType<QQuickFlatProgressBar>("QtQuick.Extras.Private.CppUtils", 1, 1, "FlatProgressBar");
qmlRegisterSingletonType<QQuickMathUtils>("QtQuick.Extras.Private.CppUtils", 1, 0, "MathUtils", registerMathUtilsSingleton);
-#ifndef QT_STATIC
- const QString prefix = baseUrl().toString();
-#else
- const QString prefix = "qrc:/qt-project.org/imports/QtQuick/Extras";
-#endif
const char *private_uri = "QtQuick.Extras.Private";
qmlRegisterType(QUrl(prefix + "/Private/CircularButton.qml"), private_uri, 1, 0, "CircularButton");
qmlRegisterType(QUrl(prefix + "/Private/CircularButtonStyleHelper.qml"), private_uri, 1, 0, "CircularButtonStyleHelper");
diff --git a/src/extras/plugin.h b/src/extras/plugin.h
index 05855f49..5f0a380e 100644
--- a/src/extras/plugin.h
+++ b/src/extras/plugin.h
@@ -54,7 +54,6 @@ public:
explicit QtQuickExtrasPlugin(QObject *parent = 0);
void registerTypes(const char *uri);
- void initializeEngine(QQmlEngine *engine, const char *uri);
};
QT_END_NAMESPACE
diff --git a/src/extras/qquickpicture_p.h b/src/extras/qquickpicture_p.h
index 9c16a232..fe1227a0 100644
--- a/src/extras/qquickpicture_p.h
+++ b/src/extras/qquickpicture_p.h
@@ -55,7 +55,7 @@ public:
explicit QQuickPicture(QQuickItem *parent = 0);
~QQuickPicture();
- void paint(QPainter *painter) Q_DECL_OVERRIDE;
+ void paint(QPainter *painter) override;
QUrl source() const;
void setSource(const QUrl &source);
diff --git a/src/widgets/qquickqfiledialog_p.h b/src/widgets/qquickqfiledialog_p.h
index 9e20ae88..d977e345 100644
--- a/src/widgets/qquickqfiledialog_p.h
+++ b/src/widgets/qquickqfiledialog_p.h
@@ -66,10 +66,10 @@ public:
QQuickQFileDialog(QObject *parent = 0);
virtual ~QQuickQFileDialog();
- virtual QList<QUrl> fileUrls() const Q_DECL_OVERRIDE;
+ QList<QUrl> fileUrls() const override;
protected:
- QPlatformFileDialogHelper *helper() Q_DECL_OVERRIDE;
+ QPlatformFileDialogHelper *helper() override;
Q_DISABLE_COPY(QQuickQFileDialog)
};
@@ -80,17 +80,17 @@ class QFileDialogHelper : public QPlatformFileDialogHelper
public:
QFileDialogHelper();
- bool defaultNameFilterDisables() const Q_DECL_OVERRIDE { return true; }
- void setDirectory(const QUrl &dir) Q_DECL_OVERRIDE { m_dialog.setDirectoryUrl(dir); }
- QUrl directory() const Q_DECL_OVERRIDE { return m_dialog.directoryUrl(); }
- void selectFile(const QUrl &f) Q_DECL_OVERRIDE { m_dialog.selectUrl(f); }
- QList<QUrl> selectedFiles() const Q_DECL_OVERRIDE;
- void setFilter() Q_DECL_OVERRIDE;
- void selectNameFilter(const QString &f) Q_DECL_OVERRIDE { m_dialog.selectNameFilter(f); }
- QString selectedNameFilter() const Q_DECL_OVERRIDE { return m_dialog.selectedNameFilter(); }
- void exec() Q_DECL_OVERRIDE { m_dialog.exec(); }
- bool show(Qt::WindowFlags f, Qt::WindowModality m, QWindow *parent) Q_DECL_OVERRIDE;
- void hide() Q_DECL_OVERRIDE { m_dialog.hide(); }
+ bool defaultNameFilterDisables() const override { return true; }
+ void setDirectory(const QUrl &dir) override { m_dialog.setDirectoryUrl(dir); }
+ QUrl directory() const override { return m_dialog.directoryUrl(); }
+ void selectFile(const QUrl &f) override { m_dialog.selectUrl(f); }
+ QList<QUrl> selectedFiles() const override;
+ void setFilter() override;
+ void selectNameFilter(const QString &f) override { m_dialog.selectNameFilter(f); }
+ QString selectedNameFilter() const override { return m_dialog.selectedNameFilter(); }
+ void exec() override { m_dialog.exec(); }
+ bool show(Qt::WindowFlags f, Qt::WindowModality m, QWindow *parent) override;
+ void hide() override { m_dialog.hide(); }
private Q_SLOTS:
void currentChanged(const QString& path);
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index f3b76771..14860dc0 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -2,6 +2,3 @@ TEMPLATE = subdirs
SUBDIRS += testplugin controls activeFocusOnTab applicationwindow dialogs \
extras qquicktreemodeladaptor customcontrolsstyle
controls.depends = testplugin
-
-# QTBUG-60268
-boot2qt: SUBDIRS -= controls activeFocusOnTab applicationwindow dialogs extras customcontrolsstyle
diff --git a/tests/auto/controls/data/tst_calendar.qml b/tests/auto/controls/data/tst_calendar.qml
index d47f62ba..17b2b9b4 100644
--- a/tests/auto/controls/data/tst_calendar.qml
+++ b/tests/auto/controls/data/tst_calendar.qml
@@ -135,7 +135,7 @@ Item {
compare(calendar.selectedDate.getDate(), expectedDate.getDate());
compare(calendar.frameVisible, true);
compare(calendar.dayOfWeekFormat, Locale.ShortFormat);
- compare(calendar.__locale, Qt.locale());
+ compare(calendar.locale, Qt.locale());
}
function test_setAfterConstructed() {
@@ -144,13 +144,13 @@ Item {
calendar.selectedDate = new Date(1980, 0, 1);
calendar.frameVisible = false;
calendar.dayOfWeekFormat = Locale.NarrowFormat;
- calendar.__locale = Qt.locale("de_DE");
+ calendar.locale = Qt.locale("de_DE");
compare(calendar.minimumDate, new Date(1900, 0, 1));
compare(calendar.maximumDate, new Date(1999, 11, 31));
compare(calendar.selectedDate, new Date(1980, 0, 1));
compare(calendar.frameVisible, false);
- compare(calendar.__locale, Qt.locale("de_DE"));
+ compare(calendar.locale, Qt.locale("de_DE"));
}
function test_selectedDate() {
@@ -208,7 +208,7 @@ Item {
calendar.selectedDate = new Date(2013, 0, 1);
// Set this to a certain locale, because days will be in different
// places depending on the system locale of the host machine.
- calendar.__locale = Qt.locale("en_GB");
+ calendar.locale = Qt.locale("en_GB");
/* January 2013 December 2012
M T W T F S S M T W T F S S
@@ -374,7 +374,7 @@ Item {
var startDate = new Date(2013, 0, 1);
calendar.selectedDate = startDate;
- calendar.__locale = Qt.locale("en_US");
+ calendar.locale = Qt.locale("en_US");
compare(calendar.selectedDate, startDate);
pressedSignalSpy.target = calendar;
@@ -414,6 +414,9 @@ Item {
compare(calendar.selectedDate.getDate(), expectedDate.getDate());
compare(calendar.__panel.pressedCellIndex, cellIndex);
compare(pressedSignalSpy.count, 1);
+ compare(pressedSignalSpy.signalArguments[0][0].getFullYear(), expectedDate.getFullYear());
+ compare(pressedSignalSpy.signalArguments[0][0].getMonth(), expectedDate.getMonth());
+ compare(pressedSignalSpy.signalArguments[0][0].getDate(), expectedDate.getDate());
compare(releasedSignalSpy.count, 0);
compare(clickedSignalSpy.count, 0);
@@ -421,7 +424,14 @@ Item {
compare(calendar.__panel.pressedCellIndex, -1);
compare(pressedSignalSpy.count, 1);
compare(releasedSignalSpy.count, 1);
+ // Will fail
+// compare(releasedSignalSpy.signalArguments[0][0].getFullYear(), expectedDate.getFullYear());
+// compare(releasedSignalSpy.signalArguments[0][0].getMonth(), expectedDate.getMonth());
+// compare(releasedSignalSpy.signalArguments[0][0].getDate(), expectedDate.getDate());
compare(clickedSignalSpy.count, 1);
+ compare(clickedSignalSpy.signalArguments[0][0].getFullYear(), expectedDate.getFullYear());
+ compare(clickedSignalSpy.signalArguments[0][0].getMonth(), expectedDate.getMonth());
+ compare(clickedSignalSpy.signalArguments[0][0].getDate(), expectedDate.getDate());
pressedSignalSpy.clear();
releasedSignalSpy.clear();
@@ -466,7 +476,7 @@ Item {
calendar.minimumDate = new Date(2013, 0, 1);
calendar.selectedDate = new Date(startDate);
calendar.maximumDate = new Date(2013, 1, 5);
- calendar.__locale = Qt.locale("no_NO");
+ calendar.locale = Qt.locale("no_NO");
pressedSignalSpy.target = calendar;
pressedSignalSpy.signalName = "pressed";
@@ -540,7 +550,7 @@ Item {
22 23 24 25 26 27 28
29 30 31 1 2 3 4 */
- calendar.__locale = Qt.locale("en_GB");
+ calendar.locale = Qt.locale("en_GB");
calendar.selectedDate = new Date(2014, 11, 1);
mousePress(calendar, toPixelsX(0), toPixelsY(0), Qt.LeftButton);
compare(calendar.selectedDate.getFullYear(), 2014);
@@ -615,7 +625,7 @@ Item {
calendar.minimumDate = new Date(2014, 1, 1);
calendar.selectedDate = new Date(2014, 1, 28);
calendar.maximumDate = new Date(2014, 2, 31);
- calendar.__locale = Qt.locale("en_GB");
+ calendar.locale = Qt.locale("en_GB");
pressedSignalSpy.target = calendar;
pressedSignalSpy.signalName = "pressed";
@@ -890,7 +900,7 @@ Item {
function test_pressAndHold() {
calendar.selectedDate = new Date(2013, 0, 1);
- calendar.__locale = Qt.locale("en_GB");
+ calendar.locale = Qt.locale("en_GB");
pressedSignalSpy.target = calendar;
pressedSignalSpy.signalName = "pressed";
diff --git a/tests/auto/controls/data/tst_checkbox.qml b/tests/auto/controls/data/tst_checkbox.qml
index 675a1e7e..0c1385a2 100644
--- a/tests/auto/controls/data/tst_checkbox.qml
+++ b/tests/auto/controls/data/tst_checkbox.qml
@@ -239,7 +239,7 @@ Item {
signalSpy.signalName = "clicked";
compare(signalSpy.count, 0);
- mouseClick(root.checkBox2, root.checkBox2.x, root.checkBox2.y, Qt.LeftButton);
+ mouseClick(root.checkBox2);
compare(signalSpy.count, 1);
compare(root.checkBox1.checked, false);
compare(root.checkBox2.checked, true);
@@ -249,7 +249,7 @@ Item {
signalSpy.signalName = "clicked";
compare(signalSpy.count, 0);
- mouseClick(root.checkBox1, root.checkBox1.x, root.checkBox1.y, Qt.LeftButton);
+ mouseClick(root.checkBox1);
compare(signalSpy.count, 1);
compare(root.checkBox1.checked, true);
compare(root.checkBox2.checked, false);
diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml
index d6a5f6c3..415d3ad3 100644
--- a/tests/auto/controls/data/tst_combobox.qml
+++ b/tests/auto/controls/data/tst_combobox.qml
@@ -192,7 +192,7 @@ TestCase {
}
function test_append_find() {
- var comboBox = Qt.createQmlObject( 'import QtQuick.Controls 1.2; \
+ var comboBox = Qt.createQmlObject( 'import QtQuick.Controls 1.2; \
import QtQuick 2.2; \
ComboBox { \
model:ListModel{ListElement{text:"first"}} \
@@ -502,8 +502,9 @@ TestCase {
mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1)
verify(!comboBox.activeFocus)
comboBox.activeFocusOnPress = true
- // two mouse clicks to open and close the popup menu
- mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1)
+ // two mouse clicks to open and close the popup menu. The 1ms delay between mouse presses is
+ // needed with software quick renderer. Without the delay, this test is flaky.
+ mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1, Qt.LeftButton, Qt.NoModifier, 1)
mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1)
verify(comboBox.activeFocus)
comboBox.destroy()
diff --git a/tests/auto/controls/data/tst_radiobutton.qml b/tests/auto/controls/data/tst_radiobutton.qml
index a50acac6..fedc3d4d 100644
--- a/tests/auto/controls/data/tst_radiobutton.qml
+++ b/tests/auto/controls/data/tst_radiobutton.qml
@@ -112,20 +112,20 @@ Item {
signalSpy.signalName = "clicked"
signalSpy.target = radioButton;
compare(signalSpy.count, 0);
- mouseClick(radioButton, radioButton.x, radioButton.y, Qt.LeftButton);
+ mouseClick(radioButton);
compare(signalSpy.count, 1);
compare(radioButton.checked, true);
// Clicking outside should do nothing.
- mouseClick(radioButton, radioButton.x - 1, radioButton.y, Qt.LeftButton);
+ mouseClick(radioButton, -1, 0, Qt.LeftButton);
compare(signalSpy.count, 1);
compare(radioButton.checked, true);
- mouseClick(radioButton, radioButton.x, radioButton.y - 1, Qt.LeftButton);
+ mouseClick(radioButton, 0, -1, Qt.LeftButton);
compare(signalSpy.count, 1);
compare(radioButton.checked, true);
- mouseClick(radioButton, radioButton.x - 1, radioButton.y - 1, Qt.LeftButton);
+ mouseClick(radioButton, -1, -1, Qt.LeftButton);
compare(signalSpy.count, 1);
compare(radioButton.checked, true);
}
@@ -170,7 +170,7 @@ Item {
signalSpy.signalName = "clicked";
compare(signalSpy.count, 0);
- mouseClick(root.radioButton2, root.radioButton2.x, root.radioButton2.y, Qt.LeftButton);
+ mouseClick(root.radioButton2);
compare(signalSpy.count, 1);
compare(root.radioButton1.checked, false);
compare(root.radioButton2.checked, true);
@@ -180,7 +180,7 @@ Item {
signalSpy.signalName = "clicked";
compare(signalSpy.count, 0);
- mouseClick(root.radioButton1, root.radioButton1.x, root.radioButton1.y, Qt.LeftButton);
+ mouseClick(root.radioButton1);
compare(signalSpy.count, 1);
compare(root.radioButton1.checked, true);
compare(root.radioButton2.checked, false);
diff --git a/tests/auto/controls/data/tst_slider.qml b/tests/auto/controls/data/tst_slider.qml
index 34627daa..e95d26d9 100644
--- a/tests/auto/controls/data/tst_slider.qml
+++ b/tests/auto/controls/data/tst_slider.qml
@@ -51,7 +51,7 @@
import QtQuick 2.6
import QtTest 1.0
import QtQuickControlsTests 1.0
-import QtQuick.Controls 1.4
+import QtQuick.Controls 1.6
import QtQuick.Controls.Private 1.0
import QtQuick.Controls.Styles 1.4
@@ -136,8 +136,22 @@ Item {
slider.destroy()
}
+ Component {
+ id: fixedHandleSizeSlider
+
+ Slider {
+ style: SliderStyle {
+ handle: Rectangle {
+ color: "red"
+ implicitWidth: 15
+ implicitHeight: 15
+ }
+ }
+ }
+ }
+
function test_mouseWheel() {
- var slider = Qt.createQmlObject('import QtQuick.Controls 1.2; Slider {}', container, '');
+ var slider = createTemporaryObject(fixedHandleSizeSlider, container)
slider.forceActiveFocus()
slider.value = 0
slider.maximumValue = 300
@@ -176,7 +190,12 @@ Item {
slider.value = 0
mouseWheel(slider, 5, 5, -40 * ratio, 0)
compare(slider.value, slider.maximumValue)
- slider.destroy()
+
+ // Mousewheel deactivated
+ slider.value = 0
+ slider.wheelEnabled = false
+ mouseWheel(slider, 5, 5, 4 * ratio, 0)
+ compare(slider.value, 0)
}
function test_activeFocusOnPress(){
diff --git a/tests/auto/customcontrolsstyle/tst_customcontrolsstyle.cpp b/tests/auto/customcontrolsstyle/tst_customcontrolsstyle.cpp
index 67aeb586..42354efd 100644
--- a/tests/auto/customcontrolsstyle/tst_customcontrolsstyle.cpp
+++ b/tests/auto/customcontrolsstyle/tst_customcontrolsstyle.cpp
@@ -68,6 +68,9 @@ void tst_customcontrolsstyle::style_data()
void tst_customcontrolsstyle::style()
{
+ if (QGuiApplication::platformName() == "offscreen")
+ QSKIP("Using grabImage does not work on offscreen platform");
+
QFETCH(QString, specifiedStyle);
QFETCH(QString, expectedStyleName);
@@ -109,6 +112,9 @@ void tst_customcontrolsstyle::style()
// start with Base, switch to custom style later on (for a specific QML engine)
void tst_customcontrolsstyle::changeStyle()
{
+ if (QGuiApplication::platformName() == "offscreen")
+ QSKIP("Using grabImage does not work on offscreen platform");
+
qputenv("QT_QUICK_CONTROLS_1_STYLE", "Base");
QByteArray importPath = qgetenv("QML2_IMPORT_PATH");
if (importPath.isEmpty())
diff --git a/tests/auto/dialogs/tst_dialogs.cpp b/tests/auto/dialogs/tst_dialogs.cpp
index 20da6e43..1f802113 100644
--- a/tests/auto/dialogs/tst_dialogs.cpp
+++ b/tests/auto/dialogs/tst_dialogs.cpp
@@ -56,6 +56,7 @@ private slots:
void fileDialogDefaultModality();
void fileDialogNonModal();
void fileDialogNameFilters();
+ void fileDialogDefaultSuffix();
private:
};
@@ -207,6 +208,28 @@ void tst_dialogs::fileDialogNameFilters()
QCOMPARE(dlg->property("selectedNameFilter").toString(), filters.first());
}
+void tst_dialogs::fileDialogDefaultSuffix()
+{
+ QQuickView *window = new QQuickView;
+ QScopedPointer<QQuickWindow> cleanup(window);
+
+ const QUrl sourceUrl = testFileUrl("RectWithFileDialog.qml");
+ window->setSource(sourceUrl);
+ window->setGeometry(240, 240, 1024, 320);
+ window->show();
+ QTRY_VERIFY(QTest::qWaitForWindowExposed(window));
+ QVERIFY(window->rootObject());
+
+ QObject *dlg = qvariant_cast<QObject *>(window->rootObject()->property("fileDialog"));
+ QCOMPARE(dlg->property("defaultSuffix").toString(), QString());
+ dlg->setProperty("defaultSuffix", "txt");
+ QCOMPARE(dlg->property("defaultSuffix").toString(), QString("txt"));
+ dlg->setProperty("defaultSuffix", ".txt");
+ QCOMPARE(dlg->property("defaultSuffix").toString(), QString("txt"));
+ dlg->setProperty("defaultSuffix", QString());
+ QCOMPARE(dlg->property("defaultSuffix").toString(), QString());
+}
+
QTEST_MAIN(tst_dialogs)
#include "tst_dialogs.moc"
diff --git a/tests/auto/extras/data/tst_picture.qml b/tests/auto/extras/data/tst_picture.qml
index e11d28fb..9ecc89be 100644
--- a/tests/auto/extras/data/tst_picture.qml
+++ b/tests/auto/extras/data/tst_picture.qml
@@ -107,6 +107,9 @@ TestCase {
}
function test_source(data) {
+ if (Qt.platform.pluginName === "offscreen")
+ skip("Using grabImage does not work on offscreen platform");
+
picture = Qt.createQmlObject("import QtQuick.Extras 1.4; Picture {}", testCase, "");
verify(picture, "Picture: failed to create an instance");
picture.source = data.tag;
@@ -134,6 +137,9 @@ TestCase {
}
function test_color(data) {
+ if (Qt.platform.pluginName === "offscreen")
+ skip("Using grabImage does not work on offscreen platform");
+
picture = Qt.createQmlObject("import QtQuick.Extras 1.4; Picture {}", testCase, "");
verify(picture, "Picture: failed to create an instance");
diff --git a/tests/auto/extras/data/tst_statusindicator.qml b/tests/auto/extras/data/tst_statusindicator.qml
index 257ec715..8801ead7 100644
--- a/tests/auto/extras/data/tst_statusindicator.qml
+++ b/tests/auto/extras/data/tst_statusindicator.qml
@@ -90,6 +90,9 @@ TestCase {
}
function test_active(data) {
+ if (Qt.platform.pluginName === "offscreen")
+ skip("Using grabImage does not work on offscreen platform");
+
indicator = Qt.createQmlObject("import QtQuick.Extras 1.4; StatusIndicator { }", testCase, "");
verify(indicator);
compare(indicator.active, false);
@@ -106,6 +109,9 @@ TestCase {
}
function test_color() {
+ if (Qt.platform.pluginName === "offscreen")
+ skip("Using grabImage does not work on offscreen platform");
+
var flatStyle = Settings.styleName === "Flat";
indicator = Qt.createQmlObject("import QtQuick.Extras 1.4; StatusIndicator { }", testCase, "");
diff --git a/tests/manual/viewinqwidget/main.qml b/tests/manual/viewinqwidget/main.qml
index 36c09b50..e50e7712 100644
--- a/tests/manual/viewinqwidget/main.qml
+++ b/tests/manual/viewinqwidget/main.qml
@@ -28,14 +28,24 @@
import QtQuick 2.2
import QtQuick.Controls 1.3
+import QtQuick.Layouts 1.3
Item {
visible: true
width: 200
height: 200
- ComboBox {
- anchors.centerIn: parent
- model: [ "Banana", "Apple", "Coconut" ]
+ ColumnLayout {
+ anchors.fill: parent
+
+ TextField {
+ Layout.alignment: Qt.AlignCenter
+ text : "Text with context menu"
+ }
+
+ ComboBox {
+ Layout.alignment: Qt.AlignCenter
+ model: [ "Banana", "Apple", "Coconut" ]
+ }
}
}