From 40b3ee57e385ca636f90c59604fa4f3692a08edc Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 8 Jun 2016 14:00:14 +0200 Subject: ScrollView: block updates when redoing the layout Changing the contentHeight might change the maximum value of the scrollbar which might change the value of the scrollbar which, if blockUpdates is not set, will change the contentY of the flickable. This can cause flickering when contentHeight varries with contentY which might typically happen for a ListView where not all elements have the same height. Or worse, this can make the scrolling jump and result in the wrong position. Change-Id: I1968055492d679387ebbf6813a160efbf82e4fbb Reviewed-by: Gabriel de Dietrich --- src/controls/Private/ScrollViewHelper.qml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/controls/Private/ScrollViewHelper.qml b/src/controls/Private/ScrollViewHelper.qml index 03ca30c8..b4a589bf 100644 --- a/src/controls/Private/ScrollViewHelper.qml +++ b/src/controls/Private/ScrollViewHelper.qml @@ -70,10 +70,12 @@ Item { function doLayout() { if (!recursionGuard) { recursionGuard = true + blockUpdates = true; scrollHelper.contentWidth = flickableItem !== null ? flickableItem.contentWidth : 0 scrollHelper.contentHeight = flickableItem !== null ? flickableItem.contentHeight : 0 scrollHelper.availableWidth = viewport.width scrollHelper.availableHeight = viewport.height + blockUpdates = false; recursionGuard = false } } -- cgit v1.2.1 From 85c29330678dc5d8e51b006f51cc39706ab1abab Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 19 May 2016 14:37:46 +0200 Subject: Doc: Fix documentation warnings src/controls/doc/src/qtquickcontrols-examples.qdoc:90: warning: Unable to parse QML snippet: "Expected token `{'" at line 1, column 10 src/controls/doc/src/qtquickcontrols-examples.qdoc:116: warning: Unable to parse QML snippet: "Expected a qualified name id" at line 1, column 1 src/controls/doc/src/qtquickcontrols-tableview.qdoc:299: warning: Unrecognizable QML module/component qualifier for TableView::section src/controls/doc/src/qtquickcontrols-treeview.qdoc:138: warning: Unrecognizable QML module/component qualifier for TreeView::section (multiple) warning: Can't link to 'DropShadow' Change-Id: Ic5e2dcbe9810486290e164f561ecba969f57df78 Reviewed-by: Venugopal Shivashankar --- src/controls/doc/qtquickcontrols.qdocconf | 2 +- src/controls/doc/src/qtquickcontrols-examples.qdoc | 8 ++++---- src/controls/doc/src/qtquickcontrols-tableview.qdoc | 4 ++-- src/controls/doc/src/qtquickcontrols-treeview.qdoc | 5 +++-- 4 files changed, 10 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/controls/doc/qtquickcontrols.qdocconf b/src/controls/doc/qtquickcontrols.qdocconf index 9aada9f6..e81777e0 100644 --- a/src/controls/doc/qtquickcontrols.qdocconf +++ b/src/controls/doc/qtquickcontrols.qdocconf @@ -34,7 +34,7 @@ qhp.QtQuickControls.subprojects.qqcexamples.indexTitle = Qt Quick Controls Examp qhp.QtQuickControls.subprojects.qqcexamples.selectors = doc:example group:stylingtutorials qhp.QtQuickControls.subprojects.qqcexamples.sortpages = true -depends = qtcore qtdoc qtgui qtwidgets qtqml qtquick qtquicklayouts qtquickdialogs qtquickextras +depends = qtcore qtdoc qtgui qtwidgets qtqml qtquick qtquicklayouts qtquickdialogs qtquickextras qtgraphicaleffects # Specify the install path under QT_INSTALL_EXAMPLES # Examples will be installed under quick/controls - 'controls' subdirectory diff --git a/src/controls/doc/src/qtquickcontrols-examples.qdoc b/src/controls/doc/src/qtquickcontrols-examples.qdoc index bc82349e..7ad34a30 100644 --- a/src/controls/doc/src/qtquickcontrols-examples.qdoc +++ b/src/controls/doc/src/qtquickcontrols-examples.qdoc @@ -83,16 +83,16 @@ In all forms, items that are supposed to interact with the application logic are exported: - \qml + \code property alias cancel: cancel property alias save: save property alias textArea: textArea - \endqml + \endcode This is the way the items are exported in \e NotesForm.ui.qml, so they can be used in \e Notes.ui.qml to implement the logic as follows: - \qml + \code function readData() { CustomerModel.selection.forEach(function (rowIndex) { form.textArea.text = CustomerModel.model.get(rowIndex).notes @@ -113,7 +113,7 @@ cancel.onClicked: readData() save.onClicked: writeData() - \endqml + \endcode \section1 Implementing the Backend in a Singleton diff --git a/src/controls/doc/src/qtquickcontrols-tableview.qdoc b/src/controls/doc/src/qtquickcontrols-tableview.qdoc index 48546e5b..e188ac9e 100644 --- a/src/controls/doc/src/qtquickcontrols-tableview.qdoc +++ b/src/controls/doc/src/qtquickcontrols-tableview.qdoc @@ -288,12 +288,12 @@ */ /*! - \qmlpropertygroup TableView::section + \qmlpropertygroup QtQuick.Controls::TableView::section \qmlproperty string TableView::section.property \qmlproperty enumeration TableView::section.criteria \qmlproperty Component TableView::section.delegate \qmlproperty enumeration TableView::section.labelPositioning These properties determine the section labels. - \sa ListView::section + \sa {QtQuick::ListView::section}{ListView.section} */ diff --git a/src/controls/doc/src/qtquickcontrols-treeview.qdoc b/src/controls/doc/src/qtquickcontrols-treeview.qdoc index bcfbad7b..b5ea0051 100644 --- a/src/controls/doc/src/qtquickcontrols-treeview.qdoc +++ b/src/controls/doc/src/qtquickcontrols-treeview.qdoc @@ -125,14 +125,15 @@ */ /*! - \qmlpropertygroup TreeView::section + \qmlpropertygroup QtQuick.Controls::TreeView::section \qmlproperty string TreeView::section.property \qmlproperty enumeration TreeView::section.criteria \qmlproperty Component TreeView::section.delegate \qmlproperty enumeration TreeView::section.labelPositioning These properties determine the section labels. - \sa ListView::section + + \sa {QtQuick::ListView::section}{ListView.section} */ /*! -- cgit v1.2.1 From 97e13b5f1b8b4e64b1ec8a503036afbd4f408148 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Mon, 20 Jun 2016 09:40:56 +0200 Subject: Fix iOS style build on case-sensitive file systems Change-Id: I3704fd913d26646d8ecdf2a81680d66e8960704c Task-number: QTBUG-54192 Reviewed-by: Jake Petroules Reviewed-by: Andy Shaw --- src/controls/Styles/styles.pri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/controls/Styles/styles.pri b/src/controls/Styles/styles.pri index 5b2b61c2..67c1ab76 100644 --- a/src/controls/Styles/styles.pri +++ b/src/controls/Styles/styles.pri @@ -109,5 +109,5 @@ STYLES_QML_FILES += \ $$PWD/Base/images/needle.png STYLES_QML_FILES += $$PWD/qmldir -ios:static: include(iOS/ios.pri) +ios:static: include(iOS/iOS.pri) !qtquickcompiler|static: QML_FILES += $$STYLES_QML_FILES -- cgit v1.2.1 From d0d169c1eae8824c679f8a5fbba47e2413cf7a52 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Mon, 20 Jun 2016 17:38:09 +0200 Subject: fix tooltip usage Change-Id: I305659b22f680eea903bf2e02a2998b9f71f5f5f Reviewed-by: Tim Jenssen --- src/extras/designer/PictureSpecifics.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/extras/designer/PictureSpecifics.qml b/src/extras/designer/PictureSpecifics.qml index 538614e4..55248ecd 100644 --- a/src/extras/designer/PictureSpecifics.qml +++ b/src/extras/designer/PictureSpecifics.qml @@ -52,7 +52,7 @@ Column { SectionLayout { Label { text: qsTr("Source") - toolTip: qsTr("Source") + tooltip: qsTr("Source") } SecondColumnLayout { LineEdit { -- cgit v1.2.1 From 0c957f241ff974ae1169faa733b700185917227f Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 21 Jun 2016 12:21:59 +0200 Subject: Revert "Fix Controls 1 types linking to Controls 2" This reverts commit b5a8306bf6d4949066872ac2afc8d0a01f716bd7. The incorrect \inherits commands caused property documentation from base types go missing. Task-number: QTBUG-54150 Change-Id: I0bbe604a6fe904d8e6a4596777262255a794ec62 Reviewed-by: Mitch Curtis --- src/controls/ApplicationWindow.qml | 1 - src/controls/BusyIndicator.qml | 1 - src/controls/Button.qml | 1 - src/controls/Calendar.qml | 1 - src/controls/CheckBox.qml | 1 - src/controls/ComboBox.qml | 1 - src/controls/GroupBox.qml | 1 - src/controls/Label.qml | 1 - src/controls/Menu.qml | 1 - src/controls/MenuBar.qml | 1 - src/controls/ProgressBar.qml | 1 - src/controls/RadioButton.qml | 1 - src/controls/ScrollView.qml | 1 - src/controls/Slider.qml | 1 - src/controls/SpinBox.qml | 1 - src/controls/SplitView.qml | 1 - src/controls/StackView.qml | 1 - src/controls/StackViewDelegate.qml | 1 - src/controls/StatusBar.qml | 1 - src/controls/Switch.qml | 1 - src/controls/Tab.qml | 1 - src/controls/TabView.qml | 1 - src/controls/TableViewColumn.qml | 1 - src/controls/TextArea.qml | 1 - src/controls/TextField.qml | 1 - src/controls/ToolBar.qml | 1 - src/controls/ToolButton.qml | 1 - src/controls/doc/src/qtquickcontrols-tableview.qdoc | 1 - src/controls/doc/src/qtquickcontrols-treeview.qdoc | 1 - src/extras/Dial.qml | 1 - 30 files changed, 30 deletions(-) (limited to 'src') diff --git a/src/controls/ApplicationWindow.qml b/src/controls/ApplicationWindow.qml index c40cc242..fb9cdacd 100644 --- a/src/controls/ApplicationWindow.qml +++ b/src/controls/ApplicationWindow.qml @@ -49,7 +49,6 @@ import QtQuick.Controls.Private 1.0 \inqmlmodule QtQuick.Controls \ingroup applicationwindow \ingroup controls - \inherits QtQuick::Window \brief Provides a top-level application window. \image applicationwindow.png diff --git a/src/controls/BusyIndicator.qml b/src/controls/BusyIndicator.qml index 1912ffbd..6c9972ad 100644 --- a/src/controls/BusyIndicator.qml +++ b/src/controls/BusyIndicator.qml @@ -46,7 +46,6 @@ import QtQuick.Controls.Private 1.0 \inqmlmodule QtQuick.Controls \since 5.2 \ingroup controls - \inherits QtQuickControls1::Control \brief A busy indicator. \image busyindicator.png diff --git a/src/controls/Button.qml b/src/controls/Button.qml index 2cdd0766..71e657ec 100644 --- a/src/controls/Button.qml +++ b/src/controls/Button.qml @@ -46,7 +46,6 @@ import QtQuick.Controls.Private 1.0 \inqmlmodule QtQuick.Controls \since 5.1 \ingroup controls - \inherits QtQuickControls1::BasicButton \brief A push button with a text label. \image button.png diff --git a/src/controls/Calendar.qml b/src/controls/Calendar.qml index e3d8d283..bbc562cc 100644 --- a/src/controls/Calendar.qml +++ b/src/controls/Calendar.qml @@ -47,7 +47,6 @@ import QtQuick.Controls.Private 1.0 \inqmlmodule QtQuick.Controls \since 5.3 \ingroup controls - \inherits QtQuickControls1::Control \brief Provides a way to select dates from a calendar \image calendar.png diff --git a/src/controls/CheckBox.qml b/src/controls/CheckBox.qml index e40cadab..d2448168 100644 --- a/src/controls/CheckBox.qml +++ b/src/controls/CheckBox.qml @@ -46,7 +46,6 @@ import QtQuick.Controls.Private 1.0 \inqmlmodule QtQuick.Controls \since 5.1 \ingroup controls - \inherits QtQuickControls1::AbstractCheckable \brief A checkbox with a text label. \image checkbox.png diff --git a/src/controls/ComboBox.qml b/src/controls/ComboBox.qml index 1b92a1ef..5fcba71b 100644 --- a/src/controls/ComboBox.qml +++ b/src/controls/ComboBox.qml @@ -46,7 +46,6 @@ import QtQuick.Controls.Private 1.0 \inqmlmodule QtQuick.Controls \since 5.1 \ingroup controls - \inherits QtQuickControls1::Control \brief Provides a drop-down list functionality. \image combobox.png diff --git a/src/controls/GroupBox.qml b/src/controls/GroupBox.qml index a36075d5..0a414ed2 100644 --- a/src/controls/GroupBox.qml +++ b/src/controls/GroupBox.qml @@ -48,7 +48,6 @@ import QtQuick.Layouts 1.0 \inqmlmodule QtQuick.Controls \since 5.1 \ingroup controls - \inherits QtQuick::FocusScope \brief GroupBox provides a group box frame with a title. \image groupbox.png diff --git a/src/controls/Label.qml b/src/controls/Label.qml index 0df25bf1..f9bc8cdd 100644 --- a/src/controls/Label.qml +++ b/src/controls/Label.qml @@ -46,7 +46,6 @@ import QtQuick.Controls.Private 1.0 \inqmlmodule QtQuick.Controls \since 5.1 \ingroup controls - \inherits QtQuick::Text \brief A text label. \image label.png diff --git a/src/controls/Menu.qml b/src/controls/Menu.qml index 4b1e8213..f91e8634 100644 --- a/src/controls/Menu.qml +++ b/src/controls/Menu.qml @@ -48,7 +48,6 @@ import QtQuick.Controls.Private 1.0 \since 5.1 \ingroup menus \ingroup controls - \inherits QtQuickControls1::MenuPrivate \brief Provides a menu component for use as a context menu, popup menu, or as part of a menu bar. diff --git a/src/controls/MenuBar.qml b/src/controls/MenuBar.qml index 73d06627..a98d0e81 100644 --- a/src/controls/MenuBar.qml +++ b/src/controls/MenuBar.qml @@ -48,7 +48,6 @@ import QtQuick.Controls.Private 1.0 \since 5.1 \ingroup applicationwindow \ingroup controls - \inherits QtQuickControls1::MenuBarPrivate \brief Provides a horizontal menu bar. \image menubar.png diff --git a/src/controls/ProgressBar.qml b/src/controls/ProgressBar.qml index d5f1dd95..9171f7d7 100644 --- a/src/controls/ProgressBar.qml +++ b/src/controls/ProgressBar.qml @@ -46,7 +46,6 @@ import QtQuick.Controls.Private 1.0 \inqmlmodule QtQuick.Controls \since 5.1 \ingroup controls - \inherits QtQuickControls1::Control \brief A progress indicator. \image progressbar.png diff --git a/src/controls/RadioButton.qml b/src/controls/RadioButton.qml index 01ec2bb7..cc191f5b 100644 --- a/src/controls/RadioButton.qml +++ b/src/controls/RadioButton.qml @@ -46,7 +46,6 @@ import QtQuick.Controls.Private 1.0 \inqmlmodule QtQuick.Controls \since 5.1 \ingroup controls - \inherits QtQuickControls1::AbstractCheckable \brief A radio button with a text label. \image radiobutton.png diff --git a/src/controls/ScrollView.qml b/src/controls/ScrollView.qml index 5dd2f5cf..183991ac 100644 --- a/src/controls/ScrollView.qml +++ b/src/controls/ScrollView.qml @@ -48,7 +48,6 @@ import QtQuick.Controls.Styles 1.1 \since 5.1 \ingroup views \ingroup controls - \inherits QtQuick::FocusScope \brief Provides a scrolling view within another Item. \image scrollview.png diff --git a/src/controls/Slider.qml b/src/controls/Slider.qml index 9072104f..f38db0e4 100644 --- a/src/controls/Slider.qml +++ b/src/controls/Slider.qml @@ -46,7 +46,6 @@ import QtQuick.Controls.Private 1.0 \inqmlmodule QtQuick.Controls \since 5.1 \ingroup controls - \inherits QtQuickControls1::Control \brief Provides a vertical or horizontal slider control. \image slider.png diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml index 1fd02cf9..999649b0 100644 --- a/src/controls/SpinBox.qml +++ b/src/controls/SpinBox.qml @@ -46,7 +46,6 @@ import QtQuick.Controls.Private 1.0 \inqmlmodule QtQuick.Controls \since 5.1 \ingroup controls - \inherits QtQuickControls1::Control \brief Provides a spin box control. \image spinbox.png diff --git a/src/controls/SplitView.qml b/src/controls/SplitView.qml index 8d7c324c..6ad785ba 100644 --- a/src/controls/SplitView.qml +++ b/src/controls/SplitView.qml @@ -49,7 +49,6 @@ import QtQuick.Window 2.1 \since 5.1 \ingroup views \ingroup controls - \inherits QtQuick::Item \brief Lays out items with a draggable splitter between each item. \image splitview.png diff --git a/src/controls/StackView.qml b/src/controls/StackView.qml index 46927fb7..3c8b4e25 100644 --- a/src/controls/StackView.qml +++ b/src/controls/StackView.qml @@ -47,7 +47,6 @@ import QtQuick.Controls.Private 1.0 \ingroup views \ingroup controls \inqmlmodule QtQuick.Controls - \inherits QtQuick::FocusScope \since 5.1 \brief Provides a stack-based navigation model. diff --git a/src/controls/StackViewDelegate.qml b/src/controls/StackViewDelegate.qml index ce666cbc..23a9ee69 100644 --- a/src/controls/StackViewDelegate.qml +++ b/src/controls/StackViewDelegate.qml @@ -43,7 +43,6 @@ import QtQuick 2.2 \qmltype StackViewDelegate \inqmlmodule QtQuick.Controls \ingroup controls - \inherits QtQml::QtObject \since 5.1 \brief A delegate used by StackView for loading transitions. diff --git a/src/controls/StatusBar.qml b/src/controls/StatusBar.qml index 36722dfc..c1168d54 100644 --- a/src/controls/StatusBar.qml +++ b/src/controls/StatusBar.qml @@ -47,7 +47,6 @@ import QtQuick.Controls.Private 1.0 \since 5.1 \ingroup applicationwindow \ingroup controls - \inherits QtQuick::FocusScope \brief Contains status information in your app. The common way of using StatusBar is in relation to \l ApplicationWindow. diff --git a/src/controls/Switch.qml b/src/controls/Switch.qml index 575b916d..b33f7d00 100644 --- a/src/controls/Switch.qml +++ b/src/controls/Switch.qml @@ -46,7 +46,6 @@ import QtQuick.Controls.Private 1.0 \inqmlmodule QtQuick.Controls \since 5.2 \ingroup controls - \inherits QtQuickControls1::Control \brief A switch. \image switch.png diff --git a/src/controls/Tab.qml b/src/controls/Tab.qml index dac93506..657d389c 100644 --- a/src/controls/Tab.qml +++ b/src/controls/Tab.qml @@ -45,7 +45,6 @@ import QtQuick 2.2 \since 5.1 \ingroup viewaddons \ingroup controls - \inherits QtQuick::Loader \brief Tab represents the content of a tab in a TabView. A Tab item inherits from Loader and provides a similar diff --git a/src/controls/TabView.qml b/src/controls/TabView.qml index fff9616b..2579636f 100644 --- a/src/controls/TabView.qml +++ b/src/controls/TabView.qml @@ -47,7 +47,6 @@ import QtQuick.Controls.Private 1.0 \since 5.1 \ingroup views \ingroup controls - \inherits QtQuickControls1::FocusScope \brief A control that allows the user to select one of multiple stacked items. \image tabview.png diff --git a/src/controls/TableViewColumn.qml b/src/controls/TableViewColumn.qml index ec0da4af..d1fd0c00 100644 --- a/src/controls/TableViewColumn.qml +++ b/src/controls/TableViewColumn.qml @@ -45,7 +45,6 @@ import QtQuick 2.2 \since 5.1 \ingroup viewitems \ingroup controls - \inherits QtQml::QtObject \brief Used to define columns in a \l TableView or in a \l TreeView. \image tableview.png diff --git a/src/controls/TextArea.qml b/src/controls/TextArea.qml index db63e6dd..89877314 100644 --- a/src/controls/TextArea.qml +++ b/src/controls/TextArea.qml @@ -46,7 +46,6 @@ import QtQuick.Controls.Private 1.0 \inqmlmodule QtQuick.Controls \since 5.1 \ingroup controls - \inherits QtQuickControls1::ScrollView \brief Displays multiple lines of editable formatted text. \image textarea.png diff --git a/src/controls/TextField.qml b/src/controls/TextField.qml index c57f93b3..d6b9b9c9 100644 --- a/src/controls/TextField.qml +++ b/src/controls/TextField.qml @@ -46,7 +46,6 @@ import QtQuick.Controls.Private 1.0 \inqmlmodule QtQuick.Controls \since 5.1 \ingroup controls - \inherits QtQuickControls1::Control \brief Displays a single line of editable plain text. \image textfield.png diff --git a/src/controls/ToolBar.qml b/src/controls/ToolBar.qml index 27ca7b9d..2e8a8fa3 100644 --- a/src/controls/ToolBar.qml +++ b/src/controls/ToolBar.qml @@ -47,7 +47,6 @@ import QtQuick.Controls.Private 1.0 \since 5.1 \ingroup applicationwindow \ingroup controls - \inherits QtQuick::FocusScope \brief Contains ToolButton and related controls. \image toolbar.png diff --git a/src/controls/ToolButton.qml b/src/controls/ToolButton.qml index 2e15f161..1d5e474f 100644 --- a/src/controls/ToolButton.qml +++ b/src/controls/ToolButton.qml @@ -46,7 +46,6 @@ import QtQuick.Controls.Private 1.0 \inqmlmodule QtQuick.Controls \since 5.1 \ingroup controls - \inherits QtQuickControls1::Button \brief Provides a button type that is typically used within a ToolBar. \image toolbar.png diff --git a/src/controls/doc/src/qtquickcontrols-tableview.qdoc b/src/controls/doc/src/qtquickcontrols-tableview.qdoc index e2dd5026..98c7ca7b 100644 --- a/src/controls/doc/src/qtquickcontrols-tableview.qdoc +++ b/src/controls/doc/src/qtquickcontrols-tableview.qdoc @@ -32,7 +32,6 @@ \since 5.1 \ingroup views \ingroup controls - \inherits QtQuickControls1::BasicTableView \brief Provides a list view with scroll bars, styling and header sections. \image tableview.png diff --git a/src/controls/doc/src/qtquickcontrols-treeview.qdoc b/src/controls/doc/src/qtquickcontrols-treeview.qdoc index af49b85e..4fe92d9c 100644 --- a/src/controls/doc/src/qtquickcontrols-treeview.qdoc +++ b/src/controls/doc/src/qtquickcontrols-treeview.qdoc @@ -32,7 +32,6 @@ \since 5.5 \ingroup views \ingroup controls - \inherits QtQuickControls1::BasicTableView \brief Provides a tree view with scroll bars, styling and header sections. \image treeview.png diff --git a/src/extras/Dial.qml b/src/extras/Dial.qml index 67e09d41..688f13d9 100644 --- a/src/extras/Dial.qml +++ b/src/extras/Dial.qml @@ -50,7 +50,6 @@ import QtQuick.Extras.Private 1.0 \since 5.5 \ingroup extras \ingroup extras-interactive - \inherits QtQuickControls1::Control \brief A circular dial that is rotated to set a value. \image dial.png A Dial -- cgit v1.2.1 From 0c053c7ea7eab4011ac6ed32ed8d32ec40874a9f Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 21 Jun 2016 12:19:33 +0200 Subject: Doc: Add missing \qmlmodule and \inqmlmodule commands These are not strictly necessary as they are for internal types, but it makes it easier for QDoc to resolve the type inheritance. Change-Id: If4a2650fab5251081ae74b109bfb97220c25751c Reviewed-by: Mitch Curtis --- src/controls/Private/qquickabstractstyle.cpp | 1 + src/controls/Styles/Base/BasicTableViewStyle.qml | 1 + src/controls/doc/src/qtquickcontrolsstyles-index.qdoc | 4 ++++ 3 files changed, 6 insertions(+) (limited to 'src') diff --git a/src/controls/Private/qquickabstractstyle.cpp b/src/controls/Private/qquickabstractstyle.cpp index 065f7171..cd283959 100644 --- a/src/controls/Private/qquickabstractstyle.cpp +++ b/src/controls/Private/qquickabstractstyle.cpp @@ -44,6 +44,7 @@ QT_BEGIN_NAMESPACE /*! \qmltype AbstractStyle \instantiates QQuickAbstractStyle1 + \inqmlmodule QtQuick.Controls.Styles \qmlabstract \internal */ diff --git a/src/controls/Styles/Base/BasicTableViewStyle.qml b/src/controls/Styles/Base/BasicTableViewStyle.qml index 42cf2d2f..233d8efc 100644 --- a/src/controls/Styles/Base/BasicTableViewStyle.qml +++ b/src/controls/Styles/Base/BasicTableViewStyle.qml @@ -44,6 +44,7 @@ import QtQuick.Controls.Private 1.0 /*! \qmltype BasicTableViewStyle \internal + \inqmlmodule QtQuick.Controls.Styles \inherits ScrollViewStyle \qmlabstract */ diff --git a/src/controls/doc/src/qtquickcontrolsstyles-index.qdoc b/src/controls/doc/src/qtquickcontrolsstyles-index.qdoc index 8a1c2ab0..69180295 100644 --- a/src/controls/doc/src/qtquickcontrolsstyles-index.qdoc +++ b/src/controls/doc/src/qtquickcontrolsstyles-index.qdoc @@ -141,3 +141,7 @@ import QtQuick.Controls.Styles 1.4 \endcode */ + +/*! \qmlmodule QtQuick.Controls.Private 1.0 + \internal +*/ -- cgit v1.2.1 From 57ba7f8d119b69feef34dd64e5a234861d4e342a Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Wed, 29 Jun 2016 13:45:37 +0200 Subject: Doc: added qtgraphicaleffects to qdocconf Corrected link issue with DropShadow in PieBoxStyle.qml Change-Id: I66821c69f392b016a0ea1a699a26990d7aad5140 Reviewed-by: J-P Nurmi Reviewed-by: Mitch Curtis --- src/controls/doc/qtquickcontrols.qdocconf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/controls/doc/qtquickcontrols.qdocconf b/src/controls/doc/qtquickcontrols.qdocconf index 9aada9f6..e81777e0 100644 --- a/src/controls/doc/qtquickcontrols.qdocconf +++ b/src/controls/doc/qtquickcontrols.qdocconf @@ -34,7 +34,7 @@ qhp.QtQuickControls.subprojects.qqcexamples.indexTitle = Qt Quick Controls Examp qhp.QtQuickControls.subprojects.qqcexamples.selectors = doc:example group:stylingtutorials qhp.QtQuickControls.subprojects.qqcexamples.sortpages = true -depends = qtcore qtdoc qtgui qtwidgets qtqml qtquick qtquicklayouts qtquickdialogs qtquickextras +depends = qtcore qtdoc qtgui qtwidgets qtqml qtquick qtquicklayouts qtquickdialogs qtquickextras qtgraphicaleffects # Specify the install path under QT_INSTALL_EXAMPLES # Examples will be installed under quick/controls - 'controls' subdirectory -- cgit v1.2.1 From 535f520685c2af471fd5d8d83da95f4321f171bb Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Fri, 1 Jul 2016 13:21:46 +0200 Subject: Adding white space to names for item library Change-Id: If4298f002ff17e737e49b468a17de7b115570bb1 Reviewed-by: Mitch Curtis --- src/extras/designer/qtquickextras.metainfo | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/extras/designer/qtquickextras.metainfo b/src/extras/designer/qtquickextras.metainfo index 20e02ffb..c2e89297 100644 --- a/src/extras/designer/qtquickextras.metainfo +++ b/src/extras/designer/qtquickextras.metainfo @@ -4,7 +4,7 @@ MetaInfo { icon: "images/delaybutton-icon16.png" ItemLibraryEntry { - name: "DelayButton" + name: "Delay Button" category: "Qt Quick - Extras" libraryIcon: "images/delaybutton-icon.png" version: "1.0" @@ -22,7 +22,7 @@ MetaInfo { icon: "images/togglebutton-icon16.png" ItemLibraryEntry { - name: "ToggleButton" + name: "Toggle Button" category: "Qt Quick - Extras" libraryIcon: "images/togglebutton-icon.png" version: "1.0" @@ -52,7 +52,7 @@ MetaInfo { icon: "images/circulargauge-icon16.png" ItemLibraryEntry { - name: "CircularGauge" + name: "Circular Gauge" category: "Qt Quick - Extras" libraryIcon: "images/circulargauge-icon.png" version: "1.0" @@ -64,7 +64,7 @@ MetaInfo { icon: "images/piemenu-icon16.png" ItemLibraryEntry { - name: "PieMenu" + name: "Pie Menu" category: "Qt Quick - Extras" libraryIcon: "images/piemenu-icon.png" version: "1.0" @@ -88,7 +88,7 @@ MetaInfo { icon: "images/statusindicator-icon16.png" ItemLibraryEntry { - name: "StatusIndicator" + name: "Status Indicator" category: "Qt Quick - Extras" libraryIcon: "images/statusindicator-icon.png" version: "1.1" -- cgit v1.2.1 From 0ea4a2cd207540c6936c6cf16bc5b371d6bcd09d Mon Sep 17 00:00:00 2001 From: David Faure Date: Sat, 18 Jun 2016 15:21:24 +0200 Subject: Find custom styles stored in qrc. The unittest was showing that it was looking in /qrc:/qt-project.org/imports/QtQuick/Controls/Styles which makes no sense. In addition, the code was only listing the directory where the default style is found. When the custom style is elsewhere, it needs to be looked up in addition. Change-Id: I93eddab73672c575cd92037e1d0b366cf17540ef Reviewed-by: Simon Hausmann Reviewed-by: J-P Nurmi --- src/controls/Private/qquickcontrolsettings.cpp | 38 +++++++++++++++++--------- src/controls/Private/qquickcontrolsettings_p.h | 1 + 2 files changed, 26 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/controls/Private/qquickcontrolsettings.cpp b/src/controls/Private/qquickcontrolsettings.cpp index dfab577e..1965738a 100644 --- a/src/controls/Private/qquickcontrolsettings.cpp +++ b/src/controls/Private/qquickcontrolsettings.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -154,16 +155,21 @@ static QString relativeStyleImportPath(QQmlEngine *engine, const QString &styleN QString path; #ifndef QT_STATIC bool found = false; - const auto importPathList = engine->importPathList(); - for (const QString &import : importPathList) { - QDir dir(import + QStringLiteral("/QtQuick/Controls/Styles")); - if (dir.exists(styleName)) { - found = true; - path = dir.absolutePath(); - break; + const auto importPathList = engine->importPathList(); // ideally we'd call QQmlImportDatabase::importPathList(Local) here, but it's not exported + for (QString import : importPathList) { + bool localPath = QFileInfo(import).isAbsolute(); + if (import.startsWith(QLatin1String("qrc:/"), Qt::CaseInsensitive)) { + import = QLatin1Char(':') + import.mid(4); + localPath = true; + } + if (localPath) { + QDir dir(import + QStringLiteral("/QtQuick/Controls/Styles")); + if (dir.exists(styleName)) { + found = true; + path = dir.absolutePath(); + break; + } } - if (found) - break; } if (!found) path = ":/QtQuick/Controls/Styles"; @@ -194,6 +200,7 @@ static QString styleImportPath(QQmlEngine *engine, const QString &styleName) } QQuickControlSettings1::QQuickControlSettings1(QQmlEngine *engine) + : m_engine(engine) { // First, register all style paths in the default style location. QDir dir; @@ -223,10 +230,14 @@ QQuickControlSettings1::QQuickControlSettings1(QQmlEngine *engine) if (m_styleMap.contains(m_name)) { m_path = m_styleMap.value(m_name).m_styleDirPath; } else { - QString unknownStyle = m_name; - m_name = defaultStyle; m_path = m_styleMap.value(defaultStyle).m_styleDirPath; - qWarning() << "WARNING: Cannot find style" << unknownStyle << "- fallback:" << styleFilePath(); + // Maybe the requested style is not next to the default style, but elsewhere in the import path + findStyle(engine, m_name); + if (!m_styleMap.contains(m_name)) { + QString unknownStyle = m_name; + m_name = defaultStyle; + qWarning() << "WARNING: Cannot find style" << unknownStyle << "- fallback:" << styleFilePath(); + } } // Can't really do anything about this failing here, so don't bother checking... @@ -278,7 +289,8 @@ void QQuickControlSettings1::findStyle(QQmlEngine *engine, const QString &styleN QDir dir; dir.setFilter(QDir::Files | QDir::NoDotAndDotDot); dir.setPath(path); - dir.cd(styleName); + if (!dir.cd(styleName)) + return; StyleData styleData; diff --git a/src/controls/Private/qquickcontrolsettings_p.h b/src/controls/Private/qquickcontrolsettings_p.h index aa3e4b2d..bfa44f2f 100644 --- a/src/controls/Private/qquickcontrolsettings_p.h +++ b/src/controls/Private/qquickcontrolsettings_p.h @@ -106,6 +106,7 @@ private: QString m_name; QString m_path; QHash m_styleMap; + QQmlEngine *m_engine; }; QT_END_NAMESPACE -- cgit v1.2.1 From f9d052928bb5767d0caf3b6c030d642beac26598 Mon Sep 17 00:00:00 2001 From: David Faure Date: Sat, 18 Jun 2016 15:20:56 +0200 Subject: Find custom styles from custom paths when set afterwards This fixes the very frequent warning from plasmashell: WARNING: Cannot find style "Plasma" Change-Id: Ibe853e7b8b42adc2bce7c63a1505b27898ea5ffc Reviewed-by: Mitch Curtis Reviewed-by: J-P Nurmi --- src/controls/Private/qquickcontrolsettings.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/controls/Private/qquickcontrolsettings.cpp b/src/controls/Private/qquickcontrolsettings.cpp index 1965738a..a2fb824c 100644 --- a/src/controls/Private/qquickcontrolsettings.cpp +++ b/src/controls/Private/qquickcontrolsettings.cpp @@ -339,6 +339,11 @@ void QQuickControlSettings1::setStyleName(const QString &name) QString oldName = m_name; m_name = name; + if (!m_styleMap.contains(name)) { + // Maybe this style is not next to the default style, but elsewhere in the import path + findStyle(m_engine, name); + } + // Don't change the style if it can't be resolved. if (!resolveCurrentStylePath()) m_name = oldName; -- cgit v1.2.1 From 37f8b753be1b16975220c8b611b17a428eafb9e9 Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Wed, 6 Jul 2016 14:02:08 +0200 Subject: Doc: QQuickRangeModel --> QQuickRangeModel1 Error message: Cannot find 'QQuickRangeModel::minimumValue' specified with '\property' for several properties Change-Id: I82bf7a277da27b096e15aac223612b96fcddadc4 Reviewed-by: J-P Nurmi --- src/controls/Private/qquickrangemodel.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/controls/Private/qquickrangemodel.cpp b/src/controls/Private/qquickrangemodel.cpp index 4a685bf3..d881e3c8 100644 --- a/src/controls/Private/qquickrangemodel.cpp +++ b/src/controls/Private/qquickrangemodel.cpp @@ -266,7 +266,7 @@ void QQuickRangeModel1::setRange(qreal min, qreal max) } /*! - \property QQuickRangeModel::minimumValue + \property QQuickRangeModel1::minimumValue \brief the minimum value that \l value can assume This property's default value is 0 @@ -285,7 +285,7 @@ qreal QQuickRangeModel1::minimum() const } /*! - \property QQuickRangeModel::maximumValue + \property QQuickRangeModel1::maximumValue \brief the maximum value that \l value can assume This property's default value is 99 @@ -306,7 +306,7 @@ qreal QQuickRangeModel1::maximum() const } /*! - \property QQuickRangeModel::stepSize + \property QQuickRangeModel1::stepSize \brief the value that is added to the \l value and \l position property Example: If a user sets a range of [0,100] and stepSize @@ -350,7 +350,7 @@ qreal QQuickRangeModel1::positionForValue(qreal value) const } /*! - \property QQuickRangeModel::position + \property QQuickRangeModel1::position \brief the current position of the model Represents a valid external position, based on the \l positionAtMinimum, @@ -385,7 +385,7 @@ void QQuickRangeModel1::setPosition(qreal newPosition) } /*! - \property QQuickRangeModel::positionAtMinimum + \property QQuickRangeModel1::positionAtMinimum \brief the minimum value that \l position can assume This property's default value is 0 @@ -404,7 +404,7 @@ qreal QQuickRangeModel1::positionAtMinimum() const } /*! - \property QQuickRangeModel::positionAtMaximum + \property QQuickRangeModel1::positionAtMaximum \brief the maximum value that \l position can assume This property's default value is 0 @@ -437,7 +437,7 @@ qreal QQuickRangeModel1::valueForPosition(qreal position) const } /*! - \property QQuickRangeModel::value + \property QQuickRangeModel1::value \brief the current value of the model Represents a valid external value, based on the \l minimumValue, @@ -472,7 +472,7 @@ void QQuickRangeModel1::setValue(qreal newValue) } /*! - \property QQuickRangeModel::inverted + \property QQuickRangeModel1::inverted \brief the model is inverted or not The model can be represented with an inverted behavior, e.g. when \l value assumes -- cgit v1.2.1