aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols2
diff options
context:
space:
mode:
Diffstat (limited to 'src/quickcontrols2')
-rw-r--r--src/quickcontrols2/qquickiconlabel.cpp2
-rw-r--r--src/quickcontrols2/qquickstyle.cpp18
-rw-r--r--src/quickcontrols2/qquicktumblerview.cpp15
3 files changed, 26 insertions, 9 deletions
diff --git a/src/quickcontrols2/qquickiconlabel.cpp b/src/quickcontrols2/qquickiconlabel.cpp
index 37e6060a..b246621b 100644
--- a/src/quickcontrols2/qquickiconlabel.cpp
+++ b/src/quickcontrols2/qquickiconlabel.cpp
@@ -81,6 +81,7 @@ bool QQuickIconLabelPrivate::createImage()
image->setSource(icon.source());
image->setSourceSize(QSize(icon.width(), icon.height()));
image->setColor(icon.color());
+ image->setCache(icon.cache());
QQmlEngine::setContextForObject(image, qmlContext(q));
if (componentComplete)
completeComponent(image);
@@ -114,6 +115,7 @@ void QQuickIconLabelPrivate::syncImage()
image->setSource(icon.source());
image->setSourceSize(QSize(icon.width(), icon.height()));
image->setColor(icon.color());
+ image->setCache(icon.cache());
const int valign = alignment & Qt::AlignVertical_Mask;
image->setVerticalAlignment(static_cast<QQuickImage::VAlignment>(valign));
const int halign = alignment & Qt::AlignHorizontal_Mask;
diff --git a/src/quickcontrols2/qquickstyle.cpp b/src/quickcontrols2/qquickstyle.cpp
index b4901db3..e2b6678b 100644
--- a/src/quickcontrols2/qquickstyle.cpp
+++ b/src/quickcontrols2/qquickstyle.cpp
@@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE
\since 5.7
QQuickStyle provides API for querying and configuring the application
- \l {Styling Qt Quick Controls 2}{styles} of Qt Quick Controls 2.
+ \l {Styling Qt Quick Controls}{styles} of Qt Quick Controls.
\code
#include <QGuiApplication>
@@ -86,7 +86,7 @@ QT_BEGIN_NAMESPACE
\endcode
\note The style must be configured \b before loading QML that imports
- Qt Quick Controls 2. It is not possible to change the style after the QML
+ Qt Quick Controls. It is not possible to change the style after the QML
types have been registered.
The style can also be specified as a path to a custom style, such as
@@ -102,7 +102,7 @@ QT_BEGIN_NAMESPACE
QQuickStyle::setFallbackStyle("Material");
\endcode
- \sa {Styling Qt Quick Controls 2}
+ \sa {Styling Qt Quick Controls}
*/
static QStringList envPathList(const QByteArray &var)
@@ -536,10 +536,10 @@ QString QQuickStyle::path()
/*!
Sets the application style to \a style.
- \note The style must be configured \b before loading QML that imports Qt Quick Controls 2.
+ \note The style must be configured \b before loading QML that imports Qt Quick Controls.
It is not possible to change the style after the QML types have been registered.
- \sa setFallbackStyle(), {Using Styles in Qt Quick Controls 2}
+ \sa setFallbackStyle(), {Using Styles in Qt Quick Controls}
*/
void QQuickStyle::setStyle(const QString &style)
{
@@ -555,15 +555,15 @@ void QQuickStyle::setStyle(const QString &style)
\since 5.8
Sets the application fallback style to \a style.
- \note The fallback style must be the name of one of the built-in Qt Quick Controls 2 styles, e.g. "Material".
+ \note The fallback style must be the name of one of the built-in Qt Quick Controls styles, e.g. "Material".
- \note The style must be configured \b before loading QML that imports Qt Quick Controls 2.
+ \note The style must be configured \b before loading QML that imports Qt Quick Controls.
It is not possible to change the style after the QML types have been registered.
The fallback style can be also specified by setting the \c QT_QUICK_CONTROLS_FALLBACK_STYLE
- \l {Supported Environment Variables in Qt Quick Controls 2}{environment variable}.
+ \l {Supported Environment Variables in Qt Quick Controls}{environment variable}.
- \sa setStyle(), {Using Styles in Qt Quick Controls 2}
+ \sa setStyle(), {Using Styles in Qt Quick Controls}
*/
void QQuickStyle::setFallbackStyle(const QString &style)
{
diff --git a/src/quickcontrols2/qquicktumblerview.cpp b/src/quickcontrols2/qquicktumblerview.cpp
index a510a1fe..5f5c065d 100644
--- a/src/quickcontrols2/qquicktumblerview.cpp
+++ b/src/quickcontrols2/qquicktumblerview.cpp
@@ -36,6 +36,7 @@
#include "qquicktumblerview_p.h"
+#include <QtCore/qloggingcategory.h>
#include <QtQuick/private/qquickitem_p.h>
#include <QtQuick/private/qquicklistview_p.h>
#include <QtQuick/private/qquickpathview_p.h>
@@ -45,6 +46,8 @@
QT_BEGIN_NAMESPACE
+Q_LOGGING_CATEGORY(lcTumblerView, "qt.quick.controls.tumblerview")
+
QQuickTumblerView::QQuickTumblerView(QQuickItem *parent) :
QQuickItem(parent)
{
@@ -59,6 +62,8 @@ QVariant QQuickTumblerView::model() const
void QQuickTumblerView::setModel(const QVariant &model)
{
+ qCDebug(lcTumblerView) << "setting model to:" << model << "on"
+ << (m_pathView ? static_cast<QObject*>(m_pathView) : static_cast<QObject*>(m_listView));
if (model == m_model)
return;
@@ -85,6 +90,8 @@ QQmlComponent *QQuickTumblerView::delegate() const
void QQuickTumblerView::setDelegate(QQmlComponent *delegate)
{
+ qCDebug(lcTumblerView) << "setting delegate to:" << delegate << "on"
+ << (m_pathView ? static_cast<QObject*>(m_pathView) : static_cast<QObject*>(m_listView));
if (delegate == m_delegate)
return;
@@ -135,6 +142,8 @@ void QQuickTumblerView::createView()
}
if (!m_pathView) {
+ qCDebug(lcTumblerView) << "creating PathView";
+
m_pathView = new QQuickPathView;
QQmlEngine::setContextForObject(m_pathView, qmlContext(this));
QQml_setParent_noEvent(m_pathView, this);
@@ -150,6 +159,8 @@ void QQuickTumblerView::createView()
updateView();
// Set the model.
updateModel();
+
+ qCDebug(lcTumblerView) << "finished creating PathView";
}
} else {
if (m_pathView) {
@@ -162,6 +173,8 @@ void QQuickTumblerView::createView()
}
if (!m_listView) {
+ qCDebug(lcTumblerView) << "creating ListView";
+
m_listView = new QQuickListView;
QQmlEngine::setContextForObject(m_listView, qmlContext(this));
QQml_setParent_noEvent(m_listView, this);
@@ -181,6 +194,8 @@ void QQuickTumblerView::createView()
// which we don't want when the contentItem has just been created.
m_listView->setDelegate(m_delegate);
m_listView->setHighlightMoveDuration(1000);
+
+ qCDebug(lcTumblerView) << "finished creating ListView";
}
}
}