summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-08-02 10:25:02 +0200
committerLiang Qi <liang.qi@qt.io>2016-08-02 10:25:02 +0200
commitdc1d95819365202e2745faffe31e13d928742c4c (patch)
treeee45832495cc20d26143fc3ec4f74c3212b0742e
parent52672d6811eeda364c10fa4d81c2b352e8b1d2e8 (diff)
parent22fab1502f562bccb3c16dde0288aa867e3b094a (diff)
downloadqtquickcontrols-dc1d95819365202e2745faffe31e13d928742c4c.tar.gz
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts: .qmake.conf Change-Id: Iab80dd0c2bea54171971fd7a9538000908ed90d5
-rw-r--r--LICENSE.GPLv22
-rw-r--r--LICENSE.GPLv32
-rw-r--r--LICENSE.LGPLv32
-rw-r--r--dist/changes-5.6.130
-rw-r--r--src/controls/ApplicationWindow.qml1
-rw-r--r--src/controls/BusyIndicator.qml1
-rw-r--r--src/controls/Button.qml1
-rw-r--r--src/controls/Calendar.qml1
-rw-r--r--src/controls/CheckBox.qml1
-rw-r--r--src/controls/ComboBox.qml1
-rw-r--r--src/controls/GroupBox.qml1
-rw-r--r--src/controls/Label.qml1
-rw-r--r--src/controls/Menu.qml1
-rw-r--r--src/controls/MenuBar.qml1
-rw-r--r--src/controls/Private/ScrollViewHelper.qml2
-rw-r--r--src/controls/Private/qquickabstractstyle.cpp1
-rw-r--r--src/controls/Private/qquickcontrolsettings.cpp43
-rw-r--r--src/controls/Private/qquickcontrolsettings_p.h1
-rw-r--r--src/controls/Private/qquickrangemodel.cpp16
-rw-r--r--src/controls/ProgressBar.qml1
-rw-r--r--src/controls/RadioButton.qml1
-rw-r--r--src/controls/ScrollView.qml1
-rw-r--r--src/controls/Slider.qml1
-rw-r--r--src/controls/SpinBox.qml1
-rw-r--r--src/controls/SplitView.qml1
-rw-r--r--src/controls/StackView.qml1
-rw-r--r--src/controls/StackViewDelegate.qml1
-rw-r--r--src/controls/StatusBar.qml1
-rw-r--r--src/controls/Styles/Base/BasicTableViewStyle.qml1
-rw-r--r--src/controls/Styles/styles.pri2
-rw-r--r--src/controls/Switch.qml1
-rw-r--r--src/controls/Tab.qml1
-rw-r--r--src/controls/TabView.qml1
-rw-r--r--src/controls/TableViewColumn.qml1
-rw-r--r--src/controls/TextArea.qml1
-rw-r--r--src/controls/TextField.qml1
-rw-r--r--src/controls/ToolBar.qml1
-rw-r--r--src/controls/ToolButton.qml1
-rw-r--r--src/controls/doc/qtquickcontrols.qdocconf2
-rw-r--r--src/controls/doc/src/qtquickcontrols-examples.qdoc8
-rw-r--r--src/controls/doc/src/qtquickcontrols-tableview.qdoc5
-rw-r--r--src/controls/doc/src/qtquickcontrols-treeview.qdoc6
-rw-r--r--src/controls/doc/src/qtquickcontrolsstyles-index.qdoc4
-rw-r--r--src/extras/Dial.qml1
-rw-r--r--src/extras/designer/PictureSpecifics.qml2
-rw-r--r--src/extras/designer/qtquickextras.metainfo10
-rw-r--r--tests/auto/controls/data/tst_calendar.qml7
-rw-r--r--tests/auto/customcontrolsstyle/QtQuick/Controls/Styles/Style/ButtonStyle.qml61
-rw-r--r--tests/auto/customcontrolsstyle/style.qrc3
-rw-r--r--tests/auto/customcontrolsstyle/tst_customcontrolsstyle.cpp39
50 files changed, 205 insertions, 72 deletions
diff --git a/LICENSE.GPLv2 b/LICENSE.GPLv2
index 6dbb032f..a4244777 100644
--- a/LICENSE.GPLv2
+++ b/LICENSE.GPLv2
@@ -3,7 +3,7 @@
The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd.
Contact: http://www.qt.io/licensing/
- You may use, distribute and copy the Qt GUI Toolkit under the terms of
+ You may use, distribute and copy the Qt Toolkit under the terms of
GNU General Public License version 2, which is displayed below.
-------------------------------------------------------------------------
diff --git a/LICENSE.GPLv3 b/LICENSE.GPLv3
index 4e49b122..71c4ad49 100644
--- a/LICENSE.GPLv3
+++ b/LICENSE.GPLv3
@@ -3,7 +3,7 @@
The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd.
Contact: http://www.qt.io/licensing/
- You may use, distribute and copy the Qt GUI Toolkit under the terms of
+ You may use, distribute and copy the Qt Toolkit under the terms of
GNU Lesser General Public License version 3. That license references
the General Public License version 3, that is displayed below. Other
portions of the Qt Toolkit may be licensed directly under this license.
diff --git a/LICENSE.LGPLv3 b/LICENSE.LGPLv3
index 4d67bac0..6bf924cd 100644
--- a/LICENSE.LGPLv3
+++ b/LICENSE.LGPLv3
@@ -3,7 +3,7 @@
The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd.
Contact: http://www.qt.io/licensing/
- You may use, distribute and copy the Qt GUI Toolkit under the terms of
+ You may use, distribute and copy the Qt Toolkit under the terms of
GNU Lesser General Public License version 3, which is displayed below.
This license makes reference to the version 3 of the GNU General
Public License, which you can find in the LICENSE.GPLv3 file.
diff --git a/dist/changes-5.6.1 b/dist/changes-5.6.1
new file mode 100644
index 00000000..44a12bd2
--- /dev/null
+++ b/dist/changes-5.6.1
@@ -0,0 +1,30 @@
+Qt 5.6.1 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.6.0.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+ https://doc.qt.io/qt-5/
+
+The Qt version 5.6 series is binary compatible with the 5.5.x series.
+Applications compiled for 5.5 will continue to run with 5.6.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+ https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* Dialogs *
+****************************************************************************
+
+ - [QTBUG-49058] Proper resize and default size for content.
+
+****************************************************************************
+* Controls *
+****************************************************************************
+
+ - Fixed a memory leak in QStyleOption.
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 b6f4d82e..bd42f76b 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/Private/ScrollViewHelper.qml b/src/controls/Private/ScrollViewHelper.qml
index 4841eace..066bc6cd 100644
--- a/src/controls/Private/ScrollViewHelper.qml
+++ b/src/controls/Private/ScrollViewHelper.qml
@@ -73,10 +73,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
}
}
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/Private/qquickcontrolsettings.cpp b/src/controls/Private/qquickcontrolsettings.cpp
index dfab577e..a2fb824c 100644
--- a/src/controls/Private/qquickcontrolsettings.cpp
+++ b/src/controls/Private/qquickcontrolsettings.cpp
@@ -42,6 +42,7 @@
#include <qcoreapplication.h>
#include <qdebug.h>
#include <qqmlengine.h>
+#include <qfileinfo.h>
#include <qlibrary.h>
#include <qdir.h>
#include <QTouchDevice>
@@ -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;
@@ -327,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;
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<QString, StyleData> m_styleMap;
+ QQmlEngine *m_engine;
};
QT_END_NAMESPACE
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
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/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/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
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/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 749efc32..70c8eabb 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 e2dd5026..cf86174a 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
@@ -289,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 af49b85e..438eec7a 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
@@ -126,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}
*/
/*!
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
+*/
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
diff --git a/src/extras/designer/PictureSpecifics.qml b/src/extras/designer/PictureSpecifics.qml
index a4c197fd..461e233a 100644
--- a/src/extras/designer/PictureSpecifics.qml
+++ b/src/extras/designer/PictureSpecifics.qml
@@ -55,7 +55,7 @@ Column {
SectionLayout {
Label {
text: qsTr("Source")
- toolTip: qsTr("Source")
+ tooltip: qsTr("Source")
}
SecondColumnLayout {
LineEdit {
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"
diff --git a/tests/auto/controls/data/tst_calendar.qml b/tests/auto/controls/data/tst_calendar.qml
index 3622268b..1185aca9 100644
--- a/tests/auto/controls/data/tst_calendar.qml
+++ b/tests/auto/controls/data/tst_calendar.qml
@@ -939,14 +939,17 @@ Item {
asyncCalendar.parent = container;
waitForRendering(asyncCalendar);
+ tryCompare(testcase.aysncDelegatesConstructed, "length", CalendarUtils.daysInAWeek);
+
for (var i = 0; i < testcase.aysncDelegatesConstructed.length; ++i) {
- tryCompare(testcase.aysncDelegatesConstructed, i, true);
+ compare(testcase.aysncDelegatesConstructed[i], true);
}
asyncCalendarLoader.active = false;
+ tryCompare(testcase.aysncDelegatesDestructed, "length", CalendarUtils.daysInAWeek);
for (i = 0; i < testcase.aysncDelegatesDestructed.length; ++i) {
- tryCompare(testcase.aysncDelegatesDestructed, i, true);
+ compare(testcase.aysncDelegatesDestructed[i], true);
}
}
}
diff --git a/tests/auto/customcontrolsstyle/QtQuick/Controls/Styles/Style/ButtonStyle.qml b/tests/auto/customcontrolsstyle/QtQuick/Controls/Styles/Style/ButtonStyle.qml
new file mode 100644
index 00000000..548c5641
--- /dev/null
+++ b/tests/auto/customcontrolsstyle/QtQuick/Controls/Styles/Style/ButtonStyle.qml
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.4
+import QtQuick.Controls 1.4
+import QtQuick.Controls.Styles 1.4
+
+ButtonStyle {
+ background: Rectangle {
+ implicitWidth: 200
+ implicitHeight: 50
+ color: "blue"
+ }
+}
diff --git a/tests/auto/customcontrolsstyle/style.qrc b/tests/auto/customcontrolsstyle/style.qrc
index 37cfbbd7..c04782ba 100644
--- a/tests/auto/customcontrolsstyle/style.qrc
+++ b/tests/auto/customcontrolsstyle/style.qrc
@@ -2,4 +2,7 @@
<qresource prefix="/">
<file>Style/ButtonStyle.qml</file>
</qresource>
+ <qresource prefix="/qt-project.org/imports/QtQuick/Controls/Styles/ResourceStyle">
+ <file alias="ButtonStyle.qml">Style/ButtonStyle.qml</file>
+ </qresource>
</RCC>
diff --git a/tests/auto/customcontrolsstyle/tst_customcontrolsstyle.cpp b/tests/auto/customcontrolsstyle/tst_customcontrolsstyle.cpp
index ebd60d1e..8405c98b 100644
--- a/tests/auto/customcontrolsstyle/tst_customcontrolsstyle.cpp
+++ b/tests/auto/customcontrolsstyle/tst_customcontrolsstyle.cpp
@@ -47,6 +47,7 @@ private slots:
void style_data();
void style();
+ void changeStyle();
};
void tst_customcontrolsstyle::initTestCase()
@@ -61,6 +62,7 @@ void tst_customcontrolsstyle::style_data()
QTest::newRow("NonExistentStyle") << QString::fromLatin1("NonExistentStyle") << QString::fromLatin1("Base");
QTest::newRow("CustomFileSystemStyle") << directory() + QString::fromLatin1("/Style") << QString::fromLatin1("Style");
+ QTest::newRow("BuiltinQrcStyle") << QString::fromLatin1("ResourceStyle") << QString::fromLatin1("ResourceStyle"); // from :/qt-project.org/imports/QtQuick/Controls/Styles
QTest::newRow("CustomQrcStyle") << QString::fromLatin1(":/Style") << QString::fromLatin1("Style");
}
@@ -104,6 +106,43 @@ void tst_customcontrolsstyle::style()
}
}
+// start with Base, switch to custom style later on (for a specific QML engine)
+void tst_customcontrolsstyle::changeStyle()
+{
+ qputenv("QT_QUICK_CONTROLS_1_STYLE", "Base");
+ qputenv("QML2_IMPORT_PATH", QFile::encodeName(directory()));
+
+ QQmlEngine engine;
+
+ QQmlComponent component(&engine, testFileUrl("TestComponent.qml"));
+ QTRY_COMPARE(component.status(), QQmlComponent::Ready);
+
+ QScopedPointer<QObject> object(component.create());
+ QVERIFY(object);
+
+ QCOMPARE(object->property("styleName").toString(), QString("Base"));
+
+ // Switch to "Style" custom style
+ QQmlComponent c(&engine);
+ c.setData("import QtQuick 2.1\n"
+ "import QtQuick.Controls 1.0\n"
+ "import QtQuick.Controls.Private 1.0\n"
+ "Item {"
+ "Component.onCompleted: {"
+ "Settings.styleName = \"Style\";"
+ "}"
+ "}", QUrl());
+ QObject *o = c.create();
+ o->deleteLater();
+
+ QCOMPARE(object->property("styleName").toString(), QString("Style"));
+ QMetaObject::invokeMethod(object.data(), "buttonStyleComponent");
+ QQuickWindow *window = qobject_cast<QQuickWindow*>(object.data());
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+ QImage windowImage = window->grabWindow();
+ QCOMPARE(windowImage.pixel(0, 0), QColor(Qt::blue).rgb());
+}
+
QTEST_MAIN(tst_customcontrolsstyle)
#include "tst_customcontrolsstyle.moc"