diff options
38 files changed, 182 insertions, 202 deletions
diff --git a/.qmake.conf b/.qmake.conf index df2fb45e..1ee23b1b 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -4,4 +4,4 @@ android|ios|qnx|isEmpty(QT.widgets.name): CONFIG += no_desktop DEFINES += QT_NO_FOREACH QT_NO_JAVA_STYLE_ITERATORS QT_NO_LINKED_LIST -MODULE_VERSION = 5.14.2 +MODULE_VERSION = 5.15.0 diff --git a/examples/quickcontrols/controls/uiforms/qml/History.qml b/examples/quickcontrols/controls/uiforms/qml/History.qml index be7a5808..031f35be 100644 --- a/examples/quickcontrols/controls/uiforms/qml/History.qml +++ b/examples/quickcontrols/controls/uiforms/qml/History.qml @@ -79,7 +79,7 @@ HistoryForm { Connections { target: CustomerModel.selection - onSelectionChanged: form.readData() + function onSelectionChanged() { form.readData() } } Component.onCompleted: readData() diff --git a/examples/quickcontrols/controls/uiforms/qml/Notes.qml b/examples/quickcontrols/controls/uiforms/qml/Notes.qml index c7f326f7..ae89482f 100644 --- a/examples/quickcontrols/controls/uiforms/qml/Notes.qml +++ b/examples/quickcontrols/controls/uiforms/qml/Notes.qml @@ -79,7 +79,7 @@ NotesForm { Connections { target: CustomerModel.selection - onSelectionChanged: form.readData() + function onSelectionChanged() { form.readData() } } Component.onCompleted: readData() diff --git a/examples/quickcontrols/controls/uiforms/qml/Settings.qml b/examples/quickcontrols/controls/uiforms/qml/Settings.qml index eefab2a1..1c3741ac 100644 --- a/examples/quickcontrols/controls/uiforms/qml/Settings.qml +++ b/examples/quickcontrols/controls/uiforms/qml/Settings.qml @@ -99,7 +99,7 @@ SettingsForm { Connections { target: CustomerModel.selection - onSelectionChanged: form.readData() + function onSelectionChanged() { form.readData() } } Component.onCompleted: readData() diff --git a/examples/quickcontrols/extras/gallery/qml/CircularGaugeView.qml b/examples/quickcontrols/extras/gallery/qml/CircularGaugeView.qml index bfb7a0c7..63e51355 100644 --- a/examples/quickcontrols/extras/gallery/qml/CircularGaugeView.qml +++ b/examples/quickcontrols/extras/gallery/qml/CircularGaugeView.qml @@ -115,9 +115,9 @@ ControlView { // Called to update the style after the user has edited a property. Connections { target: customizerItem - onMinimumValueAngleChanged: __style.minimumValueAngle = customizerItem.minimumValueAngle - onMaximumValueAngleChanged: __style.maximumValueAngle = customizerItem.maximumValueAngle - onLabelStepSizeChanged: __style.tickmarkStepSize = __style.labelStepSize = customizerItem.labelStepSize + function onMinimumValueAngleChanged() { __style.minimumValueAngle = customizerItem.minimumValueAngle } + function onMaximumValueAngleChanged() { __style.maximumValueAngle = customizerItem.maximumValueAngle } + function onLabelStepSizeChanged() { __style.tickmarkStepSize = __style.labelStepSize = customizerItem.labelStepSize } } Behavior on value { diff --git a/examples/quickcontrols/extras/gallery/qml/gallery.qml b/examples/quickcontrols/extras/gallery/qml/gallery.qml index 0f4d2b71..c7d0a194 100644 --- a/examples/quickcontrols/extras/gallery/qml/gallery.qml +++ b/examples/quickcontrols/extras/gallery/qml/gallery.qml @@ -290,7 +290,10 @@ Window { Connections { target: recordingFlashTimer - onTriggered: if (name == "Recording") indicator.active = !indicator.active + function onTriggered() { + if (name == "Recording") + indicator.active = !indicator.active + } } } ControlLabel { diff --git a/src/controls/Button.qml b/src/controls/Button.qml index 73b3b349..c3f29238 100644 --- a/src/controls/Button.qml +++ b/src/controls/Button.qml @@ -110,11 +110,11 @@ BasicButton { Connections { target: __behavior - onEffectivePressedChanged: { + function onEffectivePressedChanged() { if (!Settings.hasTouchScreen && __behavior.effectivePressed && menu) popupMenuTimer.start() } - onReleased: { + function onReleased() { if (Settings.hasTouchScreen && __behavior.containsMouse && menu) popupMenuTimer.start() } diff --git a/src/controls/MenuBar.qml b/src/controls/MenuBar.qml index 2628d064..78fd7cc7 100644 --- a/src/controls/MenuBar.qml +++ b/src/controls/MenuBar.qml @@ -291,7 +291,7 @@ MenuBarPrivate { Connections { target: __menuItem - onAboutToHide: { + function onAboutToHide() { if (d.openedMenuIndex === index) { d.openMenuAtIndex(-1) menuMouseArea.hoveredItem = null @@ -301,7 +301,7 @@ MenuBarPrivate { Connections { target: __menuItem.__action - onTriggered: d.openMenuAtIndex(__menuItemIndex) + function onTriggered() { d.openMenuAtIndex(__menuItemIndex) } } Component.onCompleted: { diff --git a/src/controls/Private/BasicButton.qml b/src/controls/Private/BasicButton.qml index 0206c72f..d5c5d28f 100644 --- a/src/controls/Private/BasicButton.qml +++ b/src/controls/Private/BasicButton.qml @@ -163,7 +163,7 @@ Control { Connections { target: __action - onTriggered: button.clicked() + function onTriggered() { button.clicked() } } activeFocusOnTab: true diff --git a/src/controls/Private/EditMenu.qml b/src/controls/Private/EditMenu.qml index 843ccb00..fde124ea 100644 --- a/src/controls/Private/EditMenu.qml +++ b/src/controls/Private/EditMenu.qml @@ -54,7 +54,7 @@ Loader { Connections { target: control - onMenuChanged: { + function onMenuChanged() { if (menuInstance !== null) { menuInstance.destroy() menuInstance = null diff --git a/src/controls/Private/EditMenu_base.qml b/src/controls/Private/EditMenu_base.qml index 2ffbfdb2..346eba2d 100644 --- a/src/controls/Private/EditMenu_base.qml +++ b/src/controls/Private/EditMenu_base.qml @@ -154,7 +154,7 @@ Item { Connections { target: mouseArea - onClicked: { + function onClicked() { if (input.selectionStart === input.selectionEnd) { var cursorPos = input.positionAt(mouse.x, mouse.y) input.moveHandles(cursorPos, cursorPos) diff --git a/src/controls/Private/ScrollViewHelper.qml b/src/controls/Private/ScrollViewHelper.qml index c16c55b8..f5ef5b17 100644 --- a/src/controls/Private/ScrollViewHelper.qml +++ b/src/controls/Private/ScrollViewHelper.qml @@ -86,19 +86,19 @@ Item { Connections { target: viewport - onWidthChanged: layoutTimer.running = true - onHeightChanged: layoutTimer.running = true + function onWidthChanged() { layoutTimer.running = true } + function onHeightChanged() { layoutTimer.running = true } } Connections { target: flickableItem - onContentWidthChanged: layoutTimer.running = true - onContentHeightChanged: layoutTimer.running = true - onContentXChanged: { + function onContentWidthChanged() { layoutTimer.running = true } + function onContentHeightChanged() { layoutTimer.running = true } + function onContentXChanged() { hscrollbar.flash() vscrollbar.flash() } - onContentYChanged: { + function onContentYChanged() { hscrollbar.flash() vscrollbar.flash() } diff --git a/src/controls/Private/qquickstyleitem.cpp b/src/controls/Private/qquickstyleitem.cpp index 08f80713..fa51c4a3 100644 --- a/src/controls/Private/qquickstyleitem.cpp +++ b/src/controls/Private/qquickstyleitem.cpp @@ -212,7 +212,7 @@ QQuickStyleItem1::~QQuickStyleItem1() void QQuickStyleItem1::initStyleOption() { if (m_styleoption) - m_styleoption->state = 0; + m_styleoption->state = {}; QString sizeHint = m_hints.value(QStringLiteral("size")).toString(); QPlatformTheme::Font platformFont = (sizeHint == QLatin1String("mini")) ? QPlatformTheme::MiniFont : @@ -267,7 +267,7 @@ void QQuickStyleItem1::initStyleOption() m_styleoption = new QStyleOptionViewItem(); QStyleOptionViewItem *opt = qstyleoption_cast<QStyleOptionViewItem*>(m_styleoption); - opt->features = 0; + opt->features = {}; if (activeControl() == QLatin1String("alternate")) opt->features |= QStyleOptionViewItem::Alternate; } @@ -594,7 +594,7 @@ void QQuickStyleItem1::initStyleOption() else if (value() & (1<<1)) opt->activeSubControls = QStyle::SC_SpinBoxDown; opt->subControls = QStyle::SC_All; - opt->stepEnabled = 0; + opt->stepEnabled = {}; if (value() & (1<<2)) opt->stepEnabled |= QAbstractSpinBox::StepUpEnabled; if (value() & (1<<3)) @@ -659,7 +659,7 @@ void QQuickStyleItem1::initStyleOption() opt->text = text(); opt->lineWidth = 1; opt->subControls = QStyle::SC_GroupBoxLabel; - opt->features = 0; + opt->features = {}; if (m_properties[QStringLiteral("sunken")].toBool()) { // Qt draws an ugly line here so I ignore it opt->subControls |= QStyle::SC_GroupBoxFrame; } else { @@ -1827,7 +1827,7 @@ QPixmap QQuickTableRowImageProvider1::requestPixmap(const QString &id, QSize *si opt.state |= QStyle::State_Enabled; opt.rect = QRect(0, 0, width, height); QString style = qApp->style()->metaObject()->className(); - opt.features = 0; + opt.features = {}; if (id.contains(QLatin1String("selected"))) opt.state |= QStyle::State_Selected; diff --git a/src/controls/ScrollView.qml b/src/controls/ScrollView.qml index 951fe65e..f79cfc8e 100644 --- a/src/controls/ScrollView.qml +++ b/src/controls/ScrollView.qml @@ -244,13 +244,13 @@ FocusScope { Connections { target: flickableItem - onContentYChanged: { + function onContentYChanged() { scroller.blockUpdates = true scroller.verticalScrollBar.value = flickableItem.contentY - flickableItem.originY scroller.blockUpdates = false } - onContentXChanged: { + function onContentXChanged() { scroller.blockUpdates = true scroller.horizontalScrollBar.value = flickableItem.contentX - flickableItem.originX scroller.blockUpdates = false @@ -309,12 +309,12 @@ FocusScope { Connections { target: flickableItem - onContentYChanged: { + function onContentYChanged() { wheelArea.verticalRecursionGuard = true wheelArea.verticalValue = flickableItem.contentY - flickableItem.originY wheelArea.verticalRecursionGuard = false } - onContentXChanged: { + function onContentXChanged() { wheelArea.horizontalRecursionGuard = true wheelArea.horizontalValue = flickableItem.contentX - flickableItem.originX wheelArea.horizontalRecursionGuard = false diff --git a/src/controls/Styles/Android/CursorHandleStyle.qml b/src/controls/Styles/Android/CursorHandleStyle.qml index 636e3688..a4b772c5 100644 --- a/src/controls/Styles/Android/CursorHandleStyle.qml +++ b/src/controls/Styles/Android/CursorHandleStyle.qml @@ -69,7 +69,7 @@ DrawableLoader { Connections { target: styleData onActivated: idle.restart() - onPressedChanged: { + function onPressedChanged() { if (!styleData.pressed) idle.restart() } @@ -82,9 +82,9 @@ DrawableLoader { Connections { target: editor ignoreUnknownSignals: true - onTextChanged: if (!ignore.running) idle.stop() - onDisplayTextChanged: if (!ignore.running) idle.stop() - onInputMethodComposing: if (!ignore.running) idle.stop() + function onTextChanged() { if (!ignore.running) idle.stop() } + function onDisplayTextChanged() { if (!ignore.running) idle.stop() } + function onInputMethodComposing() { if (!ignore.running) idle.stop() } } Timer { diff --git a/src/controls/Styles/Base/CalendarStyle.qml b/src/controls/Styles/Base/CalendarStyle.qml index ef0cb779..bde2f2cc 100644 --- a/src/controls/Styles/Base/CalendarStyle.qml +++ b/src/controls/Styles/Base/CalendarStyle.qml @@ -467,13 +467,21 @@ Style { Connections { target: control - onVisibleMonthChanged: __weekNumber = control.__model.weekNumberAt(index) - onVisibleYearChanged: __weekNumber = control.__model.weekNumberAt(index) + + function onVisibleMonthChanged() { + __weekNumber = control.__model.weekNumberAt(index) + } + + function onVisibleYearChanged() { + __weekNumber = control.__model.weekNumberAt(index) + } } Connections { target: control.__model - onCountChanged: __weekNumber = control.__model.weekNumberAt(index) + function onCountChanged() { + __weekNumber = control.__model.weekNumberAt(index) + } } property QtObject styleData: QtObject { @@ -638,7 +646,7 @@ Style { Connections { target: control - onSelectedDateChanged: view.selectedDateChanged() + function onSelectedDateChanged() { view.selectedDateChanged() } } Repeater { diff --git a/src/controls/Styles/Base/CircularButtonStyle.qml b/src/controls/Styles/Base/CircularButtonStyle.qml index 4aa4e5e6..b2324e0e 100644 --- a/src/controls/Styles/Base/CircularButtonStyle.qml +++ b/src/controls/Styles/Base/CircularButtonStyle.qml @@ -75,7 +75,7 @@ ButtonStyle { Connections { target: control - onPressedChanged: backgroundCanvas.requestPaint() + function onPressedChanged() { backgroundCanvas.requestPaint() } } onPaint: { diff --git a/src/controls/Styles/Base/CircularTickmarkLabelStyle.qml b/src/controls/Styles/Base/CircularTickmarkLabelStyle.qml index d44d9cb2..494a7f28 100644 --- a/src/controls/Styles/Base/CircularTickmarkLabelStyle.qml +++ b/src/controls/Styles/Base/CircularTickmarkLabelStyle.qml @@ -246,10 +246,10 @@ Style { Connections { target: control - onMinimumValueChanged: valueTextModel.update() - onMaximumValueChanged: valueTextModel.update() - onTickmarkStepSizeChanged: valueTextModel.update() - onLabelStepSizeChanged: valueTextModel.update() + function onMinimumValueChanged() { valueTextModel.update() } + function onMaximumValueChanged() { valueTextModel.update() } + function onTickmarkStepSizeChanged() { valueTextModel.update() } + function onLabelStepSizeChanged() { valueTextModel.update() } } Repeater { diff --git a/src/controls/Styles/Base/DelayButtonStyle.qml b/src/controls/Styles/Base/DelayButtonStyle.qml index 853c8cff..00a1716a 100644 --- a/src/controls/Styles/Base/DelayButtonStyle.qml +++ b/src/controls/Styles/Base/DelayButtonStyle.qml @@ -94,8 +94,8 @@ CircularButtonStyle { Connections { target: control - onPressedChanged: backgroundCanvas.requestPaint() - onCheckedChanged: backgroundCanvas.requestPaint() + function onPressedChanged() { backgroundCanvas.requestPaint() } + function onCheckedChanged() { backgroundCanvas.requestPaint() } } onPaint: { @@ -157,8 +157,8 @@ CircularButtonStyle { Connections { target: control - onActivated: state = "activated" - onCheckedChanged: if (!control.checked) state = "normal" + function onActivated() { state = "activated" } + function onCheckedChanged() { if (!control.checked) state = "normal" } } CircularProgressBar { @@ -187,7 +187,7 @@ CircularButtonStyle { Connections { target: delayButtonStyle - onProgressBarGradientChanged: progressBar.updateGradient() + function onProgressBarGradientChanged() { progressBar.updateGradient() } } } diff --git a/src/controls/Styles/Base/PieMenuStyle.qml b/src/controls/Styles/Base/PieMenuStyle.qml index d1aa341d..ddeb4edd 100644 --- a/src/controls/Styles/Base/PieMenuStyle.qml +++ b/src/controls/Styles/Base/PieMenuStyle.qml @@ -312,13 +312,13 @@ Style { Connections { target: pieMenuStyle - onStartAngleChanged: actionCanvas.requestPaint() - onEndAngleChanged: actionCanvas.requestPaint() + function onStartAngleChanged() { actionCanvas.requestPaint() } + function onEndAngleChanged() { actionCanvas.requestPaint() } } Connections { target: control - onCurrentIndexChanged: actionCanvas.requestPaint() + function onCurrentIndexChanged() { actionCanvas.requestPaint() } } onPaint: { diff --git a/src/controls/Styles/Base/StatusIndicatorStyle.qml b/src/controls/Styles/Base/StatusIndicatorStyle.qml index a334aa62..ae9f2110 100644 --- a/src/controls/Styles/Base/StatusIndicatorStyle.qml +++ b/src/controls/Styles/Base/StatusIndicatorStyle.qml @@ -92,8 +92,8 @@ Style { Connections { target: control - onActiveChanged: backgroundCanvas.requestPaint() - onColorChanged: backgroundCanvas.requestPaint() + function onActiveChanged() { backgroundCanvas.requestPaint() } + function onColorChanged() { backgroundCanvas.requestPaint() } } onPaint: { @@ -124,8 +124,8 @@ Style { Connections { target: control - onActiveChanged: colorCanvas.requestPaint() - onColorChanged: colorCanvas.requestPaint() + function onActiveChanged() { colorCanvas.requestPaint() } + function onColorChanged() { colorCanvas.requestPaint() } } onPaint: { @@ -157,8 +157,8 @@ Style { Connections { target: control - onActiveChanged: foregroundCanvas.requestPaint() - onColorChanged: foregroundCanvas.requestPaint() + function onActiveChanged() { foregroundCanvas.requestPaint() } + function onColorChanged() { foregroundCanvas.requestPaint() } } onPaint: { diff --git a/src/controls/Styles/Base/ToggleButtonStyle.qml b/src/controls/Styles/Base/ToggleButtonStyle.qml index a5561f29..2c47b4bf 100644 --- a/src/controls/Styles/Base/ToggleButtonStyle.qml +++ b/src/controls/Styles/Base/ToggleButtonStyle.qml @@ -139,11 +139,11 @@ CircularButtonStyle { Connections { target: control - onPressedChanged: { + function onPressedChanged() { backgroundCanvas.requestPaint(); } - onCheckedChanged: { + function onCheckedChanged() { uncheckedCanvas.requestPaint(); checkedCanvas.requestPaint(); } @@ -152,11 +152,11 @@ CircularButtonStyle { Connections { target: circularButtonStyle - onCheckedGradientChanged: checkedCanvas.requestPaint() - onCheckedDropShadowColorChanged: checkedCanvas.requestPaint() - onUncheckedGradientChanged: uncheckedCanvas.requestPaint() - onUncheckedDropShadowColorChanged: uncheckedCanvas.requestPaint() - onInactiveGradientChanged: { + function onCheckedGradientChanged() { checkedCanvas.requestPaint() } + function onCheckedDropShadowColorChanged() { checkedCanvas.requestPaint() } + function onUncheckedGradientChanged() { uncheckedCanvas.requestPaint() } + function onUncheckedDropShadowColorChanged() { uncheckedCanvas.requestPaint() } + function onInactiveGradientChanged() { checkedCanvas.requestPaint(); uncheckedCanvas.requestPaint(); } @@ -164,17 +164,17 @@ CircularButtonStyle { Connections { target: circularButtonStyle.checkedGradient - onUpdated: checkedCanvas.requestPaint() + function onUpdated() { checkedCanvas.requestPaint() } } Connections { target: circularButtonStyle.uncheckedGradient - onUpdated: uncheckedCanvas.requestPaint() + function onUpdated() { uncheckedCanvas.requestPaint() } } Connections { target: circularButtonStyle.inactiveGradient - onUpdated: { + function onUpdated() { uncheckedCanvas.requestPaint(); checkedCanvas.requestPaint(); } diff --git a/src/controls/Styles/iOS/CursorDelegate.qml b/src/controls/Styles/iOS/CursorDelegate.qml index 5312398c..37577cd4 100644 --- a/src/controls/Styles/iOS/CursorDelegate.qml +++ b/src/controls/Styles/iOS/CursorDelegate.qml @@ -53,7 +53,7 @@ Rectangle { Connections { target: input - onCursorPositionChanged: { + function onCursorPositionChanged() { state = "on" timer.restart() } diff --git a/src/controls/TextArea.qml b/src/controls/TextArea.qml index ac6ecac3..402161c2 100644 --- a/src/controls/TextArea.qml +++ b/src/controls/TextArea.qml @@ -765,8 +765,8 @@ ScrollView { Connections { target: area.viewport - onWidthChanged: edit.doLayout() - onHeightChanged: edit.doLayout() + function onWidthChanged() { edit.doLayout() } + function onHeightChanged() { edit.doLayout() } } onContentWidthChanged: edit.doLayout() onContentHeightChanged: edit.doLayout() diff --git a/src/controls/plugin.cpp b/src/controls/plugin.cpp index 6d34f285..446357aa 100644 --- a/src/controls/plugin.cpp +++ b/src/controls/plugin.cpp @@ -196,7 +196,7 @@ void QtQuickControls1Plugin::registerTypes(const char *uri) qmlRegisterSingletonType<QQuickControlSettings1>(private_uri, 1, 0, "Settings", QQuickControlsPrivate1::registerSettingsModule); qmlRegisterUncreatableType<QQuickControlsPrivate1>(private_uri, 1, 0, "Controls", QLatin1String("Controls is an abstract type.")); - qmlRegisterType<QQuickControlsPrivate1Attached>(); + qmlRegisterAnonymousType<QQuickControlsPrivate1Attached>(private_uri, 1); qmlRegisterType<QQuickTreeModelAdaptor1>(private_uri, 1, 0, "TreeModelAdaptor"); qmlRegisterType<QQuickScenePosListener1>(private_uri, 1, 0, "ScenePosListener"); diff --git a/src/controls/plugins.qmltypes b/src/controls/plugins.qmltypes index 8515aafd..0242497c 100644 --- a/src/controls/plugins.qmltypes +++ b/src/controls/plugins.qmltypes @@ -984,7 +984,7 @@ Module { isComposite: true Property { name: "control" - type: "ApplicationWindow_QMLTYPE_12" + type: "ApplicationWindow_QMLTYPE_14" isReadonly: true isPointer: true } @@ -1012,7 +1012,7 @@ Module { exportMetaObjectRevisions: [1] isComposite: true defaultProperty: "data" - Property { name: "control"; type: "BusyIndicator_QMLTYPE_19"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "BusyIndicator_QMLTYPE_21"; isReadonly: true; isPointer: true } Property { name: "indicator"; type: "QQmlComponent"; isPointer: true } Property { name: "panel"; type: "QQmlComponent"; isPointer: true } } @@ -1024,7 +1024,7 @@ Module { isComposite: true defaultProperty: "data" Property { name: "isDefault"; type: "bool" } - Property { name: "menu"; type: "Menu_QMLTYPE_51"; isPointer: true } + Property { name: "menu"; type: "Menu_QMLTYPE_55"; isPointer: true } Property { name: "checkable"; type: "bool" } Property { name: "checked"; type: "bool" } Property { name: "exclusiveGroup"; type: "QQuickExclusiveGroup1"; isPointer: true } @@ -1057,7 +1057,7 @@ Module { exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" - Property { name: "control"; type: "Button_QMLTYPE_53"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "Button_QMLTYPE_60"; isReadonly: true; isPointer: true } Property { name: "background"; type: "QQmlComponent"; isPointer: true } Property { name: "label"; type: "QQmlComponent"; isPointer: true } Property { name: "panel"; type: "QQmlComponent"; isPointer: true } @@ -1191,7 +1191,7 @@ Module { exportMetaObjectRevisions: [1] isComposite: true defaultProperty: "data" - Property { name: "control"; type: "Calendar_QMLTYPE_57"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "Calendar_QMLTYPE_65"; isReadonly: true; isPointer: true } Property { name: "gridColor"; type: "QColor" } Property { name: "gridVisible"; type: "bool" } Property { name: "__gridLineWidth"; type: "double" } @@ -1248,7 +1248,7 @@ Module { exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" - Property { name: "control"; type: "CheckBox_QMLTYPE_77"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "CheckBox_QMLTYPE_88"; isReadonly: true; isPointer: true } Property { name: "label"; type: "QQmlComponent"; isPointer: true } Property { name: "background"; type: "QQmlComponent"; isPointer: true } Property { name: "spacing"; type: "int" } @@ -1264,11 +1264,11 @@ Module { defaultProperty: "data" Property { name: "__buttonHelper" - type: "CircularButtonStyleHelper_QMLTYPE_82" + type: "CircularButtonStyleHelper_QMLTYPE_93" isReadonly: true isPointer: true } - Property { name: "control"; type: "Button_QMLTYPE_53"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "Button_QMLTYPE_60"; isReadonly: true; isPointer: true } Property { name: "background"; type: "QQmlComponent"; isPointer: true } Property { name: "label"; type: "QQmlComponent"; isPointer: true } Property { name: "panel"; type: "QQmlComponent"; isPointer: true } @@ -1280,7 +1280,7 @@ Module { exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" - Property { name: "control"; type: "CircularGauge_QMLTYPE_94"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "CircularGauge_QMLTYPE_97"; isReadonly: true; isPointer: true } Property { name: "outerRadius"; type: "double"; isReadonly: true } Property { name: "minimumValueAngle"; type: "double" } Property { name: "maximumValueAngle"; type: "double" } @@ -1383,7 +1383,7 @@ Module { Property { name: "textColor"; type: "QColor" } Property { name: "selectionColor"; type: "QColor" } Property { name: "selectedTextColor"; type: "QColor" } - Property { name: "control"; type: "ComboBox_QMLTYPE_106"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "ComboBox_QMLTYPE_120"; isReadonly: true; isPointer: true } Property { name: "dropDownButtonWidth"; type: "int" } Property { name: "background"; type: "QQmlComponent"; isPointer: true } Property { name: "__editor"; type: "QQmlComponent"; isPointer: true } @@ -1425,13 +1425,13 @@ Module { exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" - Property { name: "control"; type: "DelayButton_QMLTYPE_138"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "DelayButton_QMLTYPE_159"; isReadonly: true; isPointer: true } Property { name: "progressBarGradient"; type: "QQuickGradient"; isPointer: true } Property { name: "progressBarDropShadowColor"; type: "QColor" } Property { name: "foreground"; type: "QQmlComponent"; isPointer: true } Property { name: "__buttonHelper" - type: "CircularButtonStyleHelper_QMLTYPE_82" + type: "CircularButtonStyleHelper_QMLTYPE_93" isReadonly: true isPointer: true } @@ -1446,7 +1446,7 @@ Module { exportMetaObjectRevisions: [1] isComposite: true defaultProperty: "data" - Property { name: "control"; type: "Dial_QMLTYPE_147"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "Dial_QMLTYPE_165"; isReadonly: true; isPointer: true } Property { name: "outerRadius"; type: "double"; isReadonly: true } Property { name: "handleInset"; type: "double" } Property { name: "tickmarkStepSize"; type: "double" } @@ -1479,7 +1479,7 @@ Module { exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" - Property { name: "control"; type: "Gauge_QMLTYPE_155"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "Gauge_QMLTYPE_173"; isReadonly: true; isPointer: true } Property { name: "valuePosition"; type: "double"; isReadonly: true } Property { name: "background"; type: "QQmlComponent"; isPointer: true } Property { name: "tickmark"; type: "QQmlComponent"; isPointer: true } @@ -1503,7 +1503,7 @@ Module { Property { name: "checked"; type: "bool" } Property { name: "__content"; type: "QObject"; isList: true; isReadonly: true } Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true } - Property { name: "__checkbox"; type: "CheckBox_QMLTYPE_77"; isReadonly: true; isPointer: true } + Property { name: "__checkbox"; type: "CheckBox_QMLTYPE_88"; isReadonly: true; isPointer: true } Property { name: "__style"; type: "QObject"; isReadonly: true; isPointer: true } } Component { @@ -1633,7 +1633,7 @@ Module { Property { name: "menuItemPanel"; type: "QQmlComponent"; isPointer: true } Property { name: "itemDelegate" - type: "MenuItemSubControls_QMLTYPE_124" + type: "MenuItemSubControls_QMLTYPE_125" isReadonly: true isPointer: true } @@ -1652,7 +1652,7 @@ Module { exportMetaObjectRevisions: [3] isComposite: true defaultProperty: "data" - Property { name: "control"; type: "PieMenu_QMLTYPE_174"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "PieMenu_QMLTYPE_192"; isReadonly: true; isPointer: true } Property { name: "backgroundColor"; type: "QColor" } Property { name: "selectionColor"; type: "QColor" } Property { name: "shadowColor"; type: "QColor" } @@ -1719,7 +1719,7 @@ Module { exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" - Property { name: "control"; type: "ProgressBar_QMLTYPE_187"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "ProgressBar_QMLTYPE_207"; isReadonly: true; isPointer: true } Property { name: "currentProgress"; type: "double"; isReadonly: true } Property { name: "progress"; type: "QQmlComponent"; isPointer: true } Property { name: "background"; type: "QQmlComponent"; isPointer: true } @@ -1754,7 +1754,7 @@ Module { exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" - Property { name: "control"; type: "RadioButton_QMLTYPE_194"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "RadioButton_QMLTYPE_214"; isReadonly: true; isPointer: true } Property { name: "label"; type: "QQmlComponent"; isPointer: true } Property { name: "background"; type: "QQmlComponent"; isPointer: true } Property { name: "spacing"; type: "int" } @@ -1781,7 +1781,7 @@ Module { Property { name: "flickableItem"; type: "QQuickFlickable"; isReadonly: true; isPointer: true } Property { name: "__scroller" - type: "ScrollViewHelper_QMLTYPE_31" + type: "ScrollViewHelper_QMLTYPE_32" isReadonly: true isPointer: true } @@ -1789,13 +1789,13 @@ Module { Property { name: "__wheelAreaScrollSpeed"; type: "double" } Property { name: "__horizontalScrollBar" - type: "ScrollBar_QMLTYPE_27" + type: "ScrollBar_QMLTYPE_28" isReadonly: true isPointer: true } Property { name: "__verticalScrollBar" - type: "ScrollBar_QMLTYPE_27" + type: "ScrollBar_QMLTYPE_28" isReadonly: true isPointer: true } @@ -1807,7 +1807,7 @@ Module { exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" - Property { name: "control"; type: "ScrollView_QMLTYPE_35"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "ScrollView_QMLTYPE_37"; isReadonly: true; isPointer: true } Property { name: "corner"; type: "QQmlComponent"; isPointer: true } Property { name: "scrollToClickedPosition"; type: "bool" } Property { name: "transientScrollBars"; type: "bool" } @@ -1888,7 +1888,7 @@ Module { exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" - Property { name: "control"; type: "Slider_QMLTYPE_198"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "Slider_QMLTYPE_218"; isReadonly: true; isPointer: true } Property { name: "handle"; type: "QQmlComponent"; isPointer: true } Property { name: "groove"; type: "QQmlComponent"; isPointer: true } Property { name: "tickmarks"; type: "QQmlComponent"; isPointer: true } @@ -1934,7 +1934,7 @@ Module { exportMetaObjectRevisions: [1] isComposite: true defaultProperty: "data" - Property { name: "control"; type: "SpinBox_QMLTYPE_218"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "SpinBox_QMLTYPE_238"; isReadonly: true; isPointer: true } Property { name: "horizontalAlignment"; type: "int" } Property { name: "textColor"; type: "QColor" } Property { name: "selectionColor"; type: "QColor" } @@ -1982,7 +1982,7 @@ Module { defaultProperty: "data" Property { name: "initialItem"; type: "QVariant" } Property { name: "busy"; type: "bool"; isReadonly: true } - Property { name: "delegate"; type: "StackViewDelegate_QMLTYPE_232"; isPointer: true } + Property { name: "delegate"; type: "StackViewDelegate_QMLTYPE_252"; isPointer: true } Property { name: "__currentItem"; type: "QQuickItem"; isPointer: true } Property { name: "__depth"; type: "int" } Property { name: "__currentTransition"; type: "QVariant" } @@ -2120,7 +2120,7 @@ Module { defaultProperty: "data" Property { name: "control" - type: "StatusIndicator_QMLTYPE_241" + type: "StatusIndicator_QMLTYPE_261" isReadonly: true isPointer: true } @@ -2234,7 +2234,7 @@ Module { exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" - Property { name: "control"; type: "TabView_QMLTYPE_257"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "TabView_QMLTYPE_280"; isReadonly: true; isPointer: true } Property { name: "tabsMovable"; type: "bool" } Property { name: "tabsAlignment"; type: "int" } Property { name: "tabOverlap"; type: "int" } @@ -2257,7 +2257,7 @@ Module { Property { name: "currentRow"; type: "int" } Property { name: "selection" - type: "TableViewSelection_QMLTYPE_285" + type: "TableViewSelection_QMLTYPE_308" isReadonly: true isPointer: true } @@ -2354,7 +2354,7 @@ Module { Property { name: "flickableItem"; type: "QQuickFlickable"; isReadonly: true; isPointer: true } Property { name: "__scroller" - type: "ScrollViewHelper_QMLTYPE_31" + type: "ScrollViewHelper_QMLTYPE_32" isReadonly: true isPointer: true } @@ -2362,13 +2362,13 @@ Module { Property { name: "__wheelAreaScrollSpeed"; type: "double" } Property { name: "__horizontalScrollBar" - type: "ScrollBar_QMLTYPE_27" + type: "ScrollBar_QMLTYPE_28" isReadonly: true isPointer: true } Property { name: "__verticalScrollBar" - type: "ScrollBar_QMLTYPE_27" + type: "ScrollBar_QMLTYPE_28" isReadonly: true isPointer: true } @@ -2399,7 +2399,7 @@ Module { exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" - Property { name: "control"; type: "TableView_QMLTYPE_289"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "TableView_QMLTYPE_312"; isReadonly: true; isPointer: true } Property { name: "textColor"; type: "QColor" } Property { name: "backgroundColor"; type: "QColor" } Property { name: "alternateBackgroundColor"; type: "QColor" } @@ -2556,7 +2556,7 @@ Module { Property { name: "flickableItem"; type: "QQuickFlickable"; isReadonly: true; isPointer: true } Property { name: "__scroller" - type: "ScrollViewHelper_QMLTYPE_31" + type: "ScrollViewHelper_QMLTYPE_32" isReadonly: true isPointer: true } @@ -2564,13 +2564,13 @@ Module { Property { name: "__wheelAreaScrollSpeed"; type: "double" } Property { name: "__horizontalScrollBar" - type: "ScrollBar_QMLTYPE_27" + type: "ScrollBar_QMLTYPE_28" isReadonly: true isPointer: true } Property { name: "__verticalScrollBar" - type: "ScrollBar_QMLTYPE_27" + type: "ScrollBar_QMLTYPE_28" isReadonly: true isPointer: true } @@ -2704,7 +2704,7 @@ Module { Property { name: "flickableItem"; type: "QQuickFlickable"; isReadonly: true; isPointer: true } Property { name: "__scroller" - type: "ScrollViewHelper_QMLTYPE_31" + type: "ScrollViewHelper_QMLTYPE_32" isReadonly: true isPointer: true } @@ -2712,13 +2712,13 @@ Module { Property { name: "__wheelAreaScrollSpeed"; type: "double" } Property { name: "__horizontalScrollBar" - type: "ScrollBar_QMLTYPE_27" + type: "ScrollBar_QMLTYPE_28" isReadonly: true isPointer: true } Property { name: "__verticalScrollBar" - type: "ScrollBar_QMLTYPE_27" + type: "ScrollBar_QMLTYPE_28" isReadonly: true isPointer: true } @@ -2852,7 +2852,7 @@ Module { Property { name: "flickableItem"; type: "QQuickFlickable"; isReadonly: true; isPointer: true } Property { name: "__scroller" - type: "ScrollViewHelper_QMLTYPE_31" + type: "ScrollViewHelper_QMLTYPE_32" isReadonly: true isPointer: true } @@ -2860,13 +2860,13 @@ Module { Property { name: "__wheelAreaScrollSpeed"; type: "double" } Property { name: "__horizontalScrollBar" - type: "ScrollBar_QMLTYPE_27" + type: "ScrollBar_QMLTYPE_28" isReadonly: true isPointer: true } Property { name: "__verticalScrollBar" - type: "ScrollBar_QMLTYPE_27" + type: "ScrollBar_QMLTYPE_28" isReadonly: true isPointer: true } @@ -2878,7 +2878,7 @@ Module { exportMetaObjectRevisions: [1] isComposite: true defaultProperty: "data" - Property { name: "control"; type: "TextArea_QMLTYPE_295"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "TextArea_QMLTYPE_318"; isReadonly: true; isPointer: true } Property { name: "font"; type: "QFont" } Property { name: "textColor"; type: "QColor" } Property { name: "selectionColor"; type: "QColor" } @@ -2999,7 +2999,7 @@ Module { exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" - Property { name: "control"; type: "TextField_QMLTYPE_300"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "TextField_QMLTYPE_324"; isReadonly: true; isPointer: true } Property { name: "font"; type: "QFont" } Property { name: "textColor"; type: "QColor" } Property { name: "selectionColor"; type: "QColor" } @@ -3021,7 +3021,7 @@ Module { exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" - Property { name: "control"; type: "ToggleButton_QMLTYPE_303"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "ToggleButton_QMLTYPE_327"; isReadonly: true; isPointer: true } Property { name: "inactiveGradient"; type: "QQuickGradient"; isPointer: true } Property { name: "checkedGradient"; type: "QQuickGradient"; isPointer: true } Property { name: "uncheckedGradient"; type: "QQuickGradient"; isPointer: true } @@ -3029,7 +3029,7 @@ Module { Property { name: "uncheckedDropShadowColor"; type: "QColor" } Property { name: "__buttonHelper" - type: "CircularButtonStyleHelper_QMLTYPE_82" + type: "CircularButtonStyleHelper_QMLTYPE_93" isReadonly: true isPointer: true } @@ -3071,7 +3071,7 @@ Module { isComposite: true defaultProperty: "data" Property { name: "isDefault"; type: "bool" } - Property { name: "menu"; type: "Menu_QMLTYPE_51"; isPointer: true } + Property { name: "menu"; type: "Menu_QMLTYPE_55"; isPointer: true } Property { name: "checkable"; type: "bool" } Property { name: "checked"; type: "bool" } Property { name: "exclusiveGroup"; type: "QQuickExclusiveGroup1"; isPointer: true } @@ -3218,7 +3218,7 @@ Module { Property { name: "flickableItem"; type: "QQuickFlickable"; isReadonly: true; isPointer: true } Property { name: "__scroller" - type: "ScrollViewHelper_QMLTYPE_31" + type: "ScrollViewHelper_QMLTYPE_32" isReadonly: true isPointer: true } @@ -3226,13 +3226,13 @@ Module { Property { name: "__wheelAreaScrollSpeed"; type: "double" } Property { name: "__horizontalScrollBar" - type: "ScrollBar_QMLTYPE_27" + type: "ScrollBar_QMLTYPE_28" isReadonly: true isPointer: true } Property { name: "__verticalScrollBar" - type: "ScrollBar_QMLTYPE_27" + type: "ScrollBar_QMLTYPE_28" isReadonly: true isPointer: true } @@ -3358,7 +3358,7 @@ Module { Property { name: "flickableItem"; type: "QQuickFlickable"; isReadonly: true; isPointer: true } Property { name: "__scroller" - type: "ScrollViewHelper_QMLTYPE_31" + type: "ScrollViewHelper_QMLTYPE_32" isReadonly: true isPointer: true } @@ -3366,13 +3366,13 @@ Module { Property { name: "__wheelAreaScrollSpeed"; type: "double" } Property { name: "__horizontalScrollBar" - type: "ScrollBar_QMLTYPE_27" + type: "ScrollBar_QMLTYPE_28" isReadonly: true isPointer: true } Property { name: "__verticalScrollBar" - type: "ScrollBar_QMLTYPE_27" + type: "ScrollBar_QMLTYPE_28" isReadonly: true isPointer: true } @@ -3384,7 +3384,7 @@ Module { exportMetaObjectRevisions: [4] isComposite: true defaultProperty: "data" - Property { name: "control"; type: "TreeView_QMLTYPE_321"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "TreeView_QMLTYPE_350"; isReadonly: true; isPointer: true } Property { name: "indentation"; type: "int" } Property { name: "branchDelegate"; type: "QQmlComponent"; isPointer: true } Property { name: "textColor"; type: "QColor" } @@ -3421,7 +3421,7 @@ Module { exportMetaObjectRevisions: [2] isComposite: true defaultProperty: "data" - Property { name: "control"; type: "Tumbler_QMLTYPE_324"; isReadonly: true; isPointer: true } + Property { name: "control"; type: "Tumbler_QMLTYPE_353"; isReadonly: true; isPointer: true } Property { name: "spacing"; type: "double" } Property { name: "visibleItemCount"; type: "int" } Property { name: "__padding"; type: "double"; isReadonly: true } diff --git a/src/controls/qquickaction_p.h b/src/controls/qquickaction_p.h index 711669e5..97601a32 100644 --- a/src/controls/qquickaction_p.h +++ b/src/controls/qquickaction_p.h @@ -62,7 +62,7 @@ class QQuickAction1 : public QObject Q_PROPERTY(QString tooltip READ tooltip WRITE setTooltip NOTIFY tooltipChanged RESET resetTooltip) Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged) Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable NOTIFY checkableChanged) - Q_PROPERTY(bool checked READ isChecked WRITE setChecked DESIGNABLE isCheckable NOTIFY toggled) + Q_PROPERTY(bool checked READ isChecked WRITE setChecked NOTIFY toggled) Q_PROPERTY(QQuickExclusiveGroup1 *exclusiveGroup READ exclusiveGroup WRITE setExclusiveGroup NOTIFY exclusiveGroupChanged) #ifndef QT_NO_SHORTCUT diff --git a/src/dialogs/plugin.cpp b/src/dialogs/plugin.cpp index 601412d3..68b4cf3b 100644 --- a/src/dialogs/plugin.cpp +++ b/src/dialogs/plugin.cpp @@ -109,19 +109,8 @@ public: m_useResources = false; #endif #endif -#ifdef Q_OS_ANDROID - const QString prefix = QLatin1String("qrc:/android_rcc_bundle/qml/"); -#else - const QString prefix = QLatin1String("qrc:/"); -#endif - QQuickAbstractDialog::m_decorationComponentUrl = m_useResources ? - QUrl(prefix + QString("QtQuick/Dialogs/qml/DefaultWindowDecoration.qml")) : -#ifndef QT_STATIC - QUrl::fromLocalFile(qmlDir.filePath(QString("qml/DefaultWindowDecoration.qml"))); -#else - QUrl("qrc:/qt-project.org/imports/QtQuick/Dialogs/qml/DefaultWindowDecoration.qml"); -#endif + QQuickAbstractDialog::m_decorationComponentUrl = fileLocation("DefaultWindowDecoration"); // Prefer the QPA dialog helpers if the platform supports them. // Else if there is a QWidget-based implementation, check whether it's // possible to instantiate it from Qt Quick. @@ -170,13 +159,7 @@ public: { // @uri QtQuick.Dialogs.AbstractDialog qmlRegisterType<QQuickDialog1>(uri, 1, 2, "AbstractDialog"); // implementation wrapper - QUrl dialogQmlPath = m_useResources ? - QUrl(prefix + QString("QtQuick/Dialogs/DefaultDialogWrapper.qml")) : -#ifndef QT_STATIC - QUrl::fromLocalFile(qmlDir.filePath("DefaultDialogWrapper.qml")); -#else - QUrl("qrc:/qt-project.org/imports/QtQuick/Dialogs/DefaultDialogWrapper.qml"); -#endif + QUrl dialogQmlPath = fileLocation("DefaultDialogWrapper"); qCDebug(lcRegistration) << " registering" << dialogQmlPath << "as Dialog"; qmlRegisterType(dialogQmlPath, uri, 1, 2, "Dialog"); qmlRegisterType(dialogQmlPath, uri, 1, 3, "Dialog"); @@ -204,7 +187,7 @@ protected: bool registerWidgetImplementation(const QDir &widgetsDir, const QDir &qmlDir, const char *qmlName, const char *uri, bool hasTopLevelWindows, int versionMajor, int versionMinor) { - + Q_UNUSED(qmlDir) bool mobileTouchPlatform = false; #if defined(Q_OS_IOS) mobileTouchPlatform = true; @@ -215,12 +198,6 @@ protected: mobileTouchPlatform = true; #endif -#ifdef Q_OS_ANDROID - const QString prefix = QLatin1String("qrc:/android_rcc_bundle/qml/"); -#else - const QString prefix = QLatin1String("qrc:/"); -#endif - // If there is a qmldir and we have a QApplication instance (as opposed to a // widget-free QGuiApplication), and this isn't a mobile touch-based platform, // assume that the widget-based dialog will work. Otherwise an application developer @@ -228,14 +205,7 @@ protected: // dialogs won't be used. if (!mobileTouchPlatform && hasTopLevelWindows && widgetsDir.exists("qmldir") && QCoreApplication::instance()->inherits("QApplication")) { - QUrl dialogQmlPath = m_useResources ? - QUrl(prefix + QString("QtQuick/Dialogs/Widget%1.qml").arg(qmlName)) : -#ifndef QT_STATIC - QUrl::fromLocalFile(qmlDir.filePath(QString("Widget%1.qml").arg(qmlName))); -#else - QUrl(QString("qrc:/qt-project.org/imports/QtQuick/Dialogs/Widget%1.qml").arg(qmlName)); - Q_UNUSED(qmlDir); -#endif + QUrl dialogQmlPath = fileLocation(QString("Widget%1").arg(qmlName)); if (qmlRegisterType(dialogQmlPath, uri, versionMajor, versionMinor, qmlName) >= 0) { qCDebug(lcRegistration) << " registering" << qmlName << " as " << dialogQmlPath; return true; @@ -247,25 +217,29 @@ protected: template <class WrapperType> void registerQmlImplementation(const QDir &qmlDir, const char *qmlName, const char *uri , int versionMajor, int versionMinor) { -#ifdef Q_OS_ANDROID - const QString prefix = QLatin1String("qrc:/android_rcc_bundle/qml/"); -#else - const QString prefix = QLatin1String("qrc:/"); -#endif + Q_UNUSED(qmlDir) qCDebug(lcRegistration) << "Register QML version for" << qmlName << "with uri:" << uri; QByteArray abstractTypeName = QByteArray("Abstract") + qmlName; qmlRegisterType<WrapperType>(uri, versionMajor, versionMinor, abstractTypeName); - QUrl dialogQmlPath = m_useResources ? - QUrl(prefix + QString("QtQuick/Dialogs/Default%1.qml").arg(qmlName)) : + QUrl dialogQmlPath = fileLocation(QString("Default%1").arg(qmlName)); + qCDebug(lcRegistration) << " registering" << qmlName << " as " << dialogQmlPath; + qmlRegisterType(dialogQmlPath, uri, versionMajor, versionMinor, qmlName); + } + + QUrl fileLocation(const QString &moduleName) const + { + return m_useResources ? +#ifdef Q_OS_ANDROID + QUrl(QString("qrc:/android_rcc_bundle/qml/QtQuick/Dialogs/%1.qml").arg(moduleName)) : +#else + QUrl(QString("qrc:/QtQuick/Dialogs/%1.qml").arg(moduleName)) : +#endif #ifndef QT_STATIC - QUrl::fromLocalFile(qmlDir.filePath(QString("Default%1.qml").arg(qmlName))); + QUrl::fromLocalFile(QDir(baseUrl().toLocalFile()).filePath(moduleName + ".qml")); #else - QUrl(QString("qrc:/qt-project.org/imports/QtQuick/Dialogs/Default%1.qml").arg(qmlName)); - Q_UNUSED(qmlDir); + QUrl(QString("qrc:/qt-project.org/imports/QtQuick/Dialogs/%1.qml").arg(moduleName)); #endif - qCDebug(lcRegistration) << " registering" << qmlName << " as " << dialogQmlPath; - qmlRegisterType(dialogQmlPath, uri, versionMajor, versionMinor, qmlName); } bool m_useResources; diff --git a/src/dialogs/plugins.qmltypes b/src/dialogs/plugins.qmltypes index e698dc6c..559bb48a 100644 --- a/src/dialogs/plugins.qmltypes +++ b/src/dialogs/plugins.qmltypes @@ -326,11 +326,6 @@ Module { Property { name: "contentItem"; type: "QQuickItem"; isPointer: true } } Component { - name: "QQuickControlsPrivate1Attached" - prototype: "QObject" - Property { name: "window"; type: "QQuickWindow"; isReadonly: true; isPointer: true } - } - Component { name: "QQuickDialog1" defaultProperty: "contentItem" prototype: "QQuickAbstractDialog" diff --git a/src/dialogs/qquickdialog.cpp b/src/dialogs/qquickdialog.cpp index 4ccc0f9d..eeb9cda8 100644 --- a/src/dialogs/qquickdialog.cpp +++ b/src/dialogs/qquickdialog.cpp @@ -56,6 +56,8 @@ QT_BEGIN_NAMESPACE The purpose of Dialog is to wrap arbitrary content into a \e {dialog window} including a row of platform-tailored buttons. + \note On Android, it is recommended to use \l {QQuickDialog}{Qt Quick Controls 2 Dialog}. + The \l contentItem is the default property (the only allowed child element), and items declared inside the Dialog will actually be children of another Item inside the \c contentItem. The row of \l standardButtons will diff --git a/src/extras/Styles/Flat/CircularGaugeStyle.qml b/src/extras/Styles/Flat/CircularGaugeStyle.qml index be969ad8..64eb176d 100644 --- a/src/extras/Styles/Flat/CircularGaugeStyle.qml +++ b/src/extras/Styles/Flat/CircularGaugeStyle.qml @@ -76,10 +76,10 @@ Base.CircularGaugeStyle { Connections { target: control - onValueChanged: thickArc.requestPaint() - onMinimumValueChanged: thickArc.requestPaint() - onMaximumValueChanged: thickArc.requestPaint() - onEnabledChanged: { + function onValueChanged() { thickArc.requestPaint() } + function onMinimumValueChanged() { thickArc.requestPaint() } + function onMaximumValueChanged() { thickArc.requestPaint() } + function onEnabledChanged() { thickArc.requestPaint(); thinArc.requestPaint(); } diff --git a/src/extras/Styles/Flat/DelayButtonStyle.qml b/src/extras/Styles/Flat/DelayButtonStyle.qml index 4cebe477..d90fb4e9 100644 --- a/src/extras/Styles/Flat/DelayButtonStyle.qml +++ b/src/extras/Styles/Flat/DelayButtonStyle.qml @@ -236,7 +236,7 @@ Base.DelayButtonStyle { Connections { target: privateScope - onProgressBarColorChanged: { + function onProgressBarColorChanged() { progressBar.clearStops() progressBar.addStop(0, privateScope.progressBarColor) progressBar.redraw() diff --git a/src/extras/Styles/Flat/DialStyle.qml b/src/extras/Styles/Flat/DialStyle.qml index 5e64f3c9..7a418652 100644 --- a/src/extras/Styles/Flat/DialStyle.qml +++ b/src/extras/Styles/Flat/DialStyle.qml @@ -74,8 +74,8 @@ Base.DialStyle { Connections { target: control - onEnabledChanged: progressBar.updateColor() - onActiveFocusChanged: progressBar.updateColor() + function onEnabledChanged() { progressBar.updateColor() } + function onActiveFocusChanged() { progressBar.updateColor() } } } diff --git a/src/extras/Styles/Flat/GaugeStyle.qml b/src/extras/Styles/Flat/GaugeStyle.qml index 1019f7ce..5e903360 100644 --- a/src/extras/Styles/Flat/GaugeStyle.qml +++ b/src/extras/Styles/Flat/GaugeStyle.qml @@ -127,7 +127,7 @@ Base.GaugeStyle { // We don't want that, as we want the label's y pos to be at zero when it's not anchored. // Using a binding here whose when property is true when control.orientation === Qt.Horizontal // doesn't work. - onOrientationChanged: textLabel.y = 0 + function onOrientationChanged() { textLabel.y = 0 } } anchors.baseline: control.orientation === Qt.Vertical ? parent.verticalCenter : undefined } diff --git a/src/extras/Styles/Flat/PieMenuStyle.qml b/src/extras/Styles/Flat/PieMenuStyle.qml index cdea064c..69bb66b7 100644 --- a/src/extras/Styles/Flat/PieMenuStyle.qml +++ b/src/extras/Styles/Flat/PieMenuStyle.qml @@ -69,13 +69,13 @@ Base.PieMenuStyle { Connections { target: pieMenuStyle - onStartAngleChanged: actionCanvas.requestPaint() - onEndAngleChanged: actionCanvas.requestPaint() + function onStartAngleChanged() { actionCanvas.requestPaint() } + function onEndAngleChanged() { actionCanvas.requestPaint() } } Connections { target: __styleData - onPressedChanged: actionCanvas.requestPaint() + function onPressedChanged() { actionCanvas.requestPaint() } } readonly property bool stroke: !__styleData.hovered diff --git a/src/extras/Styles/Flat/qquicktexthandle.cpp b/src/extras/Styles/Flat/qquicktexthandle.cpp index 6b8acb17..48a73b18 100644 --- a/src/extras/Styles/Flat/qquicktexthandle.cpp +++ b/src/extras/Styles/Flat/qquicktexthandle.cpp @@ -38,6 +38,9 @@ ****************************************************************************/ #include "qquicktexthandle.h" +#include <QPainterPath> + +#include <QPainterPath> QQuickTextHandle::QQuickTextHandle(QQuickItem *parent) : QQuickPaintedItem(parent) diff --git a/src/extras/plugins.qmltypes b/src/extras/plugins.qmltypes index 8bb14246..f16f0b5c 100644 --- a/src/extras/plugins.qmltypes +++ b/src/extras/plugins.qmltypes @@ -76,11 +76,6 @@ Module { Method { name: "redraw" } } Component { - name: "QQuickControlsPrivate1Attached" - prototype: "QObject" - Property { name: "window"; type: "QQuickWindow"; isReadonly: true; isPointer: true } - } - Component { name: "QQuickFlatProgressBar" defaultProperty: "data" prototype: "QQuickPaintedItem" @@ -216,7 +211,7 @@ Module { isComposite: true defaultProperty: "data" Property { name: "isDefault"; type: "bool" } - Property { name: "menu"; type: "Menu_QMLTYPE_33"; isPointer: true } + Property { name: "menu"; type: "Menu_QMLTYPE_38"; isPointer: true } Property { name: "checkable"; type: "bool" } Property { name: "checked"; type: "bool" } Property { name: "exclusiveGroup"; type: "QQuickExclusiveGroup1"; isPointer: true } @@ -352,7 +347,7 @@ Module { Property { name: "progress"; type: "double"; isReadonly: true } Signal { name: "activated" } Property { name: "isDefault"; type: "bool" } - Property { name: "menu"; type: "Menu_QMLTYPE_33"; isPointer: true } + Property { name: "menu"; type: "Menu_QMLTYPE_38"; isPointer: true } Property { name: "checkable"; type: "bool" } Property { name: "checked"; type: "bool" } Property { name: "exclusiveGroup"; type: "QQuickExclusiveGroup1"; isPointer: true } @@ -499,7 +494,7 @@ Module { exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" - Property { name: "control"; type: "PieMenu_QMLTYPE_87"; isPointer: true } + Property { name: "control"; type: "PieMenu_QMLTYPE_98"; isPointer: true } Property { name: "styleData"; type: "QObject"; isPointer: true } Property { name: "iconSource"; type: "string"; isReadonly: true } } @@ -553,7 +548,7 @@ Module { isComposite: true defaultProperty: "data" Property { name: "isDefault"; type: "bool" } - Property { name: "menu"; type: "Menu_QMLTYPE_33"; isPointer: true } + Property { name: "menu"; type: "Menu_QMLTYPE_38"; isPointer: true } Property { name: "checkable"; type: "bool" } Property { name: "checked"; type: "bool" } Property { name: "exclusiveGroup"; type: "QQuickExclusiveGroup1"; isPointer: true } diff --git a/tests/auto/dialogs/tst_dialogs.cpp b/tests/auto/dialogs/tst_dialogs.cpp index 2ee81c9b..a9c9b5e6 100644 --- a/tests/auto/dialogs/tst_dialogs.cpp +++ b/tests/auto/dialogs/tst_dialogs.cpp @@ -268,11 +268,11 @@ void tst_dialogs::fileDialogDefaultModality() // Click to show QObject *dlg = qvariant_cast<QObject *>(window->rootObject()->property("fileDialog")); QSignalSpy spyVisibilityChanged(dlg, SIGNAL(visibilityChanged())); - QTest::mouseClick(window, Qt::LeftButton, 0, QPoint(1000, 100)); // show + QTest::mouseClick(window, Qt::LeftButton, {}, QPoint(1000, 100)); // show QTRY_VERIFY(spyVisibilityChanged.count() > 0); int visibilityChangedCount = spyVisibilityChanged.count(); // Can't hide by clicking the main window, because dialog is modal. - QTest::mouseClick(window, Qt::LeftButton, 0, QPoint(1000, 100)); + QTest::mouseClick(window, Qt::LeftButton, {}, QPoint(1000, 100)); /* On OS X, if you send an event directly to a window, the modal dialog doesn't block the event, so the window will process it normally. This @@ -315,11 +315,11 @@ void tst_dialogs::fileDialogNonModal() QObject *dlg = qvariant_cast<QObject *>(window->rootObject()->property("fileDialog")); dlg->setProperty("modality", QVariant((int)Qt::NonModal)); QSignalSpy spyVisibilityChanged(dlg, SIGNAL(visibilityChanged())); - QTest::mouseClick(window, Qt::LeftButton, 0, QPoint(1000, 100)); // show + QTest::mouseClick(window, Qt::LeftButton, {}, QPoint(1000, 100)); // show QTRY_VERIFY(spyVisibilityChanged.count() > 0); int visibilityChangedCount = spyVisibilityChanged.count(); QCOMPARE(dlg->property("visible").toBool(), true); - QTest::mouseClick(window, Qt::LeftButton, 0, QPoint(1000, 100)); // hide + QTest::mouseClick(window, Qt::LeftButton, {}, QPoint(1000, 100)); // hide QTRY_VERIFY(spyVisibilityChanged.count() > visibilityChangedCount); QCOMPARE(dlg->property("visible").toBool(), false); #ifdef Q_OS_WIN |