diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-09-06 12:21:38 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-09-07 15:39:31 +0200 |
commit | df175f190d17b3473ef4257cd393eda679060651 (patch) | |
tree | 5b134c26e27001a2f349a779e7d351d8d4aa6d04 /qmake/meta.cpp | |
parent | 9c29beb9eaa35a0c62aca9abb369540fe4edc4d5 (diff) |
introduce qmake variable abstractions
this is preparation for adapting to a new evaluator.
Change-Id: I6fc59f5525735754a00afa6629fbfe257e84db97
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Diffstat (limited to 'qmake/meta.cpp')
-rw-r--r-- | qmake/meta.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
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<QString, QHash<QString, QStringList> > QMakeMetaInfo::cache_vars; +QHash<QString, ProValueMap> 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<QString, QStringList> &v = proj.variables(); - for (QHash<QString, QStringList>::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); |