aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@digia.com>2013-08-05 10:42:21 +0200
committerSergio Ahumada <sergio.ahumada@digia.com>2013-08-05 10:42:21 +0200
commit1d3b9db5b54d8ae99c6b149c8d3d91eda19b5838 (patch)
tree9ffbf9d6d2ed6b0aef6155215767c56655ff405b /src
parent45792359f25813af18b7416e4c18737ed4b20bff (diff)
parent0316506d9ddbc3ca9f26f880b9e7fb5d5b0fec36 (diff)
Merge branch 'stable' into dev
Conflicts: .qmake.conf Change-Id: I06f79bcbde13c7b12905492a17dbcbb4a594e557
Diffstat (limited to 'src')
-rw-r--r--src/imports/dialogs/DefaultColorDialog.qml27
-rw-r--r--src/imports/dialogs/qquickabstractcolordialog_p.h8
-rw-r--r--src/imports/folderlistmodel/qquickfolderlistmodel.cpp16
-rw-r--r--src/qml/doc/src/external-resources.qdoc4
-rw-r--r--src/qml/doc/src/javascript/date.qdoc3
-rw-r--r--src/qml/doc/src/qmllanguageref/typesystem/basictypes.qdoc2
-rw-r--r--src/qml/doc/src/qmltypereference.qdoc10
-rw-r--r--src/qml/doc/src/qtqml.qdoc5
-rw-r--r--src/qml/qml/qqmlengine.cpp5
-rw-r--r--src/qml/qml/qqmltypeloader.cpp18
-rw-r--r--src/quick/items/qquickflickable.cpp10
-rw-r--r--src/quick/items/qquickimplicitsizeitem.cpp16
-rw-r--r--src/quick/items/qquicklistview.cpp12
-rw-r--r--src/quick/items/qquickpainteditem.cpp3
-rw-r--r--src/quick/items/qquickpathview.cpp35
-rw-r--r--src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp6
-rw-r--r--src/quick/scenegraph/qsgdefaultrectanglenode.cpp2
-rw-r--r--src/quick/scenegraph/qsgdistancefieldglyphnode.cpp2
-rw-r--r--src/quick/scenegraph/qsgthreadedrenderloop.cpp4
19 files changed, 92 insertions, 96 deletions
diff --git a/src/imports/dialogs/DefaultColorDialog.qml b/src/imports/dialogs/DefaultColorDialog.qml
index 8636259957..44af99bf18 100644
--- a/src/imports/dialogs/DefaultColorDialog.qml
+++ b/src/imports/dialogs/DefaultColorDialog.qml
@@ -45,11 +45,23 @@ import "qml"
AbstractColorDialog {
id: root
+ property bool _valueSet: true // guard to prevent binding loops
+ function _setControlsFromColor() {
+ _valueSet = false
+ hueSlider.value = root.hue
+ saturationSlider.value = root.saturation
+ lightnessSlider.value = root.lightness
+ alphaSlider.value = root.alpha
+ crosshairs.x = root.lightness * paletteMap.width
+ crosshairs.y = (1.0 - root.saturation) * paletteMap.height
+ _valueSet = true
+ }
+ onColorChanged: _setControlsFromColor()
Rectangle {
id: content
property int maxSize: 0.9 * Math.min(Screen.desktopAvailableWidth, Screen.desktopAvailableHeight)
- implicitHeight: Math.max(maxSize, Screen.logicalPixelDensity * (usePaletteMap ? 10 : 5))
+ implicitHeight: Math.min(maxSize, Screen.logicalPixelDensity * (usePaletteMap ? 100 : 50))
implicitWidth: usePaletteMap ? implicitHeight - bottomMinHeight : implicitHeight * 1.5
color: palette.window
property real bottomMinHeight: sliders.height + buttonRow.height + outerSpacing * 3
@@ -62,12 +74,6 @@ AbstractColorDialog {
SystemPalette { id: palette }
- Binding {
- target: root
- property: "color"
- value: Qt.hsla(hueSlider.value, saturationSlider.value, lightnessSlider.value, alphaSlider.value)
- }
-
Item {
id: paletteFrame
visible: content.usePaletteMap
@@ -83,6 +89,7 @@ AbstractColorDialog {
id: paletteMap
x: (parent.width - width) / 2
width: height
+ onWidthChanged: root._setControlsFromColor()
height: parent.height
source: "images/checkers.png"
fillMode: Image.Tile
@@ -197,6 +204,7 @@ AbstractColorDialog {
ColorSlider {
id: hueSlider
value: 0.5
+ onValueChanged: if (_valueSet) root.color = Qt.hsla(hueSlider.value, saturationSlider.value, lightnessSlider.value, alphaSlider.value)
text: qsTr("Hue")
trackDelegate: Rectangle {
rotation: -90
@@ -217,6 +225,7 @@ AbstractColorDialog {
id: saturationSlider
visible: !content.usePaletteMap
value: 0.5
+ onValueChanged: if (_valueSet) root.color = Qt.hsla(hueSlider.value, saturationSlider.value, lightnessSlider.value, alphaSlider.value)
text: qsTr("Saturation")
trackDelegate: Rectangle {
rotation: -90
@@ -232,6 +241,7 @@ AbstractColorDialog {
id: lightnessSlider
visible: !content.usePaletteMap
value: 0.5
+ onValueChanged: if (_valueSet) root.color = Qt.hsla(hueSlider.value, saturationSlider.value, lightnessSlider.value, alphaSlider.value)
text: qsTr("Luminosity")
trackDelegate: Rectangle {
rotation: -90
@@ -249,6 +259,7 @@ AbstractColorDialog {
minimum: 0.0
maximum: 1.0
value: 1.0
+ onValueChanged: if (_valueSet) root.color = Qt.hsla(hueSlider.value, saturationSlider.value, lightnessSlider.value, alphaSlider.value)
text: qsTr("Alpha")
visible: root.showAlphaChannel
trackDelegate: Item {
@@ -273,7 +284,7 @@ AbstractColorDialog {
Item {
id: buttonRow
- height: buttonsOnly.height
+ height: Math.max(buttonsOnly.height, copyIcon.height)
width: parent.width
anchors {
left: parent.left
diff --git a/src/imports/dialogs/qquickabstractcolordialog_p.h b/src/imports/dialogs/qquickabstractcolordialog_p.h
index 46f0f84acb..bd23e0d1a4 100644
--- a/src/imports/dialogs/qquickabstractcolordialog_p.h
+++ b/src/imports/dialogs/qquickabstractcolordialog_p.h
@@ -66,6 +66,10 @@ class QQuickAbstractColorDialog : public QQuickAbstractDialog
Q_OBJECT
Q_PROPERTY(bool showAlphaChannel READ showAlphaChannel WRITE setShowAlphaChannel NOTIFY showAlphaChannelChanged)
Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
+ Q_PROPERTY(qreal hue READ hue NOTIFY colorChanged)
+ Q_PROPERTY(qreal saturation READ saturation NOTIFY colorChanged)
+ Q_PROPERTY(qreal lightness READ lightness NOTIFY colorChanged)
+ Q_PROPERTY(qreal alpha READ alpha NOTIFY colorChanged)
public:
QQuickAbstractColorDialog(QObject *parent = 0);
@@ -74,6 +78,10 @@ public:
virtual QString title() const;
bool showAlphaChannel() const;
QColor color() const { return m_color; }
+ qreal hue() const { return m_color.hslHueF(); }
+ qreal saturation() const { return m_color.hslSaturationF(); }
+ qreal lightness() const { return m_color.lightnessF(); }
+ qreal alpha() const { return m_color.alphaF(); }
public Q_SLOTS:
void setVisible(bool v);
diff --git a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
index 2f9c07cf20..bb65ddbccc 100644
--- a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
+++ b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
@@ -488,16 +488,12 @@ QUrl QQuickFolderListModel::parentFolder() const
QString localFile = d->currentDir.toLocalFile();
if (!localFile.isEmpty()) {
QDir dir(localFile);
-#if defined(Q_OS_WIN)
- if (dir.isRoot())
- dir.setPath("");
- else
-#endif
- dir.cdUp();
+ if (dir.isRoot() || !dir.cdUp())
+ return QUrl();
localFile = dir.path();
} else {
- int pos = d->currentDir.path().lastIndexOf(QLatin1Char('/'));
- if (pos == -1)
+ const int pos = d->currentDir.path().lastIndexOf(QLatin1Char('/'));
+ if (pos <= 0)
return QUrl();
localFile = d->currentDir.path().left(pos);
}
@@ -541,8 +537,8 @@ void QQuickFolderListModel::componentComplete()
{
Q_D(QQuickFolderListModel);
- if (!d->currentDir.isValid() || d->currentDir.toLocalFile().isEmpty() || !QDir().exists(d->currentDir.toLocalFile()))
- setFolder(QUrl(QLatin1String("file://")+QDir::currentPath()));
+ if (!d->currentDir.isValid() || !d->currentDir.isLocalFile() || !QDir().exists(d->currentDir.toLocalFile()))
+ setFolder(QUrl::fromLocalFile(QDir::currentPath()));
}
/*!
diff --git a/src/qml/doc/src/external-resources.qdoc b/src/qml/doc/src/external-resources.qdoc
index 0832564660..671246d7ab 100644
--- a/src/qml/doc/src/external-resources.qdoc
+++ b/src/qml/doc/src/external-resources.qdoc
@@ -35,3 +35,7 @@
\title W3Schools JavaScript Reference
*/
+/*!
+ \externalpage https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
+ \title Mozilla Developer Network Date Reference
+*/ \ No newline at end of file
diff --git a/src/qml/doc/src/javascript/date.qdoc b/src/qml/doc/src/javascript/date.qdoc
index 7da24d4092..085d988377 100644
--- a/src/qml/doc/src/javascript/date.qdoc
+++ b/src/qml/doc/src/javascript/date.qdoc
@@ -30,7 +30,8 @@
\inqmlmodule QtQml 2
\brief Provides date functions
- The QML Date object extends the JS Date object with
+ The QML Date object extends the
+ \l{Mozilla Developer Network Date Reference}{JS Date object} with
locale aware functions.
Functions that accept a locale format may be either an enumeration
diff --git a/src/qml/doc/src/qmllanguageref/typesystem/basictypes.qdoc b/src/qml/doc/src/qmllanguageref/typesystem/basictypes.qdoc
index 7d2d662e4e..1d24acc31a 100644
--- a/src/qml/doc/src/qmllanguageref/typesystem/basictypes.qdoc
+++ b/src/qml/doc/src/qmllanguageref/typesystem/basictypes.qdoc
@@ -70,6 +70,8 @@ QML modules may extend the QML language with more basic types.
For example, the basic types provided by the \c QtQuick module are listed below:
\annotatedlist qtquickbasictypes
+The \l{QtQml::Qt}{Qt} global object provides useful functions for manipulating values of basic types.
+
Currently only QML modules which are provided by Qt may provide their
own basic types, however this may change in future releases of Qt QML.
In order to use types provided by a particular QML module, clients
diff --git a/src/qml/doc/src/qmltypereference.qdoc b/src/qml/doc/src/qmltypereference.qdoc
index 3def3209cc..0b363d424e 100644
--- a/src/qml/doc/src/qmltypereference.qdoc
+++ b/src/qml/doc/src/qmltypereference.qdoc
@@ -104,14 +104,10 @@ When integrating with C++, note that any QDate value
\l{qtqml-cppintegration-data.html}{passed into QML from C++} is automatically
converted into a \c date value, and vice-versa.
-Note that the date type has comparison semantics which match
-those of the JavaScript Date object. To compare the value
-of two date properties, you should compare their "toString()"
-values.
+This basic type is provided by the QML language. It can be implicitly converted
+to a \l{QtQml2::Date}{Date} object.
-This basic type is provided by the QML language.
-
-\sa {QML Basic Types}
+\sa {QtQml2::Date}{QML Date object}, {QML Basic Types}
*/
/*!
diff --git a/src/qml/doc/src/qtqml.qdoc b/src/qml/doc/src/qtqml.qdoc
index 26e4867bbc..a260a3d785 100644
--- a/src/qml/doc/src/qtqml.qdoc
+++ b/src/qml/doc/src/qtqml.qdoc
@@ -75,7 +75,7 @@ The Qt QML module contains the QML framework and important QML types used in
applications. The constructs of QML are described in the \l{The QML Reference}.
In addition to the \l{QML Basic Types}, the module comes with
-various QML object types:
+the following QML object types:
\list
\li \l Component
\li \l QtObject
@@ -84,6 +84,9 @@ various QML object types:
\li \l Timer
\endlist
+The \l{QtQml::Qt}{Qt} global object provides useful enums and functions
+for various QML types.
+
\section2 Lists and Models
New in Qt 5.1, the model types are moved to a submodule, \c QtQml.Models. The
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 1c491ae492..cc780d57b9 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -278,11 +278,8 @@ QQmlImageProviderBase::~QQmlImageProviderBase()
\inqmlmodule QtQml 2
\instantiates QQmlEnginePrivate
\ingroup qml-utility-elements
-\brief The QML global Qt object provides useful enums and functions from Qt.
-
\keyword QmlGlobalQtObject
-
-\brief The \c Qt object provides useful enums and functions from Qt, for use in all QML files.
+\brief Provides a global object with useful enums and functions from Qt.
The \c Qt object is a global object with utility functions, properties and enums.
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp
index 8d8503f344..38ee9211f8 100644
--- a/src/qml/qml/qqmltypeloader.cpp
+++ b/src/qml/qml/qqmltypeloader.cpp
@@ -1683,14 +1683,7 @@ QString QQmlTypeLoader::absoluteFilePath(const QString &path)
StringSet **fileSet = m_importDirCache.value(QHashedStringRef(dirPath.constData(), dirPath.length()));
if (!fileSet) {
QHashedString dirPathString(dirPath.toString());
- bool exists = false;
-#ifdef Q_OS_UNIX
- struct stat statBuf;
- if (::stat(QFile::encodeName(dirPathString).constData(), &statBuf) == 0)
- exists = S_ISDIR(statBuf.st_mode);
-#else
- exists = QDir(dirPathString).exists();
-#endif
+ bool exists = QDir(dirPathString).exists();
QStringHash<bool> *files = exists ? new QStringHash<bool> : 0;
m_importDirCache.insert(dirPathString, files);
fileSet = m_importDirCache.value(dirPathString);
@@ -1755,14 +1748,7 @@ bool QQmlTypeLoader::directoryExists(const QString &path)
StringSet **fileSet = m_importDirCache.value(QHashedStringRef(dirPath.constData(), dirPath.length()));
if (!fileSet) {
QHashedString dirPathString(dirPath.toString());
- bool exists = false;
-#ifdef Q_OS_UNIX
- struct stat statBuf;
- if (::stat(QFile::encodeName(dirPathString).constData(), &statBuf) == 0)
- exists = S_ISDIR(statBuf.st_mode);
-#else
- exists = QDir(dirPathString).exists();
-#endif
+ bool exists = QDir(dirPathString).exists();
QStringHash<bool> *files = exists ? new QStringHash<bool> : 0;
m_importDirCache.insert(dirPathString, files);
fileSet = m_importDirCache.value(dirPathString);
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
index 374d4397ff..46f95f16cb 100644
--- a/src/quick/items/qquickflickable.cpp
+++ b/src/quick/items/qquickflickable.cpp
@@ -881,8 +881,10 @@ QQuickItem *QQuickFlickable::contentItem()
QQuickFlickableVisibleArea *QQuickFlickable::visibleArea()
{
Q_D(QQuickFlickable);
- if (!d->visibleArea)
+ if (!d->visibleArea) {
d->visibleArea = new QQuickFlickableVisibleArea(this);
+ d->visibleArea->updateVisible(); // calculate initial ratios
+ }
return d->visibleArea;
}
@@ -1518,8 +1520,7 @@ void QQuickFlickable::geometryChanged(const QRectF &newGeometry,
bool changed = false;
if (newGeometry.width() != oldGeometry.width()) {
- if (xflick())
- changed = true;
+ changed = true; // we must update visualArea.widthRatio
if (d->hData.viewSize < 0) {
d->contentItem->setWidth(width());
emit contentWidthChanged();
@@ -1531,8 +1532,7 @@ void QQuickFlickable::geometryChanged(const QRectF &newGeometry,
}
}
if (newGeometry.height() != oldGeometry.height()) {
- if (yflick())
- changed = true;
+ changed = true; // we must update visualArea.heightRatio
if (d->vData.viewSize < 0) {
d->contentItem->setHeight(height());
emit contentHeightChanged();
diff --git a/src/quick/items/qquickimplicitsizeitem.cpp b/src/quick/items/qquickimplicitsizeitem.cpp
index b330b3929f..62dddb4a3b 100644
--- a/src/quick/items/qquickimplicitsizeitem.cpp
+++ b/src/quick/items/qquickimplicitsizeitem.cpp
@@ -47,32 +47,20 @@ QT_BEGIN_NAMESPACE
void QQuickImplicitSizeItemPrivate::implicitWidthChanged()
{
Q_Q(QQuickImplicitSizeItem);
- for (int ii = 0; ii < changeListeners.count(); ++ii) {
- const QQuickItemPrivate::ChangeListener &change = changeListeners.at(ii);
- if (change.types & QQuickItemPrivate::ImplicitWidth) {
- change.listener->itemImplicitWidthChanged(q);
- }
- }
+ QQuickItemPrivate::implicitWidthChanged();
emit q->implicitWidthChanged2();
}
void QQuickImplicitSizeItemPrivate::implicitHeightChanged()
{
Q_Q(QQuickImplicitSizeItem);
- for (int ii = 0; ii < changeListeners.count(); ++ii) {
- const QQuickItemPrivate::ChangeListener &change = changeListeners.at(ii);
- if (change.types & QQuickItemPrivate::ImplicitHeight) {
- change.listener->itemImplicitHeightChanged(q);
- }
- }
+ QQuickItemPrivate::implicitHeightChanged();
emit q->implicitHeightChanged2();
}
QQuickImplicitSizeItem::QQuickImplicitSizeItem(QQuickImplicitSizeItemPrivate &dd, QQuickItem *parent)
: QQuickItem(dd, parent)
{
- connect(this, SIGNAL(implicitHeightChanged2()), this, SIGNAL(implicitHeightChanged()));
- connect(this, SIGNAL(implicitWidthChanged2()), this, SIGNAL(implicitWidthChanged()));
}
QT_END_NAMESPACE
diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp
index f0e39c5e5a..d79f535fd4 100644
--- a/src/quick/items/qquicklistview.cpp
+++ b/src/quick/items/qquicklistview.cpp
@@ -1023,7 +1023,7 @@ void QQuickListViewPrivate::updateInlineSection(FxListItemSG *listItem)
void QQuickListViewPrivate::updateStickySections()
{
- if (!sectionCriteria
+ if (!sectionCriteria || !sectionCriteria->delegate()
|| (!sectionCriteria->labelPositioning() && !currentSectionItem && !nextSectionItem))
return;
@@ -1360,16 +1360,18 @@ void QQuickListViewPrivate::itemGeometryChanged(QQuickItem *item, const QRectF &
if (visibleItems.count() && item == visibleItems.first()->item) {
FxListItemSG *listItem = static_cast<FxListItemSG*>(visibleItems.first());
if (orient == QQuickListView::Vertical) {
+ const qreal oldItemEndPosition = verticalLayoutDirection == QQuickItemView::BottomToTop ? -oldGeometry.y() : oldGeometry.y() + oldGeometry.height();
qreal diff = newGeometry.height() - oldGeometry.height();
- if (verticalLayoutDirection == QQuickListView::TopToBottom && listItem->endPosition() < q->contentY())
+ if (verticalLayoutDirection == QQuickListView::TopToBottom && oldItemEndPosition < q->contentY())
listItem->setPosition(listItem->position() - diff, true);
- else if (verticalLayoutDirection == QQuickListView::BottomToTop && listItem->endPosition() > q->contentY())
+ else if (verticalLayoutDirection == QQuickListView::BottomToTop && oldItemEndPosition > q->contentY())
listItem->setPosition(listItem->position() + diff, true);
} else {
+ const qreal oldItemEndPosition = q->effectiveLayoutDirection() == Qt::RightToLeft ? -oldGeometry.x() : oldGeometry.x() + oldGeometry.width();
qreal diff = newGeometry.width() - oldGeometry.width();
- if (q->effectiveLayoutDirection() == Qt::LeftToRight && listItem->endPosition() < q->contentX())
+ if (q->effectiveLayoutDirection() == Qt::LeftToRight && oldItemEndPosition < q->contentX())
listItem->setPosition(listItem->position() - diff, true);
- else if (q->effectiveLayoutDirection() == Qt::RightToLeft && listItem->endPosition() > q->contentX())
+ else if (q->effectiveLayoutDirection() == Qt::RightToLeft && oldItemEndPosition > q->contentX())
listItem->setPosition(listItem->position() + diff, true);
}
}
diff --git a/src/quick/items/qquickpainteditem.cpp b/src/quick/items/qquickpainteditem.cpp
index 15abb75352..25a2b93229 100644
--- a/src/quick/items/qquickpainteditem.cpp
+++ b/src/quick/items/qquickpainteditem.cpp
@@ -67,9 +67,6 @@ QT_BEGIN_NAMESPACE
To enable QPainter to do anti-aliased rendering, use setAntialiasing().
- QQuickPaintedItem is meant to make it easier to port old code that is using the
- QPainter API to the QML Scene Graph API and it should be used only for that purpose.
-
To write your own painted item, you first create a subclass of QQuickPaintedItem, and then
start by implementing its only pure virtual public function: paint(), which implements
the actual painting. To get the size of the area painted by the item, use
diff --git a/src/quick/items/qquickpathview.cpp b/src/quick/items/qquickpathview.cpp
index 7798641fcd..091fb3eb4d 100644
--- a/src/quick/items/qquickpathview.cpp
+++ b/src/quick/items/qquickpathview.cpp
@@ -922,34 +922,37 @@ QQuickItem *QQuickPathView::highlightItem()
\qmlproperty enumeration QtQuick2::PathView::highlightRangeMode
These properties set the preferred range of the highlight (current item)
- within the view. The preferred values must be in the range 0.0-1.0.
+ within the view. The preferred values must be in the range 0.0-1.0.
- If highlightRangeMode is set to \e PathView.NoHighlightRange
+ Valid values for \c highlightRangeMode are:
- If highlightRangeMode is set to \e PathView.ApplyRange the view will
- attempt to maintain the highlight within the range, however
- the highlight can move outside of the range at the ends of the path
- or due to a mouse interaction.
+ \list
+ \li \e PathView.NoHighlightRange - no range is applied and the
+ highlight will move freely within the view.
+ \li \e PathView.ApplyRange - the view will attempt to maintain
+ the highlight within the range, however the highlight can
+ move outside of the range at the ends of the path or due to
+ a mouse interaction.
+ \li \e PathView.StrictlyEnforceRange - the highlight will never
+ move outside of the range. This means that the current item
+ will change if a keyboard or mouse action would cause the
+ highlight to move outside of the range.
+ \endlist
- If highlightRangeMode is set to \e PathView.StrictlyEnforceRange the highlight will never
- move outside of the range. This means that the current item will change
- if a keyboard or mouse action would cause the highlight to move
- outside of the range.
+ The default value is \e PathView.StrictlyEnforceRange.
- Note that this is the correct way to influence where the
+ Defining a highlight range is the correct way to influence where the
current item ends up when the view moves. For example, if you want the
currently selected item to be in the middle of the path, then set the
- highlight range to be 0.5,0.5 and highlightRangeMode to PathView.StrictlyEnforceRange.
+ highlight range to be 0.5,0.5 and highlightRangeMode to \e PathView.StrictlyEnforceRange.
Then, when the path scrolls,
the currently selected item will be the item at that position. This also applies to
when the currently selected item changes - it will scroll to within the preferred
highlight range. Furthermore, the behaviour of the current item index will occur
whether or not a highlight exists.
- The default value is \e PathView.StrictlyEnforceRange.
-
- Note that a valid range requires preferredHighlightEnd to be greater
- than or equal to preferredHighlightBegin.
+ \note A valid range requires \c preferredHighlightEnd to be greater
+ than or equal to \c preferredHighlightBegin.
*/
qreal QQuickPathView::preferredHighlightBegin() const
{
diff --git a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp
index afea96b35c..4652a2241e 100644
--- a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp
+++ b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp
@@ -172,7 +172,8 @@ void QSGDefaultDistanceFieldGlyphCache::storeGlyphs(const QHash<glyph_t, QImage>
}
}
- glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, glyph.width(), glyph.height(), GL_ALPHA, GL_UNSIGNED_BYTE, glyph.constBits());
+ for (int i = 0; i < glyph.height(); ++i)
+ glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y + i, glyph.width(), 1, GL_ALPHA, GL_UNSIGNED_BYTE, glyph.scanLine(i));
}
QHash<TextureInfo *, QVector<glyph_t> >::const_iterator i;
@@ -242,7 +243,8 @@ void QSGDefaultDistanceFieldGlyphCache::resizeTexture(TextureInfo *texInfo, int
updateTexture(oldTexture, texInfo->texture, texInfo->size);
if (useWorkaround()) {
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, oldWidth, oldHeight, GL_ALPHA, GL_UNSIGNED_BYTE, texInfo->image.constBits());
+ for (int i = 0; i < oldHeight; ++i)
+ glTexSubImage2D(GL_TEXTURE_2D, 0, 0, i, oldWidth, 1, GL_ALPHA, GL_UNSIGNED_BYTE, texInfo->image.scanLine(i));
texInfo->image = texInfo->image.copy(0, 0, width, height);
glDeleteTextures(1, &oldTexture);
return;
diff --git a/src/quick/scenegraph/qsgdefaultrectanglenode.cpp b/src/quick/scenegraph/qsgdefaultrectanglenode.cpp
index 76fbbb4209..276041d144 100644
--- a/src/quick/scenegraph/qsgdefaultrectanglenode.cpp
+++ b/src/quick/scenegraph/qsgdefaultrectanglenode.cpp
@@ -339,7 +339,7 @@ void QSGDefaultRectangleNode::update()
m_dirty_geometry = false;
}
m_material.setFlag(QSGMaterial::Blending, (m_gradient_stops.size() > 0 && !m_gradient_is_opaque)
- || m_color.alpha() < 255
+ || (m_color.alpha() < 255 && m_color.alpha() != 0)
|| (m_pen_width > 0 && m_border_color.alpha() < 255));
}
diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp b/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp
index cc4aa4bada..1b10b8b894 100644
--- a/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp
+++ b/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp
@@ -213,7 +213,7 @@ void QSGDistanceFieldGlyphNode::updateGeometry()
QVector<ushort> ip;
ip.reserve(indexes.size() * 6);
- qreal maxTexMargin = m_glyph_cache->distanceFieldRadius() / 2;
+ qreal maxTexMargin = m_glyph_cache->distanceFieldRadius();
qreal fontScale = m_glyph_cache->fontScale(fontPixelSize);
qreal margin = 2;
qreal texMargin = margin / fontScale;
diff --git a/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/src/quick/scenegraph/qsgthreadedrenderloop.cpp
index bfd9a2fb20..1e0d7c5776 100644
--- a/src/quick/scenegraph/qsgthreadedrenderloop.cpp
+++ b/src/quick/scenegraph/qsgthreadedrenderloop.cpp
@@ -535,12 +535,12 @@ void QSGRenderThread::sync()
}
}
+ QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
+
RLDEBUG(" Render: - unlocking after sync");
waitCondition.wakeOne();
mutex.unlock();
-
- QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
}