aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/designer/qquickdesignercustomobjectdata.cpp4
-rw-r--r--src/quick/items/qquickgridview.cpp4
-rw-r--r--src/quick/items/qquickitemview_p.h4
-rw-r--r--src/quick/items/qquicklistview.cpp4
-rw-r--r--src/quick/items/qquickshadereffectnode.cpp2
-rw-r--r--src/quick/items/qquicktextdocument.cpp7
-rw-r--r--src/quick/items/qquicktextinput.cpp2
-rw-r--r--src/quick/scenegraph/coreapi/qsgmaterial.cpp8
-rw-r--r--src/quick/scenegraph/qsgdefaultimagenode.cpp2
-rw-r--r--src/quick/scenegraph/util/qsgtextureprovider.cpp8
-rw-r--r--src/quick/util/qquickanimatorjob_p.h32
-rw-r--r--src/quick/util/qquickglobal.cpp6
-rw-r--r--src/quick/util/qquickimageprovider.cpp21
-rw-r--r--src/quick/util/qquickshortcut.cpp27
-rw-r--r--src/quick/util/qquickshortcut_p.h6
-rw-r--r--src/quick/util/qquicktransitionmanager_p_p.h4
-rw-r--r--src/quick/util/qquickvaluetypes_p.h7
17 files changed, 112 insertions, 36 deletions
diff --git a/src/quick/designer/qquickdesignercustomobjectdata.cpp b/src/quick/designer/qquickdesignercustomobjectdata.cpp
index 1666ffb0a5..7f074d8341 100644
--- a/src/quick/designer/qquickdesignercustomobjectdata.cpp
+++ b/src/quick/designer/qquickdesignercustomobjectdata.cpp
@@ -181,7 +181,11 @@ void QQuickDesignerCustomObjectData::doResetProperty(QQmlContext *context, const
if (hasValidResetBinding(propertyName)) {
QQmlAbstractBinding *binding = getResetBinding(propertyName);
+#if defined(QT_NO_DYNAMIC_CAST)
+ QQmlBinding *qmlBinding = static_cast<QQmlBinding*>(binding);
+#else
QQmlBinding *qmlBinding = dynamic_cast<QQmlBinding*>(binding);
+#endif
if (qmlBinding)
qmlBinding->setTarget(property);
QQmlPropertyPrivate::setBinding(binding, QQmlPropertyPrivate::None, QQmlPropertyPrivate::DontRemoveBinding);
diff --git a/src/quick/items/qquickgridview.cpp b/src/quick/items/qquickgridview.cpp
index 3ac9c6eb1c..65d7362e84 100644
--- a/src/quick/items/qquickgridview.cpp
+++ b/src/quick/items/qquickgridview.cpp
@@ -922,13 +922,13 @@ void QQuickGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal maxExte
tempPosition -= bias;
}
FxViewItem *topItem = snapItemAt(tempPosition+highlightRangeStart);
- if (strictHighlightRange && currentItem) {
+ if (strictHighlightRange && currentItem && (!topItem || topItem->index != currentIndex)) {
// StrictlyEnforceRange always keeps an item in range
updateHighlight();
topItem = currentItem;
}
FxViewItem *bottomItem = snapItemAt(tempPosition+highlightRangeEnd);
- if (strictHighlightRange && currentItem) {
+ if (strictHighlightRange && currentItem && (!bottomItem || bottomItem->index != currentIndex)) {
// StrictlyEnforceRange always keeps an item in range
updateHighlight();
bottomItem = currentItem;
diff --git a/src/quick/items/qquickitemview_p.h b/src/quick/items/qquickitemview_p.h
index 789b5a3e55..d5c4f59ed2 100644
--- a/src/quick/items/qquickitemview_p.h
+++ b/src/quick/items/qquickitemview_p.h
@@ -57,7 +57,7 @@ class QQmlChangeSet;
class QQuickItemViewPrivate;
-class Q_AUTOTEST_EXPORT QQuickItemView : public QQuickFlickable
+class Q_QUICK_PRIVATE_EXPORT QQuickItemView : public QQuickFlickable
{
Q_OBJECT
@@ -284,7 +284,7 @@ private:
};
-class Q_AUTOTEST_EXPORT QQuickItemViewAttached : public QObject
+class Q_QUICK_PRIVATE_EXPORT QQuickItemViewAttached : public QObject
{
Q_OBJECT
diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp
index 6a2de58318..955e1f1e00 100644
--- a/src/quick/items/qquicklistview.cpp
+++ b/src/quick/items/qquicklistview.cpp
@@ -1477,13 +1477,13 @@ void QQuickListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal maxExte
tempPosition -= bias;
}
FxViewItem *topItem = snapItemAt(tempPosition+highlightRangeStart);
- if (strictHighlightRange && currentItem) {
+ if (strictHighlightRange && currentItem && (!topItem || topItem->index != currentIndex)) {
// StrictlyEnforceRange always keeps an item in range
updateHighlight();
topItem = currentItem;
}
FxViewItem *bottomItem = snapItemAt(tempPosition+highlightRangeEnd);
- if (strictHighlightRange && currentItem) {
+ if (strictHighlightRange && currentItem && (!bottomItem || bottomItem->index != currentIndex)) {
// StrictlyEnforceRange always keeps an item in range
updateHighlight();
bottomItem = currentItem;
diff --git a/src/quick/items/qquickshadereffectnode.cpp b/src/quick/items/qquickshadereffectnode.cpp
index ed9e29d599..081e572e3b 100644
--- a/src/quick/items/qquickshadereffectnode.cpp
+++ b/src/quick/items/qquickshadereffectnode.cpp
@@ -460,7 +460,7 @@ void QQuickShaderEffectMaterial::updateTextures() const
{
for (int i = 0; i < textureProviders.size(); ++i) {
if (QSGTextureProvider *provider = textureProviders.at(i)) {
- if (QSGLayer *texture = qobject_cast<QSGLayer *>(provider->texture()))
+ if (QSGDynamicTexture *texture = qobject_cast<QSGDynamicTexture *>(provider->texture()))
texture->updateTexture();
}
}
diff --git a/src/quick/items/qquicktextdocument.cpp b/src/quick/items/qquicktextdocument.cpp
index 1f1359a3c3..c8b29dc1ad 100644
--- a/src/quick/items/qquicktextdocument.cpp
+++ b/src/quick/items/qquicktextdocument.cpp
@@ -68,6 +68,10 @@ public:
QPointer<QTextDocument> document;
};
+/*!
+ Constructs a QQuickTextDocument object with
+ \a parent as the parent object.
+*/
QQuickTextDocument::QQuickTextDocument(QQuickItem *parent)
: QObject(*(new QQuickTextDocumentPrivate), parent)
{
@@ -77,6 +81,9 @@ QQuickTextDocument::QQuickTextDocument(QQuickItem *parent)
d->document = QPointer<QTextDocument>(qobject_cast<QQuickTextEdit*>(parent)->d_func()->document);
}
+/*!
+ Returns a pointer to the QTextDocument object.
+*/
QTextDocument* QQuickTextDocument::textDocument() const
{
Q_D(const QQuickTextDocument);
diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp
index 5b7a52f1aa..fe18fc2231 100644
--- a/src/quick/items/qquicktextinput.cpp
+++ b/src/quick/items/qquicktextinput.cpp
@@ -1207,7 +1207,7 @@ void QQuickTextInput::setInputMethodHints(Qt::InputMethodHints hints)
If you set a cursorDelegate for a TextInput, this delegate will be used for
drawing the cursor instead of the standard cursor. An instance of the
delegate will be created and managed by the TextInput when a cursor is
- needed, and the x property of delegate instance will be set so as
+ needed, and the x property of the delegate instance will be set so as
to be one pixel before the top left of the current character.
Note that the root item of the delegate component must be a QQuickItem or
diff --git a/src/quick/scenegraph/coreapi/qsgmaterial.cpp b/src/quick/scenegraph/coreapi/qsgmaterial.cpp
index 633cab8078..5fb0a9867e 100644
--- a/src/quick/scenegraph/coreapi/qsgmaterial.cpp
+++ b/src/quick/scenegraph/coreapi/qsgmaterial.cpp
@@ -188,6 +188,9 @@ QSGMaterialShader::QSGMaterialShader()
{
}
+/*!
+ \internal
+ */
QSGMaterialShader::QSGMaterialShader(QSGMaterialShaderPrivate &dd)
: d_ptr(&dd)
{
@@ -463,7 +466,10 @@ QMatrix4x4 QSGMaterialShader::RenderState::combinedMatrix() const
Q_ASSERT(m_data);
return static_cast<const QSGRenderer *>(m_data)->currentCombinedMatrix();
}
-
+/*!
+ Returns the ratio between physical pixels and device-independent pixels
+ to be used for rendering.
+*/
float QSGMaterialShader::RenderState::devicePixelRatio() const
{
Q_ASSERT(m_data);
diff --git a/src/quick/scenegraph/qsgdefaultimagenode.cpp b/src/quick/scenegraph/qsgdefaultimagenode.cpp
index db79804908..0591d0fe2f 100644
--- a/src/quick/scenegraph/qsgdefaultimagenode.cpp
+++ b/src/quick/scenegraph/qsgdefaultimagenode.cpp
@@ -284,7 +284,7 @@ void QSGDefaultImageNode::update()
void QSGDefaultImageNode::preprocess()
{
bool doDirty = false;
- QSGLayer *t = qobject_cast<QSGLayer *>(m_material.texture());
+ QSGDynamicTexture *t = qobject_cast<QSGDynamicTexture *>(m_material.texture());
if (t) {
doDirty = t->updateTexture();
updateGeometry();
diff --git a/src/quick/scenegraph/util/qsgtextureprovider.cpp b/src/quick/scenegraph/util/qsgtextureprovider.cpp
index b9f9bde476..2d05e736fe 100644
--- a/src/quick/scenegraph/util/qsgtextureprovider.cpp
+++ b/src/quick/scenegraph/util/qsgtextureprovider.cpp
@@ -44,7 +44,15 @@ QT_BEGIN_NAMESPACE
\sa {Scene Graph - Two Texture Providers}
*/
+/*!
+ \fn QSGTexture *QSGTextureProvider::texture();
+ Returns a pointer to the texture object.
+ */
+/*!
+ \fn void QSGTextureProvider::textureChanged();
+ This signal is emitted when the texture changes.
+ */
QT_END_NAMESPACE
diff --git a/src/quick/util/qquickanimatorjob_p.h b/src/quick/util/qquickanimatorjob_p.h
index 87f383f754..82c9da1d2e 100644
--- a/src/quick/util/qquickanimatorjob_p.h
+++ b/src/quick/util/qquickanimatorjob_p.h
@@ -223,22 +223,22 @@ protected:
class Q_QUICK_PRIVATE_EXPORT QQuickScaleAnimatorJob : public QQuickTransformAnimatorJob
{
public:
- void updateCurrentTime(int time);
- void writeBack();
+ void updateCurrentTime(int time) Q_DECL_OVERRIDE;
+ void writeBack() Q_DECL_OVERRIDE;
};
class Q_QUICK_PRIVATE_EXPORT QQuickXAnimatorJob : public QQuickTransformAnimatorJob
{
public:
- void updateCurrentTime(int time);
- void writeBack();
+ void updateCurrentTime(int time) Q_DECL_OVERRIDE;
+ void writeBack() Q_DECL_OVERRIDE;
};
class Q_QUICK_PRIVATE_EXPORT QQuickYAnimatorJob : public QQuickTransformAnimatorJob
{
public:
- void updateCurrentTime(int time);
- void writeBack();
+ void updateCurrentTime(int time) Q_DECL_OVERRIDE;
+ void writeBack() Q_DECL_OVERRIDE;
};
class Q_QUICK_PRIVATE_EXPORT QQuickRotationAnimatorJob : public QQuickTransformAnimatorJob
@@ -246,8 +246,8 @@ class Q_QUICK_PRIVATE_EXPORT QQuickRotationAnimatorJob : public QQuickTransformA
public:
QQuickRotationAnimatorJob();
- void updateCurrentTime(int time);
- void writeBack();
+ void updateCurrentTime(int time) Q_DECL_OVERRIDE;
+ void writeBack() Q_DECL_OVERRIDE;
void setDirection(QQuickRotationAnimator::RotationDirection direction) { m_direction = direction; }
QQuickRotationAnimator::RotationDirection direction() const { return m_direction; }
@@ -261,10 +261,10 @@ class Q_QUICK_PRIVATE_EXPORT QQuickOpacityAnimatorJob : public QQuickAnimatorJob
public:
QQuickOpacityAnimatorJob();
- void initialize(QQuickAnimatorController *controller);
- void updateCurrentTime(int time);
- void writeBack();
- void nodeWasDestroyed();
+ void initialize(QQuickAnimatorController *controller) Q_DECL_OVERRIDE;
+ void updateCurrentTime(int time) Q_DECL_OVERRIDE;
+ void writeBack() Q_DECL_OVERRIDE;
+ void nodeWasDestroyed() Q_DECL_OVERRIDE;
private:
QSGOpacityNode *m_opacityNode;
@@ -275,16 +275,16 @@ class Q_QUICK_PRIVATE_EXPORT QQuickUniformAnimatorJob : public QQuickAnimatorJob
public:
QQuickUniformAnimatorJob();
- void setTarget(QQuickItem *target);
+ void setTarget(QQuickItem *target) Q_DECL_OVERRIDE;
void setUniform(const QByteArray &uniform) { m_uniform = uniform; }
QByteArray uniform() const { return m_uniform; }
void afterNodeSync() Q_DECL_OVERRIDE;
- void updateCurrentTime(int time);
- void writeBack();
- void nodeWasDestroyed();
+ void updateCurrentTime(int time) Q_DECL_OVERRIDE;
+ void writeBack() Q_DECL_OVERRIDE;
+ void nodeWasDestroyed() Q_DECL_OVERRIDE;
private:
QByteArray m_uniform;
diff --git a/src/quick/util/qquickglobal.cpp b/src/quick/util/qquickglobal.cpp
index 3cb7cc3b7f..d1ca02d79f 100644
--- a/src/quick/util/qquickglobal.cpp
+++ b/src/quick/util/qquickglobal.cpp
@@ -466,7 +466,11 @@ public:
}
break;
case QMetaType::QMatrix4x4:
- if (argc == 1) {
+ if (argc == 0) {
+ QMatrix4x4 m;
+ *v = QVariant(m);
+ return true;
+ } else if (argc == 1) {
const qreal *vals = reinterpret_cast<const qreal*>(argv[0]);
QMatrix4x4 m(vals[0], vals[1], vals[2], vals[3],
vals[4], vals[5], vals[6], vals[7],
diff --git a/src/quick/util/qquickimageprovider.cpp b/src/quick/util/qquickimageprovider.cpp
index ff851dac30..d11229717a 100644
--- a/src/quick/util/qquickimageprovider.cpp
+++ b/src/quick/util/qquickimageprovider.cpp
@@ -494,5 +494,26 @@ QQuickAsyncImageProvider::~QQuickAsyncImageProvider()
implementation of this method is reentrant.
*/
+/*!
+ \fn QImage QQuickImageProvider::requestImage(const QString &id, QSize *size, const QSize& requestedSize, bool requestedAutoTransform);
+
+ \internal
+ For future reference.
+*/
+
+/*!
+ \fn QPixmap QQuickImageProvider::requestPixmap(const QString &id, QSize *size, const QSize& requestedSize, bool requestedAutoTransform);
+
+ \internal
+ For future reference.
+*/
+
+/*!
+ \fn QQuickTextureFactory *QQuickImageProvider::requestTexture(const QString &id, QSize *size, const QSize &requestedSize, bool requestedAutoTransform);
+
+ \internal
+ For future reference.
+*/
+
QT_END_NAMESPACE
diff --git a/src/quick/util/qquickshortcut.cpp b/src/quick/util/qquickshortcut.cpp
index 9f32b6c180..e6f66f7bf1 100644
--- a/src/quick/util/qquickshortcut.cpp
+++ b/src/quick/util/qquickshortcut.cpp
@@ -134,20 +134,37 @@ void QQuickShortcut::setSequence(const QVariant &sequence)
}
/*!
- \qmlproperty string QtQuick::Shortcut::sequenceString
+ \qmlproperty string QtQuick::Shortcut::nativeText
\since 5.6
- This property provides the shortcut's key sequence as a string,
- for display purposes (tooltips, for example).
+ This property provides the shortcut's key sequence as a platform specific
+ string. This means that it will be shown translated, and on OS X it will
+ resemble a key sequence from the menu bar. It is best to display this text
+ to the user (for example, on a tooltip).
- \sa sequence
+ \sa sequence, portableText
*/
-QString QQuickShortcut::sequenceString() const
+QString QQuickShortcut::nativeText() const
{
return m_shortcut.toString(QKeySequence::NativeText);
}
/*!
+ \qmlproperty string QtQuick::Shortcut::portableText
+ \since 5.6
+
+ This property provides the shortcut's key sequence as a string in a
+ "portable" format, suitable for reading and writing to a file. In many
+ cases, it will look similar to the native text on Windows and X11.
+
+ \sa sequence, nativeText
+*/
+QString QQuickShortcut::portableText() const
+{
+ return m_shortcut.toString(QKeySequence::PortableText);
+}
+
+/*!
\qmlproperty bool QtQuick::Shortcut::enabled
This property holds whether the shortcut is enabled.
diff --git a/src/quick/util/qquickshortcut_p.h b/src/quick/util/qquickshortcut_p.h
index db02f8afae..d8a233af78 100644
--- a/src/quick/util/qquickshortcut_p.h
+++ b/src/quick/util/qquickshortcut_p.h
@@ -57,7 +57,8 @@ class QQuickShortcut : public QObject, public QQmlParserStatus
Q_OBJECT
Q_INTERFACES(QQmlParserStatus)
Q_PROPERTY(QVariant sequence READ sequence WRITE setSequence NOTIFY sequenceChanged FINAL)
- Q_PROPERTY(QString sequenceString READ sequenceString NOTIFY sequenceChanged FINAL REVISION 1)
+ Q_PROPERTY(QString nativeText READ nativeText NOTIFY sequenceChanged FINAL REVISION 1)
+ Q_PROPERTY(QString portableText READ portableText NOTIFY sequenceChanged FINAL REVISION 1)
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL)
Q_PROPERTY(bool autoRepeat READ autoRepeat WRITE setAutoRepeat NOTIFY autoRepeatChanged FINAL)
Q_PROPERTY(Qt::ShortcutContext context READ context WRITE setContext NOTIFY contextChanged FINAL)
@@ -69,7 +70,8 @@ public:
QVariant sequence() const;
void setSequence(const QVariant &sequence);
- Q_REVISION(1) QString sequenceString() const;
+ QString nativeText() const;
+ QString portableText() const;
bool isEnabled() const;
void setEnabled(bool enabled);
diff --git a/src/quick/util/qquicktransitionmanager_p_p.h b/src/quick/util/qquicktransitionmanager_p_p.h
index 43e63b80d9..f39cde77b0 100644
--- a/src/quick/util/qquicktransitionmanager_p_p.h
+++ b/src/quick/util/qquicktransitionmanager_p_p.h
@@ -45,12 +45,12 @@
// We mean it.
//
-#include "qquickstatechangescript_p.h"
#include "qquickanimation_p.h"
QT_BEGIN_NAMESPACE
-class QQuickStatePrivate;
+class QQuickState;
+class QQuickStateAction;
class QQuickTransitionManagerPrivate;
class Q_QUICK_PRIVATE_EXPORT QQuickTransitionManager
{
diff --git a/src/quick/util/qquickvaluetypes_p.h b/src/quick/util/qquickvaluetypes_p.h
index 3b196da206..4c2b488660 100644
--- a/src/quick/util/qquickvaluetypes_p.h
+++ b/src/quick/util/qquickvaluetypes_p.h
@@ -255,6 +255,13 @@ public:
void setM43(qreal value) { v(3, 2) = value; }
void setM44(qreal value) { v(3, 3) = value; }
+ Q_INVOKABLE void translate(const QVector3D &t) { v.translate(t); }
+ Q_INVOKABLE void rotate(float angle, const QVector3D &axis) { v.rotate(angle, axis); }
+ Q_INVOKABLE void scale(float s) { v.scale(s); }
+ Q_INVOKABLE void scale(float sx, float sy, float sz) { v.scale(sx, sy, sz); }
+ Q_INVOKABLE void scale(const QVector3D &s) { v.scale(s); }
+ Q_INVOKABLE void lookAt(const QVector3D &eye, const QVector3D &center, const QVector3D &up) { v.lookAt(eye, center, up); }
+
Q_INVOKABLE QMatrix4x4 times(const QMatrix4x4 &m) const;
Q_INVOKABLE QVector4D times(const QVector4D &vec) const;
Q_INVOKABLE QVector3D times(const QVector3D &vec) const;