From afd40dd12393e1b02776a835b17598d27db113a0 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 28 Nov 2014 19:47:55 +0100 Subject: avoid direct use of QLibraryInfo as much as possible Change-Id: Ic1f5f5167181b15bc67bf4c6a1001532d0058b45 Reviewed-by: Joerg Bornemann --- qmake/generators/mac/pbuilder_pbx.cpp | 4 ++-- qmake/generators/makefile.cpp | 3 +-- qmake/generators/win32/msvc_vcproj.cpp | 3 +-- qmake/option.cpp | 2 +- qmake/option.h | 1 - qmake/project.h | 1 + qmake/property.cpp | 1 + 7 files changed, 7 insertions(+), 8 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 8f24c20712..3605a9b148 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -455,8 +455,8 @@ ProjectBuilderSources::files(QMakeProject *project) const { QStringList ret = project->values(ProKey(key)).toQStringList(); if(key == "QMAKE_INTERNAL_INCLUDED_FILES") { - QString qtPrefix(QLibraryInfo::rawLocation(QLibraryInfo::PrefixPath, QLibraryInfo::EffectivePaths) + '/'); - QString qtSrcPrefix(QLibraryInfo::rawLocation(QLibraryInfo::PrefixPath, QLibraryInfo::EffectiveSourcePaths) + '/'); + QString qtPrefix(project->propertyValue(ProKey("QT_INSTALL_PREFIX/get")).toQString() + '/'); + QString qtSrcPrefix(project->propertyValue(ProKey("QT_INSTALL_PREFIX/src")).toQString() + '/'); QStringList newret; for(int i = 0; i < ret.size(); ++i) { diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index a9f22d8597..cb6da72cba 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -45,7 +45,6 @@ #include #include #include -#include #include #if defined(Q_OS_UNIX) @@ -3144,7 +3143,7 @@ MakefileGenerator::pkgConfigPrefix() const { if(!project->isEmpty("QMAKE_PKGCONFIG_PREFIX")) return project->first("QMAKE_PKGCONFIG_PREFIX").toQString(); - return QLibraryInfo::rawLocation(QLibraryInfo::PrefixPath, QLibraryInfo::FinalPaths); + return project->propertyValue(ProKey("QT_INSTALL_PREFIX")).toQString(); } QString diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index 4c228be310..a30070a949 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -1233,8 +1233,7 @@ void VcprojGenerator::initDeploymentTool() // Only deploy Qt libs for shared build if (!project->values("QMAKE_QT_DLL").isEmpty()) { // FIXME: This code should actually resolve the libraries from all Qt modules. - const QString &qtdir = QLibraryInfo::rawLocation(QLibraryInfo::LibrariesPath, - QLibraryInfo::EffectivePaths); + const QString &qtdir = project->propertyValue(ProKey("QT_INSTALL_LIBS/get")).toQString(); ProStringList arg = project->values("QMAKE_LIBS") + project->values("QMAKE_LIBS_PRIVATE"); for (ProStringList::ConstIterator it = arg.constBegin(); it != arg.constEnd(); ++it) { if (it->contains(qtdir)) { diff --git a/qmake/option.cpp b/qmake/option.cpp index 4fcf0d7bdb..cb851229b4 100644 --- a/qmake/option.cpp +++ b/qmake/option.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include diff --git a/qmake/option.h b/qmake/option.h index a4ca8063e0..340f13c8ed 100644 --- a/qmake/option.h +++ b/qmake/option.h @@ -42,7 +42,6 @@ #include #include #include -#include QT_BEGIN_NAMESPACE diff --git a/qmake/project.h b/qmake/project.h index 43f50e7c78..9f68ff320c 100644 --- a/qmake/project.h +++ b/qmake/project.h @@ -78,6 +78,7 @@ public: using QMakeEvaluator::evaluateFeatureFile; using QMakeEvaluator::evaluateConfigFeatures; using QMakeEvaluator::evaluateExpression; + using QMakeEvaluator::propertyValue; using QMakeEvaluator::values; using QMakeEvaluator::first; using QMakeEvaluator::isActiveConfig; diff --git a/qmake/property.cpp b/qmake/property.cpp index 051e05693c..bf1bb58a31 100644 --- a/qmake/property.cpp +++ b/qmake/property.cpp @@ -36,6 +36,7 @@ #include #include +#include #include #include -- cgit v1.2.3