aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorKari Oikarinen <kari.oikarinen@qt.io>2019-01-08 08:18:11 +0200
committerKari Oikarinen <kari.oikarinen@qt.io>2019-01-08 08:18:11 +0200
commitc2c012f79438d207cc95237c90b692121acc4876 (patch)
tree39064e5a58161a7edb4e0c63f2d43e386d1f4059 /src/quick
parent5208b2a671010b11b78312f9c4fe3c3098d253b4 (diff)
parent5ed082ea4ce3580134a9a0c83e6fdb81a6231c8e (diff)
Merge 5.12 into 5.12.1
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/doc/qtquick.qdocconf2
-rw-r--r--src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc4
-rw-r--r--src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc2
-rw-r--r--src/quick/doc/src/examples.qdoc2
-rw-r--r--src/quick/doc/src/guidelines/qtquick-toolsnutilities.qdoc1
-rw-r--r--src/quick/doc/src/qmltypereference.qdoc2
-rw-r--r--src/quick/handlers/qquickdraghandler.cpp2
-rw-r--r--src/quick/handlers/qquickhandlerpoint.cpp2
-rw-r--r--src/quick/handlers/qquickmultipointhandler.cpp2
-rw-r--r--src/quick/handlers/qquickpointhandler.cpp2
-rw-r--r--src/quick/handlers/qquicktaphandler.cpp4
-rw-r--r--src/quick/items/qquicklistview.cpp13
-rw-r--r--src/quick/items/qquicktext.cpp2
-rw-r--r--src/quick/items/qquickwindow.cpp9
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp7
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp3
-rw-r--r--src/quick/util/qquickpixmapcache.cpp10
-rw-r--r--src/quick/util/qquickstyledtext.cpp22
18 files changed, 66 insertions, 25 deletions
diff --git a/src/quick/doc/qtquick.qdocconf b/src/quick/doc/qtquick.qdocconf
index 94bc80bf93..b1268097fc 100644
--- a/src/quick/doc/qtquick.qdocconf
+++ b/src/quick/doc/qtquick.qdocconf
@@ -37,7 +37,7 @@ qhp.QtQuick.subprojects.examples.selectors = fake:example
tagfile = ../../../doc/qtquick/qtquick.tags
-depends += qtcore qtqml qtqmltest qtgui qtlinguist qtquickcontrols qtquickcontrols2 qtdoc qtquickdialogs qtsensors qtwidgets qmake qtmultimedia qtgraphicaleffects qtsql
+depends += qtcore qtqml qtqmltest qtgui qtlinguist qtquickcontrols1 qtquickcontrols qtdoc qtquickdialogs qtsensors qtwidgets qmake qtmultimedia qtgraphicaleffects qtsql qtxmlpatterns
headerdirs += ..\
../../quickwidgets
diff --git a/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc b/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc
index a849a30b4e..e4d837112f 100644
--- a/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc
+++ b/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc
@@ -331,9 +331,7 @@ signal after saving the changes.
Unlike the C++ item views such as QListView or QTableView, the \c setData()
method must be explicitly invoked from QML delegates whenever appropriate. This is done
-by simply assigning a new value to the corresponding model property. For example,
-on the \l[QML]{TextField::}{editingFinished}() or \l[QML]{TextField::}{accepted}()
-signal of \l[QtQuickControls]{TextField}.
+by simply assigning a new value to the corresponding model property.
\qml
ListView {
diff --git a/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc b/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc
index 0c6aaecf42..04dbf1cf20 100644
--- a/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc
+++ b/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc
@@ -226,7 +226,7 @@ To visualize data, bind the view's \c model property to a model and the
\section2 XML Model
XmlListModel allows construction of a model from an XML data source. The roles
- are specified via the \l XmlRole type. The type needs to be imported.
+ are specified via the \l [QML]{XmlRole} type. The type needs to be imported.
\code
import QtQuick.XmlListModel 2.0
diff --git a/src/quick/doc/src/examples.qdoc b/src/quick/doc/src/examples.qdoc
index 39fc7f27eb..77475e9812 100644
--- a/src/quick/doc/src/examples.qdoc
+++ b/src/quick/doc/src/examples.qdoc
@@ -77,9 +77,7 @@ steps such as use cases and introductory material. For more information about Qt
\b{Development Environment}
\list
\li \l{Qt Creator: Creating Qt Quick Projects}{Creating Qt Quick Projects}
- \li \l{Qt Creator: Using Qt Quick Designer}{Using Qt Quick Designer}
\li \l{Qt Creator: Creating Components}{Creating Components}
- \li \l{Qt Creator: Creating Screens}{Creating Screens}
\li \l{Qt Creator: Exporting Designs from Graphics Software}{Exporting Designs from Graphics Software}
\li \l{Qt Creator: Using QML Modules with Plugins}{Using QML Modules with Plugins}
\endlist
diff --git a/src/quick/doc/src/guidelines/qtquick-toolsnutilities.qdoc b/src/quick/doc/src/guidelines/qtquick-toolsnutilities.qdoc
index 5f00abc193..0669ec06c8 100644
--- a/src/quick/doc/src/guidelines/qtquick-toolsnutilities.qdoc
+++ b/src/quick/doc/src/guidelines/qtquick-toolsnutilities.qdoc
@@ -108,6 +108,5 @@ integrating 3rd party tools such as QmlLive and GammaRay.
\section2 Related Information
\list
\li \l{Qt Creator Manual}
-\li \l{Qt Creator: Integrating 3rd Party Tools}
\endlist
*/
diff --git a/src/quick/doc/src/qmltypereference.qdoc b/src/quick/doc/src/qmltypereference.qdoc
index ddf90f88d9..04682c9f33 100644
--- a/src/quick/doc/src/qmltypereference.qdoc
+++ b/src/quick/doc/src/qmltypereference.qdoc
@@ -49,7 +49,7 @@ information about the concepts which are central to \c QtQuick.
Qt Quick includes several submodules which contain additional types.
\list
- \li \l{Qt Quick XmlListModel QML Types}{XML List Model} - contains types
+ \li \l{Qt Quick XmlListModel QML Types}{Xml List Model} - contains types
for creating models from XML data
\li \l{Qt Quick Local Storage QML Types}{Local Storage} - a submodule
containing a JavaScript interface for an SQLite database
diff --git a/src/quick/handlers/qquickdraghandler.cpp b/src/quick/handlers/qquickdraghandler.cpp
index aa66c16007..48f0599284 100644
--- a/src/quick/handlers/qquickdraghandler.cpp
+++ b/src/quick/handlers/qquickdraghandler.cpp
@@ -82,7 +82,7 @@ Q_LOGGING_CATEGORY(lcDragHandler, "qt.quick.handler.drag")
and thus can be used to adjust some other feature independently of the
usual pinch behavior: for example adjust a tilt transformation, or adjust
some other numeric value, if the \c target is set to null. But if the
- \l target is an Item, \l centroid is the point at which the drag begins and
+ \c target is an Item, \c centroid is the point at which the drag begins and
to which the \c target will be moved (subject to constraints).
At this time, drag-and-drop is not yet supported.
diff --git a/src/quick/handlers/qquickhandlerpoint.cpp b/src/quick/handlers/qquickhandlerpoint.cpp
index 6a106b5464..de21537f27 100644
--- a/src/quick/handlers/qquickhandlerpoint.cpp
+++ b/src/quick/handlers/qquickhandlerpoint.cpp
@@ -282,8 +282,6 @@ void QQuickHandlerPoint::reset(const QVector<QQuickHandlerPoint> &points)
This property holds the keyboard modifiers that were pressed at the time
the event occurred.
-
- \sa MouseArea::modifiers
*/
/*!
diff --git a/src/quick/handlers/qquickmultipointhandler.cpp b/src/quick/handlers/qquickmultipointhandler.cpp
index 2f4e9d45e9..228c99bb12 100644
--- a/src/quick/handlers/qquickmultipointhandler.cpp
+++ b/src/quick/handlers/qquickmultipointhandler.cpp
@@ -309,6 +309,8 @@ void QQuickMultiPointHandler::acceptPoints(const QVector<QQuickEventPoint *> &po
bool QQuickMultiPointHandler::grabPoints(QVector<QQuickEventPoint *> points)
{
+ if (points.isEmpty())
+ return false;
bool allowed = true;
for (QQuickEventPoint* point : points) {
if (point->exclusiveGrabber() != this && !canGrab(point)) {
diff --git a/src/quick/handlers/qquickpointhandler.cpp b/src/quick/handlers/qquickpointhandler.cpp
index 3bc1c06a1a..6d6ba07f5c 100644
--- a/src/quick/handlers/qquickpointhandler.cpp
+++ b/src/quick/handlers/qquickpointhandler.cpp
@@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
occurs within the bounds of the \l {PointerHandler::parent}, and
no sibling PointHandler within the same \l {PointerHandler::parent}
has yet acquired a passive grab on that point, and if the other
- constraints such as \l {SinglePointHandler::acceptedButtons},
+ constraints such as \l[QML]{SinglePointHandler::acceptedButtons},
\l {PointerDeviceHandler::acceptedDevices} etc. are satisfied, it's
eligible, and the PointHandler then acquires a passive grab. In
this way, the \l {PointerHandler::parent} acts like an exclusive
diff --git a/src/quick/handlers/qquicktaphandler.cpp b/src/quick/handlers/qquicktaphandler.cpp
index bae76ddd94..f24b2bfd7e 100644
--- a/src/quick/handlers/qquicktaphandler.cpp
+++ b/src/quick/handlers/qquicktaphandler.cpp
@@ -107,6 +107,10 @@ static bool dragOverThreshold(const QQuickEventPoint *point)
bool QQuickTapHandler::wantsEventPoint(QQuickEventPoint *point)
{
+ if (!point->pointerEvent()->asPointerMouseEvent() &&
+ !point->pointerEvent()->asPointerTouchEvent() &&
+ !point->pointerEvent()->asPointerTabletEvent() )
+ return false;
// If the user has not violated any constraint, it could be a tap.
// Otherwise we want to give up the grab so that a competing handler
// (e.g. DragHandler) gets a chance to take over.
diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp
index 908801ce1c..62cbfcef2b 100644
--- a/src/quick/items/qquicklistview.cpp
+++ b/src/quick/items/qquicklistview.cpp
@@ -2456,7 +2456,18 @@ QString QQuickListView::currentSection() const
The default value for the duration properties is -1, i.e. the
highlight will take as much time as necessary to move at the set speed.
- These properties have the same characteristics as a SmoothedAnimation.
+ These properties have the same characteristics as a SmoothedAnimation:
+ if both the velocity and duration are set, the animation will use
+ whichever gives the shorter duration.
+
+ To set only one property, the other can be set to \c -1. For example,
+ if you only want to animate the duration and not velocity, use the
+ following code:
+
+ \code
+ highlightMoveDuration: 1000
+ highlightMoveVelocity: -1
+ \endcode
\sa highlightFollowsCurrentItem
*/
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp
index 4d4540bc36..dd7fbccff5 100644
--- a/src/quick/items/qquicktext.cpp
+++ b/src/quick/items/qquicktext.cpp
@@ -2082,6 +2082,8 @@ void QQuickText::resetMaximumLineCount()
\code
<b></b> - bold
+ <del></del> - strike out (removed content)
+ <s></s> - strike out (no longer accurate or no longer relevant content)
<strong></strong> - bold
<i></i> - italic
<br> - new line
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 83a1268d1d..dd5960e925 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -2246,13 +2246,14 @@ QQuickPointerEvent *QQuickWindowPrivate::queryPointerEventInstance(QQuickPointer
{
// Search for a matching reusable event object.
for (QQuickPointerEvent *e : pointerEventInstances) {
- // If device can generate native gestures (e.g. a trackpad), there might be two QQuickPointerEvents:
- // QQuickPointerNativeGestureEvent and QQuickPointerTouchEvent. Use eventType to disambiguate.
+ // If device can generate native gestures (e.g. a trackpad), there might be multiple QQuickPointerEvents:
+ // QQuickPointerNativeGestureEvent, QQuickPointerScrollEvent, and QQuickPointerTouchEvent.
+ // Use eventType to disambiguate.
#if QT_CONFIG(gestures)
- if (eventType == QEvent::NativeGesture && !qobject_cast<QQuickPointerNativeGestureEvent*>(e))
+ if ((eventType == QEvent::NativeGesture) != bool(e->asPointerNativeGestureEvent()))
continue;
#endif
- if (eventType == QEvent::Wheel && !qobject_cast<QQuickPointerScrollEvent*>(e))
+ if ((eventType == QEvent::Wheel) != bool(e->asPointerScrollEvent()))
continue;
// Otherwise we assume there's only one event type per device.
// More disambiguation tests might need to be added above if that changes later.
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp
index bd0698be6c..20286a03d5 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp
@@ -156,10 +156,11 @@ void QSGSoftwareNinePatchNode::setTexture(QSGTexture *texture)
QSGSoftwarePixmapTexture *pt = qobject_cast<QSGSoftwarePixmapTexture*>(texture);
if (!pt) {
qWarning() << "Image used with invalid texture format.";
- return;
+ } else {
+ m_pixmap = pt->pixmap();
+ markDirty(DirtyMaterial);
}
- m_pixmap = pt->pixmap();
- markDirty(DirtyMaterial);
+ delete texture;
}
void QSGSoftwareNinePatchNode::setBounds(const QRectF &bounds)
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp
index b400473128..f5a41410ee 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp
@@ -45,6 +45,7 @@
#include <private/qquickwindow_p.h>
#include <QElapsedTimer>
+#include <private/qquickanimatorcontroller_p.h>
#include <private/qquickprofiler_p.h>
#include <private/qsgsoftwarerenderer_p.h>
#include <qpa/qplatformbackingstore.h>
@@ -98,6 +99,8 @@ void QSGSoftwareRenderLoop::windowDestroyed(QQuickWindow *window)
if (m_windows.size() == 0) {
rc->invalidate();
}
+
+ delete d->animationController;
}
void QSGSoftwareRenderLoop::renderWindow(QQuickWindow *window, bool isNewExpose)
diff --git a/src/quick/util/qquickpixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp
index 0dd2a88ca1..dc8bed8125 100644
--- a/src/quick/util/qquickpixmapcache.cpp
+++ b/src/quick/util/qquickpixmapcache.cpp
@@ -471,6 +471,10 @@ QQuickPixmapReader::QQuickPixmapReader(QQmlEngine *eng)
eventLoopQuitHack->moveToThread(this);
connect(eventLoopQuitHack, SIGNAL(destroyed(QObject*)), SLOT(quit()), Qt::DirectConnection);
start(QThread::LowestPriority);
+#if !QT_CONFIG(thread)
+ // call nonblocking run ourself, as nothread qthread does not
+ run();
+#endif
}
QQuickPixmapReader::~QQuickPixmapReader()
@@ -948,8 +952,11 @@ void QQuickPixmapReader::run()
processJobs();
exec();
+#if QT_CONFIG(thread)
+ // nothread exec is empty and returns
delete threadObject;
threadObject = nullptr;
+#endif
}
class QQuickPixmapKey
@@ -1019,7 +1026,8 @@ QQuickPixmapStore::~QQuickPixmapStore()
m_timerId = -2;
// unreference all (leaked) pixmaps
- for (auto *pixmap : qAsConst(m_cache)) {
+ const auto cache = m_cache; // NOTE: intentional copy (QTBUG-65077); releasing items from the cache modifies m_cache.
+ for (auto *pixmap : cache) {
int currRefCount = pixmap->refCount;
if (currRefCount) {
#ifndef QT_NO_DEBUG
diff --git a/src/quick/util/qquickstyledtext.cpp b/src/quick/util/qquickstyledtext.cpp
index 762d49f2d2..5e1aaf121e 100644
--- a/src/quick/util/qquickstyledtext.cpp
+++ b/src/quick/util/qquickstyledtext.cpp
@@ -50,6 +50,8 @@
QQuickStyledText supports few tags:
<b></b> - bold
+ <del></del> - strike out (removed content)
+ <s></s> - strike out (no longer accurate or no longer relevant content)
<strong></strong> - bold
<i></i> - italic
<br> - new line
@@ -379,8 +381,16 @@ bool QQuickStyledTextPrivate::parseTag(const QChar *&ch, const QString &textIn,
format.setFontWeight(QFont::Bold);
return true;
}
- } else if (tag == QLatin1String("strong")) {
- format.setFontWeight(QFont::Bold);
+ } else if (char0 == QLatin1Char('s')) {
+ if (tagLength == 1) {
+ format.setFontStrikeOut(true);
+ return true;
+ } else if (tag == QLatin1String("strong")) {
+ format.setFontWeight(QFont::Bold);
+ return true;
+ }
+ } else if (tag == QLatin1String("del")) {
+ format.setFontStrikeOut(true);
return true;
} else if (tag == QLatin1String("ol")) {
List listItem;
@@ -511,7 +521,13 @@ bool QQuickStyledTextPrivate::parseCloseTag(const QChar *&ch, const QString &tex
return true;
} else if (tag == QLatin1String("font")) {
return true;
- } else if (tag == QLatin1String("strong")) {
+ } else if (char0 == QLatin1Char('s')) {
+ if (tagLength == 1) {
+ return true;
+ } else if (tag == QLatin1String("strong")) {
+ return true;
+ }
+ } else if (tag == QLatin1String("del")) {
return true;
} else if (tag == QLatin1String("ol")) {
if (!listStack.isEmpty()) {