Find Qt installation by specification of qmake rather than a "Qt dir".

Rationale: The concept of a "Qt Dir" is dead ever since Qt can be
installed. Specifying the qmake location otoh makes it possible to
unambigously detect all parts of a Qt installation.
This commit is contained in:
Daniel Molkentin
2009-09-03 19:16:22 +02:00
parent 267ef8ecc5
commit 5476bcf560
13 changed files with 178 additions and 171 deletions

View File

@@ -831,7 +831,7 @@ QString Qt4Project::qtDir(const QString &buildConfiguration) const
{
QtVersion *version = qtVersion(buildConfiguration);
if (version)
return version->path();
return version->versionInfo().value("QT_INSTALL_DATA");
return QString::null;
}
@@ -1151,9 +1151,9 @@ bool Qt4Project::compareBuildConfigurationToImportFrom(const QString &buildConfi
{
QMakeStep *qs = qmakeStep();
if (QDir(workingDirectory).exists(QLatin1String("Makefile")) && qs) {
QString qtPath = QtVersionManager::findQtVersionFromMakefile(workingDirectory);
QString qmakePath = QtVersionManager::findQMakeBinaryFromMakefile(workingDirectory);
QtVersion *version = qtVersion(buildConfiguration);
if (version->path() == qtPath) {
if (version->qmakeCommand() == qmakePath) {
// same qtversion
QPair<QtVersion::QmakeBuildConfig, QStringList> result =
QtVersionManager::scanMakeFile(workingDirectory, version->defaultBuildConfig());