bool QQuickCustomAffector::isAffectConnected()
{
- IS_SIGNAL_CONNECTED(this, "affectParticles(QQmlV8Handle,qreal)");
+ IS_SIGNAL_CONNECTED(this, QQuickCustomAffector, affectParticles, (QQmlV8Handle,qreal));
}
void QQuickCustomAffector::affectSystem(qreal dt)
bool QQuickParticleAffector::isAffectedConnected()
{
- IS_SIGNAL_CONNECTED(this, "affected(qreal,qreal)");
+ IS_SIGNAL_CONNECTED(this, QQuickParticleAffector, affected, (qreal,qreal));
}
bool QQuickParticleEmitter::isEmitConnected()
{
- IS_SIGNAL_CONNECTED(this, "emitParticles(QQmlV8Handle)");
+ IS_SIGNAL_CONNECTED(this, QQuickParticleEmitter, emitParticles, (QQmlV8Handle));
}
void QQuickParticleEmitter::componentComplete()
bool QQuickTrailEmitter::isEmitFollowConnected()
{
- IS_SIGNAL_CONNECTED(this, "emitFollowParticles(QQmlV8Handle,QQmlV8Handle)");
+ IS_SIGNAL_CONNECTED(this, QQuickTrailEmitter, emitFollowParticles, (QQmlV8Handle,QQmlV8Handle));
}
void QQuickTrailEmitter::recalcParticlesPerSecond(){
#include <private/qtqmlglobal_p.h>
#include <QtCore/QObject>
#include <private/qqmlpropertycache_p.h>
+#include <private/qmetaobject_p.h>
QT_BEGIN_HEADER
bool Q_QML_PRIVATE_EXPORT QQml_isSignalConnected(QObject*, int, int);
-#define IS_SIGNAL_CONNECTED(Sender, Signal) \
+#define IS_SIGNAL_CONNECTED(Sender, SenderType, Name, Arguments) \
do { \
QObject *sender = (Sender); \
- const char *signal = (Signal); \
- static int signalIdx = -1; \
- static int methodIdx = -1; \
- if (signalIdx < 0) { \
- signalIdx = QObjectPrivate::get(sender)->signalIndex(signal); \
- methodIdx = sender->metaObject()->indexOfSignal(signal); \
- } \
+ void (SenderType::*signal)Arguments = &SenderType::Name; \
+ static QMetaMethod method = QMetaMethod::fromSignal(signal); \
+ static int signalIdx = QMetaObjectPrivate::signalIndex(method); \
+ static int methodIdx = method.methodIndex(); \
return QQml_isSignalConnected(sender, signalIdx, methodIdx); \
} while (0)
bool QQuickCanvasItem::isPaintConnected()
{
- IS_SIGNAL_CONNECTED(this, "paint(QRect)");
+ IS_SIGNAL_CONNECTED(this, QQuickCanvasItem, paint, (const QRect &));
}
void QQuickCanvasItem::sceneGraphInitialized()
the Canvas has been rendered.
*/
-QT_END_NAMESPACE
\ No newline at end of file
+QT_END_NAMESPACE
bool QQuickMouseAreaPrivate::isPressAndHoldConnected()
{
Q_Q(QQuickMouseArea);
- IS_SIGNAL_CONNECTED(q, "pressAndHold(QQuickMouseEvent*)");
+ IS_SIGNAL_CONNECTED(q, QQuickMouseArea, pressAndHold, (QQuickMouseEvent *));
}
bool QQuickMouseAreaPrivate::isDoubleClickConnected()
{
Q_Q(QQuickMouseArea);
- IS_SIGNAL_CONNECTED(q, "doubleClicked(QQuickMouseEvent*)");
+ IS_SIGNAL_CONNECTED(q, QQuickMouseArea, doubleClicked, (QQuickMouseEvent *));
}
bool QQuickMouseAreaPrivate::isClickConnected()
{
Q_Q(QQuickMouseArea);
- IS_SIGNAL_CONNECTED(q, "clicked(QQuickMouseEvent*)");
+ IS_SIGNAL_CONNECTED(q, QQuickMouseArea, clicked, (QQuickMouseEvent *));
}
bool QQuickMouseAreaPrivate::isWheelConnected()
{
Q_Q(QQuickMouseArea);
- IS_SIGNAL_CONNECTED(q, "wheel(QQuickWheelEvent*)");
+ IS_SIGNAL_CONNECTED(q, QQuickMouseArea, wheel, (QQuickWheelEvent *));
}
void QQuickMouseAreaPrivate::propagate(QQuickMouseEvent* event, PropagateType t)
bool QQuickTextPrivate::isLineLaidOutConnected()
{
Q_Q(QQuickText);
- IS_SIGNAL_CONNECTED(q, "lineLaidOut(QQuickTextLine*)");
+ IS_SIGNAL_CONNECTED(q, QQuickText, lineLaidOut, (QQuickTextLine *));
}
void QQuickTextPrivate::setupCustomLineGeometry(QTextLine &line, qreal &height, int lineOffset)
bool QQuickTextPrivate::isLinkActivatedConnected()
{
Q_Q(QQuickText);
- IS_SIGNAL_CONNECTED(q, "linkActivated(QString)");
+ IS_SIGNAL_CONNECTED(q, QQuickText, linkActivated, (const QString &));
}
/*! \internal */
group = g;
}
-static bool isChangedConnected(QObject *obj)
+bool QQuickVisualDataGroupPrivate::isChangedConnected()
{
- IS_SIGNAL_CONNECTED(obj, "changed(QQmlV8Handle,QQmlV8Handle)");
+ Q_Q(QQuickVisualDataGroup);
+ IS_SIGNAL_CONNECTED(q, QQuickVisualDataGroup, changed, (const QQmlV8Handle &,const QQmlV8Handle &));
}
void QQuickVisualDataGroupPrivate::emitChanges(QV8Engine *engine)
{
Q_Q(QQuickVisualDataGroup);
- if (isChangedConnected(q) && !changeSet.isEmpty()) {
+ if (isChangedConnected() && !changeSet.isEmpty()) {
v8::HandleScope handleScope;
v8::Context::Scope contextScope(engine->context());
v8::Local<v8::Object> removed = engineData(engine)->array(engine, changeSet.removes());
return static_cast<QQuickVisualDataGroupPrivate *>(QObjectPrivate::get(group)); }
void setModel(QQuickVisualDataModel *model, Compositor::Group group);
+ bool isChangedConnected();
void emitChanges(QV8Engine *engine);
void emitModelUpdated(bool reset);