forked from qt-creator/qt-creator
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:
@@ -26,6 +26,7 @@
|
||||
#include <projectexplorer/toolchain.h>
|
||||
|
||||
#include <qtsupport/qtkitaspect.h>
|
||||
#include <qtsupport/qtsupportconstants.h>
|
||||
#include <qtsupport/qtversionmanager.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
@@ -115,15 +116,15 @@ public:
|
||||
k->makeSticky();
|
||||
if (mcuTarget->toolChainPackage()->isDesktopToolchain())
|
||||
k->setDeviceTypeForIcon(DEVICE_TYPE);
|
||||
k->setValue(QtSupport::SuppliesQtQuickImportPath::id(), true);
|
||||
k->setValue(QtSupport::Constants::FLAGS_SUPPLIES_QTQUICK_IMPORT_PATH, true);
|
||||
// FIXME: This is treated as a pathlist in CMakeBuildSystem::updateQmlJSCodeModel
|
||||
k->setValue(QtSupport::KitQmlImportPath::id(), (sdkPath / "include/qul").toString());
|
||||
k->setValue(QtSupport::KitHasMergedHeaderPathsWithQmlImportPaths::id(), true);
|
||||
k->setValue(QtSupport::Constants::KIT_QML_IMPORT_PATH, (sdkPath / "include/qul").toString());
|
||||
k->setValue(QtSupport::Constants::KIT_HAS_MERGED_HEADER_PATHS_WITH_QML_IMPORT_PATHS, true);
|
||||
QSet<Id> irrelevant = {
|
||||
SysRootKitAspect::id(),
|
||||
QtSupport::SuppliesQtQuickImportPath::id(),
|
||||
QtSupport::KitQmlImportPath::id(),
|
||||
QtSupport::KitHasMergedHeaderPathsWithQmlImportPaths::id(),
|
||||
QtSupport::Constants::FLAGS_SUPPLIES_QTQUICK_IMPORT_PATH,
|
||||
QtSupport::Constants::KIT_QML_IMPORT_PATH,
|
||||
QtSupport::Constants::KIT_HAS_MERGED_HEADER_PATHS_WITH_QML_IMPORT_PATHS,
|
||||
};
|
||||
if (!McuSupportOptions::kitsNeedQtVersion())
|
||||
irrelevant.insert(QtSupport::QtKitAspect::id());
|
||||
@@ -668,7 +669,7 @@ void fixExistingKits(const SettingsHandler::Ptr &settingsHandler)
|
||||
// Check if the MCU kits are flagged as supplying a QtQuick import path, in order
|
||||
// to tell the QMLJS code-model that it won't need to add a fall-back import
|
||||
// path.
|
||||
const auto bringsQtQuickImportPath = QtSupport::SuppliesQtQuickImportPath::id();
|
||||
const Id bringsQtQuickImportPath = QtSupport::Constants::FLAGS_SUPPLIES_QTQUICK_IMPORT_PATH;
|
||||
auto irrelevantAspects = kit->irrelevantAspects();
|
||||
if (!irrelevantAspects.contains(bringsQtQuickImportPath)) {
|
||||
irrelevantAspects.insert(bringsQtQuickImportPath);
|
||||
@@ -679,7 +680,7 @@ void fixExistingKits(const SettingsHandler::Ptr &settingsHandler)
|
||||
}
|
||||
|
||||
// Check if the MCU kit supplies its import path.
|
||||
const auto kitQmlImportPath = QtSupport::KitQmlImportPath::id();
|
||||
const Id kitQmlImportPath = QtSupport::Constants::KIT_QML_IMPORT_PATH;
|
||||
if (!irrelevantAspects.contains(kitQmlImportPath)) {
|
||||
irrelevantAspects.insert(kitQmlImportPath);
|
||||
kit->setIrrelevantAspects(irrelevantAspects);
|
||||
@@ -698,7 +699,7 @@ void fixExistingKits(const SettingsHandler::Ptr &settingsHandler)
|
||||
}
|
||||
|
||||
// Check if the MCU kit has the flag for merged header/qml-import paths set.
|
||||
const auto mergedPaths = QtSupport::KitHasMergedHeaderPathsWithQmlImportPaths::id();
|
||||
const Id mergedPaths = QtSupport::Constants::KIT_HAS_MERGED_HEADER_PATHS_WITH_QML_IMPORT_PATHS;
|
||||
if (!irrelevantAspects.contains(mergedPaths)) {
|
||||
irrelevantAspects.insert(mergedPaths);
|
||||
kit->setIrrelevantAspects(irrelevantAspects);
|
||||
|
||||
Reference in New Issue
Block a user