From 5607810f4ee67343c82e91c78620a27ebdd6a983 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Wed, 7 Jan 2015 22:00:00 +0100 Subject: QQuickGridMesh: Avoid a signal connection per mesh instance by just calling the signal directly. This can be instantiated a fair number of times, leading to a lot of signal connections. Since the signal is so simple, just place a function call inline and avoid unnecessary allocations. Change-Id: I031245c46bf797898f22ed991d0e97d73728bdf5 Reviewed-by: Michael Brasser Reviewed-by: Gunnar Sletta --- src/quick/items/qquickshadereffectmesh.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quick/items/qquickshadereffectmesh.cpp') diff --git a/src/quick/items/qquickshadereffectmesh.cpp b/src/quick/items/qquickshadereffectmesh.cpp index 1eab3b4148..4100594711 100644 --- a/src/quick/items/qquickshadereffectmesh.cpp +++ b/src/quick/items/qquickshadereffectmesh.cpp @@ -59,7 +59,6 @@ QQuickGridMesh::QQuickGridMesh(QObject *parent) : QQuickShaderEffectMesh(parent) , m_resolution(1, 1) { - connect(this, SIGNAL(resolutionChanged()), this, SIGNAL(geometryChanged())); } QSGGeometry *QQuickGridMesh::updateGeometry(QSGGeometry *geometry, const QVector &attributes, const QRectF &srcRect, const QRectF &dstRect) @@ -204,6 +203,7 @@ void QQuickGridMesh::setResolution(const QSize &res) } m_resolution = res; emit resolutionChanged(); + emit geometryChanged(); } QSize QQuickGridMesh::resolution() const -- cgit v1.2.3