QtSupport: Remove unusual access pattern to plugin constants

Change-Id: Ifc21607cd9927e99b5c49f1631d8940725a058fd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2023-08-18 14:40:01 +02:00
parent 743938b6cb
commit 8346905a51
5 changed files with 16 additions and 46 deletions

View File

@@ -36,9 +36,11 @@
#include <texteditor/textdocument.h>
#include <qmljs/qmljsmodelmanagerinterface.h>
#include <qmljstools/qmljstoolsconstants.h>
#include <qtsupport/qtcppkitinfo.h>
#include <qtsupport/qtkitaspect.h>
#include <qtsupport/qtsupportconstants.h>
#include <utils/algorithm.h>
#include <utils/checkablemessagebox.h>
@@ -1017,7 +1019,7 @@ void CMakeBuildSystem::updateProjectData()
{
const bool mergedHeaderPathsAndQmlImportPaths = kit()->value(
QtSupport::KitHasMergedHeaderPathsWithQmlImportPaths::id(), false).toBool();
QtSupport::Constants::KIT_HAS_MERGED_HEADER_PATHS_WITH_QML_IMPORT_PATHS, false).toBool();
QStringList extraHeaderPaths;
QList<QByteArray> moduleMappings;
for (const RawProjectPart &rpp : std::as_const(rpps)) {
@@ -1575,7 +1577,7 @@ void CMakeBuildSystem::updateQmlJSCodeModel(const QStringList &extraHeaderPaths,
const CMakeConfig &cm = configurationFromCMake();
addImports(cm.stringValueOf("QML_IMPORT_PATH"));
addImports(kit()->value(QtSupport::KitQmlImportPath::id()).toString());
addImports(kit()->value(QtSupport::Constants::KIT_QML_IMPORT_PATH).toString());
for (const QString &extraHeaderPath : extraHeaderPaths)
projectInfo.importPaths.maybeInsert(FilePath::fromString(extraHeaderPath),