BaseQtVersion: remove qmakeProperty(...) getter

Qt 6 will not use qmake to identify a Qt version, so this can not
be part of the public interface of BaseQtVersion anymore.

Provide getters for the information actually read via qmakeProperty(...).

Use the getters whenever possible.

Change-Id: Iadbee80b75e4f8b06caf90e7ed69fae2029b4dd7
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Tobias Hunger
2019-09-30 14:34:31 +02:00
parent fc2e22dad2
commit b489bfd615
22 changed files with 239 additions and 193 deletions

View File

@@ -507,8 +507,8 @@ QString QmakeBuildConfiguration::extractSpecFromArguments(QString *args,
if (parsedSpec.isEmpty())
return {};
FilePath baseMkspecDir = FilePath::fromUserInput(
version->qmakeProperty("QT_HOST_DATA") + QLatin1String("/mkspecs"));
FilePath baseMkspecDir = FilePath::fromUserInput(version->hostDataPath().toString()
+ "/mkspecs");
baseMkspecDir = FilePath::fromString(baseMkspecDir.toFileInfo().canonicalFilePath());
// if the path is relative it can be
@@ -608,7 +608,7 @@ BuildInfo QmakeBuildConfigurationFactory::createBuildInfo(const Kit *k,
QString projectDirectory = projectPath.toFileInfo().absolutePath();
QDir qtSourceDir = QDir(version->sourcePath().toString());
QString relativeProjectPath = qtSourceDir.relativeFilePath(projectDirectory);
QString qtBuildDir = version->qmakeProperty("QT_INSTALL_PREFIX");
QString qtBuildDir = version->prefix().toString();
QString absoluteBuildPath = QDir::cleanPath(qtBuildDir + QLatin1Char('/') + relativeProjectPath);
info.buildDirectory = FilePath::fromString(absoluteBuildPath);
@@ -672,8 +672,8 @@ void QmakeBuildConfiguration::setupBuildEnvironment(Kit *k, Environment &env)
{
prependCompilerPathToEnvironment(k, env);
const BaseQtVersion *qt = QtKitAspect::qtVersion(k);
if (qt && !qt->binPath().isEmpty())
env.prependOrSetPath(qt->binPath().toString());
if (qt && !qt->hostBinPath().isEmpty())
env.prependOrSetPath(qt->hostBinPath().toString());
}
QmakeBuildConfiguration::LastKitState::LastKitState() = default;