diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp index bba8439533e..71aa36d34f4 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp @@ -82,8 +82,7 @@ PropertyEditorView::PropertyEditorView(AsynchronousImageCache &imageCache, , m_propertyComponentGenerator{QmlDesigner::PropertyEditorQmlBackend::propertyEditorResourcesPath(), model()} , m_locked(false) - , m_setupCompleted(false) - , m_singleShotTimer(new QTimer(this)) + { m_qmlDir = PropertyEditorQmlBackend::propertyEditorResourcesPath(); @@ -109,32 +108,6 @@ PropertyEditorView::~PropertyEditorView() qDeleteAll(m_qmlBackendHash); } -void PropertyEditorView::setupPane([[maybe_unused]] const TypeName &typeName) -{ -#ifndef QDS_USE_PROJECTSTORAGE - NodeMetaInfo metaInfo = model()->metaInfo(typeName); - - QUrl qmlFile = PropertyEditorQmlBackend::getQmlFileUrl("Qt/ItemPane", metaInfo); - QUrl qmlSpecificsFile; - - qmlSpecificsFile = PropertyEditorQmlBackend::getQmlFileUrl(typeName + "Specifics", metaInfo); - - PropertyEditorQmlBackend *qmlBackend = m_qmlBackendHash.value(qmlFile.toString()); - - if (!qmlBackend) { - qmlBackend = new PropertyEditorQmlBackend(this, m_imageCache); - - qmlBackend->initialSetup(typeName, qmlSpecificsFile, this); - qmlBackend->setSource(qmlFile); - - m_stackedWidget->addWidget(qmlBackend->widget()); - m_qmlBackendHash.insert(qmlFile.toString(), qmlBackend); - } else { - qmlBackend->initialSetup(typeName, qmlSpecificsFile, this); - } -#endif // QDS_USE_PROJECTSTORAGE -} - void PropertyEditorView::changeValue(const QString &name) { PropertyName propertyName = name.toUtf8(); @@ -441,30 +414,6 @@ void PropertyEditorView::updateSize() frame->resize(m_stackedWidget->size()); } -void PropertyEditorView::setupPanes() -{ - if (isAttached()) { - QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); - setupPane("QtQuick.Item"); - resetView(); - m_setupCompleted = true; - QApplication::restoreOverrideCursor(); - } -} - -void PropertyEditorView::delayedResetView() -{ - if (m_timerId) - killTimer(m_timerId); - m_timerId = startTimer(50); -} - -void PropertyEditorView::timerEvent(QTimerEvent *timerEvent) -{ - if (m_timerId == timerEvent->timerId()) - resetView(); -} - void PropertyEditorView::resetView() { if (model() == nullptr) @@ -780,20 +729,6 @@ void PropertyEditorView::modelAttached(Model *model) if (debug) qDebug() << Q_FUNC_INFO; - m_locked = true; - - if (!m_setupCompleted) { - QTimer::singleShot(50, this, [this] { - if (isAttached()) { - PropertyEditorView::setupPanes(); - /* workaround for QTBUG-75847 */ - reloadQml(); - } - }); - } - - m_locked = false; - resetView(); } @@ -982,7 +917,7 @@ void PropertyEditorView::select() if (m_qmlBackEndForCurrentType) m_qmlBackEndForCurrentType->emitSelectionToBeChanged(); - delayedResetView(); + resetView(); auto nodes = selectedModelNodes(); @@ -1026,7 +961,7 @@ void PropertyEditorView::currentStateChanged(const ModelNode &node) Q_ASSERT(newQmlModelState.isValid()); if (debug) qDebug() << Q_FUNC_INFO << newQmlModelState.name(); - delayedResetView(); + resetView(); } void PropertyEditorView::instancePropertyChanged(const QList > &propertyList) @@ -1065,13 +1000,13 @@ void PropertyEditorView::instancePropertyChanged(const QList