summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-07-20 15:31:14 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-31 11:17:40 +0200
commit14bf7ef504c63f783a0a7be6d6f4354946891e31 (patch)
tree2c6309f26aca65eddf44901ab01ff8b187519191 /qmake/generators
parentf71a5c8cde492b41285309b86856b6e82354fa2e (diff)
inline MakefileGenerator::processPrlVariable()
the visitor-pattern like approach is not needed any more Change-Id: I990db681cbeee91d89ecba97745a8104595247e7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/makefile.cpp24
-rw-r--r--qmake/generators/makefile.h1
2 files changed, 6 insertions, 19 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 497b77b800..f92ae3918a 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -896,9 +896,12 @@ MakefileGenerator::processPrlFile(QString &file)
debug_msg(2, "Ignored meta file %s [%s]", real_meta_file.toLatin1().constData(), libinfo.type().toLatin1().constData());
} else {
ret = true;
- QHash<QString, QStringList> &vars = libinfo.variables();
- for(QHash<QString, QStringList>::Iterator it = vars.begin(); it != vars.end(); ++it)
- processPrlVariable(it.key(), it.value());
+ project->values("QMAKE_CURRENT_PRL_LIBS") = libinfo.values("QMAKE_PRL_LIBS");
+ QStringList &defs = project->values("DEFINES");
+ const QStringList &prl_defs = project->values("PRL_EXPORT_DEFINES");
+ foreach (const QString &def, libinfo.values("QMAKE_PRL_DEFINES"))
+ if (!defs.contains(def) && prl_defs.contains(def))
+ defs.append(def);
if(try_replace_file && !libinfo.isEmpty("QMAKE_PRL_TARGET")) {
QString dir;
int slsh = real_meta_file.lastIndexOf(Option::dir_sep);
@@ -941,21 +944,6 @@ MakefileGenerator::filterIncludedFiles(const QString &var)
}
void
-MakefileGenerator::processPrlVariable(const QString &var, const QStringList &l)
-{
- if(var == "QMAKE_PRL_LIBS") {
- project->values("QMAKE_CURRENT_PRL_LIBS") += l;
- } else if(var == "QMAKE_PRL_DEFINES") {
- QStringList &out = project->values("DEFINES");
- for(QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) {
- if(out.indexOf((*it)) == -1 &&
- project->values("PRL_EXPORT_DEFINES").indexOf((*it)) == -1)
- out.append((*it));
- }
- }
-}
-
-void
MakefileGenerator::processPrlFiles()
{
qFatal("MakefileGenerator::processPrlFiles() called!");
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
index 611430a646..118e6e7ece 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
@@ -213,7 +213,6 @@ protected:
QString prlFileName(bool fixify=true);
void writePrlFile();
bool processPrlFile(QString &);
- void processPrlVariable(const QString &, const QStringList &);
virtual void processPrlFiles();
virtual void writePrlFile(QTextStream &);