From 3399e362ccf4e98ab39f14bd773a291f34ee69fe Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Date: Thu, 23 Jul 2009 16:24:35 +0200 Subject: [PATCH] inline trivial functions --- src/shared/proparser/profileevaluator.cpp | 8 ++++---- src/shared/proparser/proparserutils.h | 12 +----------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp index ee626601cd2..8977868d508 100644 --- a/src/shared/proparser/profileevaluator.cpp +++ b/src/shared/proparser/profileevaluator.cpp @@ -915,10 +915,10 @@ QStringList ProFileEvaluator::Private::qmakeFeaturePaths() QStringList feature_roots; QByteArray mkspec_path = qgetenv("QMAKEFEATURES"); if (!mkspec_path.isNull()) - feature_roots += splitPathList(QString::fromLocal8Bit(mkspec_path)); + feature_roots += QString::fromLocal8Bit(mkspec_path).split(Option::dirlist_sep); /* if (prop) - feature_roots += splitPathList(prop->value("QMAKEFEATURES")); + feature_roots += prop->value("QMAKEFEATURES").split(Option::dirlist_sep); if (!Option::mkfile::cachefile.isEmpty()) { QString path; int last_slash = Option::mkfile::cachefile.lastIndexOf(Option::dir_sep); @@ -931,7 +931,7 @@ QStringList ProFileEvaluator::Private::qmakeFeaturePaths() QByteArray qmakepath = qgetenv("QMAKEPATH"); if (!qmakepath.isNull()) { - const QStringList lst = splitPathList(QString::fromLocal8Bit(qmakepath)); + const QStringList lst = QString::fromLocal8Bit(qmakepath).split(Option::dirlist_sep); foreach (const QString &item, lst) { foreach (const QString &concat_it, concat) feature_roots << (item + mkspecs_concat + concat_it); @@ -2165,7 +2165,7 @@ ProItem::ProItemReturn ProFileEvaluator::Private::evaluateConditionalFunction( q->logMessage(format("%1(message) requires one argument.").arg(function)); return ProItem::ReturnFalse; } - QString msg = fixEnvVariables(args.first()); + QString msg = Option::fixString(args.first(), Option::FixEnvVars); q->fileMessage(QString::fromLatin1("Project %1: %2").arg(function.toUpper(), msg)); // ### Consider real termination in non-cumulative mode return returnBool(function != QLatin1String("error")); diff --git a/src/shared/proparser/proparserutils.h b/src/shared/proparser/proparserutils.h index 0d339ad5219..f3a8c93d7d4 100644 --- a/src/shared/proparser/proparserutils.h +++ b/src/shared/proparser/proparserutils.h @@ -147,16 +147,6 @@ static void replaceInList(QStringList *varlist, } } -inline QString fixEnvVariables(const QString &x) -{ - return Option::fixString(x, Option::FixEnvVars); -} - -inline QStringList splitPathList(const QString &paths) -{ - return paths.split(Option::dirlist_sep); -} - static QStringList split_arg_list(QString params) { int quote = 0; @@ -262,7 +252,7 @@ static QStringList qmake_mkspec_paths() const QString concat = QDir::separator() + QString(QLatin1String("mkspecs")); QByteArray qmakepath = qgetenv("QMAKEPATH"); if (!qmakepath.isEmpty()) { - const QStringList lst = splitPathList(QString::fromLocal8Bit(qmakepath)); + const QStringList lst = QString::fromLocal8Bit(qmakepath).split(Option::dirlist_sep); for (QStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it) ret << ((*it) + concat); } -- GitLab