QmlDesigner: Remove "Internal" namespace from the bundle importer

Change-Id: If082d7fe724b6db2aaad8c1a6bf56f68bbbb3baf
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
Mahmoud Badri
2024-04-29 15:29:46 +03:00
parent 7a9a30d68c
commit af6dcb6659
8 changed files with 28 additions and 37 deletions

View File

@@ -18,7 +18,7 @@
using namespace Utils;
namespace QmlDesigner::Internal {
namespace QmlDesigner {
ContentLibraryBundleImporter::ContentLibraryBundleImporter(QObject *parent)
: QObject(parent)
@@ -336,4 +336,4 @@ FilePath ContentLibraryBundleImporter::resolveBundleImportPath(const QString &bu
return bundleImportPath.resolvePath(bundleId);
}
} // namespace QmlDesigner::Internal
} // namespace QmlDesigner

View File

@@ -10,7 +10,7 @@
#include <QTimer>
#include <QVariantHash>
namespace QmlDesigner::Internal {
namespace QmlDesigner {
class ContentLibraryBundleImporter : public QObject
{
@@ -48,4 +48,4 @@ private:
QHash<TypeName, bool> m_pendingTypes; // <type, isImport>
};
} // namespace QmlDesigner::Internal
} // namespace QmlDesigner

View File

@@ -90,10 +90,10 @@ QHash<int, QByteArray> ContentLibraryEffectsModel::roleNames() const
void ContentLibraryEffectsModel::createImporter()
{
m_importer = new Internal::ContentLibraryBundleImporter();
m_importer = new ContentLibraryBundleImporter();
#ifdef QDS_USE_PROJECTSTORAGE
connect(m_importer,
&Internal::ContentLibraryBundleImporter::importFinished,
&ContentLibraryBundleImporter::importFinished,
this,
[&](const QmlDesigner::TypeName &typeName) {
m_importerRunning = false;
@@ -103,7 +103,7 @@ void ContentLibraryEffectsModel::createImporter()
});
#else
connect(m_importer,
&Internal::ContentLibraryBundleImporter::importFinished,
&ContentLibraryBundleImporter::importFinished,
this,
[&](const QmlDesigner::NodeMetaInfo &metaInfo) {
m_importerRunning = false;
@@ -113,7 +113,7 @@ void ContentLibraryEffectsModel::createImporter()
});
#endif
connect(m_importer, &Internal::ContentLibraryBundleImporter::unimportFinished, this,
connect(m_importer, &ContentLibraryBundleImporter::unimportFinished, this,
[&](const QmlDesigner::NodeMetaInfo &metaInfo) {
Q_UNUSED(metaInfo)
m_importerRunning = false;
@@ -220,7 +220,7 @@ bool ContentLibraryEffectsModel::bundleExists() const
return m_bundleExists;
}
Internal::ContentLibraryBundleImporter *ContentLibraryEffectsModel::bundleImporter() const
ContentLibraryBundleImporter *ContentLibraryEffectsModel::bundleImporter() const
{
return m_importer;
}

View File

@@ -11,14 +11,11 @@
namespace QmlDesigner {
class ContentLibraryBundleImporter;
class ContentLibraryEffect;
class ContentLibraryEffectsCategory;
class ContentLibraryWidget;
namespace Internal {
class ContentLibraryBundleImporter;
}
class ContentLibraryEffectsModel : public QAbstractListModel
{
Q_OBJECT
@@ -49,7 +46,7 @@ public:
void resetModel();
void updateIsEmpty();
Internal::ContentLibraryBundleImporter *bundleImporter() const;
ContentLibraryBundleImporter *bundleImporter() const;
Q_INVOKABLE void addInstance(QmlDesigner::ContentLibraryEffect *bundleItem);
Q_INVOKABLE void removeFromProject(QmlDesigner::ContentLibraryEffect *bundleItem);
@@ -77,7 +74,7 @@ private:
QStringList m_importerSharedFiles;
QList<ContentLibraryEffectsCategory *> m_bundleCategories;
QJsonObject m_bundleObj;
Internal::ContentLibraryBundleImporter *m_importer = nullptr;
ContentLibraryBundleImporter *m_importer = nullptr;
bool m_isEmpty = true;
bool m_bundleExists = false;

View File

@@ -209,10 +209,10 @@ void ContentLibraryMaterialsModel::downloadSharedFiles(const QDir &targetDir, co
void ContentLibraryMaterialsModel::createImporter()
{
m_importer = new Internal::ContentLibraryBundleImporter();
m_importer = new ContentLibraryBundleImporter();
#ifdef QDS_USE_PROJECTSTORAGE
connect(m_importer,
&Internal::ContentLibraryBundleImporter::importFinished,
&ContentLibraryBundleImporter::importFinished,
this,
[&](const QmlDesigner::TypeName &typeName) {
m_importerRunning = false;
@@ -222,7 +222,7 @@ void ContentLibraryMaterialsModel::createImporter()
});
#else
connect(m_importer,
&Internal::ContentLibraryBundleImporter::importFinished,
&ContentLibraryBundleImporter::importFinished,
this,
[&](const QmlDesigner::NodeMetaInfo &metaInfo) {
m_importerRunning = false;
@@ -232,7 +232,7 @@ void ContentLibraryMaterialsModel::createImporter()
});
#endif
connect(m_importer, &Internal::ContentLibraryBundleImporter::unimportFinished, this,
connect(m_importer, &ContentLibraryBundleImporter::unimportFinished, this,
[&](const QmlDesigner::NodeMetaInfo &metaInfo) {
Q_UNUSED(metaInfo)
m_importerRunning = false;
@@ -331,7 +331,7 @@ bool ContentLibraryMaterialsModel::matBundleExists() const
return m_matBundleExists;
}
Internal::ContentLibraryBundleImporter *ContentLibraryMaterialsModel::bundleImporter() const
ContentLibraryBundleImporter *ContentLibraryMaterialsModel::bundleImporter() const
{
return m_importer;
}

View File

@@ -11,14 +11,11 @@
namespace QmlDesigner {
class ContentLibraryBundleImporter;
class ContentLibraryMaterial;
class ContentLibraryMaterialsCategory;
class ContentLibraryWidget;
namespace Internal {
class ContentLibraryBundleImporter;
}
class ContentLibraryMaterialsModel : public QAbstractListModel
{
Q_OBJECT
@@ -53,7 +50,7 @@ public:
void updateIsEmpty();
void loadBundle();
Internal::ContentLibraryBundleImporter *bundleImporter() const;
ContentLibraryBundleImporter *bundleImporter() const;
Q_INVOKABLE void applyToSelected(QmlDesigner::ContentLibraryMaterial *mat, bool add = false);
Q_INVOKABLE void addToProject(QmlDesigner::ContentLibraryMaterial *mat);
@@ -87,7 +84,7 @@ private:
QString m_searchText;
QList<ContentLibraryMaterialsCategory *> m_bundleCategories;
QJsonObject m_matBundleObj;
Internal::ContentLibraryBundleImporter *m_importer = nullptr;
ContentLibraryBundleImporter *m_importer = nullptr;
bool m_isEmpty = true;
bool m_matBundleExists = false;

View File

@@ -225,10 +225,10 @@ QHash<int, QByteArray> ContentLibraryUserModel::roleNames() const
void ContentLibraryUserModel::createImporter()
{
m_importer = new Internal::ContentLibraryBundleImporter();
m_importer = new ContentLibraryBundleImporter();
#ifdef QDS_USE_PROJECTSTORAGE
connect(m_importer,
&Internal::ContentLibraryBundleImporter::importFinished,
&ContentLibraryBundleImporter::importFinished,
this,
[&](const QmlDesigner::TypeName &typeName) {
m_importerRunning = false;
@@ -238,7 +238,7 @@ void ContentLibraryUserModel::createImporter()
});
#else
connect(m_importer,
&Internal::ContentLibraryBundleImporter::importFinished,
&ContentLibraryBundleImporter::importFinished,
this,
[&](const QmlDesigner::NodeMetaInfo &metaInfo) {
m_importerRunning = false;
@@ -248,7 +248,7 @@ void ContentLibraryUserModel::createImporter()
});
#endif
connect(m_importer, &Internal::ContentLibraryBundleImporter::unimportFinished, this,
connect(m_importer, &ContentLibraryBundleImporter::unimportFinished, this,
[&](const QmlDesigner::NodeMetaInfo &metaInfo) {
Q_UNUSED(metaInfo)
m_importerRunning = false;
@@ -370,7 +370,7 @@ bool ContentLibraryUserModel::matBundleExists() const
return m_matBundleExists;
}
Internal::ContentLibraryBundleImporter *ContentLibraryUserModel::bundleImporter() const
ContentLibraryBundleImporter *ContentLibraryUserModel::bundleImporter() const
{
return m_importer;
}

View File

@@ -12,16 +12,13 @@ QT_FORWARD_DECLARE_CLASS(QUrl)
namespace QmlDesigner {
class ContentLibraryBundleImporter;
class ContentLibraryEffect;
class ContentLibraryMaterial;
class ContentLibraryTexture;
class ContentLibraryWidget;
class NodeMetaInfo;
namespace Internal {
class ContentLibraryBundleImporter;
}
class ContentLibraryUserModel : public QAbstractListModel
{
Q_OBJECT
@@ -70,7 +67,7 @@ public:
void loadMaterialBundle();
void loadTextureBundle();
Internal::ContentLibraryBundleImporter *bundleImporter() const;
ContentLibraryBundleImporter *bundleImporter() const;
Q_INVOKABLE void applyToSelected(QmlDesigner::ContentLibraryMaterial *mat, bool add = false);
Q_INVOKABLE void addToProject(QmlDesigner::ContentLibraryMaterial *mat);
@@ -114,7 +111,7 @@ private:
QStringList m_userCategories;
QJsonObject m_bundleObj;
Internal::ContentLibraryBundleImporter *m_importer = nullptr;
ContentLibraryBundleImporter *m_importer = nullptr;
bool m_isEmpty = true;
bool m_matBundleExists = false;