From df175f190d17b3473ef4257cd393eda679060651 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 6 Sep 2012 12:21:38 +0200 Subject: introduce qmake variable abstractions this is preparation for adapting to a new evaluator. Change-Id: I6fc59f5525735754a00afa6629fbfe257e84db97 Reviewed-by: Daniel Teske Reviewed-by: Joerg Bornemann --- qmake/meta.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'qmake/meta.cpp') diff --git a/qmake/meta.cpp b/qmake/meta.cpp index 717da74704..93e7ed14a5 100644 --- a/qmake/meta.cpp +++ b/qmake/meta.cpp @@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE -QHash > QMakeMetaInfo::cache_vars; +QHash QMakeMetaInfo::cache_vars; QMakeMetaInfo::QMakeMetaInfo(QMakeProject *_conf) : conf(_conf) @@ -143,25 +143,25 @@ QMakeMetaInfo::readLibtoolFile(const QString &f) dirf = ""; else if(!dirf.isEmpty() && !dirf.endsWith(Option::output_dir)) dirf += QLatin1Char('/'); - const QHash &v = proj.variables(); - for (QHash::ConstIterator it = v.begin(); it != v.end(); ++it) { - QStringList lst = it.value(); + const ProValueMap &v = proj.variables(); + for (ProValueMap::ConstIterator it = v.begin(); it != v.end(); ++it) { + ProStringList lst = it.value(); if(lst.count() == 1 && (lst.first().startsWith("'") || lst.first().startsWith("\"")) && - lst.first().endsWith(QString(lst.first()[0]))) - lst = QStringList(lst.first().mid(1, lst.first().length() - 2)); + lst.first().endsWith(QString(lst.first().at(0)))) + lst = ProStringList(lst.first().mid(1, lst.first().length() - 2)); if(!vars.contains("QMAKE_PRL_TARGET") && (it.key() == "dlname" || it.key() == "library_names" || it.key() == "old_library")) { - QString dir = v["libdir"].first(); - if((dir.startsWith("'") || dir.startsWith("\"")) && dir.endsWith(QString(dir[0]))) + ProString dir = v["libdir"].first(); + if ((dir.startsWith('\'') || dir.startsWith('"')) && dir.endsWith(dir.at(0))) dir = dir.mid(1, dir.length() - 2); dir = dir.trimmed(); if(!dir.isEmpty() && !dir.endsWith(QLatin1Char('/'))) dir += QLatin1Char('/'); if(lst.count() == 1) - lst = lst.first().split(" "); - for(QStringList::Iterator lst_it = lst.begin(); lst_it != lst.end(); ++lst_it) { + lst = ProStringList(lst.first().toQString().split(" ")); + for (ProStringList::Iterator lst_it = lst.begin(); lst_it != lst.end(); ++lst_it) { bool found = false; - QString dirs[] = { "", dir, dirf, dirf + ".libs/", "(term)" }; + QString dirs[] = { "", dir.toQString(), dirf, dirf + ".libs/", "(term)" }; for(int i = 0; !found && dirs[i] != "(term)"; i++) { if(QFile::exists(dirs[i] + (*lst_it))) { QString targ = dirs[i] + (*lst_it); @@ -176,12 +176,12 @@ QMakeMetaInfo::readLibtoolFile(const QString &f) } } else if(it.key() == "dependency_libs") { if(lst.count() == 1) { - QString dep = lst.first(); + ProString dep = lst.first(); if ((dep.startsWith('\'') || dep.startsWith('"')) && dep.endsWith(dep.at(0))) dep = dep.mid(1, dep.length() - 2); - lst = dep.trimmed().split(" "); + lst = ProStringList(dep.trimmed().toQString().split(" ")); } - for(QStringList::Iterator lit = lst.begin(); lit != lst.end(); ++lit) { + for (ProStringList::Iterator lit = lst.begin(); lit != lst.end(); ++lit) { if((*lit).startsWith("-R")) { if(!conf->isEmpty("QMAKE_LFLAGS_RPATH")) (*lit) = conf->first("QMAKE_LFLAGS_RPATH") + (*lit).mid(2); -- cgit v1.2.3