From cc8d0fad83b43508d8933feba817b81afbe565b2 Mon Sep 17 00:00:00 2001 From: Konrad Rosenbaum Date: Mon, 14 Oct 2013 14:14:40 +0200 Subject: [PATCH] first attempt at porting --- lib/abstractdeclarativeobject.cpp | 4 ++-- lib/abstractdeclarativeobject_p.h | 6 ++++-- lib/declarativecolordialog_p.h | 2 +- lib/declarativedeclarativecontext.cpp | 4 +++- lib/declarativeobjectextension.h | 4 +++- lib/declarativeobjectproxy_p.h | 4 ++-- lib/lib.pro | 3 ++- lib/objectadaptors_p.h | 6 ++++-- lib/qmetaobjectbuilder_p.h | 3 ++- 9 files changed, 23 insertions(+), 13 deletions(-) diff --git a/lib/abstractdeclarativeobject.cpp b/lib/abstractdeclarativeobject.cpp index f9b608a..ecb281d 100644 --- a/lib/abstractdeclarativeobject.cpp +++ b/lib/abstractdeclarativeobject.cpp @@ -62,10 +62,10 @@ void AbstractDeclarativeObject::connectAllSignals(const QObject *sender, const Q for (int i = 0; i < sender->metaObject()->methodCount(); ++i) { const QMetaMethod method = sender->metaObject()->method(i); if (method.methodType() == QMetaMethod::Signal) { - if (blacklist.contains(method.signature())) + if (blacklist.contains(method.methodSignature())) continue; - const QByteArray signature = "2" + QByteArray(method.signature()); + const QByteArray signature = "2" + QByteArray(method.methodSignature()); QObject::connect(sender, signature.data(), receiver, signature.data()); } } diff --git a/lib/abstractdeclarativeobject_p.h b/lib/abstractdeclarativeobject_p.h index 901c3a8..58062cb 100644 --- a/lib/abstractdeclarativeobject_p.h +++ b/lib/abstractdeclarativeobject_p.h @@ -21,15 +21,17 @@ #ifndef ABSTRACTDECLARATIVEOBJECT_P_H #define ABSTRACTDECLARATIVEOBJECT_P_H -#include +#include #include #include +#define QDeclarativeListProperty QQmlListProperty + class AbstractDeclarativeObject : public QObject { Q_OBJECT - Q_PROPERTY(QDeclarativeListProperty data READ data DESIGNABLE false) + Q_PROPERTY(QQmlListProperty data READ data DESIGNABLE false) Q_CLASSINFO("DefaultProperty", "data") diff --git a/lib/declarativecolordialog_p.h b/lib/declarativecolordialog_p.h index 03ccd5d..b38c96e 100644 --- a/lib/declarativecolordialog_p.h +++ b/lib/declarativecolordialog_p.h @@ -23,7 +23,7 @@ #include "staticdialogmethodattached_p.h" -#include +#include #include class DeclarativeColorDialogAttached : public StaticDialogMethodAttached diff --git a/lib/declarativedeclarativecontext.cpp b/lib/declarativedeclarativecontext.cpp index 279b9cd..eeb257f 100644 --- a/lib/declarativedeclarativecontext.cpp +++ b/lib/declarativedeclarativecontext.cpp @@ -20,7 +20,9 @@ #include "declarativedeclarativecontext_p.h" -#include +#include + +#define QDeclarativeView QQuickView DeclarativeDeclarativeContext::DeclarativeDeclarativeContext(QObject *parent) : DeclarativeObjectProxy(parent) diff --git a/lib/declarativeobjectextension.h b/lib/declarativeobjectextension.h index 4d6828b..4ff84d4 100644 --- a/lib/declarativeobjectextension.h +++ b/lib/declarativeobjectextension.h @@ -21,9 +21,11 @@ #ifndef DECLARATIVEOBJECTEXTENSION_H #define DECLARATIVEOBJECTEXTENSION_H -#include +#include #include +#define QDeclarativeListProperty QQmlListProperty + class ObjectContainerInterface; class DeclarativeObjectExtension : public QObject diff --git a/lib/declarativeobjectproxy_p.h b/lib/declarativeobjectproxy_p.h index da9fd2c..2acabda 100644 --- a/lib/declarativeobjectproxy_p.h +++ b/lib/declarativeobjectproxy_p.h @@ -23,8 +23,8 @@ #include "abstractdeclarativeobject_p.h" -#include -#include +#include +#include #include #include diff --git a/lib/lib.pro b/lib/lib.pro index b3d5737..6a68968 100644 --- a/lib/lib.pro +++ b/lib/lib.pro @@ -2,7 +2,8 @@ TEMPLATE = lib TARGET = declarativewidgets -QT += declarative webkit +#QT += declarative webkit +QT += qml quick widgets HEADERS = \ abstractdeclarativeobject_p.h \ diff --git a/lib/objectadaptors_p.h b/lib/objectadaptors_p.h index afec3db..4ea83ec 100644 --- a/lib/objectadaptors_p.h +++ b/lib/objectadaptors_p.h @@ -21,18 +21,20 @@ #ifndef OBJECTADAPTORS_P_H #define OBJECTADAPTORS_P_H -#include +#include #include #include #include +#define QDeclarativeContext QQmlContext + class DeclarativeContext : public QObject { Q_OBJECT Q_PROPERTY(QUrl baseUrl READ baseUrl WRITE setBaseUrl NOTIFY baseUrlChanged) public: - explicit DeclarativeContext(QDeclarativeEngine *engine, QObject *parent = 0); + explicit DeclarativeContext(QQmlEngine *engine, QObject *parent = 0); explicit DeclarativeContext(DeclarativeContext *parentContext, QObject *parent = 0); ~DeclarativeContext(); diff --git a/lib/qmetaobjectbuilder_p.h b/lib/qmetaobjectbuilder_p.h index 1ab2bb8..ba9e3f8 100644 --- a/lib/qmetaobjectbuilder_p.h +++ b/lib/qmetaobjectbuilder_p.h @@ -167,7 +167,8 @@ public: int indexOfEnumerator(const QByteArray& name); int indexOfClassInfo(const QByteArray& name); - typedef QMetaObjectExtraData::StaticMetacallFunction StaticMetacallFunction; +// typedef QMetaObject::StaticMetacallFunction StaticMetacallFunction; + typedef void (*StaticMetacallFunction)(QObject *, QMetaObject::Call, int, void **); QMetaObjectBuilder::StaticMetacallFunction staticMetacallFunction() const; void setStaticMetacallFunction(QMetaObjectBuilder::StaticMetacallFunction value); -- 1.7.2.5