Commit ed31fdd2 authored by Kai Koehne's avatar Kai Koehne
Browse files

Fix compilation against latest qt/master

Adapt to latest QtDeclarative API changes.
parent 51cc9194
......@@ -976,7 +976,7 @@ void WidgetLoader::setSource(const QUrl &source)
}
QDeclarativeContext *ctxt = new QDeclarativeContext(qmlContext(this));
ctxt->addDefaultObject(this);
ctxt->setContextObject(this);
QObject *obj = m_component->create(ctxt);
if (obj) {
QWidget *widget = qobject_cast<QWidget *>(obj);
......
#include "nodeinstancesignalspy.h"
#include "objectnodeinstance.h"
#include <QMetaProperty>
#include <QMetaObject>
#include <QtDebug>
#include "objectnodeinstance.h"
#include <QSharedPointer>
#include <private/qdeclarativemetatype_p.h>
namespace QmlDesigner {
namespace Internal {
......
......@@ -31,6 +31,7 @@
#include <QDeclarativeEngine>
#include <QDeclarativeContext>
#include <private/qdeclarativeengine_p.h>
#include <QtDebug>
#include <QUrl>
......
......@@ -57,6 +57,8 @@
#include <QSharedPointer>
#include <private/qdeclarativebinding_p.h>
#include <private/qdeclarativemetatype_p.h>
#include <private/qdeclarativevaluetype_p.h>
namespace QmlDesigner {
namespace Internal {
......@@ -406,7 +408,7 @@ void ObjectNodeInstance::setPropertyBinding(const QString &name, const QString &
binding->setTarget(metaProperty);
binding->setNotifyOnValueChanged(true);
QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::setBinding(metaProperty, binding);
delete oldBinding;
oldBinding->destroy();
binding->update();
} else {
qWarning() << "Cannot set binding for property" << name << ": property is unknown for type"
......@@ -458,7 +460,7 @@ void ObjectNodeInstance::resetProperty(QObject *object, const QString &propertyN
QDeclarativeAbstractBinding *binding = QDeclarativePropertyPrivate::binding(qmlProperty);
if (binding) {
binding->setEnabled(false, 0);
delete binding;
binding->destroy();
}
if (metaProperty.isResettable()) {
......@@ -687,7 +689,7 @@ void ObjectNodeInstance::createDynamicProperty(const QString &name, const QStrin
void ObjectNodeInstance::refreshBindings(QDeclarativeContext *context)
{
// TODO: Maybe do this via a timer to prevent update flooding
QDeclarativeContextPrivate::get(context)->refreshExpressions();
QDeclarativeContextPrivate::get(context)->data->refreshExpressions();
}
}
......
......@@ -30,6 +30,7 @@
#include "proxywidgetnodeinstance.h"
#include <QGraphicsProxyWidget>
#include <private/qdeclarativemetatype_p.h>
namespace QmlDesigner {
namespace Internal {
......
......@@ -42,6 +42,7 @@
#include <private/qdeclarativeanchors_p.h>
#include <private/qdeclarativeanchors_p_p.h>
#include <private/qdeclarativeproperty_p.h>
#include <private/qdeclarativerectangle_p.h>
#include <cmath>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment