forked from qt-creator/qt-creator
Rename QtSupport::BaseQtVersion to QtVersion
... and the Utils::QtVersion enum to Utils::QtMajorVersion to avoid conflicts. Change-Id: Ib688c67388272b7204a91444155f60b8c18a56bd Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -91,7 +91,7 @@ enum class WarningFlags {
|
||||
|
||||
Q_DECLARE_FLAGS(LanguageExtensions, LanguageExtension)
|
||||
|
||||
enum class QtVersion { Unknown = -1, None, Qt4, Qt5, Qt6 };
|
||||
enum class QtMajorVersion { Unknown = -1, None, Qt4, Qt5, Qt6 };
|
||||
|
||||
} // namespace Utils
|
||||
|
||||
|
@@ -177,7 +177,7 @@ AndroidBuildApkWidget::AndroidBuildApkWidget(AndroidBuildApkStep *step)
|
||||
|
||||
QWidget *AndroidBuildApkWidget::createApplicationGroup()
|
||||
{
|
||||
QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(m_step->target()->kit());
|
||||
QtSupport::QtVersion *qt = QtSupport::QtKitAspect::qtVersion(m_step->target()->kit());
|
||||
const int minApiSupported = AndroidManager::defaultMinimumSDK(qt);
|
||||
QStringList targets = AndroidConfig::apiLevelNamesFor(AndroidConfigurations::sdkManager()->
|
||||
filteredSdkPlatforms(minApiSupported));
|
||||
@@ -322,7 +322,7 @@ QWidget *AndroidBuildApkWidget::createAdvancedGroup()
|
||||
verboseOutputCheckBox->setChecked(m_step->verboseOutput());
|
||||
|
||||
auto vbox = new QVBoxLayout(group);
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(m_step->kit());
|
||||
QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(m_step->kit());
|
||||
if (version && version->qtVersion() >= QtSupport::QtVersionNumber{5, 14}) {
|
||||
auto buildAAB = new QCheckBox(tr("Build Android App Bundle (*.aab)"), group);
|
||||
buildAAB->setChecked(m_step->buildAAB());
|
||||
@@ -526,7 +526,7 @@ bool AndroidBuildApkStep::init()
|
||||
reportWarningOrError(tr("Warning: Signing a debug or profile package."), Task::Warning);
|
||||
}
|
||||
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(kit());
|
||||
QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(kit());
|
||||
if (!version) {
|
||||
reportWarningOrError(tr("The Qt version for kit %1 is invalid.").arg(kit()->displayName()),
|
||||
Task::Error);
|
||||
@@ -751,7 +751,7 @@ void AndroidBuildApkStep::doRun()
|
||||
const auto androidAbis = AndroidManager::applicationAbis(target());
|
||||
const QString buildKey = target()->activeBuildKey();
|
||||
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(kit());
|
||||
QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(kit());
|
||||
if (!version) {
|
||||
reportWarningOrError(tr("The Qt version for kit %1 is invalid.")
|
||||
.arg(kit()->displayName()), Task::Error);
|
||||
|
@@ -368,7 +368,7 @@ void AndroidConfig::parseDependenciesJson()
|
||||
}
|
||||
}
|
||||
|
||||
QVector<int> AndroidConfig::availableNdkPlatforms(const BaseQtVersion *qtVersion) const
|
||||
QVector<int> AndroidConfig::availableNdkPlatforms(const QtVersion *qtVersion) const
|
||||
{
|
||||
QVector<int> availableNdkPlatforms;
|
||||
|
||||
@@ -548,7 +548,7 @@ FilePath AndroidConfig::toolchainPathFromNdk(const FilePath &ndkLocation) const
|
||||
return {};
|
||||
}
|
||||
|
||||
FilePath AndroidConfig::toolchainPath(const BaseQtVersion *qtVersion) const
|
||||
FilePath AndroidConfig::toolchainPath(const QtVersion *qtVersion) const
|
||||
{
|
||||
return toolchainPathFromNdk(ndkLocation(qtVersion));
|
||||
}
|
||||
@@ -561,7 +561,7 @@ FilePath AndroidConfig::clangPathFromNdk(const FilePath &ndkLocation) const
|
||||
return path.pathAppended("bin/clang").withExecutableSuffix();
|
||||
}
|
||||
|
||||
FilePath AndroidConfig::gdbPath(const Abi &abi, const BaseQtVersion *qtVersion) const
|
||||
FilePath AndroidConfig::gdbPath(const Abi &abi, const QtVersion *qtVersion) const
|
||||
{
|
||||
return gdbPathFromNdk(abi, ndkLocation(qtVersion));
|
||||
}
|
||||
@@ -887,7 +887,7 @@ bool AndroidConfig::isValidNdk(const QString &ndkLocation) const
|
||||
return true;
|
||||
}
|
||||
|
||||
QString AndroidConfig::bestNdkPlatformMatch(int target, const BaseQtVersion *qtVersion) const
|
||||
QString AndroidConfig::bestNdkPlatformMatch(int target, const QtVersion *qtVersion) const
|
||||
{
|
||||
target = std::max(AndroidManager::defaultMinimumSDK(qtVersion), target);
|
||||
foreach (int apiLevel, availableNdkPlatforms(qtVersion)) {
|
||||
@@ -944,14 +944,14 @@ void AndroidConfig::setSdkManagerToolArgs(const QStringList &args)
|
||||
m_sdkManagerToolArgs = args;
|
||||
}
|
||||
|
||||
FilePath AndroidConfig::ndkLocation(const BaseQtVersion *qtVersion) const
|
||||
FilePath AndroidConfig::ndkLocation(const QtVersion *qtVersion) const
|
||||
{
|
||||
if (!m_defaultNdk.isEmpty())
|
||||
return m_defaultNdk; // A selected default NDK is good for any Qt version
|
||||
return sdkLocation().pathAppended(ndkPathFromQtVersion(*qtVersion));
|
||||
}
|
||||
|
||||
QVersionNumber AndroidConfig::ndkVersion(const BaseQtVersion *qtVersion) const
|
||||
QVersionNumber AndroidConfig::ndkVersion(const QtVersion *qtVersion) const
|
||||
{
|
||||
return ndkVersion(ndkLocation(qtVersion));
|
||||
}
|
||||
@@ -1003,13 +1003,13 @@ QVersionNumber AndroidConfig::ndkVersion(const FilePath &ndkPath) const
|
||||
|
||||
QStringList AndroidConfig::allEssentials() const
|
||||
{
|
||||
QList<BaseQtVersion *> installedVersions = QtVersionManager::versions(
|
||||
[](const BaseQtVersion *v) {
|
||||
QList<QtVersion *> installedVersions = QtVersionManager::versions(
|
||||
[](const QtVersion *v) {
|
||||
return v->targetDeviceTypes().contains(Android::Constants::ANDROID_DEVICE_TYPE);
|
||||
});
|
||||
|
||||
QStringList allPackages(defaultEssentials());
|
||||
for (const BaseQtVersion *version : installedVersions)
|
||||
for (const QtVersion *version : installedVersions)
|
||||
allPackages.append(essentialsFromQtVersion(*version));
|
||||
allPackages.removeDuplicates();
|
||||
|
||||
@@ -1040,7 +1040,7 @@ bool AndroidConfig::sdkToolsOk() const
|
||||
return exists && writable && sdkToolsExist;
|
||||
}
|
||||
|
||||
QStringList AndroidConfig::essentialsFromQtVersion(const BaseQtVersion &version) const
|
||||
QStringList AndroidConfig::essentialsFromQtVersion(const QtVersion &version) const
|
||||
{
|
||||
QtVersionNumber qtVersion = version.qtVersion();
|
||||
for (const SdkForQtVersions &item : m_specificQtVersions)
|
||||
@@ -1050,7 +1050,7 @@ QStringList AndroidConfig::essentialsFromQtVersion(const BaseQtVersion &version)
|
||||
return m_defaultSdkDepends.essentialPackages;
|
||||
}
|
||||
|
||||
QString AndroidConfig::ndkPathFromQtVersion(const BaseQtVersion &version) const
|
||||
QString AndroidConfig::ndkPathFromQtVersion(const QtVersion &version) const
|
||||
{
|
||||
QtVersionNumber qtVersion(version.qtVersionString());
|
||||
for (const SdkForQtVersions &item : m_specificQtVersions)
|
||||
@@ -1081,7 +1081,7 @@ void AndroidConfig::setOpenJDKLocation(const FilePath &openJDKLocation)
|
||||
m_openJDKLocation = openJDKLocation;
|
||||
}
|
||||
|
||||
QString AndroidConfig::toolchainHost(const BaseQtVersion *qtVersion) const
|
||||
QString AndroidConfig::toolchainHost(const QtVersion *qtVersion) const
|
||||
{
|
||||
return toolchainHostFromNdk(ndkLocation(qtVersion));
|
||||
}
|
||||
@@ -1215,12 +1215,12 @@ void AndroidConfigurations::removeOldToolChains()
|
||||
|
||||
void AndroidConfigurations::removeUnusedDebuggers()
|
||||
{
|
||||
const QList<BaseQtVersion*> qtVersions = QtVersionManager::versions([](const BaseQtVersion *v) {
|
||||
const QList<QtVersion*> qtVersions = QtVersionManager::versions([](const QtVersion *v) {
|
||||
return v->type() == Constants::ANDROID_QT_TYPE;
|
||||
});
|
||||
|
||||
QVector<FilePath> uniqueNdks;
|
||||
for (const BaseQtVersion *qt : qtVersions) {
|
||||
for (const QtVersion *qt : qtVersions) {
|
||||
FilePath ndkLocation = currentConfig().ndkLocation(qt);
|
||||
if (!uniqueNdks.contains(ndkLocation))
|
||||
uniqueNdks.append(ndkLocation);
|
||||
@@ -1375,7 +1375,7 @@ void AndroidConfigurations::updateAutomaticKitList()
|
||||
for (Kit *k : KitManager::kits()) {
|
||||
if (DeviceTypeKitAspect::deviceTypeId(k) == Constants::ANDROID_DEVICE_TYPE) {
|
||||
if (k->value(Constants::ANDROID_KIT_NDK).isNull() || k->value(Constants::ANDROID_KIT_SDK).isNull()) {
|
||||
if (BaseQtVersion *qt = QtKitAspect::qtVersion(k)) {
|
||||
if (QtVersion *qt = QtKitAspect::qtVersion(k)) {
|
||||
k->setValueSilently(Constants::ANDROID_KIT_NDK, currentConfig().ndkLocation(qt).toString());
|
||||
k->setValue(Constants::ANDROID_KIT_SDK, currentConfig().sdkLocation().toString());
|
||||
}
|
||||
@@ -1394,11 +1394,11 @@ void AndroidConfigurations::updateAutomaticKitList()
|
||||
|
||||
removeUnusedDebuggers();
|
||||
|
||||
QHash<Abi, QList<const BaseQtVersion *> > qtVersionsForArch;
|
||||
const QList<BaseQtVersion*> qtVersions = QtVersionManager::versions([](const BaseQtVersion *v) {
|
||||
QHash<Abi, QList<const QtVersion *> > qtVersionsForArch;
|
||||
const QList<QtVersion*> qtVersions = QtVersionManager::versions([](const QtVersion *v) {
|
||||
return v->type() == Constants::ANDROID_QT_TYPE;
|
||||
});
|
||||
for (const BaseQtVersion *qtVersion : qtVersions) {
|
||||
for (const QtVersion *qtVersion : qtVersions) {
|
||||
const Abis qtAbis = qtVersion->qtAbis();
|
||||
if (qtAbis.empty())
|
||||
continue;
|
||||
@@ -1416,7 +1416,7 @@ void AndroidConfigurations::updateAutomaticKitList()
|
||||
if (tc->language() != ProjectExplorer::Constants::CXX_LANGUAGE_ID)
|
||||
continue;
|
||||
|
||||
for (const BaseQtVersion *qt : qtVersionsForArch.value(tc->targetAbi())) {
|
||||
for (const QtVersion *qt : qtVersionsForArch.value(tc->targetAbi())) {
|
||||
FilePath tcNdk = static_cast<const AndroidToolChain *>(tc)->ndkLocation();
|
||||
if (tcNdk != currentConfig().ndkLocation(qt))
|
||||
continue;
|
||||
|
@@ -100,16 +100,16 @@ public:
|
||||
QStringList sdkManagerToolArgs() const;
|
||||
void setSdkManagerToolArgs(const QStringList &args);
|
||||
|
||||
Utils::FilePath ndkLocation(const QtSupport::BaseQtVersion *qtVersion) const;
|
||||
QVersionNumber ndkVersion(const QtSupport::BaseQtVersion *qtVersion) const;
|
||||
Utils::FilePath ndkLocation(const QtSupport::QtVersion *qtVersion) const;
|
||||
QVersionNumber ndkVersion(const QtSupport::QtVersion *qtVersion) const;
|
||||
QVersionNumber ndkVersion(const Utils::FilePath &ndkPath) const;
|
||||
|
||||
QUrl sdkToolsUrl() const { return m_sdkToolsUrl; }
|
||||
QByteArray getSdkToolsSha256() const { return m_sdkToolsSha256; }
|
||||
QString ndkPathFromQtVersion(const QtSupport::BaseQtVersion &version) const;
|
||||
QString ndkPathFromQtVersion(const QtSupport::QtVersion &version) const;
|
||||
|
||||
QStringList defaultEssentials() const;
|
||||
QStringList essentialsFromQtVersion(const QtSupport::BaseQtVersion &version) const;
|
||||
QStringList essentialsFromQtVersion(const QtSupport::QtVersion &version) const;
|
||||
QStringList allEssentials() const;
|
||||
bool allEssentialsInstalled(Internal::AndroidSdkManager *sdkManager);
|
||||
bool sdkToolsOk() const;
|
||||
@@ -119,7 +119,7 @@ public:
|
||||
|
||||
Utils::FilePath keystoreLocation() const;
|
||||
|
||||
QString toolchainHost(const QtSupport::BaseQtVersion *qtVersion) const;
|
||||
QString toolchainHost(const QtSupport::QtVersion *qtVersion) const;
|
||||
QString toolchainHostFromNdk(const Utils::FilePath &ndkPath) const;
|
||||
|
||||
QStringList emulatorArgs() const;
|
||||
@@ -134,11 +134,11 @@ public:
|
||||
Utils::FilePath sdkManagerToolPath() const;
|
||||
Utils::FilePath avdManagerToolPath() const;
|
||||
|
||||
Utils::FilePath toolchainPath(const QtSupport::BaseQtVersion *qtVersion) const;
|
||||
Utils::FilePath toolchainPath(const QtSupport::QtVersion *qtVersion) const;
|
||||
Utils::FilePath toolchainPathFromNdk(const Utils::FilePath &ndkLocation) const;
|
||||
Utils::FilePath clangPathFromNdk(const Utils::FilePath &ndkLocation) const;
|
||||
|
||||
Utils::FilePath gdbPath(const ProjectExplorer::Abi &abi, const QtSupport::BaseQtVersion *qtVersion) const;
|
||||
Utils::FilePath gdbPath(const ProjectExplorer::Abi &abi, const QtSupport::QtVersion *qtVersion) const;
|
||||
Utils::FilePath gdbPathFromNdk(const ProjectExplorer::Abi &abi, const Utils::FilePath &ndkLocation) const;
|
||||
Utils::FilePath lldbPathFromNdk(const Utils::FilePath &ndkLocation) const;
|
||||
Utils::FilePath makePathFromNdk(const Utils::FilePath &ndkLocation) const;
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
|
||||
QVector<AndroidDeviceInfo> connectedDevices(QString *error = nullptr) const;
|
||||
|
||||
QString bestNdkPlatformMatch(int target, const QtSupport::BaseQtVersion *qtVersion) const;
|
||||
QString bestNdkPlatformMatch(int target, const QtSupport::QtVersion *qtVersion) const;
|
||||
|
||||
static QLatin1String toolchainPrefix(const ProjectExplorer::Abi &abi);
|
||||
static QLatin1String toolsPrefix(const ProjectExplorer::Abi &abi);
|
||||
@@ -188,7 +188,7 @@ private:
|
||||
|
||||
void parseDependenciesJson();
|
||||
|
||||
QVector<int> availableNdkPlatforms(const QtSupport::BaseQtVersion *qtVersion) const;
|
||||
QVector<int> availableNdkPlatforms(const QtSupport::QtVersion *qtVersion) const;
|
||||
|
||||
Utils::FilePath m_sdkLocation;
|
||||
QStringList m_sdkManagerToolArgs;
|
||||
|
@@ -122,7 +122,7 @@ void AndroidDebugSupport::start()
|
||||
setUseContinueInsteadOfRun(true);
|
||||
setAttachPid(m_runner->pid());
|
||||
|
||||
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(kit);
|
||||
QtSupport::QtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(kit);
|
||||
if (!Utils::HostOsInfo::isWindowsHost()
|
||||
&& (qtVersion
|
||||
&& AndroidConfigurations::currentConfig().ndkVersion(qtVersion)
|
||||
|
@@ -96,7 +96,7 @@ AndroidDeployQtStep::AndroidDeployQtStep(BuildStepList *parent, Utils::Id id)
|
||||
BoolAspect::LabelPlacement::AtCheckBox);
|
||||
m_uninstallPreviousPackage->setValue(false);
|
||||
|
||||
const QtSupport::BaseQtVersion * const qt = QtSupport::QtKitAspect::qtVersion(kit());
|
||||
const QtSupport::QtVersion * const qt = QtSupport::QtKitAspect::qtVersion(kit());
|
||||
const bool forced = qt && qt->qtVersion() < QtSupport::QtVersionNumber(5, 4, 0);
|
||||
if (forced) {
|
||||
m_uninstallPreviousPackage->setValue(true);
|
||||
@@ -110,7 +110,7 @@ AndroidDeployQtStep::AndroidDeployQtStep(BuildStepList *parent, Utils::Id id)
|
||||
|
||||
bool AndroidDeployQtStep::init()
|
||||
{
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(kit());
|
||||
QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(kit());
|
||||
if (!version) {
|
||||
reportWarningOrError(tr("The Qt version for kit %1 is invalid.").arg(kit()->displayName()),
|
||||
Task::Error);
|
||||
@@ -199,7 +199,7 @@ bool AndroidDeployQtStep::init()
|
||||
}
|
||||
}
|
||||
|
||||
const QtSupport::BaseQtVersion * const qt = QtSupport::QtKitAspect::qtVersion(kit());
|
||||
const QtSupport::QtVersion * const qt = QtSupport::QtKitAspect::qtVersion(kit());
|
||||
if (qt && qt->supportsMultipleQtAbis() && !selectedAbis.contains(info.cpuAbi.first())) {
|
||||
TaskHub::addTask(DeploymentTask(Task::Warning,
|
||||
tr("Android: The main ABI of the deployment device (%1) is not selected. The app "
|
||||
|
@@ -160,7 +160,7 @@ int AndroidManager::minimumSDK(const Target *target)
|
||||
int AndroidManager::minimumSDK(const Kit *kit)
|
||||
{
|
||||
int minSdkVersion = -1;
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(kit);
|
||||
QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(kit);
|
||||
if (version && version->targetDeviceTypes().contains(Constants::ANDROID_DEVICE_TYPE)) {
|
||||
FilePath stockManifestFilePath = FilePath::fromUserInput(
|
||||
version->prefix().toString() + "/src/android/templates/AndroidManifest.xml");
|
||||
@@ -206,7 +206,7 @@ QString AndroidManager::archTriplet(const QString &abi)
|
||||
|
||||
QJsonObject AndroidManager::deploymentSettings(const Target *target)
|
||||
{
|
||||
QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||
QtSupport::QtVersion *qt = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||
if (!qt)
|
||||
return {};
|
||||
|
||||
@@ -253,7 +253,7 @@ FilePath AndroidManager::androidBuildDirectory(const Target *target)
|
||||
|
||||
bool AndroidManager::isQt5CmakeProject(const ProjectExplorer::Target *target)
|
||||
{
|
||||
const QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||
const QtSupport::QtVersion *qt = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||
const bool isQt5 = qt && qt->qtVersion() < QtSupport::QtVersionNumber{6, 0, 0};
|
||||
const Core::Context cmakeCtx = Core::Context(CMakeProjectManager::Constants::CMAKE_PROJECT_ID);
|
||||
const bool isCmakeProject = (target->project()->projectContext() == cmakeCtx);
|
||||
@@ -446,7 +446,7 @@ void AndroidManager::setDeviceApiLevel(Target *target, int level)
|
||||
target->setNamedSettings(ApiLevelKey, level);
|
||||
}
|
||||
|
||||
int AndroidManager::defaultMinimumSDK(const QtSupport::BaseQtVersion *qtVersion)
|
||||
int AndroidManager::defaultMinimumSDK(const QtSupport::QtVersion *qtVersion)
|
||||
{
|
||||
if (qtVersion && qtVersion->qtVersion() >= QtSupport::QtVersionNumber{6, 0})
|
||||
return 23;
|
||||
@@ -692,7 +692,7 @@ static bool mergeGradleProperties(const QString &path, GradleProperties properti
|
||||
|
||||
bool AndroidManager::updateGradleProperties(Target *target, const QString &buildKey)
|
||||
{
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||
QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||
if (!version)
|
||||
return false;
|
||||
|
||||
|
@@ -88,7 +88,7 @@ public:
|
||||
|
||||
static int minimumSDK(const ProjectExplorer::Target *target);
|
||||
static int minimumSDK(const ProjectExplorer::Kit *kit);
|
||||
static int defaultMinimumSDK(const QtSupport::BaseQtVersion *qtVersion);
|
||||
static int defaultMinimumSDK(const QtSupport::QtVersion *qtVersion);
|
||||
|
||||
static QStringList applicationAbis(const ProjectExplorer::Target *target);
|
||||
static QString archTriplet(const QString &abi);
|
||||
|
@@ -725,7 +725,7 @@ void AndroidManifestEditorWidget::updateSdkVersions()
|
||||
const int targetSdk = sdkPair.second;
|
||||
const Target *target = androidTarget(m_textEditorWidget->textDocument()->filePath());
|
||||
if (target) {
|
||||
const QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||
const QtSupport::QtVersion *qt = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||
minSdk = AndroidManager::defaultMinimumSDK(qt);
|
||||
}
|
||||
|
||||
|
@@ -161,7 +161,7 @@ void AndroidPackageInstallationStep::doRun()
|
||||
// NOTE: This is a workaround for QTCREATORBUG-24155
|
||||
// Needed for Qt 5.15.0 and Qt 5.14.x versions
|
||||
if (buildType() == BuildConfiguration::BuildType::Debug) {
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(kit());
|
||||
QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(kit());
|
||||
if (version && version->qtVersion() >= QtSupport::QtVersionNumber{5, 14}
|
||||
&& version->qtVersion() <= QtSupport::QtVersionNumber{5, 15, 0}) {
|
||||
const QString assetsDebugDir = nativeAndroidBuildPath().append(
|
||||
|
@@ -163,7 +163,7 @@ bool AndroidPlugin::initialize(const QStringList &arguments, QString *errorMessa
|
||||
void AndroidPlugin::kitsRestored()
|
||||
{
|
||||
const bool qtForAndroidInstalled
|
||||
= !QtSupport::QtVersionManager::versions([](const QtSupport::BaseQtVersion *v) {
|
||||
= !QtSupport::QtVersionManager::versions([](const QtSupport::QtVersion *v) {
|
||||
return v->targetDeviceTypes().contains(Android::Constants::ANDROID_DEVICE_TYPE);
|
||||
}).isEmpty();
|
||||
|
||||
|
@@ -73,7 +73,7 @@ bool AndroidPotentialKit::isEnabled() const
|
||||
}
|
||||
}
|
||||
|
||||
return QtSupport::QtVersionManager::version([](const QtSupport::BaseQtVersion *v) {
|
||||
return QtSupport::QtVersionManager::version([](const QtSupport::QtVersion *v) {
|
||||
return v->isValid() && v->type() == QString::fromLatin1(Constants::ANDROID_QT_TYPE);
|
||||
});
|
||||
}
|
||||
|
@@ -339,7 +339,7 @@ bool AndroidQmlPreviewWorker::preparePreviewArtefacts()
|
||||
FilePath AndroidQmlPreviewWorker::createQmlrcFile(const FilePath &workFolder,
|
||||
const QString &basename)
|
||||
{
|
||||
const QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(m_rc->kit());
|
||||
const QtSupport::QtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(m_rc->kit());
|
||||
const FilePath rccBinary = qtVersion->rccFilePath();
|
||||
QtcProcess rccProcess;
|
||||
FilePath qrcPath = FilePath::fromString(basename) + ".qrc4viewer";
|
||||
|
@@ -54,7 +54,7 @@ namespace Android {
|
||||
namespace Internal {
|
||||
|
||||
AndroidQtVersion::AndroidQtVersion()
|
||||
: QtSupport::BaseQtVersion()
|
||||
: QtSupport::QtVersion()
|
||||
, m_guard(std::make_unique<QObject>())
|
||||
{
|
||||
QObject::connect(AndroidConfigurations::instance(),
|
||||
@@ -65,7 +65,7 @@ AndroidQtVersion::AndroidQtVersion()
|
||||
|
||||
bool AndroidQtVersion::isValid() const
|
||||
{
|
||||
if (!BaseQtVersion::isValid())
|
||||
if (!QtVersion::isValid())
|
||||
return false;
|
||||
if (qtAbis().isEmpty())
|
||||
return false;
|
||||
@@ -74,7 +74,7 @@ bool AndroidQtVersion::isValid() const
|
||||
|
||||
QString AndroidQtVersion::invalidReason() const
|
||||
{
|
||||
QString tmp = BaseQtVersion::invalidReason();
|
||||
QString tmp = QtVersion::invalidReason();
|
||||
if (tmp.isEmpty()) {
|
||||
if (AndroidConfigurations::currentConfig().ndkLocation(this).isEmpty())
|
||||
return tr("NDK is not configured in Devices > Android.");
|
||||
@@ -136,7 +136,7 @@ Abis AndroidQtVersion::detectQtAbis() const
|
||||
|
||||
void AndroidQtVersion::addToEnvironment(const Kit *k, Utils::Environment &env) const
|
||||
{
|
||||
BaseQtVersion::addToEnvironment(k, env);
|
||||
QtVersion::addToEnvironment(k, env);
|
||||
|
||||
const AndroidConfig &config = AndroidConfigurations::currentConfig();
|
||||
// this env vars are used by qmake mkspecs to generate makefiles (check QTDIR/mkspecs/android-g++/qmake.conf for more info)
|
||||
@@ -209,12 +209,12 @@ void AndroidQtVersion::parseMkSpec(ProFileEvaluator *evaluator) const
|
||||
m_minNdk = tmp;
|
||||
}
|
||||
}
|
||||
BaseQtVersion::parseMkSpec(evaluator);
|
||||
QtVersion::parseMkSpec(evaluator);
|
||||
}
|
||||
|
||||
QSet<Utils::Id> AndroidQtVersion::availableFeatures() const
|
||||
{
|
||||
QSet<Utils::Id> features = QtSupport::BaseQtVersion::availableFeatures();
|
||||
QSet<Utils::Id> features = QtSupport::QtVersion::availableFeatures();
|
||||
features.insert(QtSupport::Constants::FEATURE_MOBILE);
|
||||
features.remove(QtSupport::Constants::FEATURE_QT_CONSOLE);
|
||||
features.remove(QtSupport::Constants::FEATURE_QT_WEBKIT);
|
||||
|
@@ -33,7 +33,7 @@
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
|
||||
class AndroidQtVersion : public QtSupport::BaseQtVersion
|
||||
class AndroidQtVersion : public QtSupport::QtVersion
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(Android::Internal::AndroidQtVersion)
|
||||
|
||||
|
@@ -184,7 +184,7 @@ static QString lldbServerArch2(const QString &androidAbi)
|
||||
|
||||
static FilePath debugServer(bool useLldb, const Target *target)
|
||||
{
|
||||
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||
QtSupport::QtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||
QString preferredAbi = AndroidManager::apkDevicePreferredAbi(target);
|
||||
|
||||
const AndroidConfig &config = AndroidConfigurations::currentConfig();
|
||||
@@ -315,7 +315,7 @@ AndroidRunnerWorker::AndroidRunnerWorker(RunWorker *runner, const QString &packa
|
||||
<< ", After finish ADB cmds:" << m_afterFinishAdbCommands
|
||||
<< ", Debug server path:" << m_debugServerPath;
|
||||
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||
QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||
m_useAppParamsForQmlDebugger = version->qtVersion() >= QtSupport::QtVersionNumber(5, 12);
|
||||
}
|
||||
|
||||
|
@@ -181,12 +181,12 @@ static QList<FilePath> uniqueNdksForCurrentQtVersions()
|
||||
const AndroidConfig &config = AndroidConfigurations::currentConfig();
|
||||
|
||||
auto androidQtVersions = QtSupport::QtVersionManager::versions(
|
||||
[](const QtSupport::BaseQtVersion *v) {
|
||||
[](const QtSupport::QtVersion *v) {
|
||||
return v->targetDeviceTypes().contains(Android::Constants::ANDROID_DEVICE_TYPE);
|
||||
});
|
||||
|
||||
QList<FilePath> uniqueNdks;
|
||||
for (const QtSupport::BaseQtVersion *version : androidQtVersions) {
|
||||
for (const QtSupport::QtVersion *version : androidQtVersions) {
|
||||
FilePath ndk = config.ndkLocation(version);
|
||||
if (!uniqueNdks.contains(ndk))
|
||||
uniqueNdks.append(ndk);
|
||||
|
@@ -253,7 +253,7 @@ CreateAndroidManifestWizard::CreateAndroidManifestWizard(BuildSystem *buildSyste
|
||||
setWindowTitle(tr("Create Android Template Files Wizard"));
|
||||
|
||||
const QList<BuildTargetInfo> buildTargets = buildSystem->applicationTargets();
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(buildSystem->kit());
|
||||
QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(buildSystem->kit());
|
||||
m_copyGradle = version && version->qtVersion() >= QtSupport::QtVersionNumber(5, 4, 0);
|
||||
|
||||
if (buildTargets.isEmpty()) {
|
||||
@@ -300,7 +300,7 @@ void CreateAndroidManifestWizard::createAndroidTemplateFiles()
|
||||
|
||||
FileUtils::CopyAskingForOverwrite copy(this);
|
||||
Target *target = m_buildSystem->target();
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||
QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||
if (!version)
|
||||
return;
|
||||
if (version->qtVersion() < QtSupport::QtVersionNumber(5, 4, 0)) {
|
||||
|
@@ -304,7 +304,7 @@ void JLSClient::updateProjectFiles()
|
||||
if (DeviceTypeKitAspect::deviceTypeId(kit) != Android::Constants::ANDROID_DEVICE_TYPE)
|
||||
return;
|
||||
if (ProjectNode *node = project()->findNodeForBuildKey(target->activeBuildKey())) {
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(kit);
|
||||
QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(kit);
|
||||
if (!version)
|
||||
return;
|
||||
const QString qtSrc = version->prefix().toString() + "/src/android/java/src";
|
||||
|
@@ -30,7 +30,7 @@
|
||||
namespace Qdb {
|
||||
namespace Internal {
|
||||
|
||||
class QdbQtVersion : public QtSupport::BaseQtVersion
|
||||
class QdbQtVersion : public QtSupport::QtVersion
|
||||
{
|
||||
public:
|
||||
QdbQtVersion() = default;
|
||||
|
@@ -255,7 +255,7 @@ CppEditor::ProjectPart::ConstPtr createProjectPart(const Utils::FilePath &projec
|
||||
|
||||
ProjectExplorer::RawProjectPart rpp;
|
||||
rpp.setProjectFileLocation("myproject.project");
|
||||
rpp.setQtVersion(Utils::QtVersion::None);
|
||||
rpp.setQtVersion(Utils::QtMajorVersion::None);
|
||||
rpp.setMacros(macros);
|
||||
const auto projectFiles = Utils::transform<ProjectFiles>(files, [](const QString &f) {
|
||||
return ProjectFile(f, ProjectFile::classify(f));
|
||||
|
@@ -1095,7 +1095,7 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id)
|
||||
initialArgs.append("-DANDROID_STL:STRING=c++_shared");
|
||||
initialArgs.append("-DCMAKE_FIND_ROOT_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}");
|
||||
|
||||
QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(k);
|
||||
QtSupport::QtVersion *qt = QtSupport::QtKitAspect::qtVersion(k);
|
||||
auto sdkLocation = bs->data(Android::Constants::SdkLocation).value<FilePath>();
|
||||
|
||||
if (qt && qt->qtVersion() >= QtSupport::QtVersionNumber{6, 0, 0}) {
|
||||
@@ -1111,7 +1111,7 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id)
|
||||
|
||||
const IDevice::ConstPtr device = DeviceKitAspect::device(k);
|
||||
if (isIos(k)) {
|
||||
QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(k);
|
||||
QtSupport::QtVersion *qt = QtSupport::QtKitAspect::qtVersion(k);
|
||||
if (qt && qt->qtVersion().majorVersion >= 6) {
|
||||
// TODO it would be better if we could set
|
||||
// CMAKE_SYSTEM_NAME=iOS and CMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH=YES
|
||||
@@ -1137,7 +1137,7 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id)
|
||||
}
|
||||
|
||||
if (isWebAssembly(k) || isQnx(k) || isWindowsARM64(k)) {
|
||||
const QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(k);
|
||||
const QtSupport::QtVersion *qt = QtSupport::QtKitAspect::qtVersion(k);
|
||||
if (qt && qt->qtVersion().majorVersion >= 6)
|
||||
initialArgs.append(CMAKE_QT6_TOOLCHAIN_FILE_ARG);
|
||||
}
|
||||
|
@@ -1054,7 +1054,7 @@ Tasks CMakeConfigurationKitAspect::validate(const Kit *k) const
|
||||
{
|
||||
QTC_ASSERT(k, return Tasks());
|
||||
|
||||
const QtSupport::BaseQtVersion *const version = QtSupport::QtKitAspect::qtVersion(k);
|
||||
const QtSupport::QtVersion *const version = QtSupport::QtKitAspect::qtVersion(k);
|
||||
const ToolChain *const tcC = ToolChainKitAspect::cToolChain(k);
|
||||
const ToolChain *const tcCxx = ToolChainKitAspect::cxxToolChain(k);
|
||||
const CMakeConfig config = configuration(k);
|
||||
|
@@ -172,7 +172,7 @@ QStringList CppcheckTool::additionalArguments(const CppEditor::ProjectPart &part
|
||||
break;
|
||||
}
|
||||
|
||||
if (part.qtVersion != Utils::QtVersion::None)
|
||||
if (part.qtVersion != Utils::QtMajorVersion::None)
|
||||
result.push_back("--library=qt");
|
||||
|
||||
return result;
|
||||
|
@@ -733,7 +733,7 @@ bool CompilerOptionsBuilder::excludeDefineDirective(const Macro ¯o) const
|
||||
|
||||
QStringList CompilerOptionsBuilder::wrappedQtHeadersIncludePath() const
|
||||
{
|
||||
if (m_projectPart.qtVersion == QtVersion::None)
|
||||
if (m_projectPart.qtVersion == QtMajorVersion::None)
|
||||
return {};
|
||||
return {"wrappedQtHeaders", "wrappedQtHeaders/QtCore"};
|
||||
}
|
||||
|
@@ -54,7 +54,7 @@ public:
|
||||
RawProjectPart rpp;
|
||||
rpp.setPreCompiledHeaders({pchFileNativePath()});
|
||||
rpp.setMacros({Macro{"projectFoo", "projectBar"}});
|
||||
rpp.setQtVersion(Utils::QtVersion::Qt5);
|
||||
rpp.setQtVersion(Utils::QtMajorVersion::Qt5);
|
||||
rpp.setHeaderPaths(headerPaths);
|
||||
rpp.setConfigFileName(projectConfigFile);
|
||||
ToolChainInfo tcInfo;
|
||||
|
@@ -148,10 +148,10 @@ QString Utils::toString(::Utils::LanguageExtensions languageExtension)
|
||||
return result;
|
||||
}
|
||||
|
||||
QString Utils::toString(::Utils::QtVersion qtVersion)
|
||||
QString Utils::toString(::Utils::QtMajorVersion qtVersion)
|
||||
{
|
||||
#define CASE_QTVERSION(x) \
|
||||
case ::Utils::QtVersion::x: \
|
||||
case ::Utils::QtMajorVersion::x: \
|
||||
return QLatin1String(#x)
|
||||
switch (qtVersion) {
|
||||
CASE_QTVERSION(Unknown);
|
||||
|
@@ -49,7 +49,7 @@ struct Utils
|
||||
static QString toString(ProjectExplorer::HeaderPathType type);
|
||||
static QString toString(::Utils::LanguageVersion languageVersion);
|
||||
static QString toString(::Utils::LanguageExtensions languageExtension);
|
||||
static QString toString(::Utils::QtVersion qtVersion);
|
||||
static QString toString(::Utils::QtMajorVersion qtVersion);
|
||||
static QString toString(ProjectExplorer::BuildTargetType buildTargetType);
|
||||
static QString toString(const QVector<ProjectFile> &projectFiles);
|
||||
static QString toString(ProjectFile::Kind kind);
|
||||
|
@@ -1564,7 +1564,7 @@ void CppModelManager::setupFallbackProjectPart()
|
||||
RawProjectPart rpp;
|
||||
rpp.setMacros(definedMacros());
|
||||
rpp.setHeaderPaths(headerPaths());
|
||||
rpp.setQtVersion(Utils::QtVersion::Qt5);
|
||||
rpp.setQtVersion(Utils::QtMajorVersion::Qt5);
|
||||
|
||||
// Do not activate ObjectiveCExtensions since this will lead to the
|
||||
// "objective-c++" language option for a project-less *.cpp file.
|
||||
|
@@ -112,7 +112,7 @@ public:
|
||||
projectFiles << projectDir.file(file);
|
||||
|
||||
RawProjectPart rpp;
|
||||
rpp.setQtVersion(Utils::QtVersion::Qt5);
|
||||
rpp.setQtVersion(Utils::QtMajorVersion::Qt5);
|
||||
const ProjectFiles rppFiles = Utils::transform<ProjectFiles>(projectFiles,
|
||||
[](const QString &file) { return ProjectFile(file, ProjectFile::classify(file)); });
|
||||
const auto project = modelManagerTestHelper->createProject(
|
||||
@@ -190,7 +190,7 @@ void ModelManagerTest::testPathsAreClean()
|
||||
const auto project = helper.createProject(_("test_modelmanager_paths_are_clean"),
|
||||
Utils::FilePath::fromString("blubb.pro"));
|
||||
RawProjectPart rpp;
|
||||
rpp.setQtVersion(Utils::QtVersion::Qt5);
|
||||
rpp.setQtVersion(Utils::QtMajorVersion::Qt5);
|
||||
rpp.setMacros({ProjectExplorer::Macro("OH_BEHAVE", "-1")});
|
||||
rpp.setHeaderPaths({HeaderPath::makeUser(testDataDir.includeDir(false)),
|
||||
HeaderPath::makeFramework(testDataDir.frameworksDir(false))});
|
||||
@@ -220,7 +220,7 @@ void ModelManagerTest::testFrameworkHeaders()
|
||||
const auto project = helper.createProject(_("test_modelmanager_framework_headers"),
|
||||
Utils::FilePath::fromString("blubb.pro"));
|
||||
RawProjectPart rpp;
|
||||
rpp.setQtVersion(Utils::QtVersion::Qt5);
|
||||
rpp.setQtVersion(Utils::QtMajorVersion::Qt5);
|
||||
rpp.setMacros({{"OH_BEHAVE", "-1"}});
|
||||
rpp.setHeaderPaths({HeaderPath::makeUser(testDataDir.includeDir(false)),
|
||||
HeaderPath::makeFramework(testDataDir.frameworksDir(false))});
|
||||
@@ -268,7 +268,7 @@ void ModelManagerTest::testRefreshAlsoIncludesOfProjectFiles()
|
||||
= helper.createProject(_("test_modelmanager_refresh_also_includes_of_project_files"),
|
||||
Utils::FilePath::fromString("blubb.pro"));
|
||||
RawProjectPart rpp;
|
||||
rpp.setQtVersion(Utils::QtVersion::Qt5);
|
||||
rpp.setQtVersion(Utils::QtMajorVersion::Qt5);
|
||||
rpp.setMacros({{"OH_BEHAVE", "-1"}});
|
||||
rpp.setHeaderPaths({HeaderPath::makeUser(testDataDir.includeDir(false))});
|
||||
auto part = ProjectPart::create(project->projectFilePath(), rpp, {},
|
||||
@@ -325,7 +325,7 @@ void ModelManagerTest::testRefreshSeveralTimes()
|
||||
const auto project = helper.createProject(_("test_modelmanager_refresh_several_times"),
|
||||
Utils::FilePath::fromString("blubb.pro"));
|
||||
RawProjectPart rpp;
|
||||
rpp.setQtVersion(Utils::QtVersion::Qt5);
|
||||
rpp.setQtVersion(Utils::QtMajorVersion::Qt5);
|
||||
const ProjectFiles files = {
|
||||
ProjectFile(testHeader1, ProjectFile::CXXHeader),
|
||||
ProjectFile(testHeader2, ProjectFile::CXXHeader),
|
||||
@@ -384,7 +384,7 @@ void ModelManagerTest::testRefreshTestForChanges()
|
||||
const auto project = helper.createProject(_("test_modelmanager_refresh_2"),
|
||||
Utils::FilePath::fromString("blubb.pro"));
|
||||
RawProjectPart rpp;
|
||||
rpp.setQtVersion(Utils::QtVersion::Qt5);
|
||||
rpp.setQtVersion(Utils::QtMajorVersion::Qt5);
|
||||
const auto part = ProjectPart::create(project->projectFilePath(), rpp, {},
|
||||
{ProjectFile(testCpp, ProjectFile::CXXSource)});
|
||||
const auto pi = ProjectInfo::create({project, KitInfo(nullptr), {}, {}}, {part});
|
||||
@@ -419,7 +419,7 @@ void ModelManagerTest::testRefreshAddedAndPurgeRemoved()
|
||||
const auto project = helper.createProject(_("test_modelmanager_refresh_3"),
|
||||
Utils::FilePath::fromString("blubb.pro"));
|
||||
RawProjectPart rpp;
|
||||
rpp.setQtVersion(Utils::QtVersion::Qt5);
|
||||
rpp.setQtVersion(Utils::QtMajorVersion::Qt5);
|
||||
const auto part = ProjectPart::create(project->projectFilePath(), rpp, {},
|
||||
{{testCpp, ProjectFile::CXXSource}, {testHeader1, ProjectFile::CXXHeader}});
|
||||
auto pi = ProjectInfo::create({project, KitInfo(nullptr), {}, {}}, {part});
|
||||
@@ -474,7 +474,7 @@ void ModelManagerTest::testRefreshTimeStampModifiedIfSourcefilesChange()
|
||||
const auto project = helper.createProject(_("test_modelmanager_refresh_timeStampModified"),
|
||||
Utils::FilePath::fromString("blubb.pro"));
|
||||
RawProjectPart rpp;
|
||||
rpp.setQtVersion(Utils::QtVersion::Qt5);
|
||||
rpp.setQtVersion(Utils::QtMajorVersion::Qt5);
|
||||
auto files = Utils::transform<ProjectFiles>(initialProjectFiles, [](const QString &f) {
|
||||
return ProjectFile(f, ProjectFile::CXXSource);
|
||||
});
|
||||
@@ -750,7 +750,7 @@ void ModelManagerTest::testDefinesPerProject()
|
||||
|
||||
RawProjectPart rpp1;
|
||||
rpp1.setProjectFileLocation("project1.projectfile");
|
||||
rpp1.setQtVersion(Utils::QtVersion::None);
|
||||
rpp1.setQtVersion(Utils::QtMajorVersion::None);
|
||||
rpp1.setMacros({{"SUB1"}});
|
||||
rpp1.setHeaderPaths({HeaderPath::makeUser(testDataDirectory.includeDir(false))});
|
||||
const auto part1 = ProjectPart::create(project->projectFilePath(), rpp1, {},
|
||||
@@ -758,7 +758,7 @@ void ModelManagerTest::testDefinesPerProject()
|
||||
|
||||
RawProjectPart rpp2;
|
||||
rpp2.setProjectFileLocation("project1.projectfile");
|
||||
rpp2.setQtVersion(Utils::QtVersion::None);
|
||||
rpp2.setQtVersion(Utils::QtMajorVersion::None);
|
||||
rpp2.setMacros({{"SUB2"}});
|
||||
rpp2.setHeaderPaths({HeaderPath::makeUser(testDataDirectory.includeDir(false))});
|
||||
const auto part2 = ProjectPart::create(project->projectFilePath(), rpp2, {},
|
||||
@@ -813,7 +813,7 @@ void ModelManagerTest::testPrecompiledHeaders()
|
||||
|
||||
RawProjectPart rpp1;
|
||||
rpp1.setProjectFileLocation("project1.projectfile");
|
||||
rpp1.setQtVersion(Utils::QtVersion::None);
|
||||
rpp1.setQtVersion(Utils::QtMajorVersion::None);
|
||||
rpp1.setPreCompiledHeaders({pch1File});
|
||||
rpp1.setHeaderPaths({HeaderPath::makeUser(testDataDirectory.includeDir(false))});
|
||||
const auto part1 = ProjectPart::create(project->projectFilePath(), rpp1, {},
|
||||
@@ -821,7 +821,7 @@ void ModelManagerTest::testPrecompiledHeaders()
|
||||
|
||||
RawProjectPart rpp2;
|
||||
rpp2.setProjectFileLocation("project2.projectfile");
|
||||
rpp2.setQtVersion(Utils::QtVersion::None);
|
||||
rpp2.setQtVersion(Utils::QtMajorVersion::None);
|
||||
rpp2.setPreCompiledHeaders({pch2File});
|
||||
rpp2.setHeaderPaths({HeaderPath::makeUser(testDataDirectory.includeDir(false))});
|
||||
const auto part2 = ProjectPart::create(project->projectFilePath(), rpp2, {},
|
||||
@@ -893,13 +893,13 @@ void ModelManagerTest::testDefinesPerEditor()
|
||||
Utils::FilePath::fromString("blubb.pro"));
|
||||
|
||||
RawProjectPart rpp1;
|
||||
rpp1.setQtVersion(Utils::QtVersion::None);
|
||||
rpp1.setQtVersion(Utils::QtMajorVersion::None);
|
||||
rpp1.setHeaderPaths({HeaderPath::makeUser(testDataDirectory.includeDir(false))});
|
||||
const auto part1 = ProjectPart::create(project->projectFilePath(), rpp1, {},
|
||||
{{main1File, ProjectFile::CXXSource}, {header, ProjectFile::CXXHeader}});
|
||||
|
||||
RawProjectPart rpp2;
|
||||
rpp2.setQtVersion(Utils::QtVersion::None);
|
||||
rpp2.setQtVersion(Utils::QtMajorVersion::None);
|
||||
rpp2.setHeaderPaths({HeaderPath::makeUser(testDataDirectory.includeDir(false))});
|
||||
const auto part2 = ProjectPart::create(project->projectFilePath(), rpp2, {},
|
||||
{{main2File, ProjectFile::CXXSource}, {header, ProjectFile::CXXHeader}});
|
||||
@@ -977,7 +977,7 @@ void ModelManagerTest::testUpdateEditorsAfterProjectUpdate()
|
||||
= helper.createProject(_("test_modelmanager_updateEditorsAfterProjectUpdate"),
|
||||
Utils::FilePath::fromString("blubb.pro"));
|
||||
RawProjectPart rpp;
|
||||
rpp.setQtVersion(Utils::QtVersion::None);
|
||||
rpp.setQtVersion(Utils::QtMajorVersion::None);
|
||||
const auto part = ProjectPart::create(project->projectFilePath(), rpp, {},
|
||||
{{fileA, ProjectFile::CXXSource}, {fileB, ProjectFile::CXXSource}});
|
||||
const auto pi = ProjectInfo::create({project, KitInfo(nullptr), {}, {}}, {part});
|
||||
|
@@ -169,7 +169,7 @@ ProjectPart::ProjectPart(const Utils::FilePath &topLevelProject,
|
||||
CPlusPlus::LanguageFeatures ProjectPart::deriveLanguageFeatures() const
|
||||
{
|
||||
const bool hasCxx = languageVersion >= Utils::LanguageVersion::CXX98;
|
||||
const bool hasQt = hasCxx && qtVersion != Utils::QtVersion::None;
|
||||
const bool hasQt = hasCxx && qtVersion != Utils::QtMajorVersion::None;
|
||||
CPlusPlus::LanguageFeatures features;
|
||||
features.cxx11Enabled = languageVersion >= Utils::LanguageVersion::CXX11;
|
||||
features.cxx14Enabled = languageVersion >= Utils::LanguageVersion::CXX14;
|
||||
|
@@ -92,7 +92,7 @@ public:
|
||||
const Utils::Language language = Utils::Language::Cxx;
|
||||
const Utils::LanguageVersion &languageVersion = m_macroReport.languageVersion;
|
||||
const Utils::LanguageExtensions languageExtensions = Utils::LanguageExtension::None;
|
||||
const Utils::QtVersion qtVersion = Utils::QtVersion::Unknown;
|
||||
const Utils::QtMajorVersion qtVersion = Utils::QtMajorVersion::Unknown;
|
||||
|
||||
// Files
|
||||
const ProjectFiles files;
|
||||
|
@@ -2255,8 +2255,8 @@ void CdbEngine::checkQtSdkPdbFiles(const QString &module)
|
||||
if (!match.hasMatch())
|
||||
return;
|
||||
const FilePath modulePath = FilePath::fromUserInput(module).parentDir();
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtVersionManager::version(
|
||||
[modulePath](const QtSupport::BaseQtVersion *version) {
|
||||
QtSupport::QtVersion *version = QtSupport::QtVersionManager::version(
|
||||
[modulePath](const QtSupport::QtVersion *version) {
|
||||
return version->isAutodetected() && version->binPath() == modulePath;
|
||||
});
|
||||
if (!version)
|
||||
|
@@ -91,7 +91,7 @@ void ConsoleView::onScrollToBottom()
|
||||
|
||||
void ConsoleView::populateFileFinder()
|
||||
{
|
||||
QtSupport::BaseQtVersion::populateQmlFileFinder(&m_finder, nullptr);
|
||||
QtSupport::QtVersion::populateQmlFileFinder(&m_finder, nullptr);
|
||||
}
|
||||
|
||||
void ConsoleView::mousePressEvent(QMouseEvent *event)
|
||||
|
@@ -889,7 +889,7 @@ DebuggerRunTool::DebuggerRunTool(RunControl *runControl, AllowTerminal allowTerm
|
||||
m_runParameters.debugger = DebuggerKitAspect::runnable(kit);
|
||||
m_runParameters.cppEngineType = DebuggerKitAspect::engineType(kit);
|
||||
|
||||
if (QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(kit))
|
||||
if (QtSupport::QtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(kit))
|
||||
m_runParameters.qtPackageSourceLocation = qtVersion->qtPackageSourcePath().toString();
|
||||
|
||||
if (auto aspect = runControl->aspect<DebuggerRunConfigurationAspect>()) {
|
||||
@@ -953,7 +953,7 @@ DebuggerRunTool::DebuggerRunTool(RunControl *runControl, AllowTerminal allowTerm
|
||||
}
|
||||
|
||||
m_runParameters.dumperPath = Core::ICore::resourcePath("debugger/");
|
||||
if (QtSupport::BaseQtVersion *baseQtVersion = QtSupport::QtKitAspect::qtVersion(kit)) {
|
||||
if (QtSupport::QtVersion *baseQtVersion = QtSupport::QtKitAspect::qtVersion(kit)) {
|
||||
QtSupport::QtVersionNumber qtVersion = baseQtVersion->qtVersion();
|
||||
m_runParameters.fallbackQtVersion = 0x10000 * int(qtVersion.majorVersion)
|
||||
+ 0x100 * int(qtVersion.minorVersion)
|
||||
|
@@ -267,7 +267,7 @@ public:
|
||||
void setSearchPaths(const FilePaths &searchPaths) { m_searchPaths = searchPaths; }
|
||||
|
||||
private:
|
||||
QList<BaseQtVersion *> autoDetectQtVersions() const;
|
||||
QList<QtVersion *> autoDetectQtVersions() const;
|
||||
QList<ToolChain *> autoDetectToolChains();
|
||||
void autoDetectCMake();
|
||||
void autoDetectDebugger();
|
||||
@@ -620,7 +620,7 @@ void KitDetectorPrivate::undoAutoDetect() const
|
||||
};
|
||||
|
||||
emit q->logOutput('\n' + tr("Removing Qt version entries..."));
|
||||
for (BaseQtVersion *qtVersion : QtVersionManager::versions()) {
|
||||
for (QtVersion *qtVersion : QtVersionManager::versions()) {
|
||||
if (qtVersion->detectionSource() == m_sharedId) {
|
||||
emit q->logOutput(tr("Removed \"%1\"").arg(qtVersion->displayName()));
|
||||
QtVersionManager::removeVersion(qtVersion);
|
||||
@@ -670,7 +670,7 @@ void KitDetectorPrivate::listAutoDetected() const
|
||||
};
|
||||
|
||||
emit q->logOutput('\n' + tr("Qt versions:"));
|
||||
for (BaseQtVersion *qtVersion : QtVersionManager::versions()) {
|
||||
for (QtVersion *qtVersion : QtVersionManager::versions()) {
|
||||
if (qtVersion->detectionSource() == m_sharedId)
|
||||
emit q->logOutput(qtVersion->displayName());
|
||||
};
|
||||
@@ -704,9 +704,9 @@ void KitDetectorPrivate::listAutoDetected() const
|
||||
emit q->logOutput('\n' + tr("Listing of previously auto-detected kit items finished.") + "\n\n");
|
||||
}
|
||||
|
||||
QList<BaseQtVersion *> KitDetectorPrivate::autoDetectQtVersions() const
|
||||
QList<QtVersion *> KitDetectorPrivate::autoDetectQtVersions() const
|
||||
{
|
||||
QList<BaseQtVersion *> qtVersions;
|
||||
QList<QtVersion *> qtVersions;
|
||||
|
||||
QString error;
|
||||
const QStringList candidates = {"qmake-qt6", "qmake-qt5", "qmake"};
|
||||
@@ -716,7 +716,7 @@ QList<BaseQtVersion *> KitDetectorPrivate::autoDetectQtVersions() const
|
||||
const FilePath qmake = m_device->searchExecutable(candidate, m_searchPaths);
|
||||
if (qmake.isEmpty())
|
||||
continue;
|
||||
BaseQtVersion *qtVersion = QtVersionFactory::createQtVersionFromQMakePath(qmake, false, m_sharedId, &error);
|
||||
QtVersion *qtVersion = QtVersionFactory::createQtVersionFromQMakePath(qmake, false, m_sharedId, &error);
|
||||
if (!qtVersion)
|
||||
continue;
|
||||
qtVersions.append(qtVersion);
|
||||
@@ -794,7 +794,7 @@ void KitDetectorPrivate::autoDetect()
|
||||
emit q->logOutput(tr("Starting auto-detection. This will take a while..."));
|
||||
|
||||
QList<ToolChain *> toolChains = autoDetectToolChains();
|
||||
QList<BaseQtVersion *> qtVersions = autoDetectQtVersions();
|
||||
QList<QtVersion *> qtVersions = autoDetectQtVersions();
|
||||
|
||||
autoDetectCMake();
|
||||
autoDetectDebugger();
|
||||
|
@@ -183,7 +183,7 @@ static void printKits(const QSet<Kit *> &kits)
|
||||
}
|
||||
|
||||
static void setupKit(Kit *kit, Utils::Id pDeviceType, const ToolChainPair& toolChains,
|
||||
const QVariant &debuggerId, const Utils::FilePath &sdkPath, BaseQtVersion *qtVersion)
|
||||
const QVariant &debuggerId, const Utils::FilePath &sdkPath, QtVersion *qtVersion)
|
||||
{
|
||||
DeviceTypeKitAspect::setDeviceTypeId(kit, pDeviceType);
|
||||
if (toolChains.first)
|
||||
@@ -251,7 +251,7 @@ void IosConfigurations::updateAutomaticKitList()
|
||||
// target -> tool chain
|
||||
const auto targetToolChainHash = findToolChains(platforms);
|
||||
|
||||
const auto qtVersions = Utils::toSet(QtVersionManager::versions([](const BaseQtVersion *v) {
|
||||
const auto qtVersions = Utils::toSet(QtVersionManager::versions([](const QtVersion *v) {
|
||||
return v->isValid() && v->type() == Constants::IOSQT;
|
||||
}));
|
||||
|
||||
@@ -284,7 +284,7 @@ void IosConfigurations::updateAutomaticKitList()
|
||||
continue;
|
||||
}
|
||||
|
||||
for (BaseQtVersion *qtVersion : qtVersions) {
|
||||
for (QtVersion *qtVersion : qtVersions) {
|
||||
qCDebug(kitSetupLog) << " - Qt version:" << qtVersion->displayName();
|
||||
Kit *kit = Utils::findOrDefault(existingKits, [&pDeviceType, &platformToolchains, &qtVersion](const Kit *kit) {
|
||||
// we do not compare the sdk (thus automatically upgrading it in place if a
|
||||
|
@@ -44,7 +44,7 @@ IosQtVersion::IosQtVersion() = default;
|
||||
|
||||
bool IosQtVersion::isValid() const
|
||||
{
|
||||
if (!BaseQtVersion::isValid())
|
||||
if (!QtVersion::isValid())
|
||||
return false;
|
||||
if (qtAbis().isEmpty())
|
||||
return false;
|
||||
@@ -53,7 +53,7 @@ bool IosQtVersion::isValid() const
|
||||
|
||||
QString IosQtVersion::invalidReason() const
|
||||
{
|
||||
QString tmp = BaseQtVersion::invalidReason();
|
||||
QString tmp = QtVersion::invalidReason();
|
||||
if (tmp.isEmpty() && qtAbis().isEmpty())
|
||||
return tr("Failed to detect the ABIs used by the Qt version.");
|
||||
return tmp;
|
||||
@@ -61,7 +61,7 @@ QString IosQtVersion::invalidReason() const
|
||||
|
||||
Abis IosQtVersion::detectQtAbis() const
|
||||
{
|
||||
Abis abis = BaseQtVersion::detectQtAbis();
|
||||
Abis abis = QtVersion::detectQtAbis();
|
||||
for (int i = 0; i < abis.count(); ++i) {
|
||||
abis[i] = Abi(abis.at(i).architecture(),
|
||||
abis.at(i).os(),
|
||||
@@ -80,7 +80,7 @@ QString IosQtVersion::description() const
|
||||
|
||||
QSet<Utils::Id> IosQtVersion::availableFeatures() const
|
||||
{
|
||||
QSet<Utils::Id> features = QtSupport::BaseQtVersion::availableFeatures();
|
||||
QSet<Utils::Id> features = QtSupport::QtVersion::availableFeatures();
|
||||
features.insert(QtSupport::Constants::FEATURE_MOBILE);
|
||||
features.remove(QtSupport::Constants::FEATURE_QT_CONSOLE);
|
||||
features.remove(QtSupport::Constants::FEATURE_QT_WEBKIT);
|
||||
|
@@ -33,7 +33,7 @@
|
||||
namespace Ios {
|
||||
namespace Internal {
|
||||
|
||||
class IosQtVersion : public QtSupport::BaseQtVersion
|
||||
class IosQtVersion : public QtSupport::QtVersion
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(Ios::Internal::IosQtVersion)
|
||||
|
||||
|
@@ -39,7 +39,7 @@ struct KitData
|
||||
QString cmakePath;
|
||||
QString qmakePath;
|
||||
QString qtVersionStr;
|
||||
Utils::QtVersion qtVersion;
|
||||
Utils::QtMajorVersion qtVersion;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
@@ -84,21 +84,21 @@ inline KitData kitData(const ProjectExplorer::Kit *kit)
|
||||
data.cmakePath = cmakePath(kit);
|
||||
data.qmakePath = qmakePath(kit);
|
||||
data.qtVersionStr = qtVersion(kit);
|
||||
data.qtVersion = Utils::QtVersion::None;
|
||||
data.qtVersion = Utils::QtMajorVersion::None;
|
||||
auto version = Version::fromString(data.qtVersionStr);
|
||||
if (version.isValid) {
|
||||
switch (version.major) {
|
||||
case 4:
|
||||
data.qtVersion = Utils::QtVersion::Qt4;
|
||||
data.qtVersion = Utils::QtMajorVersion::Qt4;
|
||||
break;
|
||||
case 5:
|
||||
data.qtVersion = Utils::QtVersion::Qt5;
|
||||
data.qtVersion = Utils::QtMajorVersion::Qt5;
|
||||
break;
|
||||
case 6:
|
||||
data.qtVersion = Utils::QtVersion::Qt6;
|
||||
data.qtVersion = Utils::QtMajorVersion::Qt6;
|
||||
break;
|
||||
default:
|
||||
data.qtVersion = Utils::QtVersion::Unknown;
|
||||
data.qtVersion = Utils::QtMajorVersion::Unknown;
|
||||
}
|
||||
}
|
||||
return data;
|
||||
|
@@ -51,11 +51,11 @@ void writeBinariesSection(QIODevice *nativeFile, const KitData &kitData)
|
||||
addEntry(nativeFile, "c", kitData.cCompilerPath);
|
||||
addEntry(nativeFile, "cpp", kitData.cxxCompilerPath);
|
||||
addEntry(nativeFile, "qmake", kitData.qmakePath);
|
||||
if (kitData.qtVersion == Utils::QtVersion::Qt4)
|
||||
if (kitData.qtVersion == Utils::QtMajorVersion::Qt4)
|
||||
addEntry(nativeFile, QString{"qmake-qt4"}, kitData.qmakePath);
|
||||
else if (kitData.qtVersion == Utils::QtVersion::Qt5)
|
||||
else if (kitData.qtVersion == Utils::QtMajorVersion::Qt5)
|
||||
addEntry(nativeFile, QString{"qmake-qt5"}, kitData.qmakePath);
|
||||
else if (kitData.qtVersion == Utils::QtVersion::Qt6)
|
||||
else if (kitData.qtVersion == Utils::QtMajorVersion::Qt6)
|
||||
addEntry(nativeFile, QString{"qmake-qt6"}, kitData.qmakePath);
|
||||
addEntry(nativeFile, "cmake", kitData.cmakePath);
|
||||
}
|
||||
|
@@ -96,7 +96,7 @@ public:
|
||||
|
||||
inline void setEnvironment(const Utils::Environment &environment) { m_env = environment; }
|
||||
|
||||
inline void setQtVersion(Utils::QtVersion v) { m_qtVersion = v; }
|
||||
inline void setQtVersion(Utils::QtMajorVersion v) { m_qtVersion = v; }
|
||||
|
||||
bool matchesKit(const KitData &kit);
|
||||
|
||||
@@ -124,7 +124,7 @@ private:
|
||||
IntroDataType m_introType;
|
||||
MesonInfoParser::Result m_parserResult;
|
||||
QStringList m_targetsNames;
|
||||
Utils::QtVersion m_qtVersion = Utils::QtVersion::Unknown;
|
||||
Utils::QtMajorVersion m_qtVersion = Utils::QtMajorVersion::Unknown;
|
||||
std::unique_ptr<MesonProjectNode> m_rootNode; // <- project tree root node
|
||||
QString m_projectName;
|
||||
// maybe moving meson to build step could make this class simpler
|
||||
|
@@ -296,7 +296,7 @@ QStringList PerfDataReader::collectArguments(const QString &executableDirPath, c
|
||||
if (!executableDirPath.isEmpty())
|
||||
arguments << "--app" << executableDirPath;
|
||||
|
||||
if (QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(kit)) {
|
||||
if (QtSupport::QtVersion *qt = QtSupport::QtKitAspect::qtVersion(kit)) {
|
||||
arguments << "--extra" << QString("%1%5%2%5%3%5%4")
|
||||
.arg(QDir::toNativeSeparators(qt->libraryPath().toString()))
|
||||
.arg(QDir::toNativeSeparators(qt->pluginPath().toString()))
|
||||
|
@@ -563,7 +563,7 @@ void PerfProfilerTool::gotoSourceLocation(QString filePath, int lineNumber, int
|
||||
|
||||
static Utils::FilePaths collectQtIncludePaths(const ProjectExplorer::Kit *kit)
|
||||
{
|
||||
QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(kit);
|
||||
QtSupport::QtVersion *qt = QtSupport::QtKitAspect::qtVersion(kit);
|
||||
if (qt == nullptr)
|
||||
return Utils::FilePaths();
|
||||
Utils::FilePaths paths{qt->headerPath()};
|
||||
|
@@ -103,7 +103,7 @@ void RawProjectPart::setCallGroupId(const QString &id)
|
||||
callGroupId = id;
|
||||
}
|
||||
|
||||
void RawProjectPart::setQtVersion(Utils::QtVersion qtVersion)
|
||||
void RawProjectPart::setQtVersion(Utils::QtMajorVersion qtVersion)
|
||||
{
|
||||
this->qtVersion = qtVersion;
|
||||
}
|
||||
|
@@ -90,7 +90,7 @@ public:
|
||||
void setFlagsForCxx(const RawProjectPartFlags &flags);
|
||||
|
||||
void setMacros(const Macros ¯os);
|
||||
void setQtVersion(Utils::QtVersion qtVersion);
|
||||
void setQtVersion(Utils::QtMajorVersion qtVersion);
|
||||
|
||||
public:
|
||||
QString displayName;
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
|
||||
// Misc
|
||||
Macros projectMacros;
|
||||
Utils::QtVersion qtVersion = Utils::QtVersion::Unknown;
|
||||
Utils::QtMajorVersion qtVersion = Utils::QtMajorVersion::Unknown;
|
||||
};
|
||||
|
||||
using RawProjectParts = QVector<RawProjectPart>;
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
ToolChain *cToolChain = nullptr;
|
||||
ToolChain *cxxToolChain = nullptr;
|
||||
|
||||
Utils::QtVersion projectPartQtVersion = Utils::QtVersion::None;
|
||||
Utils::QtMajorVersion projectPartQtVersion = Utils::QtMajorVersion::None;
|
||||
|
||||
QString sysRootPath;
|
||||
};
|
||||
|
@@ -292,7 +292,7 @@ QVariantMap DefaultPropertyProvider::autoGeneratedProperties(const ProjectExplor
|
||||
data.insert("Android.ndk.ndkDir", ndkDir);
|
||||
}
|
||||
}
|
||||
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(k);
|
||||
QtSupport::QtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(k);
|
||||
if (qtVersion) {
|
||||
data.remove(QBS_ARCHITECTURES);
|
||||
data.remove(QBS_ARCHITECTURE);
|
||||
|
@@ -338,7 +338,7 @@ QbsBuildConfigurationFactory::QbsBuildConfigurationFactory()
|
||||
setSupportedProjectType(Constants::PROJECT_ID);
|
||||
setSupportedProjectMimeTypeName(Constants::MIME_TYPE);
|
||||
setIssueReporter([](Kit *k, const QString &projectPath, const QString &buildDir) -> Tasks {
|
||||
const QtSupport::BaseQtVersion * const version = QtSupport::QtKitAspect::qtVersion(k);
|
||||
const QtSupport::QtVersion * const version = QtSupport::QtKitAspect::qtVersion(k);
|
||||
return version ? version->reportIssues(projectPath, buildDir)
|
||||
: Tasks();
|
||||
});
|
||||
|
@@ -109,7 +109,7 @@ void ArchitecturesAspect::addToLayout(LayoutBuilder &builder)
|
||||
{
|
||||
MultiSelectionAspect::addToLayout(builder);
|
||||
const auto changeHandler = [this] {
|
||||
const BaseQtVersion *qtVersion = QtKitAspect::qtVersion(m_kit);
|
||||
const QtVersion *qtVersion = QtKitAspect::qtVersion(m_kit);
|
||||
if (!qtVersion) {
|
||||
setVisibleDynamic(false);
|
||||
return;
|
||||
|
@@ -180,7 +180,7 @@ void QbsProfileManager::addProfileFromKit(const ProjectExplorer::Kit *k)
|
||||
if (provider->canHandle(k))
|
||||
data = provider->properties(k, data);
|
||||
}
|
||||
if (const QtSupport::BaseQtVersion * const qt = QtSupport::QtKitAspect::qtVersion(k))
|
||||
if (const QtSupport::QtVersion * const qt = QtSupport::QtKitAspect::qtVersion(k))
|
||||
data.insert("moduleProviders.Qt.qmakeFilePaths", qt->qmakeFilePath().toString());
|
||||
|
||||
if (QbsSettings::qbsVersion() < QVersionNumber({1, 20})) {
|
||||
|
@@ -866,7 +866,7 @@ static RawProjectParts generateProjectParts(
|
||||
const QJsonObject &projectData,
|
||||
const std::shared_ptr<const ToolChain> &cToolChain,
|
||||
const std::shared_ptr<const ToolChain> &cxxToolChain,
|
||||
QtVersion qtVersion
|
||||
QtMajorVersion qtVersion
|
||||
)
|
||||
{
|
||||
RawProjectParts rpps;
|
||||
@@ -889,9 +889,9 @@ static RawProjectParts generateProjectParts(
|
||||
};
|
||||
forAllArtifacts(prd, ArtifactType::All, pchFinder);
|
||||
|
||||
const Utils::QtVersion qtVersionForPart
|
||||
const Utils::QtMajorVersion qtVersionForPart
|
||||
= prd.value("module-properties").toObject().value("Qt.core.version").isUndefined()
|
||||
? Utils::QtVersion::None
|
||||
? Utils::QtMajorVersion::None
|
||||
: qtVersion;
|
||||
|
||||
const QJsonArray groups = prd.value("groups").toArray();
|
||||
|
@@ -178,7 +178,7 @@ bool QbsProjectImporter::matchKit(void *directoryData, const Kit *k) const
|
||||
if (bgData->cxxCompilerPath != cxxToolchain->compilerCommand())
|
||||
return false;
|
||||
}
|
||||
const QtSupport::BaseQtVersion * const qtVersion = QtSupport::QtKitAspect::qtVersion(k);
|
||||
const QtSupport::QtVersion * const qtVersion = QtSupport::QtKitAspect::qtVersion(k);
|
||||
if (!bgData->qtBinPath.isEmpty()) {
|
||||
if (!qtVersion)
|
||||
return false;
|
||||
|
@@ -61,14 +61,14 @@ static inline QString msgAppNotFound(const QString &id)
|
||||
}
|
||||
|
||||
// -- Commands and helpers
|
||||
static QString linguistBinary(const QtSupport::BaseQtVersion *qtVersion)
|
||||
static QString linguistBinary(const QtSupport::QtVersion *qtVersion)
|
||||
{
|
||||
if (qtVersion)
|
||||
return qtVersion->linguistFilePath().toString();
|
||||
return QLatin1String(Utils::HostOsInfo::isMacHost() ? "Linguist" : "linguist");
|
||||
}
|
||||
|
||||
static QString designerBinary(const QtSupport::BaseQtVersion *qtVersion)
|
||||
static QString designerBinary(const QtSupport::QtVersion *qtVersion)
|
||||
{
|
||||
if (qtVersion)
|
||||
return qtVersion->designerFilePath().toString();
|
||||
@@ -127,10 +127,10 @@ ExternalQtEditor *ExternalQtEditor::createDesignerEditor()
|
||||
}
|
||||
}
|
||||
|
||||
static QString findFirstCommand(QVector<QtSupport::BaseQtVersion *> qtVersions,
|
||||
static QString findFirstCommand(QVector<QtSupport::QtVersion *> qtVersions,
|
||||
ExternalQtEditor::CommandForQtVersion command)
|
||||
{
|
||||
foreach (QtSupport::BaseQtVersion *qt, qtVersions) {
|
||||
foreach (QtSupport::QtVersion *qt, qtVersions) {
|
||||
if (qt) {
|
||||
const QString binary = command(qt);
|
||||
if (!binary.isEmpty())
|
||||
@@ -151,7 +151,7 @@ bool ExternalQtEditor::getEditorLaunchData(const Utils::FilePath &filePath,
|
||||
// - any other kit
|
||||
// As fallback check PATH
|
||||
data->workingDirectory.clear();
|
||||
QVector<QtSupport::BaseQtVersion *> qtVersionsToCheck; // deduplicated after being filled
|
||||
QVector<QtSupport::QtVersion *> qtVersionsToCheck; // deduplicated after being filled
|
||||
if (const Project *project = SessionManager::projectForFile(filePath)) {
|
||||
data->workingDirectory = project->projectDirectory();
|
||||
// active kit
|
||||
|
@@ -37,7 +37,7 @@ QT_BEGIN_NAMESPACE
|
||||
class QTcpSocket;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace QtSupport { class BaseQtVersion; }
|
||||
namespace QtSupport { class QtVersion; }
|
||||
|
||||
namespace QmakeProjectManager {
|
||||
namespace Internal {
|
||||
@@ -54,7 +54,7 @@ class ExternalQtEditor : public Core::IExternalEditor
|
||||
|
||||
public:
|
||||
// Member function pointer for a QtVersion function return a string (command)
|
||||
using CommandForQtVersion = std::function<QString(const QtSupport::BaseQtVersion *)>;
|
||||
using CommandForQtVersion = std::function<QString(const QtSupport::QtVersion *)>;
|
||||
|
||||
static ExternalQtEditor *createLinguistEditor();
|
||||
static ExternalQtEditor *createDesignerEditor();
|
||||
|
@@ -317,17 +317,17 @@ QString MakeFileParse::unparsedArguments() const
|
||||
return m_unparsedArguments;
|
||||
}
|
||||
|
||||
BaseQtVersion::QmakeBuildConfigs MakeFileParse::effectiveBuildConfig(BaseQtVersion::QmakeBuildConfigs defaultBuildConfig) const
|
||||
QtVersion::QmakeBuildConfigs MakeFileParse::effectiveBuildConfig(QtVersion::QmakeBuildConfigs defaultBuildConfig) const
|
||||
{
|
||||
BaseQtVersion::QmakeBuildConfigs buildConfig = defaultBuildConfig;
|
||||
QtVersion::QmakeBuildConfigs buildConfig = defaultBuildConfig;
|
||||
if (m_qmakeBuildConfig.explicitDebug)
|
||||
buildConfig = buildConfig | BaseQtVersion::DebugBuild;
|
||||
buildConfig = buildConfig | QtVersion::DebugBuild;
|
||||
else if (m_qmakeBuildConfig.explicitRelease)
|
||||
buildConfig = buildConfig & ~BaseQtVersion::DebugBuild;
|
||||
buildConfig = buildConfig & ~QtVersion::DebugBuild;
|
||||
if (m_qmakeBuildConfig.explicitBuildAll)
|
||||
buildConfig = buildConfig | BaseQtVersion::BuildAll;
|
||||
buildConfig = buildConfig | QtVersion::BuildAll;
|
||||
else if (m_qmakeBuildConfig.explicitNoBuildAll)
|
||||
buildConfig = buildConfig &~ BaseQtVersion::BuildAll;
|
||||
buildConfig = buildConfig &~ QtVersion::BuildAll;
|
||||
return buildConfig;
|
||||
}
|
||||
|
||||
|
@@ -54,8 +54,8 @@ public:
|
||||
|
||||
QString unparsedArguments() const;
|
||||
|
||||
QtSupport::BaseQtVersion::QmakeBuildConfigs
|
||||
effectiveBuildConfig(QtSupport::BaseQtVersion::QmakeBuildConfigs defaultBuildConfig) const;
|
||||
QtSupport::QtVersion::QmakeBuildConfigs
|
||||
effectiveBuildConfig(QtSupport::QtVersion::QmakeBuildConfigs defaultBuildConfig) const;
|
||||
|
||||
static const QLoggingCategory &logging();
|
||||
|
||||
|
@@ -128,13 +128,13 @@ QmakeBuildConfiguration::QmakeBuildConfiguration(Target *target, Utils::Id id)
|
||||
QTC_ASSERT(qmakeStep, return);
|
||||
|
||||
const QmakeExtraBuildInfo qmakeExtra = info.extraInfo.value<QmakeExtraBuildInfo>();
|
||||
BaseQtVersion *version = QtKitAspect::qtVersion(target->kit());
|
||||
QtVersion *version = QtKitAspect::qtVersion(target->kit());
|
||||
|
||||
BaseQtVersion::QmakeBuildConfigs config = version->defaultBuildConfig();
|
||||
QtVersion::QmakeBuildConfigs config = version->defaultBuildConfig();
|
||||
if (info.buildType == BuildConfiguration::Debug)
|
||||
config |= BaseQtVersion::DebugBuild;
|
||||
config |= QtVersion::DebugBuild;
|
||||
else
|
||||
config &= ~BaseQtVersion::DebugBuild;
|
||||
config &= ~QtVersion::DebugBuild;
|
||||
|
||||
QString additionalArguments = qmakeExtra.additionalArguments;
|
||||
if (!additionalArguments.isEmpty())
|
||||
@@ -227,7 +227,7 @@ bool QmakeBuildConfiguration::fromMap(const QVariantMap &map)
|
||||
if (!BuildConfiguration::fromMap(map))
|
||||
return false;
|
||||
|
||||
m_qmakeBuildConfiguration = BaseQtVersion::QmakeBuildConfigs(map.value(QLatin1String(BUILD_CONFIGURATION_KEY)).toInt());
|
||||
m_qmakeBuildConfiguration = QtVersion::QmakeBuildConfigs(map.value(QLatin1String(BUILD_CONFIGURATION_KEY)).toInt());
|
||||
|
||||
m_lastKitState = LastKitState(kit());
|
||||
return true;
|
||||
@@ -251,7 +251,7 @@ void QmakeBuildConfiguration::updateProblemLabel()
|
||||
const QString proFileName = project()->projectFilePath().toString();
|
||||
|
||||
// Check for Qt version:
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(k);
|
||||
QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(k);
|
||||
if (!version) {
|
||||
buildDirectoryAspect()->setProblem(tr("This kit cannot build this project since it "
|
||||
"does not define a Qt version."));
|
||||
@@ -379,12 +379,12 @@ FilePath QmakeBuildConfiguration::makefile() const
|
||||
return FilePath::fromString(m_buildSystem->rootProFile()->singleVariableValue(Variable::Makefile));
|
||||
}
|
||||
|
||||
BaseQtVersion::QmakeBuildConfigs QmakeBuildConfiguration::qmakeBuildConfiguration() const
|
||||
QtVersion::QmakeBuildConfigs QmakeBuildConfiguration::qmakeBuildConfiguration() const
|
||||
{
|
||||
return m_qmakeBuildConfiguration;
|
||||
}
|
||||
|
||||
void QmakeBuildConfiguration::setQMakeBuildConfiguration(BaseQtVersion::QmakeBuildConfigs config)
|
||||
void QmakeBuildConfiguration::setQMakeBuildConfiguration(QtVersion::QmakeBuildConfigs config)
|
||||
{
|
||||
if (m_qmakeBuildConfiguration == config)
|
||||
return;
|
||||
@@ -457,18 +457,18 @@ bool QmakeBuildConfiguration::runSystemFunction() const
|
||||
QStringList QmakeBuildConfiguration::configCommandLineArguments() const
|
||||
{
|
||||
QStringList result;
|
||||
BaseQtVersion *version = QtKitAspect::qtVersion(kit());
|
||||
BaseQtVersion::QmakeBuildConfigs defaultBuildConfiguration =
|
||||
version ? version->defaultBuildConfig() : BaseQtVersion::QmakeBuildConfigs(BaseQtVersion::DebugBuild | BaseQtVersion::BuildAll);
|
||||
BaseQtVersion::QmakeBuildConfigs userBuildConfiguration = m_qmakeBuildConfiguration;
|
||||
if ((defaultBuildConfiguration & BaseQtVersion::BuildAll) && !(userBuildConfiguration & BaseQtVersion::BuildAll))
|
||||
QtVersion *version = QtKitAspect::qtVersion(kit());
|
||||
QtVersion::QmakeBuildConfigs defaultBuildConfiguration =
|
||||
version ? version->defaultBuildConfig() : QtVersion::QmakeBuildConfigs(QtVersion::DebugBuild | QtVersion::BuildAll);
|
||||
QtVersion::QmakeBuildConfigs userBuildConfiguration = m_qmakeBuildConfiguration;
|
||||
if ((defaultBuildConfiguration & QtVersion::BuildAll) && !(userBuildConfiguration & QtVersion::BuildAll))
|
||||
result << QLatin1String("CONFIG-=debug_and_release");
|
||||
|
||||
if (!(defaultBuildConfiguration & BaseQtVersion::BuildAll) && (userBuildConfiguration & BaseQtVersion::BuildAll))
|
||||
if (!(defaultBuildConfiguration & QtVersion::BuildAll) && (userBuildConfiguration & QtVersion::BuildAll))
|
||||
result << QLatin1String("CONFIG+=debug_and_release");
|
||||
if ((defaultBuildConfiguration & BaseQtVersion::DebugBuild) && !(userBuildConfiguration & BaseQtVersion::DebugBuild))
|
||||
if ((defaultBuildConfiguration & QtVersion::DebugBuild) && !(userBuildConfiguration & QtVersion::DebugBuild))
|
||||
result << QLatin1String("CONFIG+=release");
|
||||
if (!(defaultBuildConfiguration & BaseQtVersion::DebugBuild) && (userBuildConfiguration & BaseQtVersion::DebugBuild))
|
||||
if (!(defaultBuildConfiguration & QtVersion::DebugBuild) && (userBuildConfiguration & QtVersion::DebugBuild))
|
||||
result << QLatin1String("CONFIG+=debug");
|
||||
return result;
|
||||
}
|
||||
@@ -523,7 +523,7 @@ QmakeBuildConfiguration::MakefileState QmakeBuildConfiguration::compareToImportF
|
||||
return MakefileMissing;
|
||||
}
|
||||
|
||||
BaseQtVersion *version = QtKitAspect::qtVersion(kit());
|
||||
QtVersion *version = QtKitAspect::qtVersion(kit());
|
||||
if (!version) {
|
||||
qCDebug(logs) << "**No qt version in kit";
|
||||
return MakefileForWrongProject;
|
||||
@@ -546,7 +546,7 @@ QmakeBuildConfiguration::MakefileState QmakeBuildConfiguration::compareToImportF
|
||||
}
|
||||
|
||||
// same qtversion
|
||||
BaseQtVersion::QmakeBuildConfigs buildConfig = parse.effectiveBuildConfig(version->defaultBuildConfig());
|
||||
QtVersion::QmakeBuildConfigs buildConfig = parse.effectiveBuildConfig(version->defaultBuildConfig());
|
||||
if (qmakeBuildConfiguration() != buildConfig) {
|
||||
qCDebug(logs) << "**Different qmake buildconfigurations buildconfiguration:"
|
||||
<< qmakeBuildConfiguration() << " Makefile:" << buildConfig;
|
||||
@@ -632,7 +632,7 @@ QmakeBuildConfiguration::MakefileState QmakeBuildConfiguration::compareToImportF
|
||||
|
||||
QString QmakeBuildConfiguration::extractSpecFromArguments(QString *args,
|
||||
const FilePath &directory,
|
||||
const BaseQtVersion *version,
|
||||
const QtVersion *version,
|
||||
QStringList *outArgs)
|
||||
{
|
||||
FilePath parsedSpec;
|
||||
@@ -708,7 +708,7 @@ static BuildInfo createBuildInfo(const Kit *k, const FilePath &projectPath,
|
||||
BuildConfiguration::BuildType type)
|
||||
{
|
||||
const BuildPropertiesSettings &settings = ProjectExplorerPlugin::buildPropertiesSettings();
|
||||
BaseQtVersion *version = QtKitAspect::qtVersion(k);
|
||||
QtVersion *version = QtKitAspect::qtVersion(k);
|
||||
QmakeExtraBuildInfo extraInfo;
|
||||
BuildInfo info;
|
||||
QString suffix;
|
||||
@@ -774,7 +774,7 @@ QmakeBuildConfigurationFactory::QmakeBuildConfigurationFactory()
|
||||
setSupportedProjectType(Constants::QMAKEPROJECT_ID);
|
||||
setSupportedProjectMimeTypeName(Constants::PROFILE_MIMETYPE);
|
||||
setIssueReporter([](Kit *k, const QString &projectPath, const QString &buildDir) {
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(k);
|
||||
QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(k);
|
||||
Tasks issues;
|
||||
if (version)
|
||||
issues << version->reportIssues(projectPath, buildDir);
|
||||
@@ -790,7 +790,7 @@ QmakeBuildConfigurationFactory::QmakeBuildConfigurationFactory()
|
||||
setBuildGenerator([](const Kit *k, const FilePath &projectPath, bool forSetup) {
|
||||
QList<BuildInfo> result;
|
||||
|
||||
BaseQtVersion *qtVersion = QtKitAspect::qtVersion(k);
|
||||
QtVersion *qtVersion = QtKitAspect::qtVersion(k);
|
||||
|
||||
if (forSetup && (!qtVersion || !qtVersion->isValid()))
|
||||
return result;
|
||||
@@ -815,7 +815,7 @@ QmakeBuildConfigurationFactory::QmakeBuildConfigurationFactory()
|
||||
|
||||
BuildConfiguration::BuildType QmakeBuildConfiguration::buildType() const
|
||||
{
|
||||
if (qmakeBuildConfiguration() & BaseQtVersion::DebugBuild)
|
||||
if (qmakeBuildConfiguration() & QtVersion::DebugBuild)
|
||||
return Debug;
|
||||
if (separateDebugInfo() == TriState::Enabled)
|
||||
return Profile;
|
||||
|
@@ -59,8 +59,8 @@ public:
|
||||
ProjectExplorer::FileNode *fileNodeBuild() const;
|
||||
void setFileNodeBuild(ProjectExplorer::FileNode *node);
|
||||
|
||||
QtSupport::BaseQtVersion::QmakeBuildConfigs qmakeBuildConfiguration() const;
|
||||
void setQMakeBuildConfiguration(QtSupport::BaseQtVersion::QmakeBuildConfigs config);
|
||||
QtSupport::QtVersion::QmakeBuildConfigs qmakeBuildConfiguration() const;
|
||||
void setQMakeBuildConfiguration(QtSupport::QtVersion::QmakeBuildConfigs config);
|
||||
|
||||
/// suffix should be unique
|
||||
static Utils::FilePath shadowBuildDirectory(const Utils::FilePath &profilePath,
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
enum MakefileState { MakefileMatches, MakefileForWrongProject, MakefileIncompatible, MakefileMissing };
|
||||
MakefileState compareToImportFrom(const Utils::FilePath &makefile, QString *errorString = nullptr);
|
||||
static QString extractSpecFromArguments(
|
||||
QString *arguments, const Utils::FilePath &directory, const QtSupport::BaseQtVersion *version,
|
||||
QString *arguments, const Utils::FilePath &directory, const QtSupport::QtVersion *version,
|
||||
QStringList *outArgs = nullptr);
|
||||
|
||||
QVariantMap toMap() const override;
|
||||
@@ -146,7 +146,7 @@ private:
|
||||
};
|
||||
LastKitState m_lastKitState;
|
||||
|
||||
QtSupport::BaseQtVersion::QmakeBuildConfigs m_qmakeBuildConfiguration;
|
||||
QtSupport::QtVersion::QmakeBuildConfigs m_qmakeBuildConfiguration;
|
||||
QmakeProFileNode *m_subNodeBuild = nullptr;
|
||||
ProjectExplorer::FileNode *m_fileNodeBuild = nullptr;
|
||||
QmakeBuildSystem *m_buildSystem = nullptr;
|
||||
|
@@ -101,7 +101,7 @@ QmakeKitAspect::QmakeKitAspect()
|
||||
Tasks QmakeKitAspect::validate(const Kit *k) const
|
||||
{
|
||||
Tasks result;
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(k);
|
||||
QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(k);
|
||||
|
||||
const QString mkspec = QmakeKitAspect::mkspec(k);
|
||||
if (!version && !mkspec.isEmpty())
|
||||
@@ -161,7 +161,7 @@ void QmakeKitAspect::setMkspec(Kit *k, const QString &mkspec, MkspecSource sourc
|
||||
|
||||
QString QmakeKitAspect::defaultMkspec(const Kit *k)
|
||||
{
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(k);
|
||||
QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(k);
|
||||
if (!version) // No version, so no qmake
|
||||
return {};
|
||||
|
||||
|
@@ -429,7 +429,7 @@ bool QmakeProFileNode::setData(Utils::Id role, const QVariant &value) const
|
||||
QString scope;
|
||||
int flags = QmakeProjectManager::Internal::ProWriter::ReplaceValues;
|
||||
if (Target *target = m_buildSystem->target()) {
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||
QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||
if (version && !version->supportsMultipleQtAbis()) {
|
||||
const QString arch = pro->singleVariableValue(Variable::AndroidAbi);
|
||||
scope = QString("contains(%1,%2)").arg(Android::Constants::ANDROID_TARGET_ARCH)
|
||||
|
@@ -255,7 +255,7 @@ static void createTree(QmakeBuildSystem *buildSystem,
|
||||
std::unique_ptr<QmakeProFileNode> QmakeNodeTreeBuilder::buildTree(QmakeBuildSystem *buildSystem)
|
||||
{
|
||||
// Remove qmake implementation details that litter up the project data:
|
||||
BaseQtVersion *qt = QtKitAspect::qtVersion(buildSystem->kit());
|
||||
QtVersion *qt = QtKitAspect::qtVersion(buildSystem->kit());
|
||||
|
||||
const FilePaths toExclude = qt ? qt->directoriesToIgnoreInProjectTree() : FilePaths();
|
||||
|
||||
|
@@ -368,7 +368,7 @@ void QmakeBuildSystem::updateCppCodeModel()
|
||||
if (pro->variableValue(Variable::Config).contains(QLatin1String("qt")))
|
||||
rpp.setQtVersion(kitInfo.projectPartQtVersion);
|
||||
else
|
||||
rpp.setQtVersion(Utils::QtVersion::None);
|
||||
rpp.setQtVersion(Utils::QtMajorVersion::None);
|
||||
|
||||
// Header paths
|
||||
ProjectExplorer::HeaderPaths headerPaths;
|
||||
@@ -685,7 +685,7 @@ void QmakeBuildSystem::asyncUpdate()
|
||||
watcher->setFuture(m_asyncUpdateFutureInterface->future());
|
||||
|
||||
const Kit *const k = kit();
|
||||
QtSupport::BaseQtVersion *const qtVersion = QtSupport::QtKitAspect::qtVersion(k);
|
||||
QtSupport::QtVersion *const qtVersion = QtSupport::QtKitAspect::qtVersion(k);
|
||||
if (!qtVersion || !qtVersion->isValid()) {
|
||||
const QString errorMessage
|
||||
= k ? tr("Cannot parse project \"%1\": The currently selected kit \"%2\" does not "
|
||||
@@ -738,7 +738,7 @@ void QmakeBuildSystem::buildFinished(bool success)
|
||||
Tasks QmakeProject::projectIssues(const Kit *k) const
|
||||
{
|
||||
Tasks result = Project::projectIssues(k);
|
||||
const QtSupport::BaseQtVersion *const qtFromKit = QtSupport::QtKitAspect::qtVersion(k);
|
||||
const QtSupport::QtVersion *const qtFromKit = QtSupport::QtKitAspect::qtVersion(k);
|
||||
if (!qtFromKit)
|
||||
result.append(createProjectTask(Task::TaskType::Error, tr("No Qt version set in kit.")));
|
||||
else if (!qtFromKit->isValid())
|
||||
@@ -750,12 +750,12 @@ Tasks QmakeProject::projectIssues(const Kit *k) const
|
||||
// example shipped via the installer.
|
||||
// Report a problem if and only if the project is considered to be part of *only* a Qt
|
||||
// that is not the one from the current kit.
|
||||
const QList<BaseQtVersion *> qtsContainingThisProject
|
||||
= QtVersionManager::versions([filePath = projectFilePath()](const BaseQtVersion *qt) {
|
||||
const QList<QtVersion *> qtsContainingThisProject
|
||||
= QtVersionManager::versions([filePath = projectFilePath()](const QtVersion *qt) {
|
||||
return qt->isValid() && qt->isQtSubProject(filePath);
|
||||
});
|
||||
if (!qtsContainingThisProject.isEmpty()
|
||||
&& !qtsContainingThisProject.contains(const_cast<BaseQtVersion *>(qtFromKit))) {
|
||||
&& !qtsContainingThisProject.contains(const_cast<QtVersion *>(qtFromKit))) {
|
||||
result.append(CompileTask(Task::Warning,
|
||||
tr("Project is part of Qt sources that do not match "
|
||||
"the Qt defined in the kit.")));
|
||||
@@ -826,7 +826,7 @@ QtSupport::ProFileReader *QmakeBuildSystem::createProFileReader(const QmakeProFi
|
||||
else
|
||||
qmakeArgs = bc->configCommandLineArguments();
|
||||
|
||||
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(k);
|
||||
QtSupport::QtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(k);
|
||||
m_qmakeSysroot = SysRootKitAspect::sysRoot(k).toString();
|
||||
|
||||
if (qtVersion && qtVersion->isValid()) {
|
||||
@@ -1205,7 +1205,7 @@ void QmakeBuildSystem::updateBuildSystemData()
|
||||
libraryPaths.append(FilePath::fromUserInput(dir));
|
||||
}
|
||||
}
|
||||
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(kit());
|
||||
QtSupport::QtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(kit());
|
||||
if (qtVersion)
|
||||
libraryPaths.append(qtVersion->librarySearchPath());
|
||||
|
||||
|
@@ -68,7 +68,7 @@ struct DirectoryData
|
||||
Utils::FilePath canonicalQmakeBinary;
|
||||
QtProjectImporter::QtVersionData qtVersionData;
|
||||
QString parsedSpec;
|
||||
BaseQtVersion::QmakeBuildConfigs buildConfig;
|
||||
QtVersion::QmakeBuildConfigs buildConfig;
|
||||
QString additionalArguments;
|
||||
QMakeStepConfig config;
|
||||
QMakeStepConfig::OsType osType;
|
||||
@@ -146,7 +146,7 @@ QList<void *> QmakeProjectImporter::examineDirectory(const FilePath &importPath,
|
||||
qCDebug(logs) << " QMake:" << data->canonicalQmakeBinary;
|
||||
|
||||
data->qtVersionData = QtProjectImporter::findOrCreateQtVersion(data->canonicalQmakeBinary);
|
||||
BaseQtVersion *version = data->qtVersionData.qt;
|
||||
QtVersion *version = data->qtVersionData.qt;
|
||||
bool isTemporaryVersion = data->qtVersionData.isTemporary;
|
||||
|
||||
QTC_ASSERT(version, continue);
|
||||
@@ -188,7 +188,7 @@ bool QmakeProjectImporter::matchKit(void *directoryData, const Kit *k) const
|
||||
auto *data = static_cast<DirectoryData *>(directoryData);
|
||||
const QLoggingCategory &logs = MakeFileParse::logging();
|
||||
|
||||
BaseQtVersion *kitVersion = QtKitAspect::qtVersion(k);
|
||||
QtVersion *kitVersion = QtKitAspect::qtVersion(k);
|
||||
QString kitSpec = QmakeKitAspect::mkspec(k);
|
||||
ToolChain *tc = ToolChainKitAspect::cxxToolChain(k);
|
||||
if (kitSpec.isEmpty() && kitVersion)
|
||||
@@ -218,7 +218,7 @@ const QList<BuildInfo> QmakeProjectImporter::buildInfoList(void *directoryData)
|
||||
|
||||
// create info:
|
||||
BuildInfo info;
|
||||
if (data->buildConfig & BaseQtVersion::DebugBuild) {
|
||||
if (data->buildConfig & QtVersion::DebugBuild) {
|
||||
info.buildType = BuildConfiguration::Debug;
|
||||
info.displayName = QCoreApplication::translate("QmakeProjectManager::Internal::QmakeProjectImporter", "Debug");
|
||||
} else {
|
||||
@@ -241,7 +241,7 @@ void QmakeProjectImporter::deleteDirectoryData(void *directoryData) const
|
||||
delete static_cast<DirectoryData *>(directoryData);
|
||||
}
|
||||
|
||||
static const Toolchains preferredToolChains(BaseQtVersion *qtVersion, const QString &ms)
|
||||
static const Toolchains preferredToolChains(QtVersion *qtVersion, const QString &ms)
|
||||
{
|
||||
const QString spec = ms.isEmpty() ? qtVersion->mkspec() : ms;
|
||||
|
||||
|
@@ -101,7 +101,7 @@ QMakeStep::QMakeStep(BuildStepList *bsl, Id id)
|
||||
m_effectiveCall->setEnabled(true);
|
||||
|
||||
auto updateSummary = [this] {
|
||||
BaseQtVersion *qtVersion = QtKitAspect::qtVersion(target()->kit());
|
||||
QtVersion *qtVersion = QtKitAspect::qtVersion(target()->kit());
|
||||
if (!qtVersion)
|
||||
return tr("<b>qmake:</b> No Qt version set. Cannot run qmake.");
|
||||
const QString program = qtVersion->qmakeFilePath().fileName();
|
||||
@@ -129,7 +129,7 @@ QmakeBuildSystem *QMakeStep::qmakeBuildSystem() const
|
||||
/// config arguemnts
|
||||
/// moreArguments
|
||||
/// user arguments
|
||||
QString QMakeStep::allArguments(const BaseQtVersion *v, ArgumentFlags flags) const
|
||||
QString QMakeStep::allArguments(const QtVersion *v, ArgumentFlags flags) const
|
||||
{
|
||||
QTC_ASSERT(v, return QString());
|
||||
QmakeBuildConfiguration *bc = qmakeBuildConfiguration();
|
||||
@@ -183,7 +183,7 @@ QMakeStepConfig QMakeStep::deducedArguments() const
|
||||
}
|
||||
}
|
||||
|
||||
BaseQtVersion *version = QtKitAspect::qtVersion(kit);
|
||||
QtVersion *version = QtKitAspect::qtVersion(kit);
|
||||
|
||||
config.osType = QMakeStepConfig::osTypeFor(targetAbi, version);
|
||||
config.separateDebugInfo = qmakeBuildConfiguration()->separateDebugInfo();
|
||||
@@ -200,7 +200,7 @@ bool QMakeStep::init()
|
||||
|
||||
m_wasSuccess = true;
|
||||
QmakeBuildConfiguration *qmakeBc = qmakeBuildConfiguration();
|
||||
const BaseQtVersion *qtVersion = QtKitAspect::qtVersion(kit());
|
||||
const QtVersion *qtVersion = QtKitAspect::qtVersion(kit());
|
||||
|
||||
if (!qtVersion) {
|
||||
emit addOutput(tr("No Qt version configured."), BuildStep::OutputFormat::ErrorMessage);
|
||||
@@ -433,7 +433,7 @@ QString QMakeStep::makeArguments(const QString &makefile) const
|
||||
|
||||
QString QMakeStep::effectiveQMakeCall() const
|
||||
{
|
||||
BaseQtVersion *qtVersion = QtKitAspect::qtVersion(kit());
|
||||
QtVersion *qtVersion = QtKitAspect::qtVersion(kit());
|
||||
FilePath qmake = qtVersion ? qtVersion->qmakeFilePath() : FilePath();
|
||||
if (qmake.isEmpty())
|
||||
qmake = FilePath::fromString(tr("<no Qt version>"));
|
||||
@@ -458,7 +458,7 @@ QStringList QMakeStep::parserArguments()
|
||||
{
|
||||
// NOTE: extra parser args placed before the other args intentionally
|
||||
QStringList result = m_extraParserArgs;
|
||||
BaseQtVersion *qt = QtKitAspect::qtVersion(kit());
|
||||
QtVersion *qt = QtKitAspect::qtVersion(kit());
|
||||
QTC_ASSERT(qt, return QStringList());
|
||||
for (ProcessArgs::ConstArgIterator ait(allArguments(qt, ArgumentFlag::Expand)); ait.next(); ) {
|
||||
if (ait.isSimple())
|
||||
@@ -586,7 +586,7 @@ void QMakeStep::qtVersionChanged()
|
||||
void QMakeStep::qmakeBuildConfigChanged()
|
||||
{
|
||||
QmakeBuildConfiguration *bc = qmakeBuildConfiguration();
|
||||
bool debug = bc->qmakeBuildConfiguration() & BaseQtVersion::DebugBuild;
|
||||
bool debug = bc->qmakeBuildConfiguration() & QtVersion::DebugBuild;
|
||||
m_ignoreChange = true;
|
||||
m_buildType->setValue(debug? 0 : 1);
|
||||
m_ignoreChange = false;
|
||||
@@ -630,7 +630,7 @@ void QMakeStep::abisChanged()
|
||||
m_selectedAbis << item->text();
|
||||
}
|
||||
|
||||
if (BaseQtVersion *qtVersion = QtKitAspect::qtVersion(target()->kit())) {
|
||||
if (QtVersion *qtVersion = QtKitAspect::qtVersion(target()->kit())) {
|
||||
if (qtVersion->hasAbi(Abi::LinuxOS, Abi::AndroidLinuxFlavor)) {
|
||||
const QString prefix = QString("%1=").arg(Android::Constants::ANDROID_ABIS);
|
||||
QStringList args = m_extraArgs;
|
||||
@@ -676,11 +676,11 @@ void QMakeStep::buildConfigurationSelected()
|
||||
if (m_ignoreChange)
|
||||
return;
|
||||
QmakeBuildConfiguration *bc = qmakeBuildConfiguration();
|
||||
BaseQtVersion::QmakeBuildConfigs buildConfiguration = bc->qmakeBuildConfiguration();
|
||||
QtVersion::QmakeBuildConfigs buildConfiguration = bc->qmakeBuildConfiguration();
|
||||
if (m_buildType->value() == 0) { // debug
|
||||
buildConfiguration = buildConfiguration | BaseQtVersion::DebugBuild;
|
||||
buildConfiguration = buildConfiguration | QtVersion::DebugBuild;
|
||||
} else {
|
||||
buildConfiguration = buildConfiguration & ~BaseQtVersion::DebugBuild;
|
||||
buildConfiguration = buildConfiguration & ~QtVersion::DebugBuild;
|
||||
}
|
||||
m_ignoreChange = true;
|
||||
bc->setQMakeBuildConfiguration(buildConfiguration);
|
||||
@@ -706,7 +706,7 @@ void QMakeStep::updateAbiWidgets()
|
||||
if (!abisLabel)
|
||||
return;
|
||||
|
||||
BaseQtVersion *qtVersion = QtKitAspect::qtVersion(target()->kit());
|
||||
QtVersion *qtVersion = QtKitAspect::qtVersion(target()->kit());
|
||||
if (!qtVersion)
|
||||
return;
|
||||
|
||||
@@ -778,12 +778,12 @@ QMakeStepFactory::QMakeStepFactory()
|
||||
setFlags(BuildStepInfo::UniqueStep);
|
||||
}
|
||||
|
||||
QMakeStepConfig::TargetArchConfig QMakeStepConfig::targetArchFor(const Abi &, const BaseQtVersion *)
|
||||
QMakeStepConfig::TargetArchConfig QMakeStepConfig::targetArchFor(const Abi &, const QtVersion *)
|
||||
{
|
||||
return NoArch;
|
||||
}
|
||||
|
||||
QMakeStepConfig::OsType QMakeStepConfig::osTypeFor(const Abi &targetAbi, const BaseQtVersion *version)
|
||||
QMakeStepConfig::OsType QMakeStepConfig::osTypeFor(const Abi &targetAbi, const QtVersion *version)
|
||||
{
|
||||
OsType os = NoOsType;
|
||||
const char IOSQT[] = "Qt4ProjectManager.QtVersion.Ios";
|
||||
|
@@ -47,7 +47,7 @@ class Abi;
|
||||
class ArgumentsAspect;
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
namespace QtSupport { class BaseQtVersion; }
|
||||
namespace QtSupport { class QtVersion; }
|
||||
|
||||
namespace QmakeProjectManager {
|
||||
class QmakeBuildConfiguration;
|
||||
@@ -73,8 +73,8 @@ public:
|
||||
|
||||
// TODO remove, does nothing
|
||||
static TargetArchConfig targetArchFor(const ProjectExplorer::Abi &targetAbi,
|
||||
const QtSupport::BaseQtVersion *version);
|
||||
static OsType osTypeFor(const ProjectExplorer::Abi &targetAbi, const QtSupport::BaseQtVersion *version);
|
||||
const QtSupport::QtVersion *version);
|
||||
static OsType osTypeFor(const ProjectExplorer::Abi &targetAbi, const QtSupport::QtVersion *version);
|
||||
|
||||
QStringList toArguments() const;
|
||||
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
Q_DECLARE_FLAGS(ArgumentFlags, ArgumentFlag);
|
||||
|
||||
// the complete argument line
|
||||
QString allArguments(const QtSupport::BaseQtVersion *v,
|
||||
QString allArguments(const QtSupport::QtVersion *v,
|
||||
ArgumentFlags flags = ArgumentFlags()) const;
|
||||
QMakeStepConfig deducedArguments() const;
|
||||
// arguments passed to the pro file parser
|
||||
|
@@ -96,7 +96,7 @@ QHash<Utils::Id, PuppetCreator::PuppetType> PuppetCreator::m_qml2PuppetForKitPup
|
||||
|
||||
QByteArray PuppetCreator::qtHash() const
|
||||
{
|
||||
QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(m_target->kit());
|
||||
QtSupport::QtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(m_target->kit());
|
||||
if (currentQtVersion) {
|
||||
return QCryptographicHash::hash(currentQtVersion->dataPath().toString().toUtf8(),
|
||||
QCryptographicHash::Sha1)
|
||||
@@ -108,7 +108,7 @@ QByteArray PuppetCreator::qtHash() const
|
||||
|
||||
QDateTime PuppetCreator::qtLastModified() const
|
||||
{
|
||||
QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(m_target->kit());
|
||||
QtSupport::QtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(m_target->kit());
|
||||
if (currentQtVersion)
|
||||
return currentQtVersion->libraryPath().lastModified();
|
||||
|
||||
@@ -371,7 +371,7 @@ static Utils::FilePath pathForBinPuppet(ProjectExplorer::Target *target)
|
||||
if (!target || !target->kit())
|
||||
return {};
|
||||
|
||||
QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||
QtSupport::QtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||
|
||||
if (currentQtVersion)
|
||||
return currentQtVersion->binPath().pathAppended("qml2puppet").withExecutableSuffix();
|
||||
@@ -482,7 +482,7 @@ QProcessEnvironment PuppetCreator::processEnvironment() const
|
||||
if (QTC_GUARD(m_target)) {
|
||||
if (!useOnlyFallbackPuppet() || m_availablePuppetType == BinPathPuppet) {
|
||||
m_target->kit()->addToBuildEnvironment(environment);
|
||||
const QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(m_target->kit());
|
||||
const QtSupport::QtVersion *qt = QtSupport::QtKitAspect::qtVersion(m_target->kit());
|
||||
if (QTC_GUARD(qt)) { // Kits without a Qt version should not have a puppet!
|
||||
// Update PATH to include QT_HOST_BINS
|
||||
environment.prependOrSetPath(qt->hostBinPath());
|
||||
@@ -607,7 +607,7 @@ QString PuppetCreator::buildCommand() const
|
||||
|
||||
QString PuppetCreator::qmakeCommand() const
|
||||
{
|
||||
QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(m_target->kit());
|
||||
QtSupport::QtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(m_target->kit());
|
||||
if (currentQtVersion)
|
||||
return currentQtVersion->qmakeFilePath().toString();
|
||||
|
||||
@@ -694,7 +694,7 @@ static bool nonEarlyQt5Version(const QtSupport::QtVersionNumber ¤tQtVersio
|
||||
|
||||
bool PuppetCreator::qtIsSupported() const
|
||||
{
|
||||
QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(m_target->kit());
|
||||
QtSupport::QtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(m_target->kit());
|
||||
|
||||
return currentQtVersion
|
||||
&& currentQtVersion->isValid()
|
||||
|
@@ -2178,7 +2178,7 @@ void TextToModelMerger::collectImportErrors(QList<DocumentMessage> *errors)
|
||||
#ifndef QMLDESIGNER_TEST
|
||||
auto target = ProjectExplorer::SessionManager::startupTarget();
|
||||
if (target) {
|
||||
QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(
|
||||
QtSupport::QtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(
|
||||
target->kit());
|
||||
if (currentQtVersion && currentQtVersion->isValid()) {
|
||||
const bool qt6import = import.version().startsWith("6");
|
||||
|
@@ -231,7 +231,7 @@ void GenerateResource::generateMenuEntry()
|
||||
|
||||
temp.close();
|
||||
|
||||
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(
|
||||
QtSupport::QtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(
|
||||
currentProject->activeTarget()->kit());
|
||||
FilePath rccBinary = qtVersion->rccFilePath();
|
||||
|
||||
@@ -383,7 +383,7 @@ void GenerateResource::generateMenuEntry()
|
||||
|
||||
QTemporaryFile temp(projectPath.toString() + "/XXXXXXX.create.resource.qrc");
|
||||
|
||||
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(
|
||||
QtSupport::QtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(
|
||||
currentProject->activeTarget()->kit());
|
||||
FilePath rccBinary = qtVersion->rccFilePath();
|
||||
|
||||
|
@@ -97,7 +97,7 @@ void BasicBundleProvider::mergeBundlesForKit(ProjectExplorer::Kit *kit
|
||||
bundles.mergeBundleForLanguage(Dialect::QmlTypeInfo, defaultQmltypesBundle());
|
||||
bundles.mergeBundleForLanguage(Dialect::QmlProject, defaultQmlprojectBundle());
|
||||
|
||||
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(kit);
|
||||
QtSupport::QtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(kit);
|
||||
if (!qtVersion) {
|
||||
QmlBundle b2(defaultQt5QtQuick2Bundle());
|
||||
bundles.mergeBundleForLanguage(Dialect::Qml, b2);
|
||||
|
@@ -125,7 +125,7 @@ ModelManagerInterface::ProjectInfo ModelManager::defaultProjectInfoForProject(
|
||||
activeTarget = project->activeTarget();
|
||||
}
|
||||
Kit *activeKit = activeTarget ? activeTarget->kit() : KitManager::defaultKit();
|
||||
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(activeKit);
|
||||
QtSupport::QtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(activeKit);
|
||||
|
||||
projectInfo.tryQmlDump = false;
|
||||
|
||||
@@ -165,7 +165,7 @@ ModelManagerInterface::ProjectInfo ModelManager::defaultProjectInfoForProject(
|
||||
}
|
||||
|
||||
projectInfo.qmlDumpPath.clear();
|
||||
const QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(activeKit);
|
||||
const QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(activeKit);
|
||||
if (version && projectInfo.tryQmlDump) {
|
||||
projectInfo.qmlDumpPath = version->qmlplugindumpFilePath();
|
||||
projectInfo.qmlDumpHasRelocatableFlag = version->hasQmlDumpWithRelocatableFlag();
|
||||
|
@@ -46,7 +46,7 @@ QmlPreviewConnectionManager::~QmlPreviewConnectionManager() = default;
|
||||
|
||||
void QmlPreviewConnectionManager::setTarget(ProjectExplorer::Target *target)
|
||||
{
|
||||
QtSupport::BaseQtVersion::populateQmlFileFinder(&m_projectFileFinder, target);
|
||||
QtSupport::QtVersion::populateQmlFileFinder(&m_projectFileFinder, target);
|
||||
m_projectFileFinder.setAdditionalSearchDirectories(Utils::FilePaths());
|
||||
m_targetFileFinder.setTarget(target);
|
||||
}
|
||||
|
@@ -207,7 +207,7 @@ void QmlProfilerDetailsRewriter::documentReady(QmlJS::Document::Ptr doc)
|
||||
|
||||
void QmlProfilerDetailsRewriter::populateFileFinder(const ProjectExplorer::Target *target)
|
||||
{
|
||||
QtSupport::BaseQtVersion::populateQmlFileFinder(&m_projectFinder, target);
|
||||
QtSupport::QtVersion::populateQmlFileFinder(&m_projectFinder, target);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
@@ -205,7 +205,7 @@ static QUrl localServerUrl(RunControl *runControl)
|
||||
{
|
||||
QUrl serverUrl;
|
||||
Kit *kit = runControl->kit();
|
||||
const QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(kit);
|
||||
const QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(kit);
|
||||
if (version) {
|
||||
if (version->qtVersion() >= QtSupport::QtVersionNumber(5, 6, 0))
|
||||
serverUrl = Utils::urlFromLocalSocket();
|
||||
|
@@ -412,7 +412,7 @@ Tasks QmlProject::projectIssues(const Kit *k) const
|
||||
{
|
||||
Tasks result = Project::projectIssues(k);
|
||||
|
||||
const QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(k);
|
||||
const QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(k);
|
||||
if (!version)
|
||||
result.append(createProjectTask(Task::TaskType::Error, tr("No Qt version set in kit.")));
|
||||
|
||||
@@ -471,7 +471,7 @@ Project::RestoreResult QmlProject::fromMap(const QVariantMap &map, QString *erro
|
||||
auto setKitWithVersion = [&](int qtMajorVersion) {
|
||||
const QList<Kit *> qtVersionkits
|
||||
= Utils::filtered(kits, [qtMajorVersion](const Kit *k) {
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(k);
|
||||
QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(k);
|
||||
return (version && version->qtVersion().majorVersion == qtMajorVersion);
|
||||
});
|
||||
if (!qtVersionkits.isEmpty()) {
|
||||
|
@@ -190,7 +190,7 @@ FilePath QmlProjectRunConfiguration::qmlRuntimeFilePath() const
|
||||
return FilePath::fromString(qmlViewer);
|
||||
|
||||
Kit *kit = target()->kit();
|
||||
BaseQtVersion *version = QtKitAspect::qtVersion(kit);
|
||||
QtVersion *version = QtKitAspect::qtVersion(kit);
|
||||
if (!version) // No Qt version in Kit. Don't try to run QML runtime.
|
||||
return {};
|
||||
|
||||
@@ -261,7 +261,7 @@ void QmlProjectRunConfiguration::createQtVersionAspect()
|
||||
m_qtversionAspect->setSettingsKey("QmlProjectManager.kit");
|
||||
|
||||
Kit *kit = target()->kit();
|
||||
BaseQtVersion *version = QtKitAspect::qtVersion(kit);
|
||||
QtVersion *version = QtKitAspect::qtVersion(kit);
|
||||
|
||||
if (version) {
|
||||
const QmlBuildSystem *buildSystem = qobject_cast<QmlBuildSystem *>(target()->buildSystem());
|
||||
@@ -288,7 +288,7 @@ void QmlProjectRunConfiguration::createQtVersionAspect()
|
||||
Kit *currentKit = target()->kit();
|
||||
|
||||
const QList<Kit *> kits = Utils::filtered(KitManager::kits(), [&](const Kit *k) {
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(k);
|
||||
QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(k);
|
||||
return (version && version->qtVersion().majorVersion == preferedQtVersion)
|
||||
&& DeviceTypeKitAspect::deviceTypeId(k)
|
||||
== ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE;
|
||||
|
@@ -221,8 +221,8 @@ FilePath QnxConfiguration::sdpPath() const
|
||||
|
||||
QnxQtVersion *QnxConfiguration::qnxQtVersion(const Target &target) const
|
||||
{
|
||||
foreach (BaseQtVersion *version,
|
||||
QtVersionManager::instance()->versions(Utils::equal(&BaseQtVersion::type,
|
||||
foreach (QtVersion *version,
|
||||
QtVersionManager::instance()->versions(Utils::equal(&QtVersion::type,
|
||||
QString::fromLatin1(Constants::QNX_QNX_QT)))) {
|
||||
auto qnxQt = dynamic_cast<QnxQtVersion *>(version);
|
||||
if (qnxQt && qnxQt->sdpPath() == sdpPath()) {
|
||||
|
@@ -57,11 +57,11 @@ QnxDeployQtLibrariesDialog::QnxDeployQtLibrariesDialog(const IDevice::ConstPtr &
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
const QList<BaseQtVersion*> qtVersions
|
||||
const QList<QtVersion*> qtVersions
|
||||
= QtVersionManager::sortVersions(
|
||||
QtVersionManager::versions(BaseQtVersion::isValidPredicate(Utils::equal(&BaseQtVersion::type,
|
||||
QtVersionManager::versions(QtVersion::isValidPredicate(Utils::equal(&QtVersion::type,
|
||||
QString::fromLatin1(Constants::QNX_QNX_QT)))));
|
||||
for (BaseQtVersion *v : qtVersions)
|
||||
for (QtVersion *v : qtVersions)
|
||||
m_ui->qtLibraryCombo->addItem(v->displayName(), v->uniqueId());
|
||||
|
||||
m_ui->basePathLabel->setText(QString());
|
||||
|
@@ -86,7 +86,7 @@ QString QnxQtVersion::description() const
|
||||
|
||||
QSet<Id> QnxQtVersion::availableFeatures() const
|
||||
{
|
||||
QSet<Id> features = QtSupport::BaseQtVersion::availableFeatures();
|
||||
QSet<Id> features = QtSupport::QtVersion::availableFeatures();
|
||||
features.insert(QNX_QNX_FEATURE);
|
||||
features.remove(QtSupport::Constants::FEATURE_QT_CONSOLE);
|
||||
features.remove(QtSupport::Constants::FEATURE_QT_WEBKIT);
|
||||
@@ -134,26 +134,26 @@ QString QnxQtVersion::cpuDir() const
|
||||
|
||||
QVariantMap QnxQtVersion::toMap() const
|
||||
{
|
||||
QVariantMap result = BaseQtVersion::toMap();
|
||||
QVariantMap result = QtVersion::toMap();
|
||||
result.insert(SDP_PATH_KEY, sdpPath().toVariant());
|
||||
return result;
|
||||
}
|
||||
|
||||
void QnxQtVersion::fromMap(const QVariantMap &map)
|
||||
{
|
||||
BaseQtVersion::fromMap(map);
|
||||
QtVersion::fromMap(map);
|
||||
setSdpPath(FilePath::fromVariant(map.value(SDP_PATH_KEY)));
|
||||
}
|
||||
|
||||
Abis QnxQtVersion::detectQtAbis() const
|
||||
{
|
||||
ensureMkSpecParsed();
|
||||
return QnxUtils::convertAbis(BaseQtVersion::detectQtAbis());
|
||||
return QnxUtils::convertAbis(QtVersion::detectQtAbis());
|
||||
}
|
||||
|
||||
void QnxQtVersion::addToEnvironment(const Kit *k, Environment &env) const
|
||||
{
|
||||
QtSupport::BaseQtVersion::addToEnvironment(k, env);
|
||||
QtSupport::QtVersion::addToEnvironment(k, env);
|
||||
updateEnvironment();
|
||||
env.modify(m_qnxEnv);
|
||||
env.prependOrSetLibrarySearchPath(libraryPath());
|
||||
@@ -174,7 +174,7 @@ QtSupport::QtConfigWidget *QnxQtVersion::createConfigurationWidget() const
|
||||
|
||||
bool QnxQtVersion::isValid() const
|
||||
{
|
||||
return QtSupport::BaseQtVersion::isValid() && !sdpPath().isEmpty();
|
||||
return QtSupport::QtVersion::isValid() && !sdpPath().isEmpty();
|
||||
}
|
||||
|
||||
QString QnxQtVersion::invalidReason() const
|
||||
@@ -182,7 +182,7 @@ QString QnxQtVersion::invalidReason() const
|
||||
if (sdpPath().isEmpty())
|
||||
return QCoreApplication::translate("Qnx::Internal::QnxQtVersion",
|
||||
"No SDP path was set up.");
|
||||
return QtSupport::BaseQtVersion::invalidReason();
|
||||
return QtSupport::QtVersion::invalidReason();
|
||||
}
|
||||
|
||||
FilePath QnxQtVersion::sdpPath() const
|
||||
|
@@ -35,7 +35,7 @@
|
||||
namespace Qnx {
|
||||
namespace Internal {
|
||||
|
||||
class QnxQtVersion : public QtSupport::BaseQtVersion
|
||||
class QnxQtVersion : public QtSupport::QtVersion
|
||||
{
|
||||
public:
|
||||
QnxQtVersion();
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -56,7 +56,7 @@ class Target;
|
||||
namespace QtSupport {
|
||||
|
||||
class QtConfigWidget;
|
||||
class BaseQtVersion;
|
||||
class QtVersion;
|
||||
|
||||
class QTSUPPORT_EXPORT QtVersionNumber
|
||||
{
|
||||
@@ -82,20 +82,20 @@ public:
|
||||
|
||||
namespace Internal {
|
||||
class QtOptionsPageWidget;
|
||||
class BaseQtVersionPrivate;
|
||||
class QtVersionPrivate;
|
||||
}
|
||||
|
||||
class QTSUPPORT_EXPORT BaseQtVersion
|
||||
class QTSUPPORT_EXPORT QtVersion
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(QtSupport::BaseQtVersion)
|
||||
Q_DECLARE_TR_FUNCTIONS(QtSupport::QtVersion)
|
||||
|
||||
public:
|
||||
using Predicate = std::function<bool(const BaseQtVersion *)>;
|
||||
using Predicate = std::function<bool(const QtVersion *)>;
|
||||
|
||||
virtual ~BaseQtVersion();
|
||||
virtual ~QtVersion();
|
||||
|
||||
virtual void fromMap(const QVariantMap &map);
|
||||
virtual bool equals(BaseQtVersion *other);
|
||||
virtual bool equals(QtVersion *other);
|
||||
|
||||
bool isAutodetected() const;
|
||||
QString detectionSource() const;
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
|
||||
virtual QVariantMap toMap() const;
|
||||
virtual bool isValid() const;
|
||||
static Predicate isValidPredicate(const Predicate &predicate = Predicate());
|
||||
static Predicate isValidPredicate(const Predicate &predicate = {});
|
||||
virtual QString invalidReason() const;
|
||||
virtual QStringList warningReason() const;
|
||||
|
||||
@@ -229,7 +229,7 @@ public:
|
||||
|
||||
Utils::MacroExpander *macroExpander() const; // owned by the Qt version
|
||||
static std::unique_ptr<Utils::MacroExpander>
|
||||
createMacroExpander(const std::function<const BaseQtVersion *()> &qtVersion);
|
||||
createMacroExpander(const std::function<const QtVersion *()> &qtVersion);
|
||||
|
||||
static void populateQmlFileFinder(Utils::FileInProjectFinder *finder,
|
||||
const ProjectExplorer::Target *target);
|
||||
@@ -239,8 +239,8 @@ public:
|
||||
virtual bool supportsMultipleQtAbis() const;
|
||||
|
||||
protected:
|
||||
BaseQtVersion();
|
||||
BaseQtVersion(const BaseQtVersion &other) = delete;
|
||||
QtVersion();
|
||||
QtVersion(const QtVersion &other) = delete;
|
||||
|
||||
virtual QSet<Utils::Id> availableFeatures() const;
|
||||
virtual ProjectExplorer::Tasks reportIssuesImpl(const QString &proFile, const QString &buildDir) const;
|
||||
@@ -261,15 +261,15 @@ private:
|
||||
|
||||
friend class QtVersionFactory;
|
||||
friend class QtVersionManager;
|
||||
friend class Internal::BaseQtVersionPrivate;
|
||||
friend class Internal::QtVersionPrivate;
|
||||
friend class Internal::QtOptionsPageWidget;
|
||||
|
||||
void setId(int id);
|
||||
BaseQtVersion *clone() const;
|
||||
QtVersion *clone() const;
|
||||
|
||||
Internal::BaseQtVersionPrivate *d = nullptr;
|
||||
Internal::QtVersionPrivate *d = nullptr;
|
||||
};
|
||||
|
||||
} // QtSupport
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QtSupport::BaseQtVersion::QmakeBuildConfigs)
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QtSupport::QtVersion::QmakeBuildConfigs)
|
||||
|
@@ -119,7 +119,7 @@ ExampleSetModel::ExampleSetModel()
|
||||
&ExampleSetModel::helpManagerInitialized);
|
||||
}
|
||||
|
||||
void ExampleSetModel::recreateModel(const QList<BaseQtVersion *> &qtVersions)
|
||||
void ExampleSetModel::recreateModel(const QList<QtVersion *> &qtVersions)
|
||||
{
|
||||
beginResetModel();
|
||||
clear();
|
||||
@@ -137,7 +137,7 @@ void ExampleSetModel::recreateModel(const QList<BaseQtVersion *> &qtVersions)
|
||||
extraManifestDirs.insert(set.manifestPath);
|
||||
}
|
||||
|
||||
foreach (BaseQtVersion *version, qtVersions) {
|
||||
foreach (QtVersion *version, qtVersions) {
|
||||
// sanitize away qt versions that have already been added through extra sets
|
||||
if (extraManifestDirs.contains(version->docsPath().toString())) {
|
||||
if (debugExamples()) {
|
||||
@@ -156,7 +156,7 @@ void ExampleSetModel::recreateModel(const QList<BaseQtVersion *> &qtVersions)
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
int ExampleSetModel::indexForQtVersion(BaseQtVersion *qtVersion) const
|
||||
int ExampleSetModel::indexForQtVersion(QtVersion *qtVersion) const
|
||||
{
|
||||
// return either the entry with the same QtId, or an extra example set with same path
|
||||
|
||||
@@ -525,12 +525,12 @@ QPixmap ExamplesListModel::fetchPixmapAndUpdatePixmapCache(const QString &url) c
|
||||
|
||||
void ExampleSetModel::updateQtVersionList()
|
||||
{
|
||||
QList<BaseQtVersion *> versions = QtVersionManager::sortVersions(QtVersionManager::versions(
|
||||
[](const BaseQtVersion *v) { return v->hasExamples() || v->hasDemos(); }));
|
||||
QList<QtVersion *> versions = QtVersionManager::sortVersions(QtVersionManager::versions(
|
||||
[](const QtVersion *v) { return v->hasExamples() || v->hasDemos(); }));
|
||||
|
||||
// prioritize default qt version
|
||||
ProjectExplorer::Kit *defaultKit = ProjectExplorer::KitManager::defaultKit();
|
||||
BaseQtVersion *defaultVersion = QtKitAspect::qtVersion(defaultKit);
|
||||
QtVersion *defaultVersion = QtKitAspect::qtVersion(defaultKit);
|
||||
if (defaultVersion && versions.contains(defaultVersion))
|
||||
versions.move(versions.indexOf(defaultVersion), 0);
|
||||
|
||||
@@ -544,13 +544,13 @@ void ExampleSetModel::updateQtVersionList()
|
||||
|
||||
if (currentType == ExampleSetModel::InvalidExampleSet) {
|
||||
// select examples corresponding to 'highest' Qt version
|
||||
BaseQtVersion *highestQt = findHighestQtVersion(versions);
|
||||
QtVersion *highestQt = findHighestQtVersion(versions);
|
||||
currentIndex = indexForQtVersion(highestQt);
|
||||
} else if (currentType == ExampleSetModel::QtExampleSet) {
|
||||
// try to select the previously selected Qt version, or
|
||||
// select examples corresponding to 'highest' Qt version
|
||||
int currentQtId = getQtId(currentIndex);
|
||||
BaseQtVersion *newQtVersion = QtVersionManager::version(currentQtId);
|
||||
QtVersion *newQtVersion = QtVersionManager::version(currentQtId);
|
||||
if (!newQtVersion)
|
||||
newQtVersion = findHighestQtVersion(versions);
|
||||
currentIndex = indexForQtVersion(newQtVersion);
|
||||
@@ -559,10 +559,10 @@ void ExampleSetModel::updateQtVersionList()
|
||||
emit selectedExampleSetChanged(currentIndex);
|
||||
}
|
||||
|
||||
BaseQtVersion *ExampleSetModel::findHighestQtVersion(const QList<BaseQtVersion *> &versions) const
|
||||
QtVersion *ExampleSetModel::findHighestQtVersion(const QList<QtVersion *> &versions) const
|
||||
{
|
||||
BaseQtVersion *newVersion = nullptr;
|
||||
for (BaseQtVersion *version : versions) {
|
||||
QtVersion *newVersion = nullptr;
|
||||
for (QtVersion *version : versions) {
|
||||
if (!newVersion) {
|
||||
newVersion = version;
|
||||
} else {
|
||||
@@ -601,7 +601,7 @@ QStringList ExampleSetModel::exampleSources(QString *examplesInstallPath, QStrin
|
||||
demosPath = exampleSet.examplesPath;
|
||||
} else if (currentType == ExampleSetModel::QtExampleSet) {
|
||||
int qtId = getQtId(m_selectedExampleSetIndex);
|
||||
foreach (BaseQtVersion *version, QtVersionManager::versions()) {
|
||||
foreach (QtVersion *version, QtVersionManager::versions()) {
|
||||
if (version->uniqueId() == qtId) {
|
||||
manifestScanPath = version->docsPath().toString();
|
||||
examplesPath = version->examplesPath().toString();
|
||||
@@ -660,7 +660,7 @@ void ExampleSetModel::selectExampleSet(int index)
|
||||
m_selectedExampleSetIndex = index;
|
||||
writeCurrentIdToSettings(m_selectedExampleSetIndex);
|
||||
if (getType(m_selectedExampleSetIndex) == ExampleSetModel::QtExampleSet) {
|
||||
BaseQtVersion *selectedQtVersion = QtVersionManager::version(getQtId(m_selectedExampleSetIndex));
|
||||
QtVersion *selectedQtVersion = QtVersionManager::version(getQtId(m_selectedExampleSetIndex));
|
||||
m_selectedQtTypes = selectedQtVersion->targetDeviceTypes();
|
||||
}
|
||||
emit selectedExampleSetChanged(m_selectedExampleSetIndex);
|
||||
|
@@ -80,10 +80,10 @@ private:
|
||||
int getQtId(int index) const;
|
||||
int getExtraExampleSetIndex(int index) const;
|
||||
|
||||
BaseQtVersion *findHighestQtVersion(const QList<BaseQtVersion *> &versions) const;
|
||||
QtVersion *findHighestQtVersion(const QList<QtVersion *> &versions) const;
|
||||
|
||||
int indexForQtVersion(BaseQtVersion *qtVersion) const;
|
||||
void recreateModel(const QList<BaseQtVersion *> &qtVersions);
|
||||
int indexForQtVersion(QtVersion *qtVersion) const;
|
||||
void recreateModel(const QList<QtVersion *> &qtVersions);
|
||||
void updateQtVersionList();
|
||||
|
||||
void qtVersionManagerLoaded();
|
||||
|
@@ -74,7 +74,7 @@ Tasks QScxmlcGenerator::parseIssues(const QByteArray &processStderr)
|
||||
|
||||
Utils::FilePath QScxmlcGenerator::command() const
|
||||
{
|
||||
QtSupport::BaseQtVersion *version = nullptr;
|
||||
QtSupport::QtVersion *version = nullptr;
|
||||
Target *target;
|
||||
if ((target = project()->activeTarget()))
|
||||
version = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||
|
@@ -58,7 +58,7 @@ void QmlDebuggingAspect::addToLayout(LayoutBuilder &builder)
|
||||
builder.addRow({{}, warningLabel});
|
||||
const auto changeHandler = [this, warningLabel] {
|
||||
QString warningText;
|
||||
const bool supported = m_kit && BaseQtVersion::isQmlDebuggingSupported(m_kit, &warningText);
|
||||
const bool supported = m_kit && QtVersion::isQmlDebuggingSupported(m_kit, &warningText);
|
||||
if (!supported) {
|
||||
setValue(TriState::Default);
|
||||
} else if (value() == TriState::Enabled) {
|
||||
@@ -93,7 +93,7 @@ void QtQuickCompilerAspect::addToLayout(LayoutBuilder &builder)
|
||||
const auto changeHandler = [this, warningLabel] {
|
||||
QString warningText;
|
||||
const bool supported = m_kit
|
||||
&& BaseQtVersion::isQtQuickCompilerSupported(m_kit, &warningText);
|
||||
&& QtVersion::isQtQuickCompilerSupported(m_kit, &warningText);
|
||||
if (!supported)
|
||||
setValue(TriState::Default);
|
||||
if (value() == TriState::Enabled
|
||||
|
@@ -35,11 +35,11 @@ CppKitInfo::CppKitInfo(ProjectExplorer::Kit *kit)
|
||||
{
|
||||
if (kit && (qtVersion = QtKitAspect::qtVersion(kit))) {
|
||||
if (qtVersion->qtVersion() < QtSupport::QtVersionNumber(5, 0, 0))
|
||||
projectPartQtVersion = Utils::QtVersion::Qt4;
|
||||
projectPartQtVersion = Utils::QtMajorVersion::Qt4;
|
||||
else if (qtVersion->qtVersion() < QtSupport::QtVersionNumber(6, 0, 0))
|
||||
projectPartQtVersion = Utils::QtVersion::Qt5;
|
||||
projectPartQtVersion = Utils::QtMajorVersion::Qt5;
|
||||
else
|
||||
projectPartQtVersion = Utils::QtVersion::Qt6;
|
||||
projectPartQtVersion = Utils::QtMajorVersion::Qt6;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -31,14 +31,14 @@
|
||||
|
||||
namespace QtSupport {
|
||||
|
||||
class BaseQtVersion;
|
||||
class QtVersion;
|
||||
|
||||
class QTSUPPORT_EXPORT CppKitInfo : public ProjectExplorer::KitInfo
|
||||
{
|
||||
public:
|
||||
CppKitInfo(ProjectExplorer::Kit *kit);
|
||||
|
||||
BaseQtVersion *qtVersion = nullptr;
|
||||
QtVersion *qtVersion = nullptr;
|
||||
};
|
||||
|
||||
} // namespace QtSupport
|
||||
|
@@ -59,7 +59,7 @@ public:
|
||||
m_combo->setSizePolicy(QSizePolicy::Ignored, m_combo->sizePolicy().verticalPolicy());
|
||||
m_combo->addItem(tr("None"), -1);
|
||||
|
||||
QList<int> versionIds = Utils::transform(QtVersionManager::versions(), &BaseQtVersion::uniqueId);
|
||||
QList<int> versionIds = Utils::transform(QtVersionManager::versions(), &QtVersion::uniqueId);
|
||||
versionsChanged(versionIds, QList<int>(), QList<int>());
|
||||
|
||||
m_manageButton = createManageButton(Constants::QTVERSION_SETTINGS_PAGE_ID);
|
||||
@@ -96,7 +96,7 @@ private:
|
||||
}
|
||||
|
||||
private:
|
||||
static QString itemNameFor(const BaseQtVersion *v)
|
||||
static QString itemNameFor(const QtVersion *v)
|
||||
{
|
||||
QTC_ASSERT(v, return QString());
|
||||
QString name = v->displayName();
|
||||
@@ -108,7 +108,7 @@ private:
|
||||
void versionsChanged(const QList<int> &added, const QList<int> &removed, const QList<int> &changed)
|
||||
{
|
||||
for (const int id : added) {
|
||||
BaseQtVersion *v = QtVersionManager::version(id);
|
||||
QtVersion *v = QtVersionManager::version(id);
|
||||
QTC_CHECK(v);
|
||||
QTC_CHECK(findQtVersion(id) < 0);
|
||||
m_combo->addItem(itemNameFor(v), id);
|
||||
@@ -119,7 +119,7 @@ private:
|
||||
m_combo->removeItem(pos);
|
||||
}
|
||||
for (const int id : changed) {
|
||||
BaseQtVersion *v = QtVersionManager::version(id);
|
||||
QtVersion *v = QtVersionManager::version(id);
|
||||
int pos = findQtVersion(id);
|
||||
QTC_CHECK(pos >= 0);
|
||||
m_combo->setItemText(pos, itemNameFor(v));
|
||||
@@ -166,8 +166,8 @@ void QtKitAspect::setup(Kit *k)
|
||||
const Abi tcAbi = ToolChainKitAspect::targetAbi(k);
|
||||
const Id deviceType = DeviceTypeKitAspect::deviceTypeId(k);
|
||||
|
||||
const QList<BaseQtVersion *> matches
|
||||
= QtVersionManager::versions([&tcAbi, &deviceType](const BaseQtVersion *qt) {
|
||||
const QList<QtVersion *> matches
|
||||
= QtVersionManager::versions([&tcAbi, &deviceType](const QtVersion *qt) {
|
||||
return qt->targetDeviceTypes().contains(deviceType)
|
||||
&& Utils::contains(qt->qtAbis(), [&tcAbi](const Abi &qtAbi) {
|
||||
return qtAbi.isCompatibleWith(tcAbi); });
|
||||
@@ -177,14 +177,14 @@ void QtKitAspect::setup(Kit *k)
|
||||
|
||||
// An MSVC 2015 toolchain is compatible with an MSVC 2017 Qt, but we prefer an
|
||||
// MSVC 2015 Qt if we find one.
|
||||
const QList<BaseQtVersion *> exactMatches = Utils::filtered(matches,
|
||||
[&tcAbi](const BaseQtVersion *qt) {
|
||||
const QList<QtVersion *> exactMatches = Utils::filtered(matches,
|
||||
[&tcAbi](const QtVersion *qt) {
|
||||
return qt->qtAbis().contains(tcAbi);
|
||||
});
|
||||
const QList<BaseQtVersion *> &candidates = !exactMatches.empty() ? exactMatches : matches;
|
||||
const QList<QtVersion *> &candidates = !exactMatches.empty() ? exactMatches : matches;
|
||||
|
||||
BaseQtVersion * const qtFromPath = QtVersionManager::version(
|
||||
equal(&BaseQtVersion::detectionSource, QString::fromLatin1("PATH")));
|
||||
QtVersion * const qtFromPath = QtVersionManager::version(
|
||||
equal(&QtVersion::detectionSource, QString::fromLatin1("PATH")));
|
||||
if (qtFromPath && candidates.contains(qtFromPath))
|
||||
k->setValue(id(), qtFromPath->uniqueId());
|
||||
else
|
||||
@@ -194,7 +194,7 @@ void QtKitAspect::setup(Kit *k)
|
||||
Tasks QtKitAspect::validate(const Kit *k) const
|
||||
{
|
||||
QTC_ASSERT(QtVersionManager::isLoaded(), return { });
|
||||
BaseQtVersion *version = qtVersion(k);
|
||||
QtVersion *version = qtVersion(k);
|
||||
if (!version)
|
||||
return { };
|
||||
|
||||
@@ -204,7 +204,7 @@ Tasks QtKitAspect::validate(const Kit *k) const
|
||||
void QtKitAspect::fix(Kit *k)
|
||||
{
|
||||
QTC_ASSERT(QtVersionManager::isLoaded(), return);
|
||||
BaseQtVersion *version = qtVersion(k);
|
||||
QtVersion *version = qtVersion(k);
|
||||
if (!version) {
|
||||
if (qtVersionId(k) >= 0) {
|
||||
qWarning("Qt version is no longer known, removing from kit \"%s\".",
|
||||
@@ -270,19 +270,19 @@ KitAspectWidget *QtKitAspect::createConfigWidget(Kit *k) const
|
||||
|
||||
QString QtKitAspect::displayNamePostfix(const Kit *k) const
|
||||
{
|
||||
BaseQtVersion *version = qtVersion(k);
|
||||
QtVersion *version = qtVersion(k);
|
||||
return version ? version->displayName() : QString();
|
||||
}
|
||||
|
||||
KitAspect::ItemList QtKitAspect::toUserOutput(const Kit *k) const
|
||||
{
|
||||
BaseQtVersion *version = qtVersion(k);
|
||||
QtVersion *version = qtVersion(k);
|
||||
return {{tr("Qt version"), version ? version->displayName() : tr("None")}};
|
||||
}
|
||||
|
||||
void QtKitAspect::addToBuildEnvironment(const Kit *k, Environment &env) const
|
||||
{
|
||||
BaseQtVersion *version = qtVersion(k);
|
||||
QtVersion *version = qtVersion(k);
|
||||
if (version)
|
||||
version->addToEnvironment(k, env);
|
||||
}
|
||||
@@ -298,7 +298,7 @@ class QtMacroSubProvider
|
||||
{
|
||||
public:
|
||||
QtMacroSubProvider(Kit *kit)
|
||||
: expander(BaseQtVersion::createMacroExpander(
|
||||
: expander(QtVersion::createMacroExpander(
|
||||
[kit] { return QtKitAspect::qtVersion(kit); }))
|
||||
{}
|
||||
|
||||
@@ -317,12 +317,12 @@ void QtKitAspect::addToMacroExpander(Kit *kit, MacroExpander *expander) const
|
||||
|
||||
expander->registerVariable("Qt:Name", tr("Name of Qt Version"),
|
||||
[kit]() -> QString {
|
||||
BaseQtVersion *version = qtVersion(kit);
|
||||
QtVersion *version = qtVersion(kit);
|
||||
return version ? version->displayName() : tr("unknown");
|
||||
});
|
||||
expander->registerVariable("Qt:qmakeExecutable", tr("Path to the qmake executable"),
|
||||
[kit]() -> QString {
|
||||
BaseQtVersion *version = qtVersion(kit);
|
||||
QtVersion *version = qtVersion(kit);
|
||||
return version ? version->qmakeFilePath().path() : QString();
|
||||
});
|
||||
}
|
||||
@@ -346,7 +346,7 @@ int QtKitAspect::qtVersionId(const Kit *k)
|
||||
id = -1;
|
||||
} else {
|
||||
QString source = data.toString();
|
||||
BaseQtVersion *v = QtVersionManager::version([source](const BaseQtVersion *v) { return v->detectionSource() == source; });
|
||||
QtVersion *v = QtVersionManager::version([source](const QtVersion *v) { return v->detectionSource() == source; });
|
||||
if (v)
|
||||
id = v->uniqueId();
|
||||
}
|
||||
@@ -359,12 +359,12 @@ void QtKitAspect::setQtVersionId(Kit *k, const int id)
|
||||
k->setValue(QtKitAspect::id(), id);
|
||||
}
|
||||
|
||||
BaseQtVersion *QtKitAspect::qtVersion(const Kit *k)
|
||||
QtVersion *QtKitAspect::qtVersion(const Kit *k)
|
||||
{
|
||||
return QtVersionManager::version(qtVersionId(k));
|
||||
}
|
||||
|
||||
void QtKitAspect::setQtVersion(Kit *k, const BaseQtVersion *v)
|
||||
void QtKitAspect::setQtVersion(Kit *k, const QtVersion *v)
|
||||
{
|
||||
if (!v)
|
||||
setQtVersionId(k, -1);
|
||||
@@ -383,7 +383,7 @@ void QtKitAspect::addHostBinariesToPath(const Kit *k, Environment &env)
|
||||
if (const ToolChain *tc = ToolChainKitAspect::cxxToolChain(k))
|
||||
env.prependOrSetPath(tc->compilerCommand().parentDir());
|
||||
|
||||
if (const BaseQtVersion *qt = qtVersion(k))
|
||||
if (const QtVersion *qt = qtVersion(k))
|
||||
env.prependOrSetPath(qt->hostBinPath());
|
||||
}
|
||||
|
||||
@@ -413,7 +413,7 @@ void QtKitAspect::kitsWereLoaded()
|
||||
Kit::Predicate QtKitAspect::platformPredicate(Id platform)
|
||||
{
|
||||
return [platform](const Kit *kit) -> bool {
|
||||
BaseQtVersion *version = QtKitAspect::qtVersion(kit);
|
||||
QtVersion *version = QtKitAspect::qtVersion(kit);
|
||||
return version && version->targetDeviceTypes().contains(platform);
|
||||
};
|
||||
}
|
||||
@@ -423,7 +423,7 @@ Kit::Predicate QtKitAspect::qtVersionPredicate(const QSet<Id> &required,
|
||||
const QtVersionNumber &max)
|
||||
{
|
||||
return [required, min, max](const Kit *kit) -> bool {
|
||||
BaseQtVersion *version = QtKitAspect::qtVersion(kit);
|
||||
QtVersion *version = QtKitAspect::qtVersion(kit);
|
||||
if (!version)
|
||||
return false;
|
||||
QtVersionNumber current = version->qtVersion();
|
||||
@@ -437,19 +437,19 @@ Kit::Predicate QtKitAspect::qtVersionPredicate(const QSet<Id> &required,
|
||||
|
||||
QSet<Id> QtKitAspect::supportedPlatforms(const Kit *k) const
|
||||
{
|
||||
BaseQtVersion *version = QtKitAspect::qtVersion(k);
|
||||
QtVersion *version = QtKitAspect::qtVersion(k);
|
||||
return version ? version->targetDeviceTypes() : QSet<Id>();
|
||||
}
|
||||
|
||||
QSet<Id> QtKitAspect::availableFeatures(const Kit *k) const
|
||||
{
|
||||
BaseQtVersion *version = QtKitAspect::qtVersion(k);
|
||||
QtVersion *version = QtKitAspect::qtVersion(k);
|
||||
return version ? version->features() : QSet<Id>();
|
||||
}
|
||||
|
||||
int QtKitAspect::weight(const Kit *k) const
|
||||
{
|
||||
const BaseQtVersion * const qt = qtVersion(k);
|
||||
const QtVersion * const qt = qtVersion(k);
|
||||
if (!qt)
|
||||
return 0;
|
||||
if (!qt->targetDeviceTypes().contains(DeviceTypeKitAspect::deviceTypeId(k)))
|
||||
|
@@ -60,8 +60,8 @@ public:
|
||||
static Utils::Id id();
|
||||
static int qtVersionId(const ProjectExplorer::Kit *k);
|
||||
static void setQtVersionId(ProjectExplorer::Kit *k, const int id);
|
||||
static BaseQtVersion *qtVersion(const ProjectExplorer::Kit *k);
|
||||
static void setQtVersion(ProjectExplorer::Kit *k, const BaseQtVersion *v);
|
||||
static QtVersion *qtVersion(const ProjectExplorer::Kit *k);
|
||||
static void setQtVersion(ProjectExplorer::Kit *k, const QtVersion *v);
|
||||
|
||||
static void addHostBinariesToPath(const ProjectExplorer::Kit *k, Utils::Environment &env);
|
||||
|
||||
|
@@ -77,7 +77,7 @@ class QtVersionItem : public TreeItem
|
||||
Q_DECLARE_TR_FUNCTIONS(QtSupport::QtVersion)
|
||||
|
||||
public:
|
||||
explicit QtVersionItem(BaseQtVersion *version)
|
||||
explicit QtVersionItem(QtVersion *version)
|
||||
: m_version(version)
|
||||
{}
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
delete m_version;
|
||||
}
|
||||
|
||||
void setVersion(BaseQtVersion *version)
|
||||
void setVersion(QtVersion *version)
|
||||
{
|
||||
m_version = version;
|
||||
update();
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
return m_version ? m_version->uniqueId() : -1;
|
||||
}
|
||||
|
||||
BaseQtVersion *version() const
|
||||
QtVersion *version() const
|
||||
{
|
||||
return m_version;
|
||||
}
|
||||
@@ -161,7 +161,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
BaseQtVersion *m_version = nullptr;
|
||||
QtVersion *m_version = nullptr;
|
||||
QIcon m_icon;
|
||||
QString m_buildLog;
|
||||
bool m_changed = false;
|
||||
@@ -186,7 +186,7 @@ private:
|
||||
void userChangedCurrentVersion();
|
||||
void updateWidgets();
|
||||
void setupLinkWithQtButton();
|
||||
BaseQtVersion *currentVersion() const;
|
||||
QtVersion *currentVersion() const;
|
||||
QtVersionItem *currentItem() const;
|
||||
void showDebuggingBuildLog(const QtVersionItem *item);
|
||||
|
||||
@@ -221,11 +221,11 @@ private:
|
||||
QString toolTip;
|
||||
QIcon icon;
|
||||
};
|
||||
ValidityInfo validInformation(const BaseQtVersion *version);
|
||||
QList<ProjectExplorer::ToolChain*> toolChains(const BaseQtVersion *version);
|
||||
QByteArray defaultToolChainId(const BaseQtVersion *version);
|
||||
ValidityInfo validInformation(const QtVersion *version);
|
||||
QList<ProjectExplorer::ToolChain*> toolChains(const QtVersion *version);
|
||||
QByteArray defaultToolChainId(const QtVersion *version);
|
||||
|
||||
bool isNameUnique(const BaseQtVersion *version);
|
||||
bool isNameUnique(const QtVersion *version);
|
||||
void updateVersionItem(QtVersionItem *item);
|
||||
|
||||
TreeModel<TreeItem, TreeItem, QtVersionItem> *m_model;
|
||||
@@ -295,7 +295,7 @@ QtOptionsPageWidget::QtOptionsPageWidget()
|
||||
if (selectedIndex >= 0)
|
||||
m_ui.documentationSetting->setCurrentIndex(selectedIndex);
|
||||
|
||||
QList<int> additions = transform(QtVersionManager::versions(), &BaseQtVersion::uniqueId);
|
||||
QList<int> additions = transform(QtVersionManager::versions(), &QtVersion::uniqueId);
|
||||
|
||||
updateQtVersions(additions, QList<int>(), QList<int>());
|
||||
|
||||
@@ -329,12 +329,12 @@ QtOptionsPageWidget::QtOptionsPageWidget()
|
||||
auto chooser = new VariableChooser(this);
|
||||
chooser->addSupportedWidget(m_versionUi.nameEdit, "Qt:Name");
|
||||
chooser->addMacroExpanderProvider([this] {
|
||||
BaseQtVersion *version = currentVersion();
|
||||
QtVersion *version = currentVersion();
|
||||
return version ? version->macroExpander() : nullptr;
|
||||
});
|
||||
}
|
||||
|
||||
BaseQtVersion *QtOptionsPageWidget::currentVersion() const
|
||||
QtVersion *QtOptionsPageWidget::currentVersion() const
|
||||
{
|
||||
QtVersionItem *item = currentItem();
|
||||
if (!item)
|
||||
@@ -414,7 +414,7 @@ static QString formatAbiHtmlList(const Abis &abis)
|
||||
return result;
|
||||
}
|
||||
|
||||
QtOptionsPageWidget::ValidityInfo QtOptionsPageWidget::validInformation(const BaseQtVersion *version)
|
||||
QtOptionsPageWidget::ValidityInfo QtOptionsPageWidget::validInformation(const QtVersion *version)
|
||||
{
|
||||
ValidityInfo info;
|
||||
info.icon = m_validVersionIcon;
|
||||
@@ -477,7 +477,7 @@ QtOptionsPageWidget::ValidityInfo QtOptionsPageWidget::validInformation(const Ba
|
||||
return info;
|
||||
}
|
||||
|
||||
QList<ToolChain*> QtOptionsPageWidget::toolChains(const BaseQtVersion *version)
|
||||
QList<ToolChain*> QtOptionsPageWidget::toolChains(const QtVersion *version)
|
||||
{
|
||||
QList<ToolChain*> toolChains;
|
||||
if (!version)
|
||||
@@ -496,7 +496,7 @@ QList<ToolChain*> QtOptionsPageWidget::toolChains(const BaseQtVersion *version)
|
||||
return toolChains;
|
||||
}
|
||||
|
||||
QByteArray QtOptionsPageWidget::defaultToolChainId(const BaseQtVersion *version)
|
||||
QByteArray QtOptionsPageWidget::defaultToolChainId(const QtVersion *version)
|
||||
{
|
||||
QList<ToolChain*> possibleToolChains = toolChains(version);
|
||||
if (!possibleToolChains.isEmpty())
|
||||
@@ -504,12 +504,12 @@ QByteArray QtOptionsPageWidget::defaultToolChainId(const BaseQtVersion *version)
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
bool QtOptionsPageWidget::isNameUnique(const BaseQtVersion *version)
|
||||
bool QtOptionsPageWidget::isNameUnique(const QtVersion *version)
|
||||
{
|
||||
const QString name = version->displayName().trimmed();
|
||||
|
||||
return !m_model->findItemAtLevel<2>([name, version](QtVersionItem *item) {
|
||||
BaseQtVersion *v = item->version();
|
||||
QtVersion *v = item->version();
|
||||
return v != version && v->displayName().trimmed() == name;
|
||||
});
|
||||
}
|
||||
@@ -551,7 +551,7 @@ void BuildLogDialog::setText(const QString &text)
|
||||
|
||||
void QtOptionsPageWidget::showDebuggingBuildLog(const QtVersionItem *item)
|
||||
{
|
||||
BaseQtVersion *version = item->version();
|
||||
QtVersion *version = item->version();
|
||||
if (!version)
|
||||
return;
|
||||
BuildLogDialog *dialog = new BuildLogDialog(this->window());
|
||||
@@ -583,7 +583,7 @@ void QtOptionsPageWidget::updateQtVersions(const QList<int> &additions, const QL
|
||||
|
||||
// Add changed/added items:
|
||||
foreach (int a, toAdd) {
|
||||
BaseQtVersion *version = QtVersionManager::version(a)->clone();
|
||||
QtVersion *version = QtVersionManager::version(a)->clone();
|
||||
auto *item = new QtVersionItem(version);
|
||||
|
||||
// Insert in the right place:
|
||||
@@ -639,7 +639,7 @@ void QtOptionsPageWidget::addQtDir()
|
||||
}
|
||||
|
||||
QString error;
|
||||
BaseQtVersion *version = QtVersionFactory::createQtVersionFromQMakePath(qtVersion, false, QString(), &error);
|
||||
QtVersion *version = QtVersionFactory::createQtVersionFromQMakePath(qtVersion, false, QString(), &error);
|
||||
if (version) {
|
||||
auto item = new QtVersionItem(version);
|
||||
item->setIcon(version->isValid()? m_validVersionIcon : m_invalidVersionIcon);
|
||||
@@ -669,7 +669,7 @@ void QtOptionsPageWidget::removeQtDir()
|
||||
|
||||
void QtOptionsPageWidget::editPath()
|
||||
{
|
||||
BaseQtVersion *current = currentVersion();
|
||||
QtVersion *current = currentVersion();
|
||||
FilePath qtVersion =
|
||||
FileUtils::getOpenFilePath(this,
|
||||
tr("Select a qmake Executable"),
|
||||
@@ -679,7 +679,7 @@ void QtOptionsPageWidget::editPath()
|
||||
QFileDialog::DontResolveSymlinks);
|
||||
if (qtVersion.isEmpty())
|
||||
return;
|
||||
BaseQtVersion *version = QtVersionFactory::createQtVersionFromQMakePath(qtVersion);
|
||||
QtVersion *version = QtVersionFactory::createQtVersionFromQMakePath(qtVersion);
|
||||
if (!version)
|
||||
return;
|
||||
// Same type? then replace!
|
||||
@@ -730,7 +730,7 @@ void QtOptionsPageWidget::userChangedCurrentVersion()
|
||||
void QtOptionsPageWidget::updateDescriptionLabel()
|
||||
{
|
||||
QtVersionItem *item = currentItem();
|
||||
const BaseQtVersion *version = item ? item->version() : nullptr;
|
||||
const QtVersion *version = item ? item->version() : nullptr;
|
||||
const ValidityInfo info = validInformation(version);
|
||||
if (info.message.isEmpty()) {
|
||||
m_versionUi.errorLabel->setVisible(false);
|
||||
@@ -764,7 +764,7 @@ void QtOptionsPageWidget::updateWidgets()
|
||||
{
|
||||
delete m_configurationWidget;
|
||||
m_configurationWidget = nullptr;
|
||||
BaseQtVersion *version = currentVersion();
|
||||
QtVersion *version = currentVersion();
|
||||
if (version) {
|
||||
m_versionUi.nameEdit->setText(version->unexpandedDisplayName());
|
||||
m_versionUi.qmakePath->setText(version->qmakeFilePath().toUserOutput());
|
||||
@@ -883,7 +883,7 @@ void QtOptionsPageWidget::apply()
|
||||
QtVersionManager::setDocumentationSetting(
|
||||
QtVersionManager::DocumentationSetting(m_ui.documentationSetting->currentData().toInt()));
|
||||
|
||||
QList<BaseQtVersion *> versions;
|
||||
QList<QtVersion *> versions;
|
||||
m_model->forItemsAtLevel<2>([&versions](QtVersionItem *item) {
|
||||
item->setChanged(false);
|
||||
versions.append(item->version()->clone());
|
||||
|
@@ -57,7 +57,7 @@ QtProjectImporter::QtVersionData
|
||||
QtProjectImporter::findOrCreateQtVersion(const Utils::FilePath &qmakePath) const
|
||||
{
|
||||
QtVersionData result;
|
||||
result.qt = QtVersionManager::version(Utils::equal(&BaseQtVersion::qmakeFilePath, qmakePath));
|
||||
result.qt = QtVersionManager::version(Utils::equal(&QtVersion::qmakeFilePath, qmakePath));
|
||||
if (result.qt) {
|
||||
// Check if version is a temporary qt
|
||||
const int qtId = result.qt->uniqueId();
|
||||
@@ -93,7 +93,7 @@ Kit *QtProjectImporter::createTemporaryKit(const QtVersionData &versionData,
|
||||
});
|
||||
}
|
||||
|
||||
static BaseQtVersion *versionFromVariant(const QVariant &v)
|
||||
static QtVersion *versionFromVariant(const QVariant &v)
|
||||
{
|
||||
bool ok;
|
||||
const int qtId = v.toInt(&ok);
|
||||
@@ -106,7 +106,7 @@ void QtProjectImporter::cleanupTemporaryQt(Kit *k, const QVariantList &vl)
|
||||
if (vl.isEmpty())
|
||||
return; // No temporary Qt
|
||||
QTC_ASSERT(vl.count() == 1, return);
|
||||
BaseQtVersion *version = versionFromVariant(vl.at(0));
|
||||
QtVersion *version = versionFromVariant(vl.at(0));
|
||||
QTC_ASSERT(version, return);
|
||||
QtVersionManager::removeVersion(version);
|
||||
QtKitAspect::setQtVersion(k, nullptr); // Always mark Kit as not using this Qt
|
||||
@@ -118,8 +118,8 @@ void QtProjectImporter::persistTemporaryQt(Kit *k, const QVariantList &vl)
|
||||
return; // No temporary Qt
|
||||
QTC_ASSERT(vl.count() == 1, return);
|
||||
const QVariant data = vl.at(0);
|
||||
BaseQtVersion *tmpVersion = versionFromVariant(data);
|
||||
BaseQtVersion *actualVersion = QtKitAspect::qtVersion(k);
|
||||
QtVersion *tmpVersion = versionFromVariant(data);
|
||||
QtVersion *actualVersion = QtKitAspect::qtVersion(k);
|
||||
|
||||
// User changed Kit away from temporary Qt that was set up:
|
||||
if (tmpVersion && actualVersion != tmpVersion)
|
||||
@@ -232,7 +232,7 @@ Kit *TestQtProjectImporter::createKit(void *directoryData) const
|
||||
// New temporary kit:
|
||||
return createTemporaryKit(findOrCreateQtVersion(dd->qmakePath),
|
||||
[dd](Kit *k) {
|
||||
BaseQtVersion *qt = QtKitAspect::qtVersion(k);
|
||||
QtVersion *qt = QtKitAspect::qtVersion(k);
|
||||
QMap<Utils::Id, QVariant> toKeep;
|
||||
for (const Utils::Id &key : k->allKeys()) {
|
||||
if (key.toString().startsWith("PE.tmp."))
|
||||
@@ -271,7 +271,7 @@ void TestQtProjectImporter::deleteDirectoryData(void *directoryData) const
|
||||
delete static_cast<DirectoryData *>(directoryData);
|
||||
}
|
||||
|
||||
static QStringList additionalFilesToCopy(const BaseQtVersion *qt)
|
||||
static QStringList additionalFilesToCopy(const QtVersion *qt)
|
||||
{
|
||||
// This is a hack and only works with local, "standard" installations of Qt
|
||||
const int major = qt->qtVersion().majorVersion;
|
||||
@@ -297,7 +297,7 @@ static QStringList additionalFilesToCopy(const BaseQtVersion *qt)
|
||||
return {};
|
||||
}
|
||||
|
||||
static Utils::FilePath setupQmake(const BaseQtVersion *qt, const QString &path)
|
||||
static Utils::FilePath setupQmake(const QtVersion *qt, const QString &path)
|
||||
{
|
||||
// This is a hack and only works with local, "standard" installations of Qt
|
||||
const FilePath qmake = qt->qmakeFilePath().canonicalPath();
|
||||
@@ -402,7 +402,7 @@ void QtSupportPlugin::testQtProjectImporter_oneProject()
|
||||
Kit *defaultKit = KitManager::defaultKit();
|
||||
QVERIFY(defaultKit);
|
||||
|
||||
BaseQtVersion *defaultQt = QtKitAspect::qtVersion(defaultKit);
|
||||
QtVersion *defaultQt = QtKitAspect::qtVersion(defaultKit);
|
||||
QVERIFY(defaultQt);
|
||||
|
||||
const Utils::TemporaryDirectory tempDir1("tmp1");
|
||||
@@ -423,7 +423,7 @@ void QtSupportPlugin::testQtProjectImporter_oneProject()
|
||||
setupQmake(defaultQt, tempDir2.path().path())};
|
||||
|
||||
for (int i = 1; i < qmakePaths.count(); ++i)
|
||||
QVERIFY(!QtVersionManager::version(Utils::equal(&BaseQtVersion::qmakeFilePath, qmakePaths.at(i))));
|
||||
QVERIFY(!QtVersionManager::version(Utils::equal(&QtVersion::qmakeFilePath, qmakePaths.at(i))));
|
||||
|
||||
QList<DirectoryData *> testData;
|
||||
|
||||
@@ -492,7 +492,7 @@ void QtSupportPlugin::testQtProjectImporter_oneProject()
|
||||
QCOMPARE(newQtId, defaultQt->uniqueId());
|
||||
|
||||
// VALIDATE: Qt is known to QtVersionManager
|
||||
BaseQtVersion *newQt = QtVersionManager::version(newQtId);
|
||||
QtVersion *newQt = QtVersionManager::version(newQtId);
|
||||
QVERIFY(newQt);
|
||||
|
||||
// VALIDATE: Qt has the expected qmakePath
|
||||
|
@@ -31,7 +31,7 @@
|
||||
|
||||
namespace QtSupport {
|
||||
|
||||
class BaseQtVersion;
|
||||
class QtVersion;
|
||||
|
||||
// Documentation inside.
|
||||
class QTSUPPORT_EXPORT QtProjectImporter : public ProjectExplorer::ProjectImporter
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
class QtVersionData
|
||||
{
|
||||
public:
|
||||
BaseQtVersion *qt = nullptr;
|
||||
QtVersion *qt = nullptr;
|
||||
bool isTemporary = true;
|
||||
};
|
||||
|
||||
|
@@ -35,7 +35,7 @@ const char CODEGEN_SETTINGS_PAGE_ID[] = "Class Generation";
|
||||
// QtVersions
|
||||
const char DESKTOPQT[] = "Qt4ProjectManager.QtVersion.Desktop";
|
||||
|
||||
// BaseQtVersion settings
|
||||
// QtVersion settings
|
||||
static const char QTVERSIONID[] = "Id";
|
||||
static const char QTVERSIONNAME[] = "Name";
|
||||
|
||||
|
@@ -132,7 +132,7 @@ void QtSupportPlugin::extensionsInitialized()
|
||||
{
|
||||
Utils::MacroExpander *expander = Utils::globalMacroExpander();
|
||||
|
||||
static const auto currentQtVersion = []() -> const BaseQtVersion * {
|
||||
static const auto currentQtVersion = []() -> const QtVersion * {
|
||||
ProjectExplorer::Project *project = ProjectExplorer::ProjectTree::currentProject();
|
||||
if (!project || !project->activeTarget())
|
||||
return nullptr;
|
||||
@@ -144,7 +144,7 @@ void QtSupportPlugin::extensionsInitialized()
|
||||
tr("Full path to the host bin directory of the Qt version in the active kit "
|
||||
"of the project containing the current document."),
|
||||
[]() {
|
||||
const BaseQtVersion * const qt = currentQtVersion();
|
||||
const QtVersion * const qt = currentQtVersion();
|
||||
return qt ? qt->hostBinPath().toUserOutput() : QString();
|
||||
});
|
||||
|
||||
@@ -154,7 +154,7 @@ void QtSupportPlugin::extensionsInitialized()
|
||||
"of the project containing the current document.<br>You probably want %1 instead.")
|
||||
.arg(QString::fromLatin1(kCurrentHostBins)),
|
||||
[]() {
|
||||
const BaseQtVersion * const qt = currentQtVersion();
|
||||
const QtVersion * const qt = currentQtVersion();
|
||||
return qt ? qt->binPath().toUserOutput() : QString();
|
||||
});
|
||||
|
||||
@@ -163,11 +163,11 @@ void QtSupportPlugin::extensionsInitialized()
|
||||
tr("Full path to the host libexec directory of the Qt version in the active kit "
|
||||
"of the project containing the current document."),
|
||||
[]() {
|
||||
const BaseQtVersion *const qt = currentQtVersion();
|
||||
const QtVersion *const qt = currentQtVersion();
|
||||
return qt ? qt->hostLibexecPath().toUserOutput() : QString();
|
||||
});
|
||||
|
||||
static const auto activeQtVersion = []() -> const BaseQtVersion * {
|
||||
static const auto activeQtVersion = []() -> const QtVersion * {
|
||||
ProjectExplorer::Project *project = SessionManager::startupProject();
|
||||
if (!project || !project->activeTarget())
|
||||
return nullptr;
|
||||
@@ -179,7 +179,7 @@ void QtSupportPlugin::extensionsInitialized()
|
||||
tr("Full path to the host bin directory of the Qt version in the active kit "
|
||||
"of the active project."),
|
||||
[]() {
|
||||
const BaseQtVersion * const qt = activeQtVersion();
|
||||
const QtVersion * const qt = activeQtVersion();
|
||||
return qt ? qt->hostBinPath().toUserOutput() : QString();
|
||||
});
|
||||
|
||||
@@ -189,7 +189,7 @@ void QtSupportPlugin::extensionsInitialized()
|
||||
"of the active project.<br>You probably want %1 instead.")
|
||||
.arg(QString::fromLatin1(kActiveHostBins)),
|
||||
[]() {
|
||||
const BaseQtVersion * const qt = activeQtVersion();
|
||||
const QtVersion * const qt = activeQtVersion();
|
||||
return qt ? qt->binPath().toUserOutput() : QString();
|
||||
});
|
||||
|
||||
@@ -198,7 +198,7 @@ void QtSupportPlugin::extensionsInitialized()
|
||||
tr("Full path to the libexec bin directory of the Qt version in the active kit "
|
||||
"of the active project."),
|
||||
[]() {
|
||||
const BaseQtVersion *const qt = activeQtVersion();
|
||||
const QtVersion *const qt = activeQtVersion();
|
||||
return qt ? qt->hostLibexecPath().toUserOutput() : QString();
|
||||
});
|
||||
|
||||
|
@@ -33,7 +33,7 @@ namespace Utils { class FilePath; }
|
||||
|
||||
namespace QtSupport {
|
||||
|
||||
class BaseQtVersion;
|
||||
class QtVersion;
|
||||
|
||||
class QTSUPPORT_EXPORT QtVersionFactory
|
||||
{
|
||||
@@ -44,14 +44,14 @@ public:
|
||||
static const QList<QtVersionFactory *> allQtVersionFactories();
|
||||
|
||||
bool canRestore(const QString &type);
|
||||
BaseQtVersion *restore(const QString &type, const QVariantMap &data);
|
||||
QtVersion *restore(const QString &type, const QVariantMap &data);
|
||||
|
||||
/// factories with higher priority are asked first to identify
|
||||
/// a qtversion, the priority of the desktop factory is 0 and
|
||||
/// the desktop factory claims to handle all paths
|
||||
int priority() const { return m_priority; }
|
||||
|
||||
static BaseQtVersion *createQtVersionFromQMakePath(const Utils::FilePath &qmakePath,
|
||||
static QtVersion *createQtVersionFromQMakePath(const Utils::FilePath &qmakePath,
|
||||
bool isAutoDetected = false,
|
||||
const QString &detectionSource = {},
|
||||
QString *error = nullptr);
|
||||
@@ -63,16 +63,16 @@ protected:
|
||||
bool isQnx = false; // eeks...
|
||||
};
|
||||
|
||||
void setQtVersionCreator(const std::function<BaseQtVersion *()> &creator);
|
||||
void setQtVersionCreator(const std::function<QtVersion *()> &creator);
|
||||
void setRestrictionChecker(const std::function<bool(const SetupData &)> &checker);
|
||||
void setSupportedType(const QString &type);
|
||||
void setPriority(int priority);
|
||||
|
||||
private:
|
||||
friend class BaseQtVersion;
|
||||
BaseQtVersion *create() const;
|
||||
friend class QtVersion;
|
||||
QtVersion *create() const;
|
||||
|
||||
std::function<BaseQtVersion *()> m_creator;
|
||||
std::function<QtVersion *()> m_creator;
|
||||
std::function<bool(const SetupData &)> m_restrictionChecker;
|
||||
QString m_supportedType;
|
||||
int m_priority = 0;
|
||||
|
@@ -67,7 +67,7 @@ const char QTVERSION_TYPE_KEY[] = "QtVersion.Type";
|
||||
const char QTVERSION_FILE_VERSION_KEY[] = "Version";
|
||||
const char QTVERSION_FILENAME[] = "qtversion.xml";
|
||||
|
||||
using VersionMap = QMap<int, BaseQtVersion *>;
|
||||
using VersionMap = QMap<int, QtVersion *>;
|
||||
static VersionMap m_versions;
|
||||
|
||||
const char DOCUMENTATION_SETTING_KEY[] = "QtSupport/DocumentationSetting";
|
||||
@@ -94,7 +94,7 @@ static FilePath settingsFileName(const QString &path)
|
||||
|
||||
|
||||
// prefer newer qts otherwise compare on id
|
||||
bool qtVersionNumberCompare(BaseQtVersion *a, BaseQtVersion *b)
|
||||
bool qtVersionNumberCompare(QtVersion *a, QtVersion *b)
|
||||
{
|
||||
return a->qtVersion() > b->qtVersion() || (a->qtVersion() == b->qtVersion() && a->uniqueId() < b->uniqueId());
|
||||
}
|
||||
@@ -153,7 +153,7 @@ void QtVersionManager::triggerQtVersionRestore()
|
||||
FileSystemWatcher::WatchModifiedDate);
|
||||
} // exists
|
||||
|
||||
const QList<BaseQtVersion *> vs = versions();
|
||||
const QList<QtVersion *> vs = versions();
|
||||
updateDocumentation(vs, {}, vs);
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ static bool restoreQtVersions()
|
||||
bool restored = false;
|
||||
for (QtVersionFactory *f : factories) {
|
||||
if (f->canRestore(type)) {
|
||||
if (BaseQtVersion *qtv = f->restore(type, qtversionMap)) {
|
||||
if (QtVersion *qtv = f->restore(type, qtversionMap)) {
|
||||
if (m_versions.contains(qtv->uniqueId())) {
|
||||
// This shouldn't happen, we are restoring the same id multiple times?
|
||||
qWarning() << "A Qt version with id"<<qtv->uniqueId()<<"already exists";
|
||||
@@ -264,7 +264,7 @@ void QtVersionManager::updateFromInstaller(bool emitSignal)
|
||||
|
||||
if (log().isDebugEnabled()) {
|
||||
qCDebug(log) << "======= Existing Qt versions =======";
|
||||
for (BaseQtVersion *version : qAsConst(m_versions)) {
|
||||
for (QtVersion *version : qAsConst(m_versions)) {
|
||||
qCDebug(log) << version->qmakeFilePath().toUserOutput() << "id:"<<version->uniqueId();
|
||||
qCDebug(log) << " autodetection source:" << version->detectionSource();
|
||||
qCDebug(log) << "";
|
||||
@@ -289,7 +289,7 @@ void QtVersionManager::updateFromInstaller(bool emitSignal)
|
||||
const QString type = qtversionMap.value(QTVERSION_TYPE_KEY).toString();
|
||||
const QString autoDetectionSource = qtversionMap.value("autodetectionSource").toString();
|
||||
sdkVersions << autoDetectionSource;
|
||||
int id = -1; // see BaseQtVersion::fromMap()
|
||||
int id = -1; // see QtVersion::fromMap()
|
||||
QtVersionFactory *factory = nullptr;
|
||||
for (QtVersionFactory *f : factories) {
|
||||
if (f->canRestore(type))
|
||||
@@ -302,7 +302,7 @@ void QtVersionManager::updateFromInstaller(bool emitSignal)
|
||||
// First try to find a existing Qt version to update
|
||||
bool restored = false;
|
||||
const VersionMap versionsCopy = m_versions; // m_versions is modified in loop
|
||||
for (BaseQtVersion *v : versionsCopy) {
|
||||
for (QtVersion *v : versionsCopy) {
|
||||
if (v->detectionSource() == autoDetectionSource) {
|
||||
id = v->uniqueId();
|
||||
qCDebug(log) << " Qt version found with same autodetection source" << autoDetectionSource << " => Migrating id:" << id;
|
||||
@@ -311,7 +311,7 @@ void QtVersionManager::updateFromInstaller(bool emitSignal)
|
||||
qtversionMap[Constants::QTVERSIONNAME] = v->unexpandedDisplayName();
|
||||
delete v;
|
||||
|
||||
if (BaseQtVersion *qtv = factory->restore(type, qtversionMap)) {
|
||||
if (QtVersion *qtv = factory->restore(type, qtversionMap)) {
|
||||
Q_ASSERT(qtv->isAutodetected());
|
||||
m_versions.insert(id, qtv);
|
||||
restored = true;
|
||||
@@ -325,7 +325,7 @@ void QtVersionManager::updateFromInstaller(bool emitSignal)
|
||||
// Create a new qtversion
|
||||
if (!restored) { // didn't replace any existing versions
|
||||
qCDebug(log) << " No Qt version found matching" << autoDetectionSource << " => Creating new version";
|
||||
if (BaseQtVersion *qtv = factory->restore(type, qtversionMap)) {
|
||||
if (QtVersion *qtv = factory->restore(type, qtversionMap)) {
|
||||
Q_ASSERT(qtv->isAutodetected());
|
||||
m_versions.insert(qtv->uniqueId(), qtv);
|
||||
added << qtv->uniqueId();
|
||||
@@ -340,14 +340,14 @@ void QtVersionManager::updateFromInstaller(bool emitSignal)
|
||||
|
||||
if (log().isDebugEnabled()) {
|
||||
qCDebug(log) << "======= Before removing outdated sdk versions =======";
|
||||
for (BaseQtVersion *version : qAsConst(m_versions)) {
|
||||
for (QtVersion *version : qAsConst(m_versions)) {
|
||||
qCDebug(log) << version->qmakeFilePath().toUserOutput() << "id:" << version->uniqueId();
|
||||
qCDebug(log) << " autodetection source:" << version->detectionSource();
|
||||
qCDebug(log) << "";
|
||||
}
|
||||
}
|
||||
const VersionMap versionsCopy = m_versions; // m_versions is modified in loop
|
||||
for (BaseQtVersion *qtVersion : versionsCopy) {
|
||||
for (QtVersion *qtVersion : versionsCopy) {
|
||||
if (qtVersion->detectionSource().startsWith("SDK.")) {
|
||||
if (!sdkVersions.contains(qtVersion->detectionSource())) {
|
||||
qCDebug(log) << " removing version" << qtVersion->detectionSource();
|
||||
@@ -359,7 +359,7 @@ void QtVersionManager::updateFromInstaller(bool emitSignal)
|
||||
|
||||
if (log().isDebugEnabled()) {
|
||||
qCDebug(log)<< "======= End result =======";
|
||||
for (BaseQtVersion *version : qAsConst(m_versions)) {
|
||||
for (QtVersion *version : qAsConst(m_versions)) {
|
||||
qCDebug(log) << version->qmakeFilePath().toUserOutput() << "id:" << version->uniqueId();
|
||||
qCDebug(log) << " autodetection source:" << version->detectionSource();
|
||||
qCDebug(log) << "";
|
||||
@@ -378,7 +378,7 @@ static void saveQtVersions()
|
||||
data.insert(QTVERSION_FILE_VERSION_KEY, 1);
|
||||
|
||||
int count = 0;
|
||||
for (BaseQtVersion *qtv : qAsConst(m_versions)) {
|
||||
for (QtVersion *qtv : qAsConst(m_versions)) {
|
||||
QVariantMap tmp = qtv->toMap();
|
||||
if (tmp.isEmpty())
|
||||
continue;
|
||||
@@ -442,13 +442,13 @@ static void findSystemQt()
|
||||
for (const FilePath &qmakePath : qAsConst(systemQMakes)) {
|
||||
if (BuildableHelperLibrary::isQtChooser(qmakePath))
|
||||
continue;
|
||||
const auto isSameQmake = [qmakePath](const BaseQtVersion *version) {
|
||||
const auto isSameQmake = [qmakePath](const QtVersion *version) {
|
||||
return Environment::systemEnvironment().
|
||||
isSameExecutable(qmakePath.toString(), version->qmakeFilePath().toString());
|
||||
};
|
||||
if (contains(m_versions, isSameQmake))
|
||||
continue;
|
||||
BaseQtVersion *version = QtVersionFactory::createQtVersionFromQMakePath(qmakePath,
|
||||
QtVersion *version = QtVersionFactory::createQtVersionFromQMakePath(qmakePath,
|
||||
false,
|
||||
"PATH");
|
||||
if (version)
|
||||
@@ -456,7 +456,7 @@ static void findSystemQt()
|
||||
}
|
||||
}
|
||||
|
||||
void QtVersionManager::addVersion(BaseQtVersion *version)
|
||||
void QtVersionManager::addVersion(QtVersion *version)
|
||||
{
|
||||
QTC_ASSERT(m_writer, return);
|
||||
QTC_ASSERT(version, return);
|
||||
@@ -470,7 +470,7 @@ void QtVersionManager::addVersion(BaseQtVersion *version)
|
||||
saveQtVersions();
|
||||
}
|
||||
|
||||
void QtVersionManager::removeVersion(BaseQtVersion *version)
|
||||
void QtVersionManager::removeVersion(QtVersion *version)
|
||||
{
|
||||
QTC_ASSERT(version, return);
|
||||
m_versions.remove(version->uniqueId());
|
||||
@@ -488,7 +488,7 @@ void QtVersionManager::registerExampleSet(const QString &displayName,
|
||||
|
||||
using Path = QString;
|
||||
using FileName = QString;
|
||||
static QList<std::pair<Path, FileName>> documentationFiles(BaseQtVersion *v)
|
||||
static QList<std::pair<Path, FileName>> documentationFiles(QtVersion *v)
|
||||
{
|
||||
QList<std::pair<Path, FileName>> files;
|
||||
const QStringList docPaths = QStringList(
|
||||
@@ -501,14 +501,14 @@ static QList<std::pair<Path, FileName>> documentationFiles(BaseQtVersion *v)
|
||||
return files;
|
||||
}
|
||||
|
||||
static QStringList documentationFiles(const QList<BaseQtVersion *> &vs, bool highestOnly = false)
|
||||
static QStringList documentationFiles(const QList<QtVersion *> &vs, bool highestOnly = false)
|
||||
{
|
||||
// if highestOnly is true, register each file only once per major Qt version, even if
|
||||
// multiple minor or patch releases of that major version are installed
|
||||
QHash<int, QSet<QString>> includedFileNames; // major Qt version -> names
|
||||
QSet<QString> filePaths;
|
||||
const QList<BaseQtVersion *> versions = highestOnly ? QtVersionManager::sortVersions(vs) : vs;
|
||||
for (BaseQtVersion *v : versions) {
|
||||
const QList<QtVersion *> versions = highestOnly ? QtVersionManager::sortVersions(vs) : vs;
|
||||
for (QtVersion *v : versions) {
|
||||
const int majorVersion = v->qtVersion().majorVersion;
|
||||
QSet<QString> &majorVersionFileNames = includedFileNames[majorVersion];
|
||||
for (const std::pair<Path, FileName> &file : documentationFiles(v)) {
|
||||
@@ -521,9 +521,9 @@ static QStringList documentationFiles(const QList<BaseQtVersion *> &vs, bool hig
|
||||
return filePaths.values();
|
||||
}
|
||||
|
||||
void QtVersionManager::updateDocumentation(const QList<BaseQtVersion *> &added,
|
||||
const QList<BaseQtVersion *> &removed,
|
||||
const QList<BaseQtVersion *> &allNew)
|
||||
void QtVersionManager::updateDocumentation(const QList<QtVersion *> &added,
|
||||
const QList<QtVersion *> &removed,
|
||||
const QList<QtVersion *> &allNew)
|
||||
{
|
||||
const DocumentationSetting setting = documentationSetting();
|
||||
const QStringList docsOfAll = setting == DocumentationSetting::None
|
||||
@@ -548,23 +548,23 @@ int QtVersionManager::getUniqueId()
|
||||
return m_idcount++;
|
||||
}
|
||||
|
||||
QList<BaseQtVersion *> QtVersionManager::versions(const BaseQtVersion::Predicate &predicate)
|
||||
QList<QtVersion *> QtVersionManager::versions(const QtVersion::Predicate &predicate)
|
||||
{
|
||||
QList<BaseQtVersion *> versions;
|
||||
QList<QtVersion *> versions;
|
||||
QTC_ASSERT(isLoaded(), return versions);
|
||||
if (predicate)
|
||||
return Utils::filtered(m_versions.values(), predicate);
|
||||
return m_versions.values();
|
||||
}
|
||||
|
||||
QList<BaseQtVersion *> QtVersionManager::sortVersions(const QList<BaseQtVersion *> &input)
|
||||
QList<QtVersion *> QtVersionManager::sortVersions(const QList<QtVersion *> &input)
|
||||
{
|
||||
QList<BaseQtVersion *> result = input;
|
||||
QList<QtVersion *> result = input;
|
||||
Utils::sort(result, qtVersionNumberCompare);
|
||||
return result;
|
||||
}
|
||||
|
||||
BaseQtVersion *QtVersionManager::version(int id)
|
||||
QtVersion *QtVersionManager::version(int id)
|
||||
{
|
||||
QTC_ASSERT(isLoaded(), return nullptr);
|
||||
VersionMap::const_iterator it = m_versions.constFind(id);
|
||||
@@ -573,32 +573,32 @@ BaseQtVersion *QtVersionManager::version(int id)
|
||||
return it.value();
|
||||
}
|
||||
|
||||
BaseQtVersion *QtVersionManager::version(const BaseQtVersion::Predicate &predicate)
|
||||
QtVersion *QtVersionManager::version(const QtVersion::Predicate &predicate)
|
||||
{
|
||||
return Utils::findOrDefault(m_versions.values(), predicate);
|
||||
}
|
||||
|
||||
// This function is really simplistic...
|
||||
static bool equals(BaseQtVersion *a, BaseQtVersion *b)
|
||||
static bool equals(QtVersion *a, QtVersion *b)
|
||||
{
|
||||
return a->equals(b);
|
||||
}
|
||||
|
||||
void QtVersionManager::setNewQtVersions(const QList<BaseQtVersion *> &newVersions)
|
||||
void QtVersionManager::setNewQtVersions(const QList<QtVersion *> &newVersions)
|
||||
{
|
||||
// We want to preserve the same order as in the settings dialog
|
||||
// so we sort a copy
|
||||
QList<BaseQtVersion *> sortedNewVersions = newVersions;
|
||||
Utils::sort(sortedNewVersions, &BaseQtVersion::uniqueId);
|
||||
QList<QtVersion *> sortedNewVersions = newVersions;
|
||||
Utils::sort(sortedNewVersions, &QtVersion::uniqueId);
|
||||
|
||||
QList<BaseQtVersion *> addedVersions;
|
||||
QList<BaseQtVersion *> removedVersions;
|
||||
QList<std::pair<BaseQtVersion *, BaseQtVersion *>> changedVersions;
|
||||
QList<QtVersion *> addedVersions;
|
||||
QList<QtVersion *> removedVersions;
|
||||
QList<std::pair<QtVersion *, QtVersion *>> changedVersions;
|
||||
// So we trying to find the minimal set of changed versions,
|
||||
// iterate over both sorted list
|
||||
|
||||
// newVersions and oldVersions iterator
|
||||
QList<BaseQtVersion *>::const_iterator nit, nend;
|
||||
QList<QtVersion *>::const_iterator nit, nend;
|
||||
VersionMap::const_iterator oit, oend;
|
||||
nit = sortedNewVersions.constBegin();
|
||||
nend = sortedNewVersions.constEnd();
|
||||
@@ -633,24 +633,24 @@ void QtVersionManager::setNewQtVersions(const QList<BaseQtVersion *> &newVersion
|
||||
}
|
||||
|
||||
if (!changedVersions.isEmpty() || !addedVersions.isEmpty() || !removedVersions.isEmpty()) {
|
||||
const QList<BaseQtVersion *> changedOldVersions
|
||||
= Utils::transform(changedVersions, &std::pair<BaseQtVersion *, BaseQtVersion *>::first);
|
||||
const QList<BaseQtVersion *> changedNewVersions
|
||||
const QList<QtVersion *> changedOldVersions
|
||||
= Utils::transform(changedVersions, &std::pair<QtVersion *, QtVersion *>::first);
|
||||
const QList<QtVersion *> changedNewVersions
|
||||
= Utils::transform(changedVersions,
|
||||
&std::pair<BaseQtVersion *, BaseQtVersion *>::second);
|
||||
&std::pair<QtVersion *, QtVersion *>::second);
|
||||
updateDocumentation(addedVersions + changedNewVersions,
|
||||
removedVersions + changedOldVersions,
|
||||
sortedNewVersions);
|
||||
}
|
||||
const QList<int> addedIds = Utils::transform(addedVersions, &BaseQtVersion::uniqueId);
|
||||
const QList<int> removedIds = Utils::transform(removedVersions, &BaseQtVersion::uniqueId);
|
||||
const QList<int> addedIds = Utils::transform(addedVersions, &QtVersion::uniqueId);
|
||||
const QList<int> removedIds = Utils::transform(removedVersions, &QtVersion::uniqueId);
|
||||
const QList<int> changedIds = Utils::transform(changedVersions,
|
||||
[](std::pair<BaseQtVersion *, BaseQtVersion *> v) {
|
||||
[](std::pair<QtVersion *, QtVersion *> v) {
|
||||
return v.first->uniqueId();
|
||||
});
|
||||
|
||||
qDeleteAll(m_versions);
|
||||
m_versions = Utils::transform<VersionMap>(sortedNewVersions, [](BaseQtVersion *v) {
|
||||
m_versions = Utils::transform<VersionMap>(sortedNewVersions, [](QtVersion *v) {
|
||||
return std::make_pair(v->uniqueId(), v);
|
||||
});
|
||||
saveQtVersions();
|
||||
@@ -666,7 +666,7 @@ void QtVersionManager::setDocumentationSetting(const QtVersionManager::Documenta
|
||||
Core::ICore::settings()->setValueWithDefault(DOCUMENTATION_SETTING_KEY, int(setting), 0);
|
||||
// force re-evaluating which documentation should be registered
|
||||
// by claiming that all are removed and re-added
|
||||
const QList<BaseQtVersion *> vs = versions();
|
||||
const QList<QtVersion *> vs = versions();
|
||||
updateDocumentation(vs, vs, vs);
|
||||
}
|
||||
|
||||
|
@@ -34,7 +34,7 @@ class QTSUPPORT_EXPORT QtVersionManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
// for getUniqueId();
|
||||
friend class BaseQtVersion;
|
||||
friend class QtVersion;
|
||||
friend class QtVersionFactory;
|
||||
friend class Internal::QtOptionsPageWidget;
|
||||
|
||||
@@ -53,15 +53,15 @@ public:
|
||||
// Note: DO NOT STORE THESE POINTERS!
|
||||
// The QtVersionManager may delete them at random times and you will
|
||||
// need to get a new pointer by calling this function again!
|
||||
static QList<BaseQtVersion *> versions(const BaseQtVersion::Predicate &predicate = BaseQtVersion::Predicate());
|
||||
static BaseQtVersion *version(int id);
|
||||
static BaseQtVersion *version(const BaseQtVersion::Predicate &predicate);
|
||||
static QList<QtVersion *> versions(const QtVersion::Predicate &predicate = QtVersion::Predicate());
|
||||
static QtVersion *version(int id);
|
||||
static QtVersion *version(const QtVersion::Predicate &predicate);
|
||||
|
||||
// Sorting is potentially expensive since it might require qmake --query to run for each version!
|
||||
static QList<BaseQtVersion *> sortVersions(const QList<BaseQtVersion *> &input);
|
||||
static QList<QtVersion *> sortVersions(const QList<QtVersion *> &input);
|
||||
|
||||
static void addVersion(BaseQtVersion *version);
|
||||
static void removeVersion(BaseQtVersion *version);
|
||||
static void addVersion(QtVersion *version);
|
||||
static void removeVersion(QtVersion *version);
|
||||
|
||||
// Call latest in extensionsInitialized of plugin depending on QtSupport
|
||||
static void registerExampleSet(const QString &displayName,
|
||||
@@ -69,21 +69,21 @@ public:
|
||||
const QString &examplesPath);
|
||||
|
||||
signals:
|
||||
// content of BaseQtVersion objects with qmake path might have changed
|
||||
// content of QtVersion objects with qmake path might have changed
|
||||
void qtVersionsChanged(const QList<int> &addedIds, const QList<int> &removedIds, const QList<int> &changedIds);
|
||||
void qtVersionsLoaded();
|
||||
|
||||
private:
|
||||
enum class DocumentationSetting { HighestOnly, All, None };
|
||||
|
||||
static void updateDocumentation(const QList<BaseQtVersion *> &added,
|
||||
const QList<BaseQtVersion *> &removed,
|
||||
const QList<BaseQtVersion *> &allNew);
|
||||
static void updateDocumentation(const QList<QtVersion *> &added,
|
||||
const QList<QtVersion *> &removed,
|
||||
const QList<QtVersion *> &allNew);
|
||||
void updateFromInstaller(bool emitSignal = true);
|
||||
void triggerQtVersionRestore();
|
||||
|
||||
// Used by QtOptionsPage
|
||||
static void setNewQtVersions(const QList<BaseQtVersion *> &newVersions);
|
||||
static void setNewQtVersions(const QList<QtVersion *> &newVersions);
|
||||
static void setDocumentationSetting(const DocumentationSetting &setting);
|
||||
static DocumentationSetting documentationSetting();
|
||||
// Used by QtVersion
|
||||
|
@@ -45,7 +45,7 @@
|
||||
namespace QtSupport {
|
||||
namespace Internal {
|
||||
|
||||
class DesktopQtVersion : public BaseQtVersion
|
||||
class DesktopQtVersion : public QtVersion
|
||||
{
|
||||
public:
|
||||
DesktopQtVersion() = default;
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
|
||||
QStringList DesktopQtVersion::warningReason() const
|
||||
{
|
||||
QStringList ret = BaseQtVersion::warningReason();
|
||||
QStringList ret = QtVersion::warningReason();
|
||||
if (qtVersion() >= QtVersionNumber(5, 0, 0)) {
|
||||
if (qmlRuntimeFilePath().isEmpty())
|
||||
ret << QCoreApplication::translate("QtVersion", "No QML utility installed.");
|
||||
@@ -75,7 +75,7 @@ QString DesktopQtVersion::description() const
|
||||
|
||||
QSet<Utils::Id> DesktopQtVersion::availableFeatures() const
|
||||
{
|
||||
QSet<Utils::Id> features = BaseQtVersion::availableFeatures();
|
||||
QSet<Utils::Id> features = QtVersion::availableFeatures();
|
||||
features.insert(Constants::FEATURE_DESKTOP);
|
||||
features.insert(Constants::FEATURE_QMLPROJECT);
|
||||
return features;
|
||||
@@ -104,7 +104,7 @@ DesktopQtVersionFactory::DesktopQtVersionFactory()
|
||||
|
||||
const char EMBEDDED_LINUX_QT[] = "RemoteLinux.EmbeddedLinuxQt";
|
||||
|
||||
class EmbeddedLinuxQtVersion : public BaseQtVersion
|
||||
class EmbeddedLinuxQtVersion : public QtVersion
|
||||
{
|
||||
public:
|
||||
EmbeddedLinuxQtVersion() = default;
|
||||
|
@@ -52,7 +52,7 @@ UicGenerator::UicGenerator(const Project *project, const Utils::FilePath &source
|
||||
|
||||
Utils::FilePath UicGenerator::command() const
|
||||
{
|
||||
QtSupport::BaseQtVersion *version = nullptr;
|
||||
QtSupport::QtVersion *version = nullptr;
|
||||
Target *target;
|
||||
if ((target = project()->activeTarget()))
|
||||
version = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user