#include <QtCore/qurl.h>
#include <QtCore/qobject.h>
+#include <QtCore/qmetaobject.h>
#include <private/qqmlengine_p.h>
#include <private/qqmlglobal_p.h>
: m_engine(e), m_p(p), m_redirectCount(0), m_reply(0)
{
if (finishedIndex == -1) {
+ finishedIndex = QMetaMethod::fromSignal(&QQmlFileNetworkReply::finished).methodIndex();
+ downloadProgressIndex = QMetaMethod::fromSignal(&QQmlFileNetworkReply::downloadProgress).methodIndex();
const QMetaObject *smo = &staticMetaObject;
- finishedIndex = smo->indexOfSignal("finished()");
- downloadProgressIndex = smo->indexOfSignal("downloadProgress(qint64,qint64)");
networkFinishedIndex = smo->indexOfMethod("networkFinished()");
networkDownloadProgressIndex = smo->indexOfMethod("networkDownloadProgress(qint64,qint64)");
- const QMetaObject *rsmo = &QNetworkReply::staticMetaObject;
- replyFinishedIndex = rsmo->indexOfSignal("finished()");
- replyDownloadProgressIndex = rsmo->indexOfSignal("downloadProgress(qint64,qint64)");
+ replyFinishedIndex = QMetaMethod::fromSignal(&QNetworkReply::finished).methodIndex();
+ replyDownloadProgressIndex = QMetaMethod::fromSignal(&QNetworkReply::downloadProgress).methodIndex();
}
Q_ASSERT(finishedIndex != -1 && downloadProgressIndex != -1 &&
networkFinishedIndex != -1 && networkDownloadProgressIndex != -1 &&
#include <QtGui/qpixmapcache.h>
#include <QtCore/qstringbuilder.h>
#include <QtCore/qmath.h>
+#include <QtCore/qmetaobject.h>
QT_BEGIN_NAMESPACE
return;
static int updatedSignalIdx = -1;
if (updatedSignalIdx < 0)
- updatedSignalIdx = QQuickGradient::staticMetaObject.indexOfSignal("updated()");
+ updatedSignalIdx = QMetaMethod::fromSignal(&QQuickGradient::updated).methodIndex();
if (d->doUpdateSlotIdx < 0)
d->doUpdateSlotIdx = QQuickRectangle::staticMetaObject.indexOfSlot("doUpdate()");
if (d->gradient)
//
#include "qquickitem_p.h"
+#include <QtCore/qmetaobject.h>
QT_BEGIN_NAMESPACE
pen = new QQuickPen;
static int penChangedSignalIdx = -1;
if (penChangedSignalIdx < 0)
- penChangedSignalIdx = QQuickPen::staticMetaObject.indexOfSignal("penChanged()");
+ penChangedSignalIdx = QMetaMethod::fromSignal(&QQuickPen::penChanged).methodIndex();
if (doUpdateSlotIdx < 0)
doUpdateSlotIdx = QQuickRectangle::staticMetaObject.indexOfSlot("doUpdate()");
QMetaObject::connect(pen, penChangedSignalIdx, q, doUpdateSlotIdx);
#include <qvariant.h>
#include <qurl.h>
#include <qstylehints.h>
+#include <qmetaobject.h>
// ### these should come from QStyleHints
const int textCursorWidth = 1;
doc->setUndoRedoEnabled(false);
//Saving the index save some time.
- static int contentsChangedIndex = QTextDocument::staticMetaObject.indexOfSignal("contentsChanged()");
- static int textChangedIndex = QQuickTextControl::staticMetaObject.indexOfSignal("textChanged()");
+ static int contentsChangedIndex = QMetaMethod::fromSignal(&QTextDocument::contentsChanged).methodIndex();
+ static int textChangedIndex = QMetaMethod::fromSignal(&QQuickTextControl::textChanged).methodIndex();
// avoid multiple textChanged() signals being emitted
QMetaObject::disconnect(doc, contentsChangedIndex, q, textChangedIndex);
#include <private/qobject_p.h>
#include <QSslError>
#include <QQmlFile>
+#include <QMetaMethod>
#define IMAGEREQUEST_MAX_REQUEST_COUNT 8
#define IMAGEREQUEST_MAX_REDIRECT_RECURSION 16
void QQuickPixmapReader::run()
{
if (replyDownloadProgress == -1) {
- const QMetaObject *nr = &QNetworkReply::staticMetaObject;
- const QMetaObject *pr = &QQuickPixmapReply::staticMetaObject;
+ replyDownloadProgress = QMetaMethod::fromSignal(&QNetworkReply::downloadProgress).methodIndex();
+ replyFinished = QMetaMethod::fromSignal(&QNetworkReply::finished).methodIndex();
+ downloadProgress = QMetaMethod::fromSignal(&QQuickPixmapReply::downloadProgress).methodIndex();
const QMetaObject *ir = &QQuickPixmapReaderThreadObject::staticMetaObject;
- replyDownloadProgress = nr->indexOfSignal("downloadProgress(qint64,qint64)");
- replyFinished = nr->indexOfSignal("finished()");
- downloadProgress = pr->indexOfSignal("downloadProgress(qint64,qint64)");
threadNetworkRequestDone = ir->indexOfSlot("networkRequestDone()");
}
: data(d), engineForReader(0), requestSize(d->requestSize), url(d->url), loading(false), redirectCount(0)
{
if (finishedIndex == -1) {
- finishedIndex = QQuickPixmapReply::staticMetaObject.indexOfSignal("finished()");
- downloadProgressIndex = QQuickPixmapReply::staticMetaObject.indexOfSignal("downloadProgress(qint64,qint64)");
+ finishedIndex = QMetaMethod::fromSignal(&QQuickPixmapReply::finished).methodIndex();
+ downloadProgressIndex = QMetaMethod::fromSignal(&QQuickPixmapReply::downloadProgress).methodIndex();
}
}