diff --git a/src/plugins/qmldesigner/CMakeLists.txt b/src/plugins/qmldesigner/CMakeLists.txt index 8236553abce..81d0c473c4a 100644 --- a/src/plugins/qmldesigner/CMakeLists.txt +++ b/src/plugins/qmldesigner/CMakeLists.txt @@ -420,7 +420,7 @@ extend_qtc_plugin(QmlDesigner filestatuscache.cpp filestatuscache.h nonlockingmutex.h projectstorageinterface.h - projectstorage.h + projectstorage.cpp projectstorage.h projectstoragepathwatcher.h projectstoragepathwatcherinterface.h projectstoragepathwatchernotifierinterface.h diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.cpp b/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.cpp new file mode 100644 index 00000000000..fe9e228d26c --- /dev/null +++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.cpp @@ -0,0 +1,30 @@ +/**************************************************************************** +** +** Copyright (C) 2022 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +#include "projectstorage.h" + +#include + +template class QmlDesigner::ProjectStorage; diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h b/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h index d35af311469..18e75be71ff 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h +++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h @@ -31,6 +31,7 @@ #include "storagecache.h" #include +#include #include #include @@ -828,29 +829,6 @@ private: &typeId); } - void prepareLinkingOfAliasPropertiesDeclarationsWithAliasId( - PropertyDeclarationId aliasId, AliasPropertyDeclarations &relinkableAliasPropertyDeclarations) - { - auto callback = [&](long long propertyDeclarationId, - long long propertyImportedTypeNameId, - long long aliasPropertyDeclarationId) { - auto aliasPropertyName = selectPropertyNameStatement.template value( - aliasPropertyDeclarationId); - - relinkableAliasPropertyDeclarations - .emplace_back(PropertyDeclarationId{propertyDeclarationId}, - ImportedTypeNameId{propertyImportedTypeNameId}, - std::move(aliasPropertyName)); - - updateAliasPropertyDeclarationToNullStatement.write(propertyDeclarationId); - - return Sqlite::CallbackControl::Continue; - }; - - selectAliasPropertiesDeclarationForPropertiesWithAliasIdStatement.readCallback(callback, - &aliasId); - } - void handlePropertyDeclarationWithPropertyType(TypeId typeId, PropertyDeclarations &relinkablePropertyDeclarations) { @@ -2870,5 +2848,5 @@ public: "FROM imports", database}; }; - +extern template class ProjectStorage; } // namespace QmlDesigner diff --git a/src/plugins/qmldesigner/qmldesignerplugin.qbs b/src/plugins/qmldesigner/qmldesignerplugin.qbs index 63bf488894c..6c3205ced8c 100644 --- a/src/plugins/qmldesigner/qmldesignerplugin.qbs +++ b/src/plugins/qmldesigner/qmldesignerplugin.qbs @@ -466,6 +466,7 @@ Project { "filesystem.h", "filesysteminterface.h", "nonlockingmutex.h", + "projectstorage.cpp", "projectstorage.h", "projectstorageinterface.h", "projectstoragepathwatcher.h", diff --git a/tests/unit/unittest/CMakeLists.txt b/tests/unit/unittest/CMakeLists.txt index 41f3764e30a..dba3c3678fd 100644 --- a/tests/unit/unittest/CMakeLists.txt +++ b/tests/unit/unittest/CMakeLists.txt @@ -250,7 +250,7 @@ extend_qtc_test(unittest projectstorage/filestatuscache.cpp projectstorage/filestatuscache.h projectstorage/nonlockingmutex.h projectstorage/projectstorageinterface.h - projectstorage/projectstorage.h + projectstorage/projectstorage.cpp projectstorage/projectstorage.h projectstorage/projectstoragepathwatcher.h projectstorage/projectstoragepathwatcherinterface.h projectstorage/projectstoragepathwatchernotifierinterface.h