Skip to content

Commit

Permalink
avoid direct use of QLibraryInfo as much as possible
Browse files Browse the repository at this point in the history
Change-Id: Ic1f5f5167181b15bc67bf4c6a1001532d0058b45
Reviewed-by: Joerg Bornemann <[email protected]>
  • Loading branch information
ossilator committed Feb 2, 2015
1 parent 44fca87 commit afd40dd
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions qmake/generators/mac/pbuilder_pbx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 1 addition & 2 deletions qmake/generators/makefile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#include <qhash.h>
#include <qdebug.h>
#include <qbuffer.h>
#include <qsettings.h>
#include <qdatetime.h>

#if defined(Q_OS_UNIX)
Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions qmake/generators/win32/msvc_vcproj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion qmake/option.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <qregexp.h>
#include <qhash.h>
#include <qdebug.h>
#include <qsettings.h>
#include <qlibraryinfo.h>
#include <stdlib.h>
#include <stdarg.h>

Expand Down
1 change: 0 additions & 1 deletion qmake/option.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#include <qstring.h>
#include <qstringlist.h>
#include <qfile.h>
#include <qlibraryinfo.h>

QT_BEGIN_NAMESPACE

Expand Down
1 change: 1 addition & 0 deletions qmake/project.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class QMakeProject : private QMakeEvaluator
using QMakeEvaluator::evaluateFeatureFile;
using QMakeEvaluator::evaluateConfigFeatures;
using QMakeEvaluator::evaluateExpression;
using QMakeEvaluator::propertyValue;
using QMakeEvaluator::values;
using QMakeEvaluator::first;
using QMakeEvaluator::isActiveConfig;
Expand Down
1 change: 1 addition & 0 deletions qmake/property.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

#include <qdir.h>
#include <qsettings.h>
#include <qlibraryinfo.h>
#include <qstringlist.h>
#include <stdio.h>

Expand Down

0 comments on commit afd40dd

Please sign in to comment.