From bf2ece2d158cc471c90891b1661802837e5f21eb Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Tue, 22 Mar 2022 18:02:48 +0100 Subject: QmlDesigner: Remove globalBaseUrl It is not used anymore. Change-Id: I1d436888b5a93a187065cd8276b55a233a0f374c Reviewed-by: Reviewed-by: Qt CI Bot Reviewed-by: Mahmoud Badri --- .../components/propertyeditor/propertyeditorcontextobject.cpp | 9 --------- .../components/propertyeditor/propertyeditorcontextobject.h | 5 ----- .../components/propertyeditor/propertyeditorqmlbackend.cpp | 2 -- .../qmldesigner/components/propertyeditor/propertyeditorview.cpp | 2 -- 4 files changed, 18 deletions(-) diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp index b569ce37ba..3a9a138b2a 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp @@ -416,15 +416,6 @@ QQmlComponent *PropertyEditorContextObject::specificQmlComponent() return m_qmlComponent; } -void PropertyEditorContextObject::setGlobalBaseUrl(const QUrl &newBaseUrl) -{ - if (newBaseUrl == m_globalBaseUrl) - return; - - m_globalBaseUrl = newBaseUrl; - emit globalBaseUrlChanged(); -} - void PropertyEditorContextObject::setSpecificsUrl(const QUrl &newSpecificsUrl) { if (newSpecificsUrl == m_specificsUrl) diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.h b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.h index 262e9191cc..6a3e410c8a 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.h +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.h @@ -42,7 +42,6 @@ class PropertyEditorContextObject : public QObject { Q_OBJECT - Q_PROPERTY(QUrl globalBaseUrl READ globalBaseUrl WRITE setGlobalBaseUrl NOTIFY globalBaseUrlChanged) Q_PROPERTY(QUrl specificsUrl READ specificsUrl WRITE setSpecificsUrl NOTIFY specificsUrlChanged) Q_PROPERTY(QString specificQmlData READ specificQmlData WRITE setSpecificQmlData NOTIFY specificQmlDataChanged) @@ -68,7 +67,6 @@ class PropertyEditorContextObject : public QObject public: PropertyEditorContextObject(QObject *parent = nullptr); - QUrl globalBaseUrl() const {return m_globalBaseUrl; } QUrl specificsUrl() const {return m_specificsUrl; } QString specificQmlData() const {return m_specificQmlData; } QString stateName() const {return m_stateName; } @@ -122,7 +120,6 @@ public: bool hasAliasExport() const { return m_aliasExport; } signals: - void globalBaseUrlChanged(); void specificsUrlChanged(); void specificQmlDataChanged(); void stateNameChanged(); @@ -139,7 +136,6 @@ signals: void hasActiveTimelineChanged(); public slots: - void setGlobalBaseUrl(const QUrl &newBaseUrl); void setSpecificsUrl(const QUrl &newSpecificsUrl); @@ -161,7 +157,6 @@ public slots: void setHasAliasExport(bool hasAliasExport); private: - QUrl m_globalBaseUrl; QUrl m_specificsUrl; QString m_specificQmlData; diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp index 5d6e16670e..135bbca9df 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp @@ -549,8 +549,6 @@ void PropertyEditorQmlBackend::initialSetup(const TypeName &typeName, const QUrl contextObject()->setIsBaseState(true); contextObject()->setSpecificQmlData(QStringLiteral("")); - - contextObject()->setGlobalBaseUrl(QUrl()); } QString PropertyEditorQmlBackend::propertyEditorResourcesPath() diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp index 75681f6468..fb1baed3f3 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp @@ -498,7 +498,6 @@ void PropertyEditorView::setupQmlBackend() if (specificQmlData.isEmpty()) currentQmlBackend->contextObject()->setSpecificQmlData(specificQmlData); - currentQmlBackend->contextObject()->setGlobalBaseUrl(qmlFile); currentQmlBackend->contextObject()->setSpecificQmlData(specificQmlData); currentQmlBackend->setSource(qmlFile); } else { @@ -511,7 +510,6 @@ void PropertyEditorView::setupQmlBackend() if (specificQmlData.isEmpty()) currentQmlBackend->contextObject()->setSpecificQmlData(specificQmlData); currentQmlBackend->setup(*qmlObjectNode, currentStateName, qmlSpecificsFile, this); - currentQmlBackend->contextObject()->setGlobalBaseUrl(qmlFile); currentQmlBackend->contextObject()->setSpecificQmlData(specificQmlData); } -- cgit v1.2.3