Commit 50b87b3a authored by Oswald Buddenhagen's avatar Oswald Buddenhagen

add ProStringList::join(ProString) overload and make use of it

Change-Id: Ic3919a1fa9419bbb3b57dd1aa7eb95643ee59e53
Reviewed-by: Joerg Bornemann's avatarJoerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/e45a9fe457a4e5e70bf4e62092b253675dc97819)
Reviewed-by: Jake Petroules's avatarJake Petroules <jake.petroules@qt.io>
parent ddd749b1
......@@ -362,6 +362,11 @@ static QString ProStringList_join(const ProStringList &this_, const QChar *sep,
return res;
}
QString ProStringList::join(const ProString &sep) const
{
return ProStringList_join(*this, sep.constData(), sep.size());
}
QString ProStringList::join(const QString &sep) const
{
return ProStringList_join(*this, sep.constData(), sep.size());
......
......@@ -229,6 +229,7 @@ public:
int length() const { return size(); }
QString join(const ProString &sep) const;
QString join(const QString &sep) const;
QString join(QChar sep) const;
......
......@@ -602,10 +602,9 @@ ProStringList QMakeEvaluator::evaluateBuiltinExpand(
if (args.count() < 1 || args.count() > 4) {
evalError(fL1S("join(var, glue, before, after) requires one to four arguments."));
} else {
QString glue;
ProString before, after;
ProString glue, before, after;
if (args.count() >= 2)
glue = args.at(1).toQString(m_tmp1);
glue = args.at(1);
if (args.count() >= 3)
before = args[2];
if (args.count() == 4)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment