aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-08-26 14:03:42 +0200
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-08-26 14:03:42 +0200
commit2a054d48ef5a412d104aff0389bcaa69ba2c9878 (patch)
tree953847f836611a0b2225f2fe62808623538a9ca8 /src/quicktemplates2
parent2812d380e5999733aaaf2ace2bdbd0702ce293dc (diff)
parentf51b569219f4fe9ee196c92958bb5dc9f3810678 (diff)
Merge branch 'dev' into nativestyle
Diffstat (limited to 'src/quicktemplates2')
-rw-r--r--src/quicktemplates2/CMakeLists.txt15
-rw-r--r--src/quicktemplates2/qquickabstractbutton_p.h40
-rw-r--r--src/quicktemplates2/qquickaction_p.h2
-rw-r--r--src/quicktemplates2/qquickactiongroup_p.h3
-rw-r--r--src/quicktemplates2/qquickapplicationwindow_p.h36
-rw-r--r--src/quicktemplates2/qquickbusyindicator_p.h2
-rw-r--r--src/quicktemplates2/qquickbutton_p.h2
-rw-r--r--src/quicktemplates2/qquickbuttongroup_p.h13
-rw-r--r--src/quicktemplates2/qquickcheckbox_p.h6
-rw-r--r--src/quicktemplates2/qquickcheckdelegate_p.h6
-rw-r--r--src/quicktemplates2/qquickcombobox_p.h62
-rw-r--r--src/quicktemplates2/qquickcontainer_p.h16
-rw-r--r--src/quicktemplates2/qquickcontrol_p.h57
-rw-r--r--src/quicktemplates2/qquickdelaybutton_p.h2
-rw-r--r--src/quicktemplates2/qquickdial_p.h12
-rw-r--r--src/quicktemplates2/qquickdialog_p.h24
-rw-r--r--src/quicktemplates2/qquickdialogbuttonbox_p.h13
-rw-r--r--src/quicktemplates2/qquickdrawer_p.h6
-rw-r--r--src/quicktemplates2/qquickframe_p.h2
-rw-r--r--src/quicktemplates2/qquickgroupbox_p.h10
-rw-r--r--src/quicktemplates2/qquickheaderview_p.h12
-rw-r--r--src/quicktemplates2/qquickicon_p.h3
-rw-r--r--src/quicktemplates2/qquickitemdelegate_p.h2
-rw-r--r--src/quicktemplates2/qquicklabel_p.h34
-rw-r--r--src/quicktemplates2/qquickmenu_p.h48
-rw-r--r--src/quicktemplates2/qquickmenubar_p.h2
-rw-r--r--src/quicktemplates2/qquickmenubaritem_p.h2
-rw-r--r--src/quicktemplates2/qquickmenuitem_p.h14
-rw-r--r--src/quicktemplates2/qquickmenuseparator_p.h2
-rw-r--r--src/quicktemplates2/qquickoverlay_p.h4
-rw-r--r--src/quicktemplates2/qquickpage_p.h14
-rw-r--r--src/quicktemplates2/qquickpageindicator_p.h2
-rw-r--r--src/quicktemplates2/qquickpane_p.h2
-rw-r--r--src/quicktemplates2/qquickpopup.cpp2
-rw-r--r--src/quicktemplates2/qquickpopup_p.h62
-rw-r--r--src/quicktemplates2/qquickpopupanchors_p.h2
-rw-r--r--src/quicktemplates2/qquickpopuppositioner.cpp18
-rw-r--r--src/quicktemplates2/qquickpopuppositioner_p_p.h1
-rw-r--r--src/quicktemplates2/qquickprogressbar_p.h2
-rw-r--r--src/quicktemplates2/qquickradiobutton_p.h2
-rw-r--r--src/quicktemplates2/qquickradiodelegate_p.h2
-rw-r--r--src/quicktemplates2/qquickrangeslider_p.h32
-rw-r--r--src/quicktemplates2/qquickroundbutton_p.h2
-rw-r--r--src/quicktemplates2/qquickscrollbar_p.h31
-rw-r--r--src/quicktemplates2/qquickscrollindicator_p.h19
-rw-r--r--src/quicktemplates2/qquickscrollview_p.h2
-rw-r--r--src/quicktemplates2/qquickslider_p.h26
-rw-r--r--src/quicktemplates2/qquickspinbox.cpp2
-rw-r--r--src/quicktemplates2/qquickspinbox_p.h34
-rw-r--r--src/quicktemplates2/qquicksplitview_p.h7
-rw-r--r--src/quicktemplates2/qquickstackview.cpp3
-rw-r--r--src/quicktemplates2/qquickstackview_p.h21
-rw-r--r--src/quicktemplates2/qquickswipe_p.h20
-rw-r--r--src/quicktemplates2/qquickswipedelegate.cpp11
-rw-r--r--src/quicktemplates2/qquickswipedelegate_p.h3
-rw-r--r--src/quicktemplates2/qquickswipeview_p.h23
-rw-r--r--src/quicktemplates2/qquickswitch_p.h2
-rw-r--r--src/quicktemplates2/qquickswitchdelegate_p.h2
-rw-r--r--src/quicktemplates2/qquicktabbar_p.h7
-rw-r--r--src/quicktemplates2/qquicktabbutton_p.h2
-rw-r--r--src/quicktemplates2/qquicktextarea_p.h50
-rw-r--r--src/quicktemplates2/qquicktextfield_p.h50
-rw-r--r--src/quicktemplates2/qquicktoolbar_p.h2
-rw-r--r--src/quicktemplates2/qquicktoolbutton_p.h2
-rw-r--r--src/quicktemplates2/qquicktoolseparator_p.h2
-rw-r--r--src/quicktemplates2/qquicktooltip_p.h7
-rw-r--r--src/quicktemplates2/qquicktumbler_p.h13
-rw-r--r--src/quicktemplates2/qtquicktemplates2global_p.h2
-rw-r--r--src/quicktemplates2/quicktemplates2.pro6
69 files changed, 599 insertions, 345 deletions
diff --git a/src/quicktemplates2/CMakeLists.txt b/src/quicktemplates2/CMakeLists.txt
index 4b7f2ff9..ba48dd6e 100644
--- a/src/quicktemplates2/CMakeLists.txt
+++ b/src/quicktemplates2/CMakeLists.txt
@@ -5,6 +5,7 @@
#####################################################################
qt_add_module(QuickTemplates2
+ GENERATE_METATYPES
SOURCES
qquickabstractbutton.cpp qquickabstractbutton_p.h
qquickabstractbutton_p_p.h
@@ -129,6 +130,10 @@ qt_add_module(QuickTemplates2
#### Keys ignored in scope 1:.:.:quicktemplates2.pro:<TRUE>:
# MODULE = "quicktemplates2"
+# QMLTYPES_FILENAME = "plugins.qmltypes"
+# QMLTYPES_INSTALL_DIR = "$$[QT_INSTALL_QML]/QtQuick/Templates"
+# QML_IMPORT_NAME = "QtQuick.Templates"
+# QML_IMPORT_VERSION = "$$QT_VERSION"
## Scopes:
#####################################################################
@@ -147,3 +152,13 @@ qt_extend_target(QuickTemplates2 CONDITION QT_FEATURE_quick_listview AND QT_FEAT
qquicktumbler.cpp qquicktumbler_p.h
qquicktumbler_p_p.h
)
+
+set_target_properties(QuickTemplates2 PROPERTIES
+ QT_QML_MODULE_INSTALL_QMLTYPES TRUE
+ QT_QML_MODULE_VERSION ${CMAKE_PROJECT_VERSION}
+ QT_QML_MODULE_URI QtQuick.Templates
+ QT_QMLTYPES_FILENAME plugins.qmltypes
+ QT_QML_MODULE_INSTALL_DIR "${INSTALL_QMLDIR}/QtQuick/Templates"
+)
+
+qt6_qml_type_registration(QuickTemplates2)
diff --git a/src/quicktemplates2/qquickabstractbutton_p.h b/src/quicktemplates2/qquickabstractbutton_p.h
index 0fa48980..a5dbd733 100644
--- a/src/quicktemplates2/qquickabstractbutton_p.h
+++ b/src/quicktemplates2/qquickabstractbutton_p.h
@@ -68,18 +68,20 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickAbstractButton : public QQuickContr
Q_PROPERTY(bool autoRepeat READ autoRepeat WRITE setAutoRepeat NOTIFY autoRepeatChanged FINAL)
Q_PROPERTY(QQuickItem *indicator READ indicator WRITE setIndicator NOTIFY indicatorChanged FINAL)
// 2.3 (Qt 5.10)
- Q_PROPERTY(QQuickIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL REVISION 3)
- Q_PROPERTY(Display display READ display WRITE setDisplay NOTIFY displayChanged FINAL REVISION 3)
- Q_PROPERTY(QQuickAction *action READ action WRITE setAction NOTIFY actionChanged FINAL REVISION 3)
+ Q_PROPERTY(QQuickIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(Display display READ display WRITE setDisplay NOTIFY displayChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(QQuickAction *action READ action WRITE setAction NOTIFY actionChanged FINAL REVISION(2, 3))
// 2.4 (Qt 5.11)
- Q_PROPERTY(int autoRepeatDelay READ autoRepeatDelay WRITE setAutoRepeatDelay NOTIFY autoRepeatDelayChanged FINAL REVISION 4)
- Q_PROPERTY(int autoRepeatInterval READ autoRepeatInterval WRITE setAutoRepeatInterval NOTIFY autoRepeatIntervalChanged FINAL REVISION 4)
- Q_PROPERTY(qreal pressX READ pressX NOTIFY pressXChanged FINAL REVISION 4)
- Q_PROPERTY(qreal pressY READ pressY NOTIFY pressYChanged FINAL REVISION 4)
+ Q_PROPERTY(int autoRepeatDelay READ autoRepeatDelay WRITE setAutoRepeatDelay NOTIFY autoRepeatDelayChanged FINAL REVISION(2, 4))
+ Q_PROPERTY(int autoRepeatInterval READ autoRepeatInterval WRITE setAutoRepeatInterval NOTIFY autoRepeatIntervalChanged FINAL REVISION(2, 4))
+ Q_PROPERTY(qreal pressX READ pressX NOTIFY pressXChanged FINAL REVISION(2, 4))
+ Q_PROPERTY(qreal pressY READ pressY NOTIFY pressYChanged FINAL REVISION(2, 4))
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal implicitIndicatorWidth READ implicitIndicatorWidth NOTIFY implicitIndicatorWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitIndicatorHeight READ implicitIndicatorHeight NOTIFY implicitIndicatorHeightChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal implicitIndicatorWidth READ implicitIndicatorWidth NOTIFY implicitIndicatorWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitIndicatorHeight READ implicitIndicatorHeight NOTIFY implicitIndicatorHeightChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "background,contentItem,indicator")
+ QML_NAMED_ELEMENT(AbstractButton)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickAbstractButton(QQuickItem *parent = nullptr);
@@ -167,19 +169,19 @@ Q_SIGNALS:
void autoRepeatChanged();
void indicatorChanged();
// 2.2 (Qt 5.9)
- Q_REVISION(2) void toggled();
+ Q_REVISION(2, 2) void toggled();
// 2.3 (Qt 5.10)
- Q_REVISION(3) void iconChanged();
- Q_REVISION(3) void displayChanged();
- Q_REVISION(3) void actionChanged();
+ Q_REVISION(2, 3) void iconChanged();
+ Q_REVISION(2, 3) void displayChanged();
+ Q_REVISION(2, 3) void actionChanged();
// 2.4 (Qt 5.11)
- Q_REVISION(4) void autoRepeatDelayChanged();
- Q_REVISION(4) void autoRepeatIntervalChanged();
- Q_REVISION(4) void pressXChanged();
- Q_REVISION(4) void pressYChanged();
+ Q_REVISION(2, 4) void autoRepeatDelayChanged();
+ Q_REVISION(2, 4) void autoRepeatIntervalChanged();
+ Q_REVISION(2, 4) void pressXChanged();
+ Q_REVISION(2, 4) void pressYChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void implicitIndicatorWidthChanged();
- Q_REVISION(5) void implicitIndicatorHeightChanged();
+ Q_REVISION(2, 5) void implicitIndicatorWidthChanged();
+ Q_REVISION(2, 5) void implicitIndicatorHeightChanged();
protected:
QQuickAbstractButton(QQuickAbstractButtonPrivate &dd, QQuickItem *parent);
diff --git a/src/quicktemplates2/qquickaction_p.h b/src/quicktemplates2/qquickaction_p.h
index cbe0d8fe..f600d89e 100644
--- a/src/quicktemplates2/qquickaction_p.h
+++ b/src/quicktemplates2/qquickaction_p.h
@@ -69,6 +69,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickAction : public QObject
#if QT_CONFIG(shortcut)
Q_PRIVATE_PROPERTY(QQuickAction::d_func(), QVariant shortcut READ shortcut WRITE setShortcut NOTIFY shortcutChanged FINAL)
#endif
+ QML_NAMED_ELEMENT(Action)
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickAction(QObject *parent = nullptr);
diff --git a/src/quicktemplates2/qquickactiongroup_p.h b/src/quicktemplates2/qquickactiongroup_p.h
index aa04d32e..d905f595 100644
--- a/src/quicktemplates2/qquickactiongroup_p.h
+++ b/src/quicktemplates2/qquickactiongroup_p.h
@@ -67,6 +67,9 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickActionGroup : public QObject
Q_PROPERTY(bool exclusive READ isExclusive WRITE setExclusive NOTIFY exclusiveChanged FINAL)
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL)
Q_CLASSINFO("DefaultProperty", "actions")
+ QML_NAMED_ELEMENT(ActionGroup)
+ QML_ATTACHED(QQuickActionGroupAttached)
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickActionGroup(QObject *parent = nullptr);
diff --git a/src/quicktemplates2/qquickapplicationwindow_p.h b/src/quicktemplates2/qquickapplicationwindow_p.h
index 9c0292ed..4e4f50ef 100644
--- a/src/quicktemplates2/qquickapplicationwindow_p.h
+++ b/src/quicktemplates2/qquickapplicationwindow_p.h
@@ -72,11 +72,13 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickApplicationWindow : public QQuickWi
Q_PROPERTY(QFont font READ font WRITE setFont RESET resetFont NOTIFY fontChanged FINAL)
Q_PROPERTY(QLocale locale READ locale WRITE setLocale RESET resetLocale NOTIFY localeChanged FINAL)
// 2.3 (Qt 5.10)
- Q_PROPERTY(QQuickItem *menuBar READ menuBar WRITE setMenuBar NOTIFY menuBarChanged FINAL REVISION 3)
+ Q_PROPERTY(QQuickItem *menuBar READ menuBar WRITE setMenuBar NOTIFY menuBarChanged FINAL REVISION(2, 3))
// 2.14 (Qt 6)
- Q_PRIVATE_PROPERTY(QQuickApplicationWindow::d_func(), QQuickPalette *palette READ palette WRITE setPalette RESET resetPalette NOTIFY paletteChanged REVISION 3)
+ Q_PRIVATE_PROPERTY(QQuickApplicationWindow::d_func(), QQuickPalette *palette READ palette WRITE setPalette RESET resetPalette NOTIFY paletteChanged REVISION(2, 3))
Q_CLASSINFO("DeferredPropertyNames", "background")
Q_CLASSINFO("DefaultProperty", "contentData")
+ QML_NAMED_ELEMENT(ApplicationWindow)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickApplicationWindow(QWindow *parent = nullptr);
@@ -115,7 +117,7 @@ Q_SIGNALS:
void footerChanged();
void fontChanged();
void localeChanged();
- Q_REVISION(3) void menuBarChanged();
+ Q_REVISION(2, 3) void menuBarChanged();
protected:
bool isComponentComplete() const;
@@ -137,7 +139,7 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickApplicationWindowAttached : public
Q_PROPERTY(QQuickItem *activeFocusControl READ activeFocusControl NOTIFY activeFocusControlChanged FINAL)
Q_PROPERTY(QQuickItem *header READ header NOTIFY headerChanged FINAL)
Q_PROPERTY(QQuickItem *footer READ footer NOTIFY footerChanged FINAL)
- Q_PROPERTY(QQuickItem *menuBar READ menuBar NOTIFY menuBarChanged FINAL) // REVISION 3
+ Q_PROPERTY(QQuickItem *menuBar READ menuBar NOTIFY menuBarChanged FINAL) // REVISION(2, 3)
public:
explicit QQuickApplicationWindowAttached(QObject *parent = nullptr);
@@ -156,13 +158,37 @@ Q_SIGNALS:
void headerChanged();
void footerChanged();
// 2.3 (Qt 5.10)
- /*Q_REVISION(3)*/ void menuBarChanged();
+ /*Q_REVISION(2, 3)*/ void menuBarChanged();
private:
Q_DISABLE_COPY(QQuickApplicationWindowAttached)
Q_DECLARE_PRIVATE(QQuickApplicationWindowAttached)
};
+struct QWindowForeign2
+{
+ Q_GADGET
+ QML_ANONYMOUS
+ QML_FOREIGN(QWindow)
+ QML_ADDED_IN_VERSION(2, 0)
+};
+
+struct QQuickWindowForeign
+{
+ Q_GADGET
+ QML_ANONYMOUS
+ QML_FOREIGN(QQuickWindow)
+ QML_ADDED_IN_VERSION(2, 0)
+};
+
+struct QQuickWindowQmlImplForeign
+{
+ Q_GADGET
+ QML_ANONYMOUS
+ QML_FOREIGN(QQuickWindowQmlImpl)
+ QML_ADDED_IN_VERSION(2, 2)
+};
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QQuickApplicationWindow)
diff --git a/src/quicktemplates2/qquickbusyindicator_p.h b/src/quicktemplates2/qquickbusyindicator_p.h
index f140764b..bdb2eb24 100644
--- a/src/quicktemplates2/qquickbusyindicator_p.h
+++ b/src/quicktemplates2/qquickbusyindicator_p.h
@@ -58,6 +58,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickBusyIndicator : public QQuickContro
{
Q_OBJECT
Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged FINAL)
+ QML_NAMED_ELEMENT(BusyIndicator)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickBusyIndicator(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickbutton_p.h b/src/quicktemplates2/qquickbutton_p.h
index 2a757952..bfac5663 100644
--- a/src/quicktemplates2/qquickbutton_p.h
+++ b/src/quicktemplates2/qquickbutton_p.h
@@ -59,6 +59,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickButton : public QQuickAbstractButto
Q_OBJECT
Q_PROPERTY(bool highlighted READ isHighlighted WRITE setHighlighted NOTIFY highlightedChanged FINAL)
Q_PROPERTY(bool flat READ isFlat WRITE setFlat NOTIFY flatChanged FINAL)
+ QML_NAMED_ELEMENT(Button)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickButton(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickbuttongroup_p.h b/src/quicktemplates2/qquickbuttongroup_p.h
index 84ddd225..daff84f2 100644
--- a/src/quicktemplates2/qquickbuttongroup_p.h
+++ b/src/quicktemplates2/qquickbuttongroup_p.h
@@ -66,10 +66,13 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickButtonGroup : public QObject, publi
Q_PROPERTY(QQuickAbstractButton *checkedButton READ checkedButton WRITE setCheckedButton NOTIFY checkedButtonChanged FINAL)
Q_PROPERTY(QQmlListProperty<QQuickAbstractButton> buttons READ buttons NOTIFY buttonsChanged FINAL)
// 2.3 (Qt 5.10)
- Q_PROPERTY(bool exclusive READ isExclusive WRITE setExclusive NOTIFY exclusiveChanged FINAL REVISION 3)
+ Q_PROPERTY(bool exclusive READ isExclusive WRITE setExclusive NOTIFY exclusiveChanged FINAL REVISION(2, 3))
// 2.4 (Qt 5.11)
- Q_PROPERTY(Qt::CheckState checkState READ checkState WRITE setCheckState NOTIFY checkStateChanged FINAL REVISION 4)
+ Q_PROPERTY(Qt::CheckState checkState READ checkState WRITE setCheckState NOTIFY checkStateChanged FINAL REVISION(2, 4))
Q_INTERFACES(QQmlParserStatus)
+ QML_NAMED_ELEMENT(ButtonGroup)
+ QML_ATTACHED(QQuickButtonGroupAttached)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickButtonGroup(QObject *parent = nullptr);
@@ -97,11 +100,11 @@ Q_SIGNALS:
void checkedButtonChanged();
void buttonsChanged();
// 2.1 (Qt 5.8)
- Q_REVISION(1) void clicked(QQuickAbstractButton *button);
+ Q_REVISION(2, 1) void clicked(QQuickAbstractButton *button);
// 2.3 (Qt 5.10)
- Q_REVISION(3) void exclusiveChanged();
+ Q_REVISION(2, 3) void exclusiveChanged();
// 2.4 (Qt 5.11)
- Q_REVISION(4) void checkStateChanged();
+ Q_REVISION(2, 4) void checkStateChanged();
protected:
void classBegin() override;
diff --git a/src/quicktemplates2/qquickcheckbox_p.h b/src/quicktemplates2/qquickcheckbox_p.h
index 1e333d7c..8e53b41d 100644
--- a/src/quicktemplates2/qquickcheckbox_p.h
+++ b/src/quicktemplates2/qquickcheckbox_p.h
@@ -60,7 +60,9 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickCheckBox : public QQuickAbstractBut
Q_PROPERTY(bool tristate READ isTristate WRITE setTristate NOTIFY tristateChanged FINAL)
Q_PROPERTY(Qt::CheckState checkState READ checkState WRITE setCheckState NOTIFY checkStateChanged FINAL)
// 2.4 (Qt 5.11)
- Q_PRIVATE_PROPERTY(QQuickCheckBox::d_func(), QJSValue nextCheckState MEMBER nextCheckState WRITE setNextCheckState NOTIFY nextCheckStateChanged FINAL REVISION 4)
+ Q_PRIVATE_PROPERTY(QQuickCheckBox::d_func(), QJSValue nextCheckState MEMBER nextCheckState WRITE setNextCheckState NOTIFY nextCheckStateChanged FINAL REVISION(2, 4))
+ QML_NAMED_ELEMENT(CheckBox)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickCheckBox(QQuickItem *parent = nullptr);
@@ -75,7 +77,7 @@ Q_SIGNALS:
void tristateChanged();
void checkStateChanged();
// 2.4 (Qt 5.11)
- Q_REVISION(4) void nextCheckStateChanged();
+ Q_REVISION(2, 4) void nextCheckStateChanged();
protected:
QFont defaultFont() const override;
diff --git a/src/quicktemplates2/qquickcheckdelegate_p.h b/src/quicktemplates2/qquickcheckdelegate_p.h
index 67dcf706..9b69943f 100644
--- a/src/quicktemplates2/qquickcheckdelegate_p.h
+++ b/src/quicktemplates2/qquickcheckdelegate_p.h
@@ -60,7 +60,9 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickCheckDelegate : public QQuickItemDe
Q_PROPERTY(bool tristate READ isTristate WRITE setTristate NOTIFY tristateChanged FINAL)
Q_PROPERTY(Qt::CheckState checkState READ checkState WRITE setCheckState NOTIFY checkStateChanged FINAL)
// 2.4 (Qt 5.11)
- Q_PRIVATE_PROPERTY(QQuickCheckDelegate::d_func(), QJSValue nextCheckState MEMBER nextCheckState WRITE setNextCheckState NOTIFY nextCheckStateChanged FINAL REVISION 4)
+ Q_PRIVATE_PROPERTY(QQuickCheckDelegate::d_func(), QJSValue nextCheckState MEMBER nextCheckState WRITE setNextCheckState NOTIFY nextCheckStateChanged FINAL REVISION(2, 4))
+ QML_NAMED_ELEMENT(CheckDelegate)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickCheckDelegate(QQuickItem *parent = nullptr);
@@ -75,7 +77,7 @@ Q_SIGNALS:
void tristateChanged();
void checkStateChanged();
// 2.4 (Qt 5.11)
- Q_REVISION(4) void nextCheckStateChanged();
+ Q_REVISION(2, 4) void nextCheckStateChanged();
protected:
QFont defaultFont() const override;
diff --git a/src/quicktemplates2/qquickcombobox_p.h b/src/quicktemplates2/qquickcombobox_p.h
index 18c1275c..4ad8279e 100644
--- a/src/quicktemplates2/qquickcombobox_p.h
+++ b/src/quicktemplates2/qquickcombobox_p.h
@@ -76,27 +76,29 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickComboBox : public QQuickControl
Q_PROPERTY(QQuickItem *indicator READ indicator WRITE setIndicator NOTIFY indicatorChanged FINAL)
Q_PROPERTY(QQuickPopup *popup READ popup WRITE setPopup NOTIFY popupChanged FINAL)
// 2.1 (Qt 5.8)
- Q_PROPERTY(bool flat READ isFlat WRITE setFlat NOTIFY flatChanged FINAL REVISION 1)
+ Q_PROPERTY(bool flat READ isFlat WRITE setFlat NOTIFY flatChanged FINAL REVISION(2, 1))
// 2.2 (Qt 5.9)
- Q_PROPERTY(bool down READ isDown WRITE setDown RESET resetDown NOTIFY downChanged FINAL REVISION 2)
- Q_PROPERTY(bool editable READ isEditable WRITE setEditable NOTIFY editableChanged FINAL REVISION 2)
- Q_PROPERTY(QString editText READ editText WRITE setEditText RESET resetEditText NOTIFY editTextChanged FINAL REVISION 2)
- Q_PROPERTY(QValidator *validator READ validator WRITE setValidator NOTIFY validatorChanged FINAL REVISION 2)
- Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints NOTIFY inputMethodHintsChanged FINAL REVISION 2)
- Q_PROPERTY(bool inputMethodComposing READ isInputMethodComposing NOTIFY inputMethodComposingChanged FINAL REVISION 2)
- Q_PROPERTY(bool acceptableInput READ hasAcceptableInput NOTIFY acceptableInputChanged FINAL REVISION 2)
+ Q_PROPERTY(bool down READ isDown WRITE setDown RESET resetDown NOTIFY downChanged FINAL REVISION(2, 2))
+ Q_PROPERTY(bool editable READ isEditable WRITE setEditable NOTIFY editableChanged FINAL REVISION(2, 2))
+ Q_PROPERTY(QString editText READ editText WRITE setEditText RESET resetEditText NOTIFY editTextChanged FINAL REVISION(2, 2))
+ Q_PROPERTY(QValidator *validator READ validator WRITE setValidator NOTIFY validatorChanged FINAL REVISION(2, 2))
+ Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints NOTIFY inputMethodHintsChanged FINAL REVISION(2, 2))
+ Q_PROPERTY(bool inputMethodComposing READ isInputMethodComposing NOTIFY inputMethodComposingChanged FINAL REVISION(2, 2))
+ Q_PROPERTY(bool acceptableInput READ hasAcceptableInput NOTIFY acceptableInputChanged FINAL REVISION(2, 2))
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal implicitIndicatorWidth READ implicitIndicatorWidth NOTIFY implicitIndicatorWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitIndicatorHeight READ implicitIndicatorHeight NOTIFY implicitIndicatorHeightChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal implicitIndicatorWidth READ implicitIndicatorWidth NOTIFY implicitIndicatorWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitIndicatorHeight READ implicitIndicatorHeight NOTIFY implicitIndicatorHeightChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "background,contentItem,indicator,popup")
// 2.14 (Qt 5.14)
- Q_PROPERTY(QVariant currentValue READ currentValue NOTIFY currentValueChanged FINAL REVISION 14)
- Q_PROPERTY(QString valueRole READ valueRole WRITE setValueRole NOTIFY valueRoleChanged FINAL REVISION 14)
+ Q_PROPERTY(QVariant currentValue READ currentValue NOTIFY currentValueChanged FINAL REVISION(2, 14))
+ Q_PROPERTY(QString valueRole READ valueRole WRITE setValueRole NOTIFY valueRoleChanged FINAL REVISION(2, 14))
// 2.15 (Qt 5.15)
- Q_PROPERTY(bool selectTextByMouse READ selectTextByMouse WRITE setSelectTextByMouse NOTIFY selectTextByMouseChanged FINAL REVISION 15)
+ Q_PROPERTY(bool selectTextByMouse READ selectTextByMouse WRITE setSelectTextByMouse NOTIFY selectTextByMouseChanged FINAL REVISION(2, 15))
// TODO: 6.0 (Qt 6.0) - QTBUG-84190
Q_PROPERTY(ImplicitContentWidthPolicy implicitContentWidthPolicy READ implicitContentWidthPolicy
WRITE setImplicitContentWidthPolicy NOTIFY implicitContentWidthPolicyChanged FINAL REVISION 15)
+ QML_NAMED_ELEMENT(ComboBox)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickComboBox(QQuickItem *parent = nullptr);
@@ -171,8 +173,8 @@ public:
// 2.14 (Qt 5.14)
QVariant currentValue() const;
- Q_REVISION(14) Q_INVOKABLE QVariant valueAt(int index) const;
- Q_REVISION(14) Q_INVOKABLE int indexOfValue(const QVariant &value) const;
+ Q_REVISION(2, 14) Q_INVOKABLE QVariant valueAt(int index) const;
+ Q_REVISION(2, 14) Q_INVOKABLE int indexOfValue(const QVariant &value) const;
// 2.15 (Qt 5.15)
bool selectTextByMouse() const;
@@ -192,7 +194,7 @@ public:
public Q_SLOTS:
void incrementCurrentIndex();
void decrementCurrentIndex();
- Q_REVISION(2) void selectAll();
+ Q_REVISION(2, 2) void selectAll();
Q_SIGNALS:
void activated(int index);
@@ -210,24 +212,24 @@ Q_SIGNALS:
void indicatorChanged();
void popupChanged();
// 2.1 (Qt 5.8)
- Q_REVISION(1) void flatChanged();
+ Q_REVISION(2, 1) void flatChanged();
// 2.2 (Qt 5.9)
- Q_REVISION(2) void accepted();
- Q_REVISION(2) void downChanged();
- Q_REVISION(2) void editableChanged();
- Q_REVISION(2) void editTextChanged();
- Q_REVISION(2) void validatorChanged();
- Q_REVISION(2) void inputMethodHintsChanged();
- Q_REVISION(2) void inputMethodComposingChanged();
- Q_REVISION(2) void acceptableInputChanged();
+ Q_REVISION(2, 2) void accepted();
+ Q_REVISION(2, 2) void downChanged();
+ Q_REVISION(2, 2) void editableChanged();
+ Q_REVISION(2, 2) void editTextChanged();
+ Q_REVISION(2, 2) void validatorChanged();
+ Q_REVISION(2, 2) void inputMethodHintsChanged();
+ Q_REVISION(2, 2) void inputMethodComposingChanged();
+ Q_REVISION(2, 2) void acceptableInputChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void implicitIndicatorWidthChanged();
- Q_REVISION(5) void implicitIndicatorHeightChanged();
+ Q_REVISION(2, 5) void implicitIndicatorWidthChanged();
+ Q_REVISION(2, 5) void implicitIndicatorHeightChanged();
// 2.14 (Qt 5.14)
- Q_REVISION(14) void valueRoleChanged();
- Q_REVISION(14) void currentValueChanged();
+ Q_REVISION(2, 14) void valueRoleChanged();
+ Q_REVISION(2, 14) void currentValueChanged();
// 2.15 (Qt 5.15)
- Q_REVISION(15) void selectTextByMouseChanged();
+ Q_REVISION(2, 15) void selectTextByMouseChanged();
// 6.0 (Qt 6.0)
Q_REVISION(6, 0) void implicitContentWidthPolicyChanged();
diff --git a/src/quicktemplates2/qquickcontainer_p.h b/src/quicktemplates2/qquickcontainer_p.h
index 9deba199..666c9307 100644
--- a/src/quicktemplates2/qquickcontainer_p.h
+++ b/src/quicktemplates2/qquickcontainer_p.h
@@ -65,9 +65,11 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickContainer : public QQuickControl
Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged FINAL)
Q_PROPERTY(QQuickItem *currentItem READ currentItem NOTIFY currentItemChanged FINAL)
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth RESET resetContentWidth NOTIFY contentWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight RESET resetContentHeight NOTIFY contentHeightChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth RESET resetContentWidth NOTIFY contentWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight RESET resetContentHeight NOTIFY contentHeightChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DefaultProperty", "contentData")
+ QML_NAMED_ELEMENT(Container)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickContainer(QQuickItem *parent = nullptr);
@@ -80,7 +82,7 @@ public:
Q_INVOKABLE void moveItem(int from, int to);
Q_INVOKABLE void removeItem(QQuickItem *item);
// 2.3 (Qt 5.10)
- Q_REVISION(3) Q_INVOKABLE QQuickItem *takeItem(int index);
+ Q_REVISION(2, 3) Q_INVOKABLE QQuickItem *takeItem(int index);
QVariant contentModel() const;
QQmlListProperty<QObject> contentData();
@@ -101,8 +103,8 @@ public:
public Q_SLOTS:
void setCurrentIndex(int index);
// 2.1 (Qt 5.8)
- Q_REVISION(1) void incrementCurrentIndex();
- Q_REVISION(1) void decrementCurrentIndex();
+ Q_REVISION(2, 1) void incrementCurrentIndex();
+ Q_REVISION(2, 1) void decrementCurrentIndex();
Q_SIGNALS:
void countChanged();
@@ -110,8 +112,8 @@ Q_SIGNALS:
void currentIndexChanged();
void currentItemChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void contentWidthChanged();
- Q_REVISION(5) void contentHeightChanged();
+ Q_REVISION(2, 5) void contentWidthChanged();
+ Q_REVISION(2, 5) void contentHeightChanged();
protected:
QQuickContainer(QQuickContainerPrivate &dd, QQuickItem *parent);
diff --git a/src/quicktemplates2/qquickcontrol_p.h b/src/quicktemplates2/qquickcontrol_p.h
index 6d88a8b2..5e4a7cd9 100644
--- a/src/quicktemplates2/qquickcontrol_p.h
+++ b/src/quicktemplates2/qquickcontrol_p.h
@@ -81,17 +81,19 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickControl : public QQuickItem
Q_PROPERTY(QQuickItem *contentItem READ contentItem WRITE setContentItem NOTIFY contentItemChanged FINAL)
Q_PROPERTY(qreal baselineOffset READ baselineOffset WRITE setBaselineOffset RESET resetBaselineOffset NOTIFY baselineOffsetChanged FINAL)
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal horizontalPadding READ horizontalPadding WRITE setHorizontalPadding RESET resetHorizontalPadding NOTIFY horizontalPaddingChanged FINAL REVISION 5)
- Q_PROPERTY(qreal verticalPadding READ verticalPadding WRITE setVerticalPadding RESET resetVerticalPadding NOTIFY verticalPaddingChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitContentWidth READ implicitContentWidth NOTIFY implicitContentWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitContentHeight READ implicitContentHeight NOTIFY implicitContentHeightChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION 5)
- Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal horizontalPadding READ horizontalPadding WRITE setHorizontalPadding RESET resetHorizontalPadding NOTIFY horizontalPaddingChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal verticalPadding READ verticalPadding WRITE setVerticalPadding RESET resetVerticalPadding NOTIFY verticalPaddingChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitContentWidth READ implicitContentWidth NOTIFY implicitContentWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitContentHeight READ implicitContentHeight NOTIFY implicitContentHeightChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "background,contentItem")
+ QML_NAMED_ELEMENT(Control)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickControl(QQuickItem *parent = nullptr);
@@ -215,16 +217,16 @@ Q_SIGNALS:
void contentItemChanged();
void baselineOffsetChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void horizontalPaddingChanged();
- Q_REVISION(5) void verticalPaddingChanged();
- Q_REVISION(5) void implicitContentWidthChanged();
- Q_REVISION(5) void implicitContentHeightChanged();
- Q_REVISION(5) void implicitBackgroundWidthChanged();
- Q_REVISION(5) void implicitBackgroundHeightChanged();
- Q_REVISION(5) void topInsetChanged();
- Q_REVISION(5) void leftInsetChanged();
- Q_REVISION(5) void rightInsetChanged();
- Q_REVISION(5) void bottomInsetChanged();
+ Q_REVISION(2, 5) void horizontalPaddingChanged();
+ Q_REVISION(2, 5) void verticalPaddingChanged();
+ Q_REVISION(2, 5) void implicitContentWidthChanged();
+ Q_REVISION(2, 5) void implicitContentHeightChanged();
+ Q_REVISION(2, 5) void implicitBackgroundWidthChanged();
+ Q_REVISION(2, 5) void implicitBackgroundHeightChanged();
+ Q_REVISION(2, 5) void topInsetChanged();
+ Q_REVISION(2, 5) void leftInsetChanged();
+ Q_REVISION(2, 5) void rightInsetChanged();
+ Q_REVISION(2, 5) void bottomInsetChanged();
protected:
virtual QFont defaultFont() const;
@@ -286,6 +288,21 @@ private:
Q_DECLARE_PRIVATE(QQuickControl)
};
+struct QQuickItemForeign
+{
+ Q_GADGET
+ QML_ANONYMOUS
+ QML_FOREIGN(QQuickItem)
+ QML_ADDED_IN_VERSION(2, 3)
+};
+
+struct QQuickPaletteForeign
+{
+ Q_GADGET
+ QML_NAMED_ELEMENT(Palette)
+ QML_ADDED_IN_VERSION(6, 0)
+};
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QQuickControl)
diff --git a/src/quicktemplates2/qquickdelaybutton_p.h b/src/quicktemplates2/qquickdelaybutton_p.h
index 5ac0885d..a697bca8 100644
--- a/src/quicktemplates2/qquickdelaybutton_p.h
+++ b/src/quicktemplates2/qquickdelaybutton_p.h
@@ -61,6 +61,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickDelayButton : public QQuickAbstract
Q_PROPERTY(int delay READ delay WRITE setDelay NOTIFY delayChanged FINAL)
Q_PROPERTY(qreal progress READ progress WRITE setProgress NOTIFY progressChanged FINAL)
Q_PROPERTY(QQuickTransition *transition READ transition WRITE setTransition NOTIFY transitionChanged FINAL)
+ QML_NAMED_ELEMENT(DelayButton)
+ QML_ADDED_IN_VERSION(2, 2)
public:
explicit QQuickDelayButton(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickdial_p.h b/src/quicktemplates2/qquickdial_p.h
index cc641c78..67bbc183 100644
--- a/src/quicktemplates2/qquickdial_p.h
+++ b/src/quicktemplates2/qquickdial_p.h
@@ -71,10 +71,12 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickDial : public QQuickControl
Q_PROPERTY(bool pressed READ isPressed NOTIFY pressedChanged FINAL)
Q_PROPERTY(QQuickItem *handle READ handle WRITE setHandle NOTIFY handleChanged FINAL)
// 2.2 (Qt 5.9)
- Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged FINAL REVISION 2)
+ Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged FINAL REVISION(2, 2))
// 2.5 (Qt 5.12)
- Q_PROPERTY(InputMode inputMode READ inputMode WRITE setInputMode NOTIFY inputModeChanged FINAL REVISION 5)
+ Q_PROPERTY(InputMode inputMode READ inputMode WRITE setInputMode NOTIFY inputModeChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "background,handle")
+ QML_NAMED_ELEMENT(Dial)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickDial(QQuickItem *parent = nullptr);
@@ -145,10 +147,10 @@ Q_SIGNALS:
void pressedChanged();
void handleChanged();
// 2.2 (Qt 5.9)
- Q_REVISION(2) void moved();
- Q_REVISION(2) void liveChanged();
+ Q_REVISION(2, 2) void moved();
+ Q_REVISION(2, 2) void liveChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void inputModeChanged();
+ Q_REVISION(2, 5) void inputModeChanged();
protected:
void keyPressEvent(QKeyEvent *event) override;
diff --git a/src/quicktemplates2/qquickdialog_p.h b/src/quicktemplates2/qquickdialog_p.h
index 38a1b396..20f56f6b 100644
--- a/src/quicktemplates2/qquickdialog_p.h
+++ b/src/quicktemplates2/qquickdialog_p.h
@@ -64,13 +64,15 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickDialog : public QQuickPopup
Q_PROPERTY(QQuickItem *footer READ footer WRITE setFooter NOTIFY footerChanged FINAL)
Q_PROPERTY(QPlatformDialogHelper::StandardButtons standardButtons READ standardButtons WRITE setStandardButtons NOTIFY standardButtonsChanged FINAL)
// 2.3 (Qt 5.10)
- Q_PROPERTY(int result READ result WRITE setResult NOTIFY resultChanged FINAL REVISION 3)
+ Q_PROPERTY(int result READ result WRITE setResult NOTIFY resultChanged FINAL REVISION(2, 3))
Q_FLAGS(QPlatformDialogHelper::StandardButtons)
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal implicitHeaderWidth READ implicitHeaderWidth NOTIFY implicitHeaderWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitHeaderHeight READ implicitHeaderHeight NOTIFY implicitHeaderHeightChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitFooterWidth READ implicitFooterWidth NOTIFY implicitFooterWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitFooterHeight READ implicitFooterHeight NOTIFY implicitFooterHeightChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal implicitHeaderWidth READ implicitHeaderWidth NOTIFY implicitHeaderWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitHeaderHeight READ implicitHeaderHeight NOTIFY implicitHeaderHeightChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitFooterWidth READ implicitFooterWidth NOTIFY implicitFooterWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitFooterHeight READ implicitFooterHeight NOTIFY implicitFooterHeightChanged FINAL REVISION(2, 5))
+ QML_NAMED_ELEMENT(Dialog)
+ QML_ADDED_IN_VERSION(2, 1)
public:
explicit QQuickDialog(QObject *parent = nullptr);
@@ -86,7 +88,7 @@ public:
QPlatformDialogHelper::StandardButtons standardButtons() const;
void setStandardButtons(QPlatformDialogHelper::StandardButtons buttons);
- Q_REVISION(3) Q_INVOKABLE QQuickAbstractButton *standardButton(QPlatformDialogHelper::StandardButton button) const;
+ Q_REVISION(2, 3) Q_INVOKABLE QQuickAbstractButton *standardButton(QPlatformDialogHelper::StandardButton button) const;
// 2.3 (Qt 5.10)
enum StandardCode { Rejected, Accepted };
@@ -115,11 +117,11 @@ Q_SIGNALS:
void footerChanged();
void standardButtonsChanged();
// 2.3 (Qt 5.10)
- Q_REVISION(3) void applied();
- Q_REVISION(3) void reset();
- Q_REVISION(3) void discarded();
- Q_REVISION(3) void helpRequested();
- Q_REVISION(3) void resultChanged();
+ Q_REVISION(2, 3) void applied();
+ Q_REVISION(2, 3) void reset();
+ Q_REVISION(2, 3) void discarded();
+ Q_REVISION(2, 3) void helpRequested();
+ Q_REVISION(2, 3) void resultChanged();
// 2.5 (Qt 5.12)
void implicitHeaderWidthChanged();
void implicitHeaderHeightChanged();
diff --git a/src/quicktemplates2/qquickdialogbuttonbox_p.h b/src/quicktemplates2/qquickdialogbuttonbox_p.h
index 996f4ef7..b1687df7 100644
--- a/src/quicktemplates2/qquickdialogbuttonbox_p.h
+++ b/src/quicktemplates2/qquickdialogbuttonbox_p.h
@@ -67,8 +67,11 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickDialogButtonBox : public QQuickCont
Q_PROPERTY(QPlatformDialogHelper::StandardButtons standardButtons READ standardButtons WRITE setStandardButtons NOTIFY standardButtonsChanged FINAL)
Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL)
// 2.5 (Qt 5.12)
- Q_PROPERTY(QPlatformDialogHelper::ButtonLayout buttonLayout READ buttonLayout WRITE setButtonLayout RESET resetButtonLayout NOTIFY buttonLayoutChanged FINAL REVISION 5)
+ Q_PROPERTY(QPlatformDialogHelper::ButtonLayout buttonLayout READ buttonLayout WRITE setButtonLayout RESET resetButtonLayout NOTIFY buttonLayoutChanged FINAL REVISION(2, 5))
Q_FLAGS(QPlatformDialogHelper::StandardButtons)
+ QML_NAMED_ELEMENT(DialogButtonBox)
+ QML_ATTACHED(QQuickDialogButtonBoxAttached)
+ QML_ADDED_IN_VERSION(2, 1)
public:
explicit QQuickDialogButtonBox(QQuickItem *parent = nullptr);
@@ -113,11 +116,11 @@ Q_SIGNALS:
void standardButtonsChanged();
void delegateChanged();
// 2.3 (Qt 5.10)
- Q_REVISION(3) void applied();
- Q_REVISION(3) void reset();
- Q_REVISION(3) void discarded();
+ Q_REVISION(2, 3) void applied();
+ Q_REVISION(2, 3) void reset();
+ Q_REVISION(2, 3) void discarded();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void buttonLayoutChanged();
+ Q_REVISION(2, 5) void buttonLayoutChanged();
protected:
void updatePolish() override;
diff --git a/src/quicktemplates2/qquickdrawer_p.h b/src/quicktemplates2/qquickdrawer_p.h
index 8e246fcc..f16ae771 100644
--- a/src/quicktemplates2/qquickdrawer_p.h
+++ b/src/quicktemplates2/qquickdrawer_p.h
@@ -61,7 +61,9 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickDrawer : public QQuickPopup
Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged FINAL)
Q_PROPERTY(qreal dragMargin READ dragMargin WRITE setDragMargin RESET resetDragMargin NOTIFY dragMarginChanged FINAL)
// 2.2 (Qt 5.9)
- Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged FINAL REVISION 2)
+ Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged FINAL REVISION(2, 2))
+ QML_NAMED_ELEMENT(Drawer)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickDrawer(QObject *parent = nullptr);
@@ -85,7 +87,7 @@ Q_SIGNALS:
void positionChanged();
void dragMarginChanged();
// 2.2 (Qt 5.9)
- Q_REVISION(2) void interactiveChanged();
+ Q_REVISION(2, 2) void interactiveChanged();
protected:
bool childMouseEventFilter(QQuickItem *child, QEvent *event) override;
diff --git a/src/quicktemplates2/qquickframe_p.h b/src/quicktemplates2/qquickframe_p.h
index 381088ec..f65e2814 100644
--- a/src/quicktemplates2/qquickframe_p.h
+++ b/src/quicktemplates2/qquickframe_p.h
@@ -57,6 +57,8 @@ class QQuickFramePrivate;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickFrame : public QQuickPane
{
Q_OBJECT
+ QML_NAMED_ELEMENT(Frame)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickFrame(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickgroupbox_p.h b/src/quicktemplates2/qquickgroupbox_p.h
index f5159630..39e20494 100644
--- a/src/quicktemplates2/qquickgroupbox_p.h
+++ b/src/quicktemplates2/qquickgroupbox_p.h
@@ -60,9 +60,11 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickGroupBox : public QQuickFrame
Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged FINAL)
Q_PROPERTY(QQuickItem *label READ label WRITE setLabel NOTIFY labelChanged FINAL)
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal implicitLabelWidth READ implicitLabelWidth NOTIFY implicitLabelWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitLabelHeight READ implicitLabelHeight NOTIFY implicitLabelHeightChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal implicitLabelWidth READ implicitLabelWidth NOTIFY implicitLabelWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitLabelHeight READ implicitLabelHeight NOTIFY implicitLabelHeightChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "background,contentItem,label")
+ QML_NAMED_ELEMENT(GroupBox)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickGroupBox(QQuickItem *parent = nullptr);
@@ -82,8 +84,8 @@ Q_SIGNALS:
void titleChanged();
void labelChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void implicitLabelWidthChanged();
- Q_REVISION(5) void implicitLabelHeightChanged();
+ Q_REVISION(2, 5) void implicitLabelWidthChanged();
+ Q_REVISION(2, 5) void implicitLabelHeightChanged();
protected:
void componentComplete() override;
diff --git a/src/quicktemplates2/qquickheaderview_p.h b/src/quicktemplates2/qquickheaderview_p.h
index 10c55c6e..b8e8b77a 100644
--- a/src/quicktemplates2/qquickheaderview_p.h
+++ b/src/quicktemplates2/qquickheaderview_p.h
@@ -88,6 +88,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickHorizontalHeaderView : public QQuic
{
Q_OBJECT
Q_DECLARE_PRIVATE(QQuickHorizontalHeaderView)
+ QML_NAMED_ELEMENT(HorizontalHeaderView)
+ QML_ADDED_IN_VERSION(2, 15)
public:
QQuickHorizontalHeaderView(QQuickItem *parent = nullptr);
@@ -105,6 +107,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickVerticalHeaderView : public QQuickH
{
Q_OBJECT
Q_DECLARE_PRIVATE(QQuickVerticalHeaderView)
+ QML_NAMED_ELEMENT(VerticalHeaderView)
+ QML_ADDED_IN_VERSION(2, 15)
public:
QQuickVerticalHeaderView(QQuickItem *parent = nullptr);
@@ -117,6 +121,14 @@ private:
Q_DISABLE_COPY(QQuickVerticalHeaderView)
};
+struct QQuickTableViewForeign
+{
+ Q_GADGET
+ QML_ANONYMOUS
+ QML_FOREIGN(QQuickTableView)
+ QML_ADDED_IN_VERSION(2, 14)
+};
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QQuickHorizontalHeaderView)
diff --git a/src/quicktemplates2/qquickicon_p.h b/src/quicktemplates2/qquickicon_p.h
index 1835585d..0c0fe101 100644
--- a/src/quicktemplates2/qquickicon_p.h
+++ b/src/quicktemplates2/qquickicon_p.h
@@ -54,6 +54,7 @@
#include <QtCore/qshareddata.h>
#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
#include <QtGui/qcolor.h>
+#include <QtQml/qqml.h>
QT_BEGIN_NAMESPACE
@@ -68,6 +69,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickIcon
Q_PROPERTY(int height READ height WRITE setHeight RESET resetHeight FINAL)
Q_PROPERTY(QColor color READ color WRITE setColor RESET resetColor FINAL)
Q_PROPERTY(bool cache READ cache WRITE setCache RESET resetCache FINAL)
+ QML_ANONYMOUS
+ QML_ADDED_IN_VERSION(2, 3)
public:
QQuickIcon();
diff --git a/src/quicktemplates2/qquickitemdelegate_p.h b/src/quicktemplates2/qquickitemdelegate_p.h
index a162ddee..2568a0bf 100644
--- a/src/quicktemplates2/qquickitemdelegate_p.h
+++ b/src/quicktemplates2/qquickitemdelegate_p.h
@@ -58,6 +58,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickItemDelegate : public QQuickAbstrac
{
Q_OBJECT
Q_PROPERTY(bool highlighted READ isHighlighted WRITE setHighlighted NOTIFY highlightedChanged FINAL)
+ QML_NAMED_ELEMENT(ItemDelegate)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickItemDelegate(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquicklabel_p.h b/src/quicktemplates2/qquicklabel_p.h
index c3e4fb45..02acddca 100644
--- a/src/quicktemplates2/qquicklabel_p.h
+++ b/src/quicktemplates2/qquicklabel_p.h
@@ -62,13 +62,15 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickLabel : public QQuickText
Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged) // override
Q_PROPERTY(QQuickItem *background READ background WRITE setBackground NOTIFY backgroundChanged FINAL)
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION 5)
- Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "background")
+ QML_NAMED_ELEMENT(Label)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickLabel(QQuickItem *parent = nullptr);
@@ -104,12 +106,12 @@ Q_SIGNALS:
void fontChanged();
void backgroundChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void implicitBackgroundWidthChanged();
- Q_REVISION(5) void implicitBackgroundHeightChanged();
- Q_REVISION(5) void topInsetChanged();
- Q_REVISION(5) void leftInsetChanged();
- Q_REVISION(5) void rightInsetChanged();
- Q_REVISION(5) void bottomInsetChanged();
+ Q_REVISION(2, 5) void implicitBackgroundWidthChanged();
+ Q_REVISION(2, 5) void implicitBackgroundHeightChanged();
+ Q_REVISION(2, 5) void topInsetChanged();
+ Q_REVISION(2, 5) void leftInsetChanged();
+ Q_REVISION(2, 5) void rightInsetChanged();
+ Q_REVISION(2, 5) void bottomInsetChanged();
protected:
void classBegin() override;
@@ -124,6 +126,14 @@ private:
Q_DECLARE_PRIVATE(QQuickLabel)
};
+struct QQuickTextForeign
+{
+ Q_GADGET
+ QML_ANONYMOUS
+ QML_FOREIGN(QQuickText)
+ QML_ADDED_IN_VERSION(2, 3)
+};
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QQuickLabel)
diff --git a/src/quicktemplates2/qquickmenu_p.h b/src/quicktemplates2/qquickmenu_p.h
index de252bf8..2646cffa 100644
--- a/src/quicktemplates2/qquickmenu_p.h
+++ b/src/quicktemplates2/qquickmenu_p.h
@@ -67,12 +67,14 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickMenu : public QQuickPopup
Q_PROPERTY(QQmlListProperty<QObject> contentData READ contentData FINAL)
Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged FINAL)
// 2.3 (Qt 5.10)
- Q_PROPERTY(int count READ count NOTIFY countChanged FINAL REVISION 3)
- Q_PROPERTY(bool cascade READ cascade WRITE setCascade RESET resetCascade NOTIFY cascadeChanged FINAL REVISION 3)
- Q_PROPERTY(qreal overlap READ overlap WRITE setOverlap NOTIFY overlapChanged FINAL REVISION 3)
- Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL REVISION 3)
- Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged FINAL REVISION 3)
+ Q_PROPERTY(int count READ count NOTIFY countChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(bool cascade READ cascade WRITE setCascade RESET resetCascade NOTIFY cascadeChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(qreal overlap READ overlap WRITE setOverlap NOTIFY overlapChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged FINAL REVISION(2, 3))
Q_CLASSINFO("DefaultProperty", "contentData")
+ QML_NAMED_ELEMENT(Menu)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickMenu(QObject *parent = nullptr);
@@ -104,25 +106,25 @@ public:
// 2.3 (Qt 5.10)
int count() const;
- Q_REVISION(3) Q_INVOKABLE QQuickItem *takeItem(int index);
+ Q_REVISION(2, 3) Q_INVOKABLE QQuickItem *takeItem(int index);
- Q_REVISION(3) Q_INVOKABLE QQuickMenu *menuAt(int index) const;
- Q_REVISION(3) Q_INVOKABLE void addMenu(QQuickMenu *menu);
- Q_REVISION(3) Q_INVOKABLE void insertMenu(int index, QQuickMenu *menu);
- Q_REVISION(3) Q_INVOKABLE void removeMenu(QQuickMenu *menu);
- Q_REVISION(3) Q_INVOKABLE QQuickMenu *takeMenu(int index);
+ Q_REVISION(2, 3) Q_INVOKABLE QQuickMenu *menuAt(int index) const;
+ Q_REVISION(2, 3) Q_INVOKABLE void addMenu(QQuickMenu *menu);
+ Q_REVISION(2, 3) Q_INVOKABLE void insertMenu(int index, QQuickMenu *menu);
+ Q_REVISION(2, 3) Q_INVOKABLE void removeMenu(QQuickMenu *menu);
+ Q_REVISION(2, 3) Q_INVOKABLE QQuickMenu *takeMenu(int index);
- Q_REVISION(3) Q_INVOKABLE QQuickAction *actionAt(int index) const;
- Q_REVISION(3) Q_INVOKABLE void addAction(QQuickAction *action);
- Q_REVISION(3) Q_INVOKABLE void insertAction(int index, QQuickAction *action);
- Q_REVISION(3) Q_INVOKABLE void removeAction(QQuickAction *action);
- Q_REVISION(3) Q_INVOKABLE QQuickAction *takeAction(int index);
+ Q_REVISION(2, 3) Q_INVOKABLE QQuickAction *actionAt(int index) const;
+ Q_REVISION(2, 3) Q_INVOKABLE void addAction(QQuickAction *action);
+ Q_REVISION(2, 3) Q_INVOKABLE void insertAction(int index, QQuickAction *action);
+ Q_REVISION(2, 3) Q_INVOKABLE void removeAction(QQuickAction *action);
+ Q_REVISION(2, 3) Q_INVOKABLE QQuickAction *takeAction(int index);
void popup(QQuickItem *menuItem = nullptr);
void popup(const QPointF &pos, QQuickItem *menuItem = nullptr);
- Q_REVISION(3) Q_INVOKABLE void popup(QQmlV4Function *args);
- Q_REVISION(3) Q_INVOKABLE void dismiss();
+ Q_REVISION(2, 3) Q_INVOKABLE void popup(QQmlV4Function *args);
+ Q_REVISION(2, 3) Q_INVOKABLE void dismiss();
protected:
void componentComplete() override;
@@ -133,11 +135,11 @@ protected:
Q_SIGNALS:
void titleChanged(const QString &title);
// 2.3 (Qt 5.10)
- Q_REVISION(3) void countChanged();
- Q_REVISION(3) void cascadeChanged(bool cascade);
- Q_REVISION(3) void overlapChanged();
- Q_REVISION(3) void delegateChanged();
- Q_REVISION(3) void currentIndexChanged();
+ Q_REVISION(2, 3) void countChanged();
+ Q_REVISION(2, 3) void cascadeChanged(bool cascade);
+ Q_REVISION(2, 3) void overlapChanged();
+ Q_REVISION(2, 3) void delegateChanged();
+ Q_REVISION(2, 3) void currentIndexChanged();
protected:
void timerEvent(QTimerEvent *event) override;
diff --git a/src/quicktemplates2/qquickmenubar_p.h b/src/quicktemplates2/qquickmenubar_p.h
index 8fcaa870..8092cf9b 100644
--- a/src/quicktemplates2/qquickmenubar_p.h
+++ b/src/quicktemplates2/qquickmenubar_p.h
@@ -63,6 +63,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickMenuBar : public QQuickContainer
Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight RESET resetContentHeight NOTIFY contentHeightChanged FINAL) // re-declare QQuickContainer::contentHeight (REV 5)
Q_PRIVATE_PROPERTY(QQuickMenuBar::d_func(), QQmlListProperty<QQuickMenu> menus READ menus NOTIFY menusChanged FINAL)
Q_PRIVATE_PROPERTY(QQuickMenuBar::d_func(), QQmlListProperty<QObject> contentData READ contentData FINAL)
+ QML_NAMED_ELEMENT(MenuBar)
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickMenuBar(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickmenubaritem_p.h b/src/quicktemplates2/qquickmenubaritem_p.h
index b58ef1c4..a913f242 100644
--- a/src/quicktemplates2/qquickmenubaritem_p.h
+++ b/src/quicktemplates2/qquickmenubaritem_p.h
@@ -62,6 +62,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickMenuBarItem : public QQuickAbstract
Q_PROPERTY(QQuickMenuBar *menuBar READ menuBar NOTIFY menuBarChanged FINAL)
Q_PROPERTY(QQuickMenu *menu READ menu WRITE setMenu NOTIFY menuChanged FINAL)
Q_PROPERTY(bool highlighted READ isHighlighted WRITE setHighlighted NOTIFY highlightedChanged FINAL)
+ QML_NAMED_ELEMENT(MenuBarItem)
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickMenuBarItem(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickmenuitem_p.h b/src/quicktemplates2/qquickmenuitem_p.h
index e519132e..817da76b 100644
--- a/src/quicktemplates2/qquickmenuitem_p.h
+++ b/src/quicktemplates2/qquickmenuitem_p.h
@@ -60,10 +60,12 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickMenuItem : public QQuickAbstractBut
Q_OBJECT
Q_PROPERTY(bool highlighted READ isHighlighted WRITE setHighlighted NOTIFY highlightedChanged FINAL)
// 2.3 (Qt 5.10)
- Q_PROPERTY(QQuickItem *arrow READ arrow WRITE setArrow NOTIFY arrowChanged FINAL REVISION 3)
- Q_PROPERTY(QQuickMenu *menu READ menu NOTIFY menuChanged FINAL REVISION 3)
- Q_PROPERTY(QQuickMenu *subMenu READ subMenu NOTIFY subMenuChanged FINAL REVISION 3)
+ Q_PROPERTY(QQuickItem *arrow READ arrow WRITE setArrow NOTIFY arrowChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(QQuickMenu *menu READ menu NOTIFY menuChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(QQuickMenu *subMenu READ subMenu NOTIFY subMenuChanged FINAL REVISION(2, 3))
Q_CLASSINFO("DeferredPropertyNames", "arrow,background,contentItem,indicator")
+ QML_NAMED_ELEMENT(MenuItem)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickMenuItem(QQuickItem *parent = nullptr);
@@ -82,9 +84,9 @@ Q_SIGNALS:
void triggered();
void highlightedChanged();
// 2.3 (Qt 5.10)
- Q_REVISION(3) void arrowChanged();
- Q_REVISION(3) void menuChanged();
- Q_REVISION(3) void subMenuChanged();
+ Q_REVISION(2, 3) void arrowChanged();
+ Q_REVISION(2, 3) void menuChanged();
+ Q_REVISION(2, 3) void subMenuChanged();
protected:
void componentComplete() override;
diff --git a/src/quicktemplates2/qquickmenuseparator_p.h b/src/quicktemplates2/qquickmenuseparator_p.h
index 15d96739..330aaac4 100644
--- a/src/quicktemplates2/qquickmenuseparator_p.h
+++ b/src/quicktemplates2/qquickmenuseparator_p.h
@@ -58,6 +58,8 @@ class QQuickMenuSeparator;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickMenuSeparator : public QQuickControl
{
Q_OBJECT
+ QML_NAMED_ELEMENT(MenuSeparator)
+ QML_ADDED_IN_VERSION(2, 1)
public:
explicit QQuickMenuSeparator(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickoverlay_p.h b/src/quicktemplates2/qquickoverlay_p.h
index 20ec21a1..c6e530e2 100644
--- a/src/quicktemplates2/qquickoverlay_p.h
+++ b/src/quicktemplates2/qquickoverlay_p.h
@@ -63,6 +63,10 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickOverlay : public QQuickItem
Q_OBJECT
Q_PROPERTY(QQmlComponent *modal READ modal WRITE setModal NOTIFY modalChanged FINAL)
Q_PROPERTY(QQmlComponent *modeless READ modeless WRITE setModeless NOTIFY modelessChanged FINAL)
+ QML_NAMED_ELEMENT(Overlay)
+ QML_ATTACHED(QQuickOverlayAttached)
+ QML_UNCREATABLE("")
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickOverlay(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickpage_p.h b/src/quicktemplates2/qquickpage_p.h
index b7888ad6..3278900d 100644
--- a/src/quicktemplates2/qquickpage_p.h
+++ b/src/quicktemplates2/qquickpage_p.h
@@ -62,13 +62,15 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickPage : public QQuickPane
Q_PROPERTY(QQuickItem *header READ header WRITE setHeader NOTIFY headerChanged FINAL)
Q_PROPERTY(QQuickItem *footer READ footer WRITE setFooter NOTIFY footerChanged FINAL)
// 2.1 (Qt 5.8)
- Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth NOTIFY contentWidthChanged FINAL REVISION 1)
- Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight NOTIFY contentHeightChanged FINAL REVISION 1)
+ Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth NOTIFY contentWidthChanged FINAL REVISION(2, 1))
+ Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight NOTIFY contentHeightChanged FINAL REVISION(2, 1))
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal implicitHeaderWidth READ implicitHeaderWidth NOTIFY implicitHeaderWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitHeaderHeight READ implicitHeaderHeight NOTIFY implicitHeaderHeightChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitFooterWidth READ implicitFooterWidth NOTIFY implicitFooterWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitFooterHeight READ implicitFooterHeight NOTIFY implicitFooterHeightChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal implicitHeaderWidth READ implicitHeaderWidth NOTIFY implicitHeaderWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitHeaderHeight READ implicitHeaderHeight NOTIFY implicitHeaderHeightChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitFooterWidth READ implicitFooterWidth NOTIFY implicitFooterWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitFooterHeight READ implicitFooterHeight NOTIFY implicitFooterHeightChanged FINAL REVISION(2, 5))
+ QML_NAMED_ELEMENT(Page)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickPage(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickpageindicator_p.h b/src/quicktemplates2/qquickpageindicator_p.h
index 01352016..a21e88fe 100644
--- a/src/quicktemplates2/qquickpageindicator_p.h
+++ b/src/quicktemplates2/qquickpageindicator_p.h
@@ -62,6 +62,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickPageIndicator : public QQuickContro
Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged FINAL)
Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged FINAL)
Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL)
+ QML_NAMED_ELEMENT(PageIndicator)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickPageIndicator(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickpane_p.h b/src/quicktemplates2/qquickpane_p.h
index 86b2c9f2..2aeb94cd 100644
--- a/src/quicktemplates2/qquickpane_p.h
+++ b/src/quicktemplates2/qquickpane_p.h
@@ -63,6 +63,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickPane : public QQuickControl
Q_PRIVATE_PROPERTY(QQuickPane::d_func(), QQmlListProperty<QObject> contentData READ contentData FINAL)
Q_PRIVATE_PROPERTY(QQuickPane::d_func(), QQmlListProperty<QQuickItem> contentChildren READ contentChildren NOTIFY contentChildrenChanged FINAL)
Q_CLASSINFO("DefaultProperty", "contentData")
+ QML_NAMED_ELEMENT(Pane)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickPane(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp
index 57b93036..d5a0ccf4 100644
--- a/src/quicktemplates2/qquickpopup.cpp
+++ b/src/quicktemplates2/qquickpopup.cpp
@@ -451,7 +451,7 @@ bool QQuickPopupPrivate::prepareExitTransition()
if (transitionState == ExitTransition && transitionManager.isRunning())
return false;
- if (transitionState != ExitTransition) {
+ if (transitionState != ExitTransition && !hadActiveFocusBeforeExitTransition) {
// The setFocus(false) call below removes any active focus before we're
// able to check it in finalizeExitTransition.
hadActiveFocusBeforeExitTransition = popupItem->hasActiveFocus();
diff --git a/src/quicktemplates2/qquickpopup_p.h b/src/quicktemplates2/qquickpopup_p.h
index d5e2f1e9..76ccc7a9 100644
--- a/src/quicktemplates2/qquickpopup_p.h
+++ b/src/quicktemplates2/qquickpopup_p.h
@@ -116,26 +116,28 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickPopup : public QObject, public QQml
Q_PROPERTY(QQuickTransition *enter READ enter WRITE setEnter NOTIFY enterChanged FINAL)
Q_PROPERTY(QQuickTransition *exit READ exit WRITE setExit NOTIFY exitChanged FINAL)
// 2.1 (Qt 5.8)
- Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing RESET resetSpacing NOTIFY spacingChanged FINAL REVISION 1)
+ Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing RESET resetSpacing NOTIFY spacingChanged FINAL REVISION(2, 1))
// 2.3 (Qt 5.10)
- Q_PROPERTY(bool opened READ isOpened NOTIFY openedChanged FINAL REVISION 3)
- Q_PROPERTY(bool mirrored READ isMirrored NOTIFY mirroredChanged FINAL REVISION 3)
- Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL REVISION 3)
- Q_PRIVATE_PROPERTY(QQuickPopup::d_func(), QQuickPalette *palette READ palette WRITE setPalette RESET resetPalette NOTIFY paletteChanged REVISION 3)
+ Q_PROPERTY(bool opened READ isOpened NOTIFY openedChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(bool mirrored READ isMirrored NOTIFY mirroredChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL REVISION(2, 3))
+ Q_PRIVATE_PROPERTY(QQuickPopup::d_func(), QQuickPalette *palette READ palette WRITE setPalette RESET resetPalette NOTIFY paletteChanged REVISION(2, 3))
// 2.5 (Qt 5.12)
Q_PROPERTY(qreal horizontalPadding READ horizontalPadding WRITE setHorizontalPadding RESET resetHorizontalPadding NOTIFY horizontalPaddingChanged FINAL)
Q_PROPERTY(qreal verticalPadding READ verticalPadding WRITE setVerticalPadding RESET resetVerticalPadding NOTIFY verticalPaddingChanged FINAL)
- Q_PRIVATE_PROPERTY(QQuickPopup::d_func(), QQuickPopupAnchors *anchors READ getAnchors DESIGNABLE false CONSTANT FINAL REVISION 5)
- Q_PROPERTY(qreal implicitContentWidth READ implicitContentWidth NOTIFY implicitContentWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitContentHeight READ implicitContentHeight NOTIFY implicitContentHeightChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION 5)
- Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION 5)
+ Q_PRIVATE_PROPERTY(QQuickPopup::d_func(), QQuickPopupAnchors *anchors READ getAnchors DESIGNABLE false CONSTANT FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitContentWidth READ implicitContentWidth NOTIFY implicitContentWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitContentHeight READ implicitContentHeight NOTIFY implicitContentHeightChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "background,contentItem")
Q_CLASSINFO("DefaultProperty", "contentData")
+ QML_NAMED_ELEMENT(Popup)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickPopup(QObject *parent = nullptr);
@@ -390,24 +392,24 @@ Q_SIGNALS:
void exitChanged();
void windowChanged(QQuickWindow *window);
// 2.1 (Qt 5.8)
- Q_REVISION(1) void spacingChanged();
+ Q_REVISION(2, 1) void spacingChanged();
// 2.3 (Qt 5.10)
- Q_REVISION(3) void openedChanged();
- Q_REVISION(3) void mirroredChanged();
- Q_REVISION(3) void enabledChanged();
- Q_REVISION(3) void paletteChanged();
- Q_REVISION(3) void paletteCreated();
+ Q_REVISION(2, 3) void openedChanged();
+ Q_REVISION(2, 3) void mirroredChanged();
+ Q_REVISION(2, 3) void enabledChanged();
+ Q_REVISION(2, 3) void paletteChanged();
+ Q_REVISION(2, 3) void paletteCreated();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void horizontalPaddingChanged();
- Q_REVISION(5) void verticalPaddingChanged();
- Q_REVISION(5) void implicitContentWidthChanged();
- Q_REVISION(5) void implicitContentHeightChanged();
- Q_REVISION(5) void implicitBackgroundWidthChanged();
- Q_REVISION(5) void implicitBackgroundHeightChanged();
- Q_REVISION(5) void topInsetChanged();
- Q_REVISION(5) void leftInsetChanged();
- Q_REVISION(5) void rightInsetChanged();
- Q_REVISION(5) void bottomInsetChanged();
+ Q_REVISION(2, 5) void horizontalPaddingChanged();
+ Q_REVISION(2, 5) void verticalPaddingChanged();
+ Q_REVISION(2, 5) void implicitContentWidthChanged();
+ Q_REVISION(2, 5) void implicitContentHeightChanged();
+ Q_REVISION(2, 5) void implicitBackgroundWidthChanged();
+ Q_REVISION(2, 5) void implicitBackgroundHeightChanged();
+ Q_REVISION(2, 5) void topInsetChanged();
+ Q_REVISION(2, 5) void leftInsetChanged();
+ Q_REVISION(2, 5) void rightInsetChanged();
+ Q_REVISION(2, 5) void bottomInsetChanged();
protected:
QQuickPopup(QQuickPopupPrivate &dd, QObject *parent);
diff --git a/src/quicktemplates2/qquickpopupanchors_p.h b/src/quicktemplates2/qquickpopupanchors_p.h
index eff4e23d..dce1c5b2 100644
--- a/src/quicktemplates2/qquickpopupanchors_p.h
+++ b/src/quicktemplates2/qquickpopupanchors_p.h
@@ -63,6 +63,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickPopupAnchors : public QObject, publ
{
Q_OBJECT
Q_PROPERTY(QQuickItem *centerIn READ centerIn WRITE setCenterIn RESET resetCenterIn NOTIFY centerInChanged)
+ QML_ANONYMOUS
+ QML_ADDED_IN_VERSION(2, 5)
public:
explicit QQuickPopupAnchors(QQuickPopup *popup);
diff --git a/src/quicktemplates2/qquickpopuppositioner.cpp b/src/quicktemplates2/qquickpopuppositioner.cpp
index dbe8ac1d..1bfaafbe 100644
--- a/src/quicktemplates2/qquickpopuppositioner.cpp
+++ b/src/quicktemplates2/qquickpopuppositioner.cpp
@@ -92,7 +92,10 @@ void QQuickPopupPositioner::setParentItem(QQuickItem *parent)
QQuickItemPrivate::get(parent)->addItemChangeListener(this, ItemChangeTypes);
addAncestorListeners(parent->parentItem());
-
+ // Store the scale property so the end result of any transition that could effect the scale
+ // does not influence the top left of the final popup, so it doesn't appear to flip from one
+ // position to another as a result
+ m_popupScale = m_popup->popupItem()->scale();
if (m_popup->popupItem()->isVisible())
QQuickPopupPrivate::get(m_popup)->reposition();
}
@@ -108,11 +111,10 @@ void QQuickPopupPositioner::reposition()
return;
}
- const qreal scale = popupItem->scale();
- const qreal w = popupItem->width() * scale;
- const qreal h = popupItem->height() * scale;
- const qreal iw = popupItem->implicitWidth() * scale;
- const qreal ih = popupItem->implicitHeight() * scale;
+ const qreal w = popupItem->width() * m_popupScale;
+ const qreal h = popupItem->height() * m_popupScale;
+ const qreal iw = popupItem->implicitWidth() * m_popupScale;
+ const qreal ih = popupItem->implicitHeight() * m_popupScale;
bool widthAdjusted = false;
bool heightAdjusted = false;
@@ -258,9 +260,9 @@ void QQuickPopupPositioner::reposition()
}
if (!p->hasWidth && widthAdjusted && rect.width() > 0)
- popupItem->setWidth(rect.width() / scale);
+ popupItem->setWidth(rect.width() / m_popupScale);
if (!p->hasHeight && heightAdjusted && rect.height() > 0)
- popupItem->setHeight(rect.height() / scale);
+ popupItem->setHeight(rect.height() / m_popupScale);
m_positioning = false;
}
diff --git a/src/quicktemplates2/qquickpopuppositioner_p_p.h b/src/quicktemplates2/qquickpopuppositioner_p_p.h
index 64f57a3f..03a2e2fe 100644
--- a/src/quicktemplates2/qquickpopuppositioner_p_p.h
+++ b/src/quicktemplates2/qquickpopuppositioner_p_p.h
@@ -79,6 +79,7 @@ protected:
bool m_positioning = false;
QQuickItem *m_parentItem = nullptr;
QQuickPopup *m_popup = nullptr;
+ qreal m_popupScale = 1.0;
};
QT_END_NAMESPACE
diff --git a/src/quicktemplates2/qquickprogressbar_p.h b/src/quicktemplates2/qquickprogressbar_p.h
index f2284c65..8322670f 100644
--- a/src/quicktemplates2/qquickprogressbar_p.h
+++ b/src/quicktemplates2/qquickprogressbar_p.h
@@ -63,6 +63,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickProgressBar : public QQuickControl
Q_PROPERTY(qreal position READ position NOTIFY positionChanged FINAL)
Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL)
Q_PROPERTY(bool indeterminate READ isIndeterminate WRITE setIndeterminate NOTIFY indeterminateChanged FINAL)
+ QML_NAMED_ELEMENT(ProgressBar)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickProgressBar(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickradiobutton_p.h b/src/quicktemplates2/qquickradiobutton_p.h
index f937081f..29e18922 100644
--- a/src/quicktemplates2/qquickradiobutton_p.h
+++ b/src/quicktemplates2/qquickradiobutton_p.h
@@ -58,6 +58,8 @@ class QQuickRadioButtonPrivate;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickRadioButton : public QQuickAbstractButton
{
Q_OBJECT
+ QML_NAMED_ELEMENT(RadioButton)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickRadioButton(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickradiodelegate_p.h b/src/quicktemplates2/qquickradiodelegate_p.h
index 1a4761a3..0ddff985 100644
--- a/src/quicktemplates2/qquickradiodelegate_p.h
+++ b/src/quicktemplates2/qquickradiodelegate_p.h
@@ -57,6 +57,8 @@ class QQuickRadioDelegatePrivate;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickRadioDelegate : public QQuickItemDelegate
{
Q_OBJECT
+ QML_NAMED_ELEMENT(RadioDelegate)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickRadioDelegate(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickrangeslider_p.h b/src/quicktemplates2/qquickrangeslider_p.h
index a42245a1..d767228e 100644
--- a/src/quicktemplates2/qquickrangeslider_p.h
+++ b/src/quicktemplates2/qquickrangeslider_p.h
@@ -66,12 +66,14 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickRangeSlider : public QQuickControl
Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged FINAL)
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
// 2.2 (Qt 5.9)
- Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged FINAL REVISION 2)
- Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION 3)
+ Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged FINAL REVISION(2, 2))
+ Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION(2, 3))
// 2.3 (Qt 5.10)
- Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION 3)
+ Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION(2, 3))
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal touchDragThreshold READ touchDragThreshold WRITE setTouchDragThreshold RESET resetTouchDragThreshold NOTIFY touchDragThresholdChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal touchDragThreshold READ touchDragThreshold WRITE setTouchDragThreshold RESET resetTouchDragThreshold NOTIFY touchDragThresholdChanged FINAL REVISION(2, 5))
+ QML_NAMED_ELEMENT(RangeSlider)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickRangeSlider(QQuickItem *parent = nullptr);
@@ -116,7 +118,7 @@ public:
qreal touchDragThreshold() const;
void setTouchDragThreshold(qreal touchDragThreshold);
void resetTouchDragThreshold();
- Q_REVISION(5) Q_INVOKABLE qreal valueAt(qreal position) const;
+ Q_REVISION(2, 5) Q_INVOKABLE qreal valueAt(qreal position) const;
Q_SIGNALS:
void fromChanged();
@@ -125,9 +127,9 @@ Q_SIGNALS:
void snapModeChanged();
void orientationChanged();
// 2.2 (Qt 5.9)
- Q_REVISION(2) void liveChanged();
+ Q_REVISION(2, 2) void liveChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void touchDragThresholdChanged();
+ Q_REVISION(2, 5) void touchDragThresholdChanged();
protected:
void focusInEvent(QFocusEvent *event) override;
@@ -166,11 +168,13 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickRangeSliderNode : public QObject
Q_PROPERTY(QQuickItem *handle READ handle WRITE setHandle NOTIFY handleChanged FINAL)
Q_PROPERTY(bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged FINAL)
// 2.1 (Qt 5.8)
- Q_PROPERTY(bool hovered READ isHovered WRITE setHovered NOTIFY hoveredChanged FINAL REVISION 1)
+ Q_PROPERTY(bool hovered READ isHovered WRITE setHovered NOTIFY hoveredChanged FINAL REVISION(2, 1))
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal implicitHandleWidth READ implicitHandleWidth NOTIFY implicitHandleWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitHandleHeight READ implicitHandleHeight NOTIFY implicitHandleHeightChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal implicitHandleWidth READ implicitHandleWidth NOTIFY implicitHandleWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitHandleHeight READ implicitHandleHeight NOTIFY implicitHandleHeightChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "handle")
+ QML_ANONYMOUS
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickRangeSliderNode(qreal value, QQuickRangeSlider *slider);
@@ -207,11 +211,11 @@ Q_SIGNALS:
void handleChanged();
void pressedChanged();
// 2.1 (Qt 5.8)
- Q_REVISION(1) void hoveredChanged();
+ Q_REVISION(2, 1) void hoveredChanged();
// 2.5 (Qt 5.12)
- /*Q_REVISION(5)*/ void moved();
- /*Q_REVISION(5)*/ void implicitHandleWidthChanged();
- /*Q_REVISION(5)*/ void implicitHandleHeightChanged();
+ /*Q_REVISION(2, 5)*/ void moved();
+ /*Q_REVISION(2, 5)*/ void implicitHandleWidthChanged();
+ /*Q_REVISION(2, 5)*/ void implicitHandleHeightChanged();
private:
Q_DISABLE_COPY(QQuickRangeSliderNode)
diff --git a/src/quicktemplates2/qquickroundbutton_p.h b/src/quicktemplates2/qquickroundbutton_p.h
index dc5e432a..fdd46cf8 100644
--- a/src/quicktemplates2/qquickroundbutton_p.h
+++ b/src/quicktemplates2/qquickroundbutton_p.h
@@ -58,6 +58,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickRoundButton : public QQuickButton
{
Q_OBJECT
Q_PROPERTY(qreal radius READ radius WRITE setRadius RESET resetRadius NOTIFY radiusChanged FINAL)
+ QML_NAMED_ELEMENT(RoundButton)
+ QML_ADDED_IN_VERSION(2, 1)
public:
explicit QQuickRoundButton(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickscrollbar_p.h b/src/quicktemplates2/qquickscrollbar_p.h
index 5fad8240..dee0b749 100644
--- a/src/quicktemplates2/qquickscrollbar_p.h
+++ b/src/quicktemplates2/qquickscrollbar_p.h
@@ -65,16 +65,19 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickScrollBar : public QQuickControl
Q_PROPERTY(bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged FINAL)
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
// 2.2 (Qt 5.9)
- Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged FINAL REVISION 2)
- Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive RESET resetInteractive NOTIFY interactiveChanged FINAL REVISION 2)
- Q_PROPERTY(Policy policy READ policy WRITE setPolicy NOTIFY policyChanged FINAL REVISION 2)
+ Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged FINAL REVISION(2, 2))
+ Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive RESET resetInteractive NOTIFY interactiveChanged FINAL REVISION(2, 2))
+ Q_PROPERTY(Policy policy READ policy WRITE setPolicy NOTIFY policyChanged FINAL REVISION(2, 2))
// 2.3 (Qt 5.10)
- Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION 3)
- Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION 3)
+ Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION(2, 3))
// 2.4 (Qt 5.11)
- Q_PROPERTY(qreal minimumSize READ minimumSize WRITE setMinimumSize NOTIFY minimumSizeChanged FINAL REVISION 4)
- Q_PROPERTY(qreal visualSize READ visualSize NOTIFY visualSizeChanged FINAL REVISION 4)
- Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL REVISION 4)
+ Q_PROPERTY(qreal minimumSize READ minimumSize WRITE setMinimumSize NOTIFY minimumSizeChanged FINAL REVISION(2, 4))
+ Q_PROPERTY(qreal visualSize READ visualSize NOTIFY visualSizeChanged FINAL REVISION(2, 4))
+ Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL REVISION(2, 4))
+ QML_NAMED_ELEMENT(ScrollBar)
+ QML_ATTACHED(QQuickScrollBarAttached)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickScrollBar(QQuickItem *parent = nullptr);
@@ -146,13 +149,13 @@ Q_SIGNALS:
void pressedChanged();
void orientationChanged();
// 2.2 (Qt 5.9)
- Q_REVISION(2) void snapModeChanged();
- Q_REVISION(2) void interactiveChanged();
- Q_REVISION(2) void policyChanged();
+ Q_REVISION(2, 2) void snapModeChanged();
+ Q_REVISION(2, 2) void interactiveChanged();
+ Q_REVISION(2, 2) void policyChanged();
// 2.4 (Qt 5.11)
- Q_REVISION(4) void minimumSizeChanged();
- Q_REVISION(4) void visualSizeChanged();
- Q_REVISION(4) void visualPositionChanged();
+ Q_REVISION(2, 4) void minimumSizeChanged();
+ Q_REVISION(2, 4) void visualSizeChanged();
+ Q_REVISION(2, 4) void visualPositionChanged();
protected:
void mousePressEvent(QMouseEvent *event) override;
diff --git a/src/quicktemplates2/qquickscrollindicator_p.h b/src/quicktemplates2/qquickscrollindicator_p.h
index 4fa06a33..dbad6ffe 100644
--- a/src/quicktemplates2/qquickscrollindicator_p.h
+++ b/src/quicktemplates2/qquickscrollindicator_p.h
@@ -64,12 +64,15 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickScrollIndicator : public QQuickCont
Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged FINAL)
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
// 2.3 (Qt 5.10)
- Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION 3)
- Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION 3)
+ Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION(2, 3))
// 2.4 (Qt 5.11)
- Q_PROPERTY(qreal minimumSize READ minimumSize WRITE setMinimumSize NOTIFY minimumSizeChanged FINAL REVISION 4)
- Q_PROPERTY(qreal visualSize READ visualSize NOTIFY visualSizeChanged FINAL REVISION 4)
- Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL REVISION 4)
+ Q_PROPERTY(qreal minimumSize READ minimumSize WRITE setMinimumSize NOTIFY minimumSizeChanged FINAL REVISION(2, 4))
+ Q_PROPERTY(qreal visualSize READ visualSize NOTIFY visualSizeChanged FINAL REVISION(2, 4))
+ Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL REVISION(2, 4))
+ QML_NAMED_ELEMENT(ScrollIndicator)
+ QML_ATTACHED(QQuickScrollIndicatorAttached)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickScrollIndicator(QQuickItem *parent = nullptr);
@@ -106,9 +109,9 @@ Q_SIGNALS:
void activeChanged();
void orientationChanged();
// 2.4 (Qt 5.11)
- Q_REVISION(4) void minimumSizeChanged();
- Q_REVISION(4) void visualSizeChanged();
- Q_REVISION(4) void visualPositionChanged();
+ Q_REVISION(2, 4) void minimumSizeChanged();
+ Q_REVISION(2, 4) void visualSizeChanged();
+ Q_REVISION(2, 4) void visualPositionChanged();
protected:
#if QT_CONFIG(quicktemplates2_multitouch)
diff --git a/src/quicktemplates2/qquickscrollview_p.h b/src/quicktemplates2/qquickscrollview_p.h
index 2b8d260e..7eea46dd 100644
--- a/src/quicktemplates2/qquickscrollview_p.h
+++ b/src/quicktemplates2/qquickscrollview_p.h
@@ -58,6 +58,8 @@ class QQuickScrollViewPrivate;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickScrollView : public QQuickPane
{
Q_OBJECT
+ QML_NAMED_ELEMENT(ScrollView)
+ QML_ADDED_IN_VERSION(2, 2)
public:
explicit QQuickScrollView(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickslider_p.h b/src/quicktemplates2/qquickslider_p.h
index c65733dc..ac03f7f9 100644
--- a/src/quicktemplates2/qquickslider_p.h
+++ b/src/quicktemplates2/qquickslider_p.h
@@ -67,15 +67,17 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSlider : public QQuickControl
Q_PROPERTY(bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged FINAL)
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
Q_PROPERTY(QQuickItem *handle READ handle WRITE setHandle NOTIFY handleChanged FINAL)
- Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged FINAL REVISION 2)
+ Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged FINAL REVISION(2, 2))
// 2.3 (Qt 5.10)
- Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION 3)
- Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION 3)
+ Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION(2, 3))
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal touchDragThreshold READ touchDragThreshold WRITE setTouchDragThreshold RESET resetTouchDragThreshold NOTIFY touchDragThresholdChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitHandleWidth READ implicitHandleWidth NOTIFY implicitHandleWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitHandleHeight READ implicitHandleHeight NOTIFY implicitHandleHeightChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal touchDragThreshold READ touchDragThreshold WRITE setTouchDragThreshold RESET resetTouchDragThreshold NOTIFY touchDragThresholdChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitHandleWidth READ implicitHandleWidth NOTIFY implicitHandleWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitHandleHeight READ implicitHandleHeight NOTIFY implicitHandleHeightChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "background,handle")
+ QML_NAMED_ELEMENT(Slider)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickSlider(QQuickItem *parent = nullptr);
@@ -116,7 +118,7 @@ public:
void setHandle(QQuickItem *handle);
// 2.1 (Qt 5.8)
- Q_REVISION(1) Q_INVOKABLE qreal valueAt(qreal position) const;
+ Q_REVISION(2, 1) Q_INVOKABLE qreal valueAt(qreal position) const;
// 2.2 (Qt 5.9)
bool live() const;
@@ -150,12 +152,12 @@ Q_SIGNALS:
void orientationChanged();
void handleChanged();
// 2.2 (Qt 5.9)
- Q_REVISION(2) void moved();
- Q_REVISION(2) void liveChanged();
+ Q_REVISION(2, 2) void moved();
+ Q_REVISION(2, 2) void liveChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void touchDragThresholdChanged();
- Q_REVISION(5) void implicitHandleWidthChanged();
- Q_REVISION(5) void implicitHandleHeightChanged();
+ Q_REVISION(2, 5) void touchDragThresholdChanged();
+ Q_REVISION(2, 5) void implicitHandleWidthChanged();
+ Q_REVISION(2, 5) void implicitHandleHeightChanged();
protected:
void keyPressEvent(QKeyEvent *event) override;
diff --git a/src/quicktemplates2/qquickspinbox.cpp b/src/quicktemplates2/qquickspinbox.cpp
index c1541a99..d53916e1 100644
--- a/src/quicktemplates2/qquickspinbox.cpp
+++ b/src/quicktemplates2/qquickspinbox.cpp
@@ -700,7 +700,7 @@ QJSValue QQuickSpinBox::valueFromText() const
if (!d->valueFromText.isCallable()) {
QQmlEngine *engine = qmlEngine(this);
if (engine)
- d->valueFromText = engine->evaluate(QStringLiteral("function(text, locale) { return Number.fromLocaleString(locale, text); }"));
+ d->valueFromText = engine->evaluate(QStringLiteral("(function(text, locale) { return Number.fromLocaleString(locale, text); })"));
}
return d->valueFromText;
}
diff --git a/src/quicktemplates2/qquickspinbox_p.h b/src/quicktemplates2/qquickspinbox_p.h
index 6b787674..d90aa531 100644
--- a/src/quicktemplates2/qquickspinbox_p.h
+++ b/src/quicktemplates2/qquickspinbox_p.h
@@ -72,12 +72,14 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSpinBox : public QQuickControl
Q_PROPERTY(QQuickSpinButton *up READ up CONSTANT FINAL)
Q_PROPERTY(QQuickSpinButton *down READ down CONSTANT FINAL)
// 2.2 (Qt 5.9)
- Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints NOTIFY inputMethodHintsChanged FINAL REVISION 2)
- Q_PROPERTY(bool inputMethodComposing READ isInputMethodComposing NOTIFY inputMethodComposingChanged FINAL REVISION 2)
+ Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints NOTIFY inputMethodHintsChanged FINAL REVISION(2, 2))
+ Q_PROPERTY(bool inputMethodComposing READ isInputMethodComposing NOTIFY inputMethodComposingChanged FINAL REVISION(2, 2))
// 2.3 (Qt 5.10)
- Q_PROPERTY(bool wrap READ wrap WRITE setWrap NOTIFY wrapChanged FINAL REVISION 3)
+ Q_PROPERTY(bool wrap READ wrap WRITE setWrap NOTIFY wrapChanged FINAL REVISION(2, 3))
// 2.4 (Qt 5.11)
- Q_PROPERTY(QString displayText READ displayText NOTIFY displayTextChanged FINAL REVISION 4)
+ Q_PROPERTY(QString displayText READ displayText NOTIFY displayTextChanged FINAL REVISION(2, 4))
+ QML_NAMED_ELEMENT(SpinBox)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickSpinBox(QQuickItem *parent = nullptr);
@@ -137,13 +139,13 @@ Q_SIGNALS:
void textFromValueChanged();
void valueFromTextChanged();
// 2.2 (Qt 5.9)
- Q_REVISION(2) void valueModified();
- Q_REVISION(2) void inputMethodHintsChanged();
- Q_REVISION(2) void inputMethodComposingChanged();
+ Q_REVISION(2, 2) void valueModified();
+ Q_REVISION(2, 2) void inputMethodHintsChanged();
+ Q_REVISION(2, 2) void inputMethodComposingChanged();
// 2.3 (Qt 5.10)
- Q_REVISION(3) void wrapChanged();
+ Q_REVISION(2, 3) void wrapChanged();
// 2.4 (Qt 5.11)
- Q_REVISION(4) void displayTextChanged();
+ Q_REVISION(2, 4) void displayTextChanged();
protected:
void focusInEvent(QFocusEvent *event) override;
@@ -181,11 +183,13 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSpinButton : public QObject
Q_PROPERTY(bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged FINAL)
Q_PROPERTY(QQuickItem *indicator READ indicator WRITE setIndicator NOTIFY indicatorChanged FINAL)
// 2.1 (Qt 5.8)
- Q_PROPERTY(bool hovered READ isHovered WRITE setHovered NOTIFY hoveredChanged FINAL REVISION 1)
+ Q_PROPERTY(bool hovered READ isHovered WRITE setHovered NOTIFY hoveredChanged FINAL REVISION(2, 1))
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal implicitIndicatorWidth READ implicitIndicatorWidth NOTIFY implicitIndicatorWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitIndicatorHeight READ implicitIndicatorHeight NOTIFY implicitIndicatorHeightChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal implicitIndicatorWidth READ implicitIndicatorWidth NOTIFY implicitIndicatorWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitIndicatorHeight READ implicitIndicatorHeight NOTIFY implicitIndicatorHeightChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "indicator")
+ QML_ANONYMOUS
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickSpinButton(QQuickSpinBox *parent);
@@ -208,10 +212,10 @@ Q_SIGNALS:
void pressedChanged();
void indicatorChanged();
// 2.1 (Qt 5.8)
- Q_REVISION(1) void hoveredChanged();
+ Q_REVISION(2, 1) void hoveredChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void implicitIndicatorWidthChanged();
- Q_REVISION(5) void implicitIndicatorHeightChanged();
+ Q_REVISION(2, 5) void implicitIndicatorWidthChanged();
+ Q_REVISION(2, 5) void implicitIndicatorHeightChanged();
private:
Q_DISABLE_COPY(QQuickSpinButton)
diff --git a/src/quicktemplates2/qquicksplitview_p.h b/src/quicktemplates2/qquicksplitview_p.h
index 06dc1a55..55b45ed8 100644
--- a/src/quicktemplates2/qquicksplitview_p.h
+++ b/src/quicktemplates2/qquicksplitview_p.h
@@ -65,6 +65,9 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSplitView : public QQuickContainer
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
Q_PROPERTY(bool resizing READ isResizing NOTIFY resizingChanged)
Q_PROPERTY(QQmlComponent *handle READ handle WRITE setHandle NOTIFY handleChanged FINAL)
+ QML_NAMED_ELEMENT(SplitView)
+ QML_ATTACHED(QQuickSplitViewAttached)
+ QML_ADDED_IN_VERSION(2, 13)
public:
explicit QQuickSplitView(QQuickItem *parent = nullptr);
@@ -190,6 +193,10 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSplitHandleAttached : public QObjec
Q_OBJECT
Q_PROPERTY(bool hovered READ isHovered NOTIFY hoveredChanged FINAL)
Q_PROPERTY(bool pressed READ isPressed NOTIFY pressedChanged FINAL)
+ QML_NAMED_ELEMENT(SplitHandle)
+ QML_ATTACHED(QQuickSplitHandleAttached)
+ QML_UNCREATABLE("")
+ QML_ADDED_IN_VERSION(2, 13)
public:
explicit QQuickSplitHandleAttached(QObject *parent = nullptr);
diff --git a/src/quicktemplates2/qquickstackview.cpp b/src/quicktemplates2/qquickstackview.cpp
index 83f99843..7bf4c3d3 100644
--- a/src/quicktemplates2/qquickstackview.cpp
+++ b/src/quicktemplates2/qquickstackview.cpp
@@ -635,6 +635,9 @@ void QQuickStackView::push(QQmlV4Function *args)
items down to (but not including) the first item is popped.
If not specified, only the current item is popped.
+ \note A pop() operation on a stack with depth 1 or 0 does nothing. In such
+ cases, the stack can be emptied using the \l clear() method.
+
\include qquickstackview.qdocinc pop-ownership
An \a operation can be optionally specified as the last argument. Supported
diff --git a/src/quicktemplates2/qquickstackview_p.h b/src/quicktemplates2/qquickstackview_p.h
index f551f027..f4cb5458 100644
--- a/src/quicktemplates2/qquickstackview_p.h
+++ b/src/quicktemplates2/qquickstackview_p.h
@@ -73,7 +73,10 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickStackView : public QQuickControl
Q_PROPERTY(QQuickTransition *replaceEnter READ replaceEnter WRITE setReplaceEnter NOTIFY replaceEnterChanged FINAL)
Q_PROPERTY(QQuickTransition *replaceExit READ replaceExit WRITE setReplaceExit NOTIFY replaceExitChanged FINAL)
// 2.3 (Qt 5.10)
- Q_PROPERTY(bool empty READ isEmpty NOTIFY emptyChanged FINAL REVISION 3)
+ Q_PROPERTY(bool empty READ isEmpty NOTIFY emptyChanged FINAL REVISION(2, 3))
+ QML_NAMED_ELEMENT(StackView)
+ QML_ATTACHED(QQuickStackViewAttached)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickStackView(QQuickItem *parent = nullptr);
@@ -153,7 +156,7 @@ Q_SIGNALS:
void replaceEnterChanged();
void replaceExitChanged();
// 2.3 (Qt 5.10)
- Q_REVISION(3) void emptyChanged();
+ Q_REVISION(2, 3) void emptyChanged();
protected:
void componentComplete() override;
@@ -180,7 +183,7 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickStackViewAttached : public QObject
Q_PROPERTY(QQuickStackView *view READ view NOTIFY viewChanged FINAL)
Q_PROPERTY(QQuickStackView::Status status READ status NOTIFY statusChanged FINAL)
// 2.2 (Qt 5.9)
- Q_PROPERTY(bool visible READ isVisible WRITE setVisible RESET resetVisible NOTIFY visibleChanged FINAL) // REVISION 2
+ Q_PROPERTY(bool visible READ isVisible WRITE setVisible RESET resetVisible NOTIFY visibleChanged FINAL) // REVISION(2, 2)
public:
explicit QQuickStackViewAttached(QObject *parent = nullptr);
@@ -200,13 +203,13 @@ Q_SIGNALS:
void viewChanged();
void statusChanged();
// 2.1 (Qt 5.8)
- /*Q_REVISION(1)*/ void activated();
- /*Q_REVISION(1)*/ void activating();
- /*Q_REVISION(1)*/ void deactivated();
- /*Q_REVISION(1)*/ void deactivating();
- /*Q_REVISION(1)*/ void removed();
+ /*Q_REVISION(2, 1)*/ void activated();
+ /*Q_REVISION(2, 1)*/ void activating();
+ /*Q_REVISION(2, 1)*/ void deactivated();
+ /*Q_REVISION(2, 1)*/ void deactivating();
+ /*Q_REVISION(2, 1)*/ void removed();
// 2.2 (Qt 5.9)
- /*Q_REVISION(2)*/ void visibleChanged();
+ /*Q_REVISION(2, 2)*/ void visibleChanged();
private:
Q_DISABLE_COPY(QQuickStackViewAttached)
diff --git a/src/quicktemplates2/qquickswipe_p.h b/src/quicktemplates2/qquickswipe_p.h
index 20e38e90..768d5638 100644
--- a/src/quicktemplates2/qquickswipe_p.h
+++ b/src/quicktemplates2/qquickswipe_p.h
@@ -71,8 +71,10 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSwipe : public QObject
Q_PROPERTY(QQuickItem *behindItem READ behindItem NOTIFY behindItemChanged FINAL)
Q_PROPERTY(QQuickItem *rightItem READ rightItem NOTIFY rightItemChanged FINAL)
// 2.2 (Qt 5.9)
- Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL) // REVISION 2
- Q_PROPERTY(QQuickTransition *transition READ transition WRITE setTransition NOTIFY transitionChanged FINAL) // REVISION 2
+ Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL) // REVISION(2, 2)
+ Q_PROPERTY(QQuickTransition *transition READ transition WRITE setTransition NOTIFY transitionChanged FINAL) // REVISION(2, 2)
+ QML_ANONYMOUS
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickSwipe(QQuickSwipeDelegate *control);
@@ -102,7 +104,7 @@ public:
void setRightItem(QQuickItem *item);
// 2.1 (Qt 5.8)
- Q_REVISION(1) Q_INVOKABLE void close();
+ Q_REVISION(2, 1) Q_INVOKABLE void close();
// 2.2 (Qt 5.9)
bool isEnabled() const;
@@ -111,7 +113,7 @@ public:
QQuickTransition *transition() const;
void setTransition(QQuickTransition *transition);
- Q_REVISION(2) Q_INVOKABLE void open(QQuickSwipeDelegate::Side side);
+ Q_REVISION(2, 2) Q_INVOKABLE void open(QQuickSwipeDelegate::Side side);
Q_SIGNALS:
void positionChanged();
@@ -123,12 +125,12 @@ Q_SIGNALS:
void behindItemChanged();
void rightItemChanged();
// 2.1 (Qt 5.8)
- /*Q_REVISION(1)*/ void completed();
+ /*Q_REVISION(2, 1)*/ void completed();
// 2.2 (Qt 5.9)
- /*Q_REVISION(2)*/ void opened();
- /*Q_REVISION(2)*/ void closed();
- /*Q_REVISION(2)*/ void enabledChanged();
- /*Q_REVISION(2)*/ void transitionChanged();
+ /*Q_REVISION(2, 2)*/ void opened();
+ /*Q_REVISION(2, 2)*/ void closed();
+ /*Q_REVISION(2, 2)*/ void enabledChanged();
+ /*Q_REVISION(2, 2)*/ void transitionChanged();
private:
Q_DISABLE_COPY(QQuickSwipe)
diff --git a/src/quicktemplates2/qquickswipedelegate.cpp b/src/quicktemplates2/qquickswipedelegate.cpp
index a28d8ecf..4b16609d 100644
--- a/src/quicktemplates2/qquickswipedelegate.cpp
+++ b/src/quicktemplates2/qquickswipedelegate.cpp
@@ -697,6 +697,11 @@ void QQuickSwipe::close()
if (qFuzzyIsNull(d->position))
return;
+ if (d->control->isPressed()) {
+ // We don't support closing when we're pressed; release() or clicked() should be used instead.
+ return;
+ }
+
d->beginTransition(0.0);
d->wasComplete = false;
d->positionBeforePress = 0.0;
@@ -889,7 +894,11 @@ bool QQuickSwipeDelegatePrivate::handleMouseReleaseEvent(QQuickItem *item, QMous
swipePrivate->beginTransition(-1.0);
swipePrivate->wasComplete = true;
} else if (!swipePrivate->isTransitioning()) {
- swipePrivate->beginTransition(0.0);
+ // The position is either <= 0.5 or >= -0.5, so the position should go to 0.
+ // However, if the position was already 0 or close to it, we were just clicked,
+ // and we don't need to start a transition.
+ if (!qFuzzyIsNull(swipePrivate->position))
+ swipePrivate->beginTransition(0.0);
swipePrivate->wasComplete = false;
}
diff --git a/src/quicktemplates2/qquickswipedelegate_p.h b/src/quicktemplates2/qquickswipedelegate_p.h
index 76f9df5b..228f1085 100644
--- a/src/quicktemplates2/qquickswipedelegate_p.h
+++ b/src/quicktemplates2/qquickswipedelegate_p.h
@@ -61,6 +61,9 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSwipeDelegate : public QQuickItemDe
{
Q_OBJECT
Q_PROPERTY(QQuickSwipe *swipe READ swipe CONSTANT FINAL)
+ QML_NAMED_ELEMENT(SwipeDelegate)
+ QML_ATTACHED(QQuickSwipeDelegateAttached)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickSwipeDelegate(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickswipeview_p.h b/src/quicktemplates2/qquickswipeview_p.h
index 72d7d543..8a09a37e 100644
--- a/src/quicktemplates2/qquickswipeview_p.h
+++ b/src/quicktemplates2/qquickswipeview_p.h
@@ -59,12 +59,15 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSwipeView : public QQuickContainer
{
Q_OBJECT
// 2.1 (Qt 5.8)
- Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged FINAL REVISION 1)
+ Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged FINAL REVISION(2, 1))
// 2.2 (Qt 5.9)
- Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL REVISION 2)
+ Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL REVISION(2, 2))
// 2.3 (Qt 5.10)
- Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION 3)
- Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION 3)
+ Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION(2, 3))
+ QML_NAMED_ELEMENT(SwipeView)
+ QML_ATTACHED(QQuickSwipeViewAttached)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickSwipeView(QQuickItem *parent = nullptr);
@@ -85,9 +88,9 @@ public:
Q_SIGNALS:
// 2.1 (Qt 5.8)
- Q_REVISION(1) void interactiveChanged();
+ Q_REVISION(2, 1) void interactiveChanged();
// 2.2 (Qt 5.9)
- Q_REVISION(2) void orientationChanged();
+ Q_REVISION(2, 2) void orientationChanged();
protected:
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
@@ -113,8 +116,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSwipeViewAttached : public QObject
Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY isCurrentItemChanged FINAL)
Q_PROPERTY(QQuickSwipeView *view READ view NOTIFY viewChanged FINAL)
// 2.1 (Qt 5.8)
- Q_PROPERTY(bool isNextItem READ isNextItem NOTIFY isNextItemChanged FINAL REVISION 1)
- Q_PROPERTY(bool isPreviousItem READ isPreviousItem NOTIFY isPreviousItemChanged FINAL REVISION 1)
+ Q_PROPERTY(bool isNextItem READ isNextItem NOTIFY isNextItemChanged FINAL REVISION(2, 1))
+ Q_PROPERTY(bool isPreviousItem READ isPreviousItem NOTIFY isPreviousItemChanged FINAL REVISION(2, 1))
public:
explicit QQuickSwipeViewAttached(QObject *parent = nullptr);
@@ -132,8 +135,8 @@ Q_SIGNALS:
void isCurrentItemChanged();
void viewChanged();
// 2.1 (Qt 5.8)
- /*Q_REVISION(1)*/ void isNextItemChanged();
- /*Q_REVISION(1)*/ void isPreviousItemChanged();
+ /*Q_REVISION(2, 1)*/ void isNextItemChanged();
+ /*Q_REVISION(2, 1)*/ void isPreviousItemChanged();
private:
Q_DISABLE_COPY(QQuickSwipeViewAttached)
diff --git a/src/quicktemplates2/qquickswitch_p.h b/src/quicktemplates2/qquickswitch_p.h
index e4c55c2b..b3df0299 100644
--- a/src/quicktemplates2/qquickswitch_p.h
+++ b/src/quicktemplates2/qquickswitch_p.h
@@ -59,6 +59,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSwitch : public QQuickAbstractButto
Q_OBJECT
Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged FINAL)
Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL)
+ QML_NAMED_ELEMENT(Switch)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickSwitch(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickswitchdelegate_p.h b/src/quicktemplates2/qquickswitchdelegate_p.h
index 383a662d..a2eb6f62 100644
--- a/src/quicktemplates2/qquickswitchdelegate_p.h
+++ b/src/quicktemplates2/qquickswitchdelegate_p.h
@@ -59,6 +59,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSwitchDelegate : public QQuickItemD
Q_OBJECT
Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged FINAL)
Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL)
+ QML_NAMED_ELEMENT(SwitchDelegate)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickSwitchDelegate(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquicktabbar_p.h b/src/quicktemplates2/qquicktabbar_p.h
index 42d39767..1025d3c6 100644
--- a/src/quicktemplates2/qquicktabbar_p.h
+++ b/src/quicktemplates2/qquicktabbar_p.h
@@ -61,8 +61,11 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickTabBar : public QQuickContainer
Q_OBJECT
Q_PROPERTY(Position position READ position WRITE setPosition NOTIFY positionChanged FINAL)
// 2.2 (Qt 5.9)
- Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth RESET resetContentWidth NOTIFY contentWidthChanged FINAL REVISION 2) // re-declare QQuickContainer::contentWidth (REV 5)
- Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight RESET resetContentHeight NOTIFY contentHeightChanged FINAL REVISION 2) // re-declare QQuickContainer::contentHeight (REV 5)
+ Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth RESET resetContentWidth NOTIFY contentWidthChanged FINAL REVISION(2, 2)) // re-declare QQuickContainer::contentWidth (REV 5)
+ Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight RESET resetContentHeight NOTIFY contentHeightChanged FINAL REVISION(2, 2)) // re-declare QQuickContainer::contentHeight (REV 5)
+ QML_NAMED_ELEMENT(TabBar)
+ QML_ATTACHED(QQuickTabBarAttached)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickTabBar(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquicktabbutton_p.h b/src/quicktemplates2/qquicktabbutton_p.h
index bcaf7c29..302180c4 100644
--- a/src/quicktemplates2/qquicktabbutton_p.h
+++ b/src/quicktemplates2/qquicktabbutton_p.h
@@ -57,6 +57,8 @@ class QQuickTabButtonPrivate;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickTabButton : public QQuickAbstractButton
{
Q_OBJECT
+ QML_NAMED_ELEMENT(TabButton)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickTabButton(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquicktextarea_p.h b/src/quicktemplates2/qquicktextarea_p.h
index 74247703..fed0eb59 100644
--- a/src/quicktemplates2/qquicktextarea_p.h
+++ b/src/quicktemplates2/qquicktextarea_p.h
@@ -69,17 +69,19 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickTextArea : public QQuickTextEdit
Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText NOTIFY placeholderTextChanged FINAL)
Q_PROPERTY(Qt::FocusReason focusReason READ focusReason WRITE setFocusReason NOTIFY focusReasonChanged FINAL)
// 2.1 (Qt 5.8)
- Q_PROPERTY(bool hovered READ isHovered NOTIFY hoveredChanged FINAL REVISION 1)
- Q_PROPERTY(bool hoverEnabled READ isHoverEnabled WRITE setHoverEnabled RESET resetHoverEnabled NOTIFY hoverEnabledChanged FINAL REVISION 1)
+ Q_PROPERTY(bool hovered READ isHovered NOTIFY hoveredChanged FINAL REVISION(2, 1))
+ Q_PROPERTY(bool hoverEnabled READ isHoverEnabled WRITE setHoverEnabled RESET resetHoverEnabled NOTIFY hoverEnabledChanged FINAL REVISION(2, 1))
// 2.5 (Qt 5.12)
- Q_PROPERTY(QColor placeholderTextColor READ placeholderTextColor WRITE setPlaceholderTextColor NOTIFY placeholderTextColorChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION 5)
- Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION 5)
+ Q_PROPERTY(QColor placeholderTextColor READ placeholderTextColor WRITE setPlaceholderTextColor NOTIFY placeholderTextColorChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "background")
+ QML_NAMED_ELEMENT(TextArea)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickTextArea(QQuickItem *parent = nullptr);
@@ -141,18 +143,18 @@ Q_SIGNALS:
void focusReasonChanged();
void pressAndHold(QQuickMouseEvent *event);
// 2.1 (Qt 5.8)
- Q_REVISION(1) void pressed(QQuickMouseEvent *event);
- Q_REVISION(1) void released(QQuickMouseEvent *event);
- Q_REVISION(1) void hoveredChanged();
- Q_REVISION(1) void hoverEnabledChanged();
+ Q_REVISION(2, 1) void pressed(QQuickMouseEvent *event);
+ Q_REVISION(2, 1) void released(QQuickMouseEvent *event);
+ Q_REVISION(2, 1) void hoveredChanged();
+ Q_REVISION(2, 1) void hoverEnabledChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void placeholderTextColorChanged();
- Q_REVISION(5) void implicitBackgroundWidthChanged();
- Q_REVISION(5) void implicitBackgroundHeightChanged();
- Q_REVISION(5) void topInsetChanged();
- Q_REVISION(5) void leftInsetChanged();
- Q_REVISION(5) void rightInsetChanged();
- Q_REVISION(5) void bottomInsetChanged();
+ Q_REVISION(2, 5) void placeholderTextColorChanged();
+ Q_REVISION(2, 5) void implicitBackgroundWidthChanged();
+ Q_REVISION(2, 5) void implicitBackgroundHeightChanged();
+ Q_REVISION(2, 5) void topInsetChanged();
+ Q_REVISION(2, 5) void leftInsetChanged();
+ Q_REVISION(2, 5) void rightInsetChanged();
+ Q_REVISION(2, 5) void bottomInsetChanged();
protected:
friend struct QQuickPressHandler;
@@ -204,6 +206,14 @@ private:
Q_DECLARE_PRIVATE(QQuickTextAreaAttached)
};
+struct QQuickTextEditForeign
+{
+ Q_GADGET
+ QML_ANONYMOUS
+ QML_FOREIGN(QQuickTextEdit)
+ QML_ADDED_IN_VERSION(2, 3)
+};
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QQuickTextArea)
diff --git a/src/quicktemplates2/qquicktextfield_p.h b/src/quicktemplates2/qquicktextfield_p.h
index f24330c7..b1b9715c 100644
--- a/src/quicktemplates2/qquicktextfield_p.h
+++ b/src/quicktemplates2/qquicktextfield_p.h
@@ -68,17 +68,19 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickTextField : public QQuickTextInput
Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText NOTIFY placeholderTextChanged FINAL)
Q_PROPERTY(Qt::FocusReason focusReason READ focusReason WRITE setFocusReason NOTIFY focusReasonChanged FINAL)
// 2.1 (Qt 5.8)
- Q_PROPERTY(bool hovered READ isHovered NOTIFY hoveredChanged FINAL REVISION 1)
- Q_PROPERTY(bool hoverEnabled READ isHoverEnabled WRITE setHoverEnabled RESET resetHoverEnabled NOTIFY hoverEnabledChanged FINAL REVISION 1)
+ Q_PROPERTY(bool hovered READ isHovered NOTIFY hoveredChanged FINAL REVISION(2, 1))
+ Q_PROPERTY(bool hoverEnabled READ isHoverEnabled WRITE setHoverEnabled RESET resetHoverEnabled NOTIFY hoverEnabledChanged FINAL REVISION(2, 1))
// 2.5 (Qt 5.12)
- Q_PROPERTY(QColor placeholderTextColor READ placeholderTextColor WRITE setPlaceholderTextColor NOTIFY placeholderTextColorChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION 5)
- Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION 5)
+ Q_PROPERTY(QColor placeholderTextColor READ placeholderTextColor WRITE setPlaceholderTextColor NOTIFY placeholderTextColorChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "background")
+ QML_NAMED_ELEMENT(TextField)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickTextField(QQuickItem *parent = nullptr);
@@ -136,18 +138,18 @@ Q_SIGNALS:
void focusReasonChanged();
void pressAndHold(QQuickMouseEvent *event);
// 2.1 (Qt 5.8)
- Q_REVISION(1) void pressed(QQuickMouseEvent *event);
- Q_REVISION(1) void released(QQuickMouseEvent *event);
- Q_REVISION(1) void hoveredChanged();
- Q_REVISION(1) void hoverEnabledChanged();
+ Q_REVISION(2, 1) void pressed(QQuickMouseEvent *event);
+ Q_REVISION(2, 1) void released(QQuickMouseEvent *event);
+ Q_REVISION(2, 1) void hoveredChanged();
+ Q_REVISION(2, 1) void hoverEnabledChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void placeholderTextColorChanged();
- Q_REVISION(5) void implicitBackgroundWidthChanged();
- Q_REVISION(5) void implicitBackgroundHeightChanged();
- Q_REVISION(5) void topInsetChanged();
- Q_REVISION(5) void leftInsetChanged();
- Q_REVISION(5) void rightInsetChanged();
- Q_REVISION(5) void bottomInsetChanged();
+ Q_REVISION(2, 5) void placeholderTextColorChanged();
+ Q_REVISION(2, 5) void implicitBackgroundWidthChanged();
+ Q_REVISION(2, 5) void implicitBackgroundHeightChanged();
+ Q_REVISION(2, 5) void topInsetChanged();
+ Q_REVISION(2, 5) void leftInsetChanged();
+ Q_REVISION(2, 5) void rightInsetChanged();
+ Q_REVISION(2, 5) void bottomInsetChanged();
protected:
friend struct QQuickPressHandler;
@@ -178,6 +180,14 @@ private:
Q_DECLARE_PRIVATE(QQuickTextField)
};
+struct QQuickTextFieldForeign
+{
+ Q_GADGET
+ QML_ANONYMOUS
+ QML_FOREIGN(QQuickTextInput)
+ QML_ADDED_IN_VERSION(2, 2)
+};
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QQuickTextField)
diff --git a/src/quicktemplates2/qquicktoolbar_p.h b/src/quicktemplates2/qquicktoolbar_p.h
index 631f553e..cefdeaa1 100644
--- a/src/quicktemplates2/qquicktoolbar_p.h
+++ b/src/quicktemplates2/qquicktoolbar_p.h
@@ -58,6 +58,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickToolBar : public QQuickPane
{
Q_OBJECT
Q_PROPERTY(Position position READ position WRITE setPosition NOTIFY positionChanged FINAL)
+ QML_NAMED_ELEMENT(ToolBar)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickToolBar(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquicktoolbutton_p.h b/src/quicktemplates2/qquicktoolbutton_p.h
index c8d70aef..2db052f6 100644
--- a/src/quicktemplates2/qquicktoolbutton_p.h
+++ b/src/quicktemplates2/qquicktoolbutton_p.h
@@ -57,6 +57,8 @@ class QQuickToolButtonPrivate;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickToolButton : public QQuickButton
{
Q_OBJECT
+ QML_NAMED_ELEMENT(ToolButton)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickToolButton(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquicktoolseparator_p.h b/src/quicktemplates2/qquicktoolseparator_p.h
index 30bcf7df..e4692154 100644
--- a/src/quicktemplates2/qquicktoolseparator_p.h
+++ b/src/quicktemplates2/qquicktoolseparator_p.h
@@ -60,6 +60,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickToolSeparator : public QQuickContro
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL)
Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL)
+ QML_NAMED_ELEMENT(ToolSeparator)
+ QML_ADDED_IN_VERSION(2, 1)
public:
explicit QQuickToolSeparator(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquicktooltip_p.h b/src/quicktemplates2/qquicktooltip_p.h
index a143452d..5be22fd8 100644
--- a/src/quicktemplates2/qquicktooltip_p.h
+++ b/src/quicktemplates2/qquicktooltip_p.h
@@ -62,6 +62,9 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickToolTip : public QQuickPopup
Q_PROPERTY(int delay READ delay WRITE setDelay NOTIFY delayChanged FINAL)
Q_PROPERTY(int timeout READ timeout WRITE setTimeout NOTIFY timeoutChanged FINAL)
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged FINAL)
+ QML_NAMED_ELEMENT(ToolTip)
+ QML_ATTACHED(QQuickToolTipAttached)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickToolTip(QQuickItem *parent = nullptr);
@@ -85,8 +88,8 @@ Q_SIGNALS:
void timeoutChanged();
public Q_SLOTS:
- Q_REVISION(5) void show(const QString &text, int ms = -1);
- Q_REVISION(5) void hide();
+ Q_REVISION(2, 5) void show(const QString &text, int ms = -1);
+ Q_REVISION(2, 5) void hide();
protected:
QFont defaultFont() const override;
diff --git a/src/quicktemplates2/qquicktumbler_p.h b/src/quicktemplates2/qquicktumbler_p.h
index 046e8b8c..f9d5a13b 100644
--- a/src/quicktemplates2/qquicktumbler_p.h
+++ b/src/quicktemplates2/qquicktumbler_p.h
@@ -67,9 +67,12 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickTumbler : public QQuickControl
Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL)
Q_PROPERTY(int visibleItemCount READ visibleItemCount WRITE setVisibleItemCount NOTIFY visibleItemCountChanged FINAL)
// 2.1 (Qt 5.8)
- Q_PROPERTY(bool wrap READ wrap WRITE setWrap RESET resetWrap NOTIFY wrapChanged FINAL REVISION 1)
+ Q_PROPERTY(bool wrap READ wrap WRITE setWrap RESET resetWrap NOTIFY wrapChanged FINAL REVISION(2, 1))
// 2.2 (Qt 5.9)
- Q_PROPERTY(bool moving READ isMoving NOTIFY movingChanged FINAL REVISION 2)
+ Q_PROPERTY(bool moving READ isMoving NOTIFY movingChanged FINAL REVISION(2, 2))
+ QML_NAMED_ELEMENT(Tumbler)
+ QML_ATTACHED(QQuickTumblerAttached)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickTumbler(QQuickItem *parent = nullptr);
@@ -111,7 +114,7 @@ public:
Q_ENUM(PositionMode)
// 2.5 (Qt 5.12)
- Q_REVISION(5) Q_INVOKABLE void positionViewAtIndex(int index, PositionMode mode);
+ Q_REVISION(2, 5) Q_INVOKABLE void positionViewAtIndex(int index, PositionMode mode);
Q_SIGNALS:
void modelChanged();
@@ -121,9 +124,9 @@ Q_SIGNALS:
void delegateChanged();
void visibleItemCountChanged();
// 2.1 (Qt 5.8)
- Q_REVISION(1) void wrapChanged();
+ Q_REVISION(2, 1) void wrapChanged();
// 2.2 (Qt 5.9)
- Q_REVISION(2) void movingChanged();
+ Q_REVISION(2, 2) void movingChanged();
protected:
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
diff --git a/src/quicktemplates2/qtquicktemplates2global_p.h b/src/quicktemplates2/qtquicktemplates2global_p.h
index e5ee3f2e..37d81888 100644
--- a/src/quicktemplates2/qtquicktemplates2global_p.h
+++ b/src/quicktemplates2/qtquicktemplates2global_p.h
@@ -66,4 +66,6 @@ QT_BEGIN_NAMESPACE
QT_END_NAMESPACE
+Q_QUICKTEMPLATES2_PRIVATE_EXPORT void qml_register_types_QtQuick_Templates();
+
#endif // QTQUICKTEMPLATES2GLOBAL_P_H
diff --git a/src/quicktemplates2/quicktemplates2.pro b/src/quicktemplates2/quicktemplates2.pro
index 8ed0151a..06fa0ee7 100644
--- a/src/quicktemplates2/quicktemplates2.pro
+++ b/src/quicktemplates2/quicktemplates2.pro
@@ -12,3 +12,9 @@ HEADERS += \
include(quicktemplates2.pri)
load(qt_module)
+
+QMLTYPES_FILENAME = plugins.qmltypes
+QMLTYPES_INSTALL_DIR = $$[QT_INSTALL_QML]/QtQuick/Templates
+QML_IMPORT_NAME = QtQuick.Templates
+QML_IMPORT_VERSION = $$QT_VERSION
+CONFIG += qmltypes install_qmltypes install_metatypes