Commit 00eccf6b authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.PropertyEditorView: moving QML types registration

Moving the registration of QML types from PropertyEditorView
to QuickPropertyEditorView.

The view itself should not handle QML implementation details anymore.

Change-Id: Ia66db999e2f7a4b8cbe1111c4176257344d78ea8
Reviewed-by: default avatarMarco Bubke <marco.bubke@digia.com>
parent 7a5cce92
......@@ -43,17 +43,7 @@
#include <rewriterview.h>
#include "propertyeditorvalue.h"
#include "basiclayouts.h"
#include "basicwidgets.h"
#include "resetwidget.h"
#include "qlayoutobject.h"
#include <qmleditorwidgets/colorwidgets.h>
#include "gradientlineqmladaptor.h"
#include "behaviordialog.h"
#include "fontwidget.h"
#include "siblingcombobox.h"
#include "propertyeditortransaction.h"
#include "originwidget.h"
#include <utils/fileutils.h>
......@@ -96,22 +86,7 @@ PropertyEditorView::PropertyEditorView(QWidget *parent) :
m_stackedWidget->insertWidget(0, new QWidget(m_stackedWidget));
static bool declarativeTypesRegistered = false;
if (!declarativeTypesRegistered) {
declarativeTypesRegistered = true;
BasicWidgets::registerDeclarativeTypes();
BasicLayouts::registerDeclarativeTypes();
ResetWidget::registerDeclarativeType();
QLayoutObject::registerDeclarativeType();
QmlEditorWidgets::ColorWidgets::registerDeclarativeTypes();
BehaviorDialog::registerDeclarativeType();
PropertyEditorValue::registerDeclarativeTypes();
FontWidget::registerDeclarativeTypes();
SiblingComboBox::registerDeclarativeTypes();
OriginWidget::registerDeclarativeType();
GradientLineQmlAdaptor::registerDeclarativeType();
}
QuickPropertyEditorView::registerQmlTypes();
setQmlDir(PropertyEditorQmlBackend::propertyEditorResourcesPath());
m_stackedWidget->setWindowTitle(tr("Properties"));
}
......
......@@ -29,6 +29,17 @@
#include "quickpropertyeditorview.h"
#include "basiclayouts.h"
#include "basicwidgets.h"
#include "resetwidget.h"
#include "qlayoutobject.h"
#include <qmleditorwidgets/colorwidgets.h>
#include "gradientlineqmladaptor.h"
#include "behaviordialog.h"
#include "fontwidget.h"
#include "siblingcombobox.h"
#include "originwidget.h"
#include <QDeclarativeItem>
#include <QDeclarativeEngine>
#include <QDeclarativeContext>
......@@ -141,4 +152,24 @@ void QuickPropertyEditorView::setRootWidget(QWidget *widget)
}
}
void QuickPropertyEditorView::registerQmlTypes()
{
static bool declarativeTypesRegistered = false;
if (!declarativeTypesRegistered) {
declarativeTypesRegistered = true;
BasicWidgets::registerDeclarativeTypes();
BasicLayouts::registerDeclarativeTypes();
ResetWidget::registerDeclarativeType();
QLayoutObject::registerDeclarativeType();
QmlEditorWidgets::ColorWidgets::registerDeclarativeTypes();
BehaviorDialog::registerDeclarativeType();
PropertyEditorValue::registerDeclarativeTypes();
FontWidget::registerDeclarativeTypes();
SiblingComboBox::registerDeclarativeTypes();
OriginWidget::registerDeclarativeType();
GradientLineQmlAdaptor::registerDeclarativeType();
}
}
} //QmlDesigner
......@@ -62,6 +62,8 @@ public:
enum Status { Null, Ready, Loading, Error };
Status status() const;
static void registerQmlTypes();
signals:
void statusChanged(QuickPropertyEditorView::Status);
......
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