diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-12-15 11:44:26 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-12-15 11:44:26 +0100 |
commit | 1fcec5bf1e208a4f32ef4f3afa54684358a11a1d (patch) | |
tree | febc62851b20cfc485f875e3a6303ac2791b1119 /src/quickcontrols2 | |
parent | 6767d789b3544c6ff7717250e1c0dee02ad91fd4 (diff) | |
parent | 6b89293b99e763589181fd1f75470712f52cee3c (diff) |
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
.qmake.conf
examples/quickcontrols2/quickcontrols2.pro
src/imports/controls/ComboBox.qml
src/quicktemplates2/qquickabstractbutton.cpp
src/quicktemplates2/qquickabstractbutton_p.h
src/quicktemplates2/qquickapplicationwindow_p.h
src/quicktemplates2/qquickcombobox.cpp
src/quicktemplates2/qquickcontainer.cpp
src/quicktemplates2/qquickcontrol.cpp
src/quicktemplates2/qquickcontrol_p.h
src/quicktemplates2/qquickcontrol_p_p.h
src/quicktemplates2/qquicklabel_p.h
src/quicktemplates2/qquicklabel_p_p.h
src/quicktemplates2/qquickslider_p.h
src/quicktemplates2/qquickspinbox.cpp
src/quicktemplates2/qquicktextarea_p.h
src/quicktemplates2/qquicktextarea_p_p.h
src/quicktemplates2/qquicktextfield_p.h
src/quicktemplates2/qquicktextfield_p_p.h
tests/auto/auto.pro
tests/auto/controls/data/tst_combobox.qml
Change-Id: I34cdd5a9794e34e0f38f70353f2a2d04dfc11074
Diffstat (limited to 'src/quickcontrols2')
-rw-r--r-- | src/quickcontrols2/qquickanimatednode.cpp | 13 | ||||
-rw-r--r-- | src/quickcontrols2/qquickstyle.cpp | 4 | ||||
-rw-r--r-- | src/quickcontrols2/qquicktumblerview.cpp | 2 |
3 files changed, 15 insertions, 4 deletions
diff --git a/src/quickcontrols2/qquickanimatednode.cpp b/src/quickcontrols2/qquickanimatednode.cpp index 83539fc6..3a18c757 100644 --- a/src/quickcontrols2/qquickanimatednode.cpp +++ b/src/quickcontrols2/qquickanimatednode.cpp @@ -112,8 +112,14 @@ void QQuickAnimatedNode::start(int duration) m_timer.restart(); if (duration > 0) m_duration = duration; - connect(m_window, &QQuickWindow::beforeRendering, this, &QQuickAnimatedNode::advance); - connect(m_window, &QQuickWindow::frameSwapped, this, &QQuickAnimatedNode::update); + + connect(m_window, &QQuickWindow::beforeRendering, this, &QQuickAnimatedNode::advance, Qt::DirectConnection); + connect(m_window, &QQuickWindow::frameSwapped, this, &QQuickAnimatedNode::update, Qt::DirectConnection); + + // If we're inside a QQuickWidget, this call is necessary to ensure the widget + // gets updated for the first time. + m_window->update(); + emit started(); } @@ -152,6 +158,9 @@ void QQuickAnimatedNode::advance() } } updateCurrentTime(time); + + // If we're inside a QQuickWidget, this call is necessary to ensure the widget gets updated. + m_window->update(); } void QQuickAnimatedNode::update() diff --git a/src/quickcontrols2/qquickstyle.cpp b/src/quickcontrols2/qquickstyle.cpp index c4555ee7..c9c5ba54 100644 --- a/src/quickcontrols2/qquickstyle.cpp +++ b/src/quickcontrols2/qquickstyle.cpp @@ -215,7 +215,7 @@ struct QQuickStyleSpec for (const QString &path : stylePaths) { QString stylePath = findStyle(path, style); if (!stylePath.isEmpty()) { - custom = !stylePath.startsWith(baseUrl.toLocalFile()); + custom = !stylePath.startsWith(QQmlFile::urlToLocalFileOrQrc(baseUrl)); style = stylePath; resolved = true; break; @@ -296,7 +296,7 @@ void QQuickStylePrivate::init(const QUrl &baseUrl) spec->resolve(baseUrl); if (!spec->fallbackStyle.isEmpty()) { - QString fallbackStyle = spec->findStyle(baseUrl.toLocalFile(), spec->fallbackStyle); + QString fallbackStyle = spec->findStyle(QQmlFile::urlToLocalFileOrQrc(baseUrl), spec->fallbackStyle); if (fallbackStyle.isEmpty()) { if (spec->fallbackStyle.compare(QStringLiteral("Default")) != 0) { qWarning() << "ERROR: unable to locate fallback style" << spec->fallbackStyle; diff --git a/src/quickcontrols2/qquicktumblerview.cpp b/src/quickcontrols2/qquicktumblerview.cpp index 5e6d9f5a..e8f0c364 100644 --- a/src/quickcontrols2/qquicktumblerview.cpp +++ b/src/quickcontrols2/qquicktumblerview.cpp @@ -148,6 +148,7 @@ void QQuickTumblerView::createView() m_pathView->setDelegate(m_delegate); m_pathView->setPreferredHighlightBegin(0.5); m_pathView->setPreferredHighlightEnd(0.5); + m_pathView->setHighlightMoveDuration(1000); m_pathView->setClip(true); // Give the view a size. @@ -172,6 +173,7 @@ void QQuickTumblerView::createView() m_listView->setParentItem(this); m_listView->setSnapMode(QQuickListView::SnapToItem); m_listView->setHighlightRangeMode(QQuickListView::StrictlyEnforceRange); + m_listView->setHighlightMoveDuration(1000); m_listView->setClip(true); m_listView->setDelegate(m_delegate); |