Source

Target

Showing with 172 additions and 81 deletions
......@@ -562,6 +562,8 @@ void QQuickPinchArea::setTouchEventsEnabledForWindow(QWindow *window)
// Save the current window, setTouchEventsEnabledForWindow will be called
// with a null window on disable.
_currentWindow = window;
#else // Q_OS_MAC
Q_UNUSED(window)
#endif
}
......
......@@ -644,7 +644,7 @@ void QQuickPositionerAttached::setIsLastItem(bool isLastItem)
\image verticalpositioner_transition.gif
\sa Row, Grid, Flow, Positioner, {qml/positioners}{Positioners example}
\sa Row, Grid, Flow, Positioner, {Qt Quick Examples - Positioners}
*/
/*!
\qmlproperty Transition QtQuick2::Column::populate
......@@ -657,7 +657,7 @@ void QQuickPositionerAttached::setIsLastItem(bool isLastItem)
the item that is being added. See the \l ViewTransition documentation for more details
and examples on using these transitions.
\sa add, ViewTransition, {declarative/positioners}{Positioners example}
\sa add, ViewTransition, {Qt Quick Examples - Positioners}
*/
/*!
\qmlproperty Transition QtQuick2::Column::add
......@@ -679,7 +679,7 @@ void QQuickPositionerAttached::setIsLastItem(bool isLastItem)
\note This transition is not applied to the items that already part of the positioner
at the time of its creation. In this case, the \l populate transition is applied instead.
\sa populate, ViewTransition, {declarative/positioners}{Positioners example}
\sa populate, ViewTransition, {Qt Quick Examples - Positioners}
*/
/*!
\qmlproperty Transition QtQuick2::Column::move
......@@ -704,7 +704,7 @@ void QQuickPositionerAttached::setIsLastItem(bool isLastItem)
positioner at the time of its creation. From \l {Qt Quick}{Qt Quick 2} onwards, positioners apply the
\l populate transition to these items instead.
\sa add, ViewTransition, {qml/positioners}{Positioners example}
\sa add, ViewTransition, {Qt Quick Examples - Positioners}
*/
/*!
\qmlproperty real QtQuick2::Column::spacing
......@@ -798,7 +798,7 @@ void QQuickColumn::reportConflictingAnchors()
\l{Item Layouts}.
\sa Column, Grid, Flow, Positioner, {qml/positioners}{Positioners example}
\sa Column, Grid, Flow, Positioner, {Qt Quick Examples - Positioners}
*/
/*!
\qmlproperty Transition QtQuick2::Row::populate
......@@ -811,7 +811,7 @@ void QQuickColumn::reportConflictingAnchors()
the item that is being added. See the \l ViewTransition documentation for more details
and examples on using these transitions.
\sa add, ViewTransition, {declarative/positioners}{Positioners example}
\sa add, ViewTransition, {Qt Quick Examples - Positioners}
*/
/*!
\qmlproperty Transition QtQuick2::Row::add
......@@ -833,7 +833,7 @@ void QQuickColumn::reportConflictingAnchors()
\note This transition is not applied to the items that already part of the positioner
at the time of its creation. In this case, the \l populate transition is applied instead.
\sa populate, ViewTransition, {declarative/positioners}{Positioners example}
\sa populate, ViewTransition, {Qt Quick Examples - Positioners}
*/
/*!
\qmlproperty Transition QtQuick2::Row::move
......@@ -858,7 +858,7 @@ void QQuickColumn::reportConflictingAnchors()
positioner at the time of its creation. From \l {Qt Quick}{QtQuick 2} onwards, positioners apply the
\l populate transition to these items instead.
\sa add, ViewTransition, {qml/positioners}{Positioners example}
\sa add, ViewTransition, {Qt Quick Examples - Positioners}
*/
/*!
\qmlproperty real QtQuick2::Row::spacing
......@@ -887,7 +887,7 @@ QQuickRow::QQuickRow(QQuickItem *parent)
the right anchor remains to the right of the row.
\endlist
\sa Grid::layoutDirection, Flow::layoutDirection, {qml/righttoleft/layoutdirection}{Layout directions example}
\sa Grid::layoutDirection, Flow::layoutDirection, {Qt Quick Examples - Right to Left}
*/
Qt::LayoutDirection QQuickRow::layoutDirection() const
......@@ -1031,7 +1031,7 @@ void QQuickRow::reportConflictingAnchors()
\l{Item Layouts}.
\sa Flow, Row, Column, Positioner, {qml/positioners}{Positioners example}
\sa Flow, Row, Column, Positioner, {Qt Quick Examples - Positioners}
*/
/*!
\qmlproperty Transition QtQuick2::Grid::populate
......@@ -1044,7 +1044,7 @@ void QQuickRow::reportConflictingAnchors()
the item that is being added. See the \l ViewTransition documentation for more details
and examples on using these transitions.
\sa add, ViewTransition, {declarative/positioners}{Positioners example}
\sa add, ViewTransition, {Qt Quick Examples - Positioners}
*/
/*!
\qmlproperty Transition QtQuick2::Grid::add
......@@ -1066,7 +1066,7 @@ void QQuickRow::reportConflictingAnchors()
\note This transition is not applied to the items that already part of the positioner
at the time of its creation. In this case, the \l populate transition is applied instead.
\sa populate, ViewTransition, {declarative/positioners}{Positioners example}
\sa populate, ViewTransition, {Qt Quick Examples - Positioners}
*/
/*!
\qmlproperty Transition QtQuick2::Grid::move
......@@ -1091,7 +1091,7 @@ void QQuickRow::reportConflictingAnchors()
positioner at the time of its creation. From \l {Qt Quick}{QtQuick 2} onwards, positioners apply the
\l populate transition to these items instead.
\sa add, ViewTransition, {qml/positioners}{Positioners example}
\sa add, ViewTransition, {Qt Quick Examples - Positioners}
*/
/*!
\qmlproperty qreal QtQuick2::Grid::spacing
......@@ -1248,7 +1248,7 @@ void QQuickGrid::setColumnSpacing(const qreal columnSpacing)
\l Grid::flow property.
\endlist
\sa Flow::layoutDirection, Row::layoutDirection, {qml/righttoleft/layoutdirection}{Layout directions example}
\sa Flow::layoutDirection, Row::layoutDirection, {Qt Quick Examples - Right to Left}
*/
Qt::LayoutDirection QQuickGrid::layoutDirection() const
{
......@@ -1572,7 +1572,7 @@ void QQuickGrid::reportConflictingAnchors()
For more information on using Flow and other related positioner-types, see
\l{Item Layouts}.
\sa Column, Row, Grid, Positioner, {qml/positioners}{Positioners example}
\sa Column, Row, Grid, Positioner, {Qt Quick Examples - Positioners}
*/
/*!
\qmlproperty Transition QtQuick2::Flow::populate
......@@ -1585,7 +1585,7 @@ void QQuickGrid::reportConflictingAnchors()
the item that is being added. See the \l ViewTransition documentation for more details
and examples on using these transitions.
\sa add, ViewTransition, {declarative/positioners}{Positioners example}
\sa add, ViewTransition, {Qt Quick Examples - Positioners}
*/
/*!
\qmlproperty Transition QtQuick2::Flow::add
......@@ -1607,7 +1607,7 @@ void QQuickGrid::reportConflictingAnchors()
\note This transition is not applied to the items that already part of the positioner
at the time of its creation. In this case, the \l populate transition is applied instead.
\sa populate, ViewTransition, {declarative/positioners}{Positioners example}
\sa populate, ViewTransition, {Qt Quick Examples - Positioners}
*/
/*!
\qmlproperty Transition QtQuick2::Flow::move
......@@ -1632,7 +1632,7 @@ void QQuickGrid::reportConflictingAnchors()
positioner at the time of its creation. From \l {Qt Quick}{QtQuick 2} onwards, positioners apply the
\l populate transition to these items instead.
\sa add, ViewTransition, {qml/positioners}{Positioners example}
\sa add, ViewTransition, {Qt Quick Examples - Positioners}
*/
/*!
\qmlproperty real QtQuick2::Flow::spacing
......@@ -1710,7 +1710,7 @@ void QQuickFlow::setFlow(Flow flow)
\l Flow::flow property.
\endlist
\sa Grid::layoutDirection, Row::layoutDirection, {qml/righttoleft/layoutdirection}{Layout directions example}
\sa Grid::layoutDirection, Row::layoutDirection, {Qt Quick Examples - Right to Left}
*/
Qt::LayoutDirection QQuickFlow::layoutDirection() const
......
......@@ -302,7 +302,7 @@ int QQuickRectanglePrivate::doUpdateSlotIdx = -1;
\clearfloat
\section1 Performance
Using the \l antialiasing property improves the appearance of a rounded rectangle at
Using the \l Item::antialiasing property improves the appearance of a rounded rectangle at
the cost of rendering performance. You should consider unsetting this property
for rectangles in motion, and only set it when they are stationary.
......
......@@ -351,11 +351,12 @@ void QQuickRepeater::clear()
if (d->model) {
for (int i = 0; i < d->deletables.count(); ++i) {
QQuickItem *item = d->deletables.at(i);
if (complete)
emit itemRemoved(i, item);
item->setParentItem(0);
d->model->release(item);
if (QQuickItem *item = d->deletables.at(i)) {
if (complete)
emit itemRemoved(i, item);
item->setParentItem(0);
d->model->release(item);
}
}
}
d->deletables.clear();
......
......@@ -1989,6 +1989,7 @@ void QQuickText::setTextFormat(TextFormat format)
d->rightToLeftText = d->extra->doc->toPlainText().isRightToLeft();
} else {
d->rightToLeftText = d->text.isRightToLeft();
d->textHasChanged = true;
}
d->determineHorizontalAlignment();
}
......
......@@ -298,6 +298,8 @@ void QQuickTextControlPrivate::setContent(Qt::TextFormat format, const QString &
bool previousUndoRedoState = doc->isUndoRedoEnabled();
doc->setUndoRedoEnabled(false);
const int oldCursorPos = cursor.position();
// avoid multiple textChanged() signals being emitted
qmlobject_disconnect(doc, QTextDocument, SIGNAL(contentsChanged()), q, QQuickTextControl, SIGNAL(textChanged()));
......@@ -341,7 +343,8 @@ void QQuickTextControlPrivate::setContent(Qt::TextFormat format, const QString &
doc->setModified(false);
q->updateCursorRectangle(true);
emit q->cursorPositionChanged();
if (cursor.position() != oldCursorPos)
emit q->cursorPositionChanged();
}
void QQuickTextControlPrivate::setCursorPosition(const QPointF &pos)
......
......@@ -840,6 +840,11 @@ void QQuickWindowPrivate::cleanup(QSGNode *n)
Alternatively you can set or bind \l x and \l y to position the Window
explicitly on the screen.
When the user attempts to close a window, the \a closing signal will be
emitted. You can force the window to stay open (for example to prompt the
user to save changes) by writing an onClosing handler and setting
close.accepted = false.
*/
/*!
\class QQuickWindow
......@@ -1174,6 +1179,14 @@ bool QQuickWindow::event(QEvent *e)
case QEvent::WindowDeactivate:
contentItem()->windowDeactivateEvent();
break;
case QEvent::Close: {
// TOOD Qt 6 (binary incompatible)
// closeEvent(static_cast<QCloseEvent *>(e));
QQuickCloseEvent qev;
qev.setAccepted(e->isAccepted());
emit closing(&qev);
e->setAccepted(qev.isAccepted());
} break;
case QEvent::FocusAboutToChange:
#ifndef QT_NO_IM
if (d->activeFocusItem)
......@@ -2558,6 +2571,57 @@ QOpenGLContext *QQuickWindow::openglContext() const
This signal will be emitted from the scene graph rendering thread.
*/
/*!
\class QQuickCloseEvent
\internal
\since QtQuick 2.1
\inmodule QtQuick.Window
\brief Notification that a \l QQuickWindow is about to be closed
*/
/*!
\qmltype CloseEvent
\instantiates QQuickCloseEvent
\inqmlmodule QtQuick.Window 2
\ingroup qtquick-visual
\brief Notification that a \l Window is about to be closed
\since Qt 5.1
Notification that a window is about to be closed by the windowing system
(e.g. the user clicked the titlebar close button). The CloseEvent contains
an accepted property which can be set to false to abort closing the window.
\sa Window.closing()
*/
/*!
\qmlproperty bool QtQuick.Window2::CloseEvent::accepted
This property indicates whether the application will allow the user to
close the window. It is true by default.
*/
/*!
\fn void QQuickWindow::closing()
\since QtQuick 2.1
This signal is emitted when the window receives a QCloseEvent from the
windowing system.
*/
/*!
\qmlsignal QtQuick.Window2::closing(CloseEvent close)
\since Qt 5.1
This signal is emitted when the user tries to close the window.
This signal includes a closeEvent parameter. The \a close \l accepted
property is true by default so that the window is allowed to close; but you
can implement an onClosing() handler and set close.accepted = false if
you need to do something else before the window can be closed.
*/
/*!
Sets the render target for this window to be \a fbo.
......
......@@ -57,6 +57,7 @@ class QQuickWindowPrivate;
class QOpenGLFramebufferObject;
class QQmlIncubationController;
class QInputMethodEvent;
class QQuickCloseEvent;
class Q_QUICK_EXPORT QQuickWindow : public QWindow
{
......@@ -129,6 +130,7 @@ Q_SIGNALS:
void beforeSynchronizing();
void beforeRendering();
void afterRendering();
Q_REVISION(1) void closing(QQuickCloseEvent *close);
void colorChanged(const QColor &);
Q_REVISION(1) void activeFocusItemChanged();
......@@ -144,6 +146,7 @@ protected:
virtual void showEvent(QShowEvent *);
virtual void hideEvent(QHideEvent *);
// TODO Qt 6: reimplement QWindow::closeEvent to emit closing
virtual void focusInEvent(QFocusEvent *);
virtual void focusOutEvent(QFocusEvent *);
......
......@@ -231,9 +231,26 @@ private:
static void cleanupNodesOnShutdown(QQuickItem *);
};
class Q_QUICK_PRIVATE_EXPORT QQuickCloseEvent : public QObject
{
Q_OBJECT
Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted)
public:
QQuickCloseEvent()
: _accepted(true) {}
bool isAccepted() { return _accepted; }
void setAccepted(bool accepted) { _accepted = accepted; }
private:
bool _accepted;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickWindowPrivate::FocusOptions)
QT_END_NAMESPACE
QML_DECLARE_TYPE(QQuickCloseEvent)
#endif // QQUICKWINDOW_P_H
......@@ -14,12 +14,15 @@ exists("qqml_enable_gcov") {
QMAKE_DOCS = $$PWD/doc/qtquick.qdocconf
ANDROID_LIB_DEPENDENCIES = \
lib/libQt5QuickParticles.so
ANDROID_LIB_DEPENDENCY_REPLACEMENTS = \
"plugins/platforms/android/libqtforandroid.so:plugins/platforms/android/libqtforandroidGL.so"
MODULE_PLUGIN_TYPES = \
accessible
ANDROID_BUNDLED_FILES += \
qml
qml \
lib/libQt5QuickParticles.so
load(qt_module)
......
......@@ -332,42 +332,42 @@ const QSGGeometry::AttributeSet &QSGGeometry::defaultAttributes_ColoredPoint2D()
/*!
\fn const QSGGeometry::ColoredPoint2D *QSGGeometry::vertexDataAsColoredPoint2D() const
Convenience function to access the vertex data as an immuatble
Convenience function to access the vertex data as an immutable
array of QSGGeometry::ColoredPoint2D.
*/
/*!
\fn QSGGeometry::ColoredPoint2D *QSGGeometry::vertexDataAsColoredPoint2D()
Convenience function to access the vertex data as a muatble
Convenience function to access the vertex data as a mutable
array of QSGGeometry::ColoredPoint2D.
*/
/*!
\fn const QSGGeometry::TexturedPoint2D *QSGGeometry::vertexDataAsTexturedPoint2D() const
Convenience function to access the vertex data as an immuatble
Convenience function to access the vertex data as an immutable
array of QSGGeometry::TexturedPoint2D.
*/
/*!
\fn QSGGeometry::TexturedPoint2D *QSGGeometry::vertexDataAsTexturedPoint2D()
Convenience function to access the vertex data as a muatble
Convenience function to access the vertex data as a mutable
array of QSGGeometry::TexturedPoint2D.
*/
/*!
\fn const QSGGeometry::Point2D *QSGGeometry::vertexDataAsPoint2D() const
Convenience function to access the vertex data as an immuatble
Convenience function to access the vertex data as an immutable
array of QSGGeometry::Point2D.
*/
/*!
\fn QSGGeometry::Point2D *QSGGeometry::vertexDataAsPoint2D()
Convenience function to access the vertex data as a muatble
Convenience function to access the vertex data as a mutable
array of QSGGeometry::Point2D.
*/
......@@ -705,7 +705,8 @@ void QSGGeometry::updateTexturedRectGeometry(QSGGeometry *g, const QRectF &rect,
The default is AlwaysUploadPattern. When set to anything other than
the default, the user must call markIndexDataDirty() after changing
the index data.
the index data, in addition to calling QSGNode::markDirty() with
QSGNode::DirtyGeometry.
*/
void QSGGeometry::setIndexDataPattern(DataPattern p)
......@@ -728,7 +729,8 @@ void QSGGeometry::setIndexDataPattern(DataPattern p)
The default is AlwaysUploadPattern. When set to anything other than
the default, the user must call markVertexDataDirty() after changing
the vertex data.
the vertex data, in addition to calling QSGNode::markDirty() with
QSGNode::DirtyGeometry.
*/
void QSGGeometry::setVertexDataPattern(DataPattern p)
......
......@@ -128,12 +128,12 @@ static void qt_print_node_count()
before rendering starts.
\value OwnsGeometry Only valid for QSGGeometryNode and QSGClipNode.
The node has ownership over the QSGGeometry instance and will
delete it when the node is destroyed.
delete it when the node is destroyed or a geometry is assigned.
\value OwnsMaterial Only valid for QSGGeometryNode. The node has ownership
over the material and will delete it when the node is destroyed.
over the material and will delete it when the node is destroyed or a material is assigned.
\value OwnsOpaqueMaterial Only valid for QSGGeometryNode. The node has
ownership over the opaque material and will delete it when the node is
destroyed.
destroyed or a material is assigned.
*/
/*!
......
......@@ -521,7 +521,7 @@ int QSGTextMaskMaterial::compare(const QSGMaterial *o) const
Q_ASSERT(o && type() == o->type());
const QSGTextMaskMaterial *other = static_cast<const QSGTextMaskMaterial *>(o);
if (m_glyphCache != other->m_glyphCache)
return m_glyphCache - other->m_glyphCache;
return m_glyphCache.data() < other->m_glyphCache.data() ? -1 : 1;
QRgb c1 = m_color.rgba();
QRgb c2 = other->m_color.rgba();
return int(c2 < c1) - int(c1 < c2);
......
......@@ -144,8 +144,7 @@ void QSGDistanceFieldTextMaterialShader::updateState(const RenderState &state, Q
if (oldMaterial == 0
|| material->color() != oldMaterial->color()
|| state.isOpacityDirty()) {
QColor c = material->color();
QVector4D color(c.redF(), c.greenF(), c.blueF(), c.alphaF());
QVector4D color = material->color();
color *= state.opacity();
program()->setUniformValue(m_color_id, color);
}
......@@ -206,10 +205,10 @@ QSGMaterialType *QSGDistanceFieldTextMaterial::type() const
void QSGDistanceFieldTextMaterial::setColor(const QColor &color)
{
m_color = QColor::fromRgbF(color.redF() * color.alphaF(),
color.greenF() * color.alphaF(),
color.blueF() * color.alphaF(),
color.alphaF());
m_color = QVector4D(color.redF() * color.alphaF(),
color.greenF() * color.alphaF(),
color.blueF() * color.alphaF(),
color.alphaF());
}
QSGMaterialShader *QSGDistanceFieldTextMaterial::createShader() const
......@@ -239,10 +238,8 @@ int QSGDistanceFieldTextMaterial::compare(const QSGMaterial *o) const
if (m_fontScale != other->m_fontScale) {
return int(other->m_fontScale < m_fontScale) - int(m_fontScale < other->m_fontScale);
}
QRgb c1 = m_color.rgba();
QRgb c2 = other->m_color.rgba();
if (c1 != c2)
return int(c2 < c1) - int(c1 < c2);
if (m_color != other->m_color)
return &m_color < &other->m_color ? -1 : 1;
int t0 = m_texture ? m_texture->textureId : -1;
int t1 = other->m_texture ? other->m_texture->textureId : -1;
return t0 - t1;
......@@ -284,8 +281,7 @@ void DistanceFieldStyledTextMaterialShader::updateState(const RenderState &state
if (oldMaterial == 0
|| material->styleColor() != oldMaterial->styleColor()
|| (state.isOpacityDirty())) {
QColor c = material->styleColor();
QVector4D color(c.redF(), c.greenF(), c.blueF(), c.alphaF());
QVector4D color = material->styleColor();
color *= state.opacity();
program()->setUniformValue(m_styleColor_id, color);
}
......@@ -302,21 +298,18 @@ QSGDistanceFieldStyledTextMaterial::~QSGDistanceFieldStyledTextMaterial()
void QSGDistanceFieldStyledTextMaterial::setStyleColor(const QColor &color)
{
m_styleColor = QColor::fromRgbF(color.redF() * color.alphaF(),
color.greenF() * color.alphaF(),
color.blueF() * color.alphaF(),
color.alphaF());
m_styleColor = QVector4D(color.redF() * color.alphaF(),
color.greenF() * color.alphaF(),
color.blueF() * color.alphaF(),
color.alphaF());
}
int QSGDistanceFieldStyledTextMaterial::compare(const QSGMaterial *o) const
{
Q_ASSERT(o && type() == o->type());
const QSGDistanceFieldStyledTextMaterial *other = static_cast<const QSGDistanceFieldStyledTextMaterial *>(o);
if (m_styleColor != other->m_styleColor) {
QRgb c1 = m_styleColor.rgba();
QRgb c2 = other->m_styleColor.rgba();
return int(c2 < c1) - int(c1 < c2);
}
if (m_styleColor != other->m_color)
return &m_styleColor < &other->m_styleColor ? -1 : 1;
return QSGDistanceFieldTextMaterial::compare(o);
}
......@@ -657,8 +650,8 @@ void QSGHiQSubPixelDistanceFieldTextMaterialShader::updateState(const RenderStat
QSGDistanceFieldTextMaterial *oldMaterial = static_cast<QSGDistanceFieldTextMaterial *>(oldEffect);
if (oldMaterial == 0 || material->color() != oldMaterial->color()) {
QColor c = material->color();
state.context()->functions()->glBlendColor(c.redF(), c.greenF(), c.blueF(), 1.0f);
QVector4D c = material->color();
state.context()->functions()->glBlendColor(c.x(), c.y(), c.z(), 1.0f);
}
if (oldMaterial == 0 || material->fontScale() != oldMaterial->fontScale())
......
......@@ -59,7 +59,7 @@ public:
virtual int compare(const QSGMaterial *other) const;
virtual void setColor(const QColor &color);
const QColor &color() const { return m_color; }
const QVector4D &color() const { return m_color; }
void setGlyphCache(QSGDistanceFieldGlyphCache *a) { m_glyph_cache = a; }
QSGDistanceFieldGlyphCache *glyphCache() const { return m_glyph_cache; }
......@@ -76,7 +76,7 @@ public:
protected:
QSize m_size;
QColor m_color;
QVector4D m_color;
QSGDistanceFieldGlyphCache *m_glyph_cache;
const QSGDistanceFieldGlyphCache::Texture *m_texture;
qreal m_fontScale;
......@@ -93,10 +93,10 @@ public:
virtual int compare(const QSGMaterial *other) const;
void setStyleColor(const QColor &color);
const QColor &styleColor() const { return m_styleColor; }
const QVector4D &styleColor() const { return m_styleColor; }
protected:
QColor m_styleColor;
QVector4D m_styleColor;
};
class Q_QUICK_PRIVATE_EXPORT QSGDistanceFieldOutlineTextMaterial : public QSGDistanceFieldStyledTextMaterial
......@@ -130,7 +130,7 @@ class Q_QUICK_PRIVATE_EXPORT QSGHiQSubPixelDistanceFieldTextMaterial : public QS
public:
virtual QSGMaterialType *type() const;
virtual QSGMaterialShader *createShader() const;
void setColor(const QColor &color) { m_color = color; }
void setColor(const QColor &color) { m_color = QVector4D(color.redF(), color.greenF(), color.blueF(), color.alphaF()); }
};
class Q_QUICK_PRIVATE_EXPORT QSGLoQSubPixelDistanceFieldTextMaterial : public QSGDistanceFieldTextMaterial
......@@ -138,7 +138,7 @@ class Q_QUICK_PRIVATE_EXPORT QSGLoQSubPixelDistanceFieldTextMaterial : public QS
public:
virtual QSGMaterialType *type() const;
virtual QSGMaterialShader *createShader() const;
void setColor(const QColor &color) { m_color = color; }
void setColor(const QColor &color) { m_color = QVector4D(color.redF(), color.greenF(), color.blueF(), color.alphaF()); }
};
QT_END_NAMESPACE
......
......@@ -74,11 +74,11 @@ void FlatColorMaterialShader::updateState(const RenderState &state, QSGMaterial
const QColor &c = newMaterial->color();
if (oldMaterial == 0 || c != oldMaterial->color() || state.isOpacityDirty()) {
float opacity = state.opacity();
QVector4D v(c.redF() * c.alphaF() * opacity,
c.greenF() * c.alphaF() * opacity,
c.blueF() * c.alphaF() * opacity,
c.alphaF() * opacity);
float opacity = state.opacity() * c.alphaF();
QVector4D v(c.redF() * opacity,
c.greenF() * opacity,
c.blueF() * opacity,
opacity);
program()->setUniformValue(m_color_id, v);
}
......
......@@ -145,7 +145,7 @@ void QSGOpaqueTextureMaterialShader::updateState(const RenderState &state, QSGMa
tuple. The QSGGeometry::defaultAttributes_TexturedPoint2D returns an
attribute set compatible with this material.
The texture to be rendered is can be set using setTexture(). How the
The texture to be rendered can be set using setTexture(). How the
texture should be rendered can be specified using setMipmapFiltering(),
setFiltering(), setHorizontalWrapMode() and setVerticalWrapMode().
The rendering state is set on the texture instance just before it
......@@ -208,7 +208,7 @@ QSGMaterialShader *QSGOpaqueTextureMaterial::createShader() const
/*!
Sets the texture of this material to \a texture.
The material does not take ownership over the texture.
The material does not take ownership of the texture.
*/
void QSGOpaqueTextureMaterial::setTexture(QSGTexture *texture)
......@@ -337,7 +337,7 @@ int QSGOpaqueTextureMaterial::compare(const QSGMaterial *o) const
tuple. The QSGGeometry::defaultAttributes_TexturedPoint2D returns an
attribute set compatible with this material.
The texture to be rendered is set using setTexture(). How the
The texture to be rendered can be set using setTexture(). How the
texture should be rendered can be specified using setMipmapFiltering(),
setFiltering(), setHorizontalWrapMode() and setVerticalWrapMode().
The rendering state is set on the texture instance just before it
......
......@@ -1975,7 +1975,7 @@ void QQuickPropertyAnimation::setDuration(int duration)
}
/*!
\qmlproperty real QtQuick2::PropertyAnimation::from
\qmlproperty variant QtQuick2::PropertyAnimation::from
This property holds the starting value for the animation.
If the PropertyAnimation is defined within a \l Transition or \l Behavior,
......@@ -2002,7 +2002,7 @@ void QQuickPropertyAnimation::setFrom(const QVariant &f)
}
/*!
\qmlproperty real QtQuick2::PropertyAnimation::to
\qmlproperty variant QtQuick2::PropertyAnimation::to
This property holds the end value for the animation.
If the PropertyAnimation is defined within a \l Transition or \l Behavior,
......
......@@ -69,3 +69,7 @@ SUBDIRS += debugger
contains(QT_CONFIG, private_tests) {
SUBDIRS += $$PRIVATETESTS
}
qtNomakeTools( \
qmlplugindump \
)
......@@ -68,9 +68,7 @@ void tst_qmlplugindump::initTestCase()
{
qmlplugindumpPath = QLibraryInfo::location(QLibraryInfo::BinariesPath);
#if defined(Q_OS_MAC)
qmlplugindumpPath += QLatin1String("/qmlplugindump.app/Contents/MacOS/qmlplugindump");
#elif defined(Q_OS_WIN)
#if defined(Q_OS_WIN)
qmlplugindumpPath += QLatin1String("/qmlplugindump.exe");
#else
qmlplugindumpPath += QLatin1String("/qmlplugindump");
......