Utils/all: Move mime constants into a central place

They are reasonably standardized, and generally usable cross-plugin,
so this can help to avoid a few cross-plugin compiletime dependencies.

Change-Id: Icb2b010c3e12dee69df54ab16f6f8e90d9cffba6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2023-10-19 17:17:37 +02:00
parent fc7c11fb65
commit 6685f0255d
68 changed files with 396 additions and 355 deletions

View File

@@ -40,6 +40,7 @@
#include <utils/fileutils.h>
#include <utils/fsengine/fileiconprovider.h>
#include <utils/mimeconstants.h>
#include <utils/process.h>
#include <utils/qtcsettings.h>
@@ -252,7 +253,7 @@ void QmlProjectPlugin::initialize()
d->landingPageWidget = new QdsLandingPageWidget();
const QStringList mimeTypes = {QmlJSTools::Constants::QMLUI_MIMETYPE};
const QStringList mimeTypes = {Utils::Constants::QMLUI_MIMETYPE};
auto context = new Internal::DesignModeContext(d->landingPageWidget);
Core::ICore::addContextObject(context);
@@ -262,7 +263,7 @@ void QmlProjectPlugin::initialize()
this, &QmlProjectPlugin::editorModeChanged);
}
ProjectManager::registerProjectType<QmlProject>(QmlJSTools::Constants::QMLPROJECT_MIMETYPE);
ProjectManager::registerProjectType<QmlProject>(Utils::Constants::QMLPROJECT_MIMETYPE);
Utils::FileIconProvider::registerIconOverlayForSuffix(":/qmlproject/images/qmlproject.png",
"qmlproject");