diff options
author | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2016-05-13 15:21:05 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2016-05-24 12:38:47 +0000 |
commit | e45a9fe457a4e5e70bf4e62092b253675dc97819 (patch) | |
tree | 5f96833425131cc8dfc7a8bdd99367278837063d | |
parent | 4c56466f431b237f636f66c263d21d3bc9152260 (diff) |
add ProStringList::join(ProString) overload and make use of it
this introduces an ambiguity, so some char* arguments need explicit
QString construction now.
Change-Id: Ic3919a1fa9419bbb3b57dd1aa7eb95643ee59e53
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r-- | qmake/generators/makefile.cpp | 11 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 5 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.cpp | 3 | ||||
-rw-r--r-- | qmake/library/proitems.cpp | 5 | ||||
-rw-r--r-- | qmake/library/proitems.h | 1 | ||||
-rw-r--r-- | qmake/library/qmakebuiltins.cpp | 5 |
6 files changed, 19 insertions, 11 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 12004c62c3..762ae66a1a 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -318,8 +318,8 @@ MakefileGenerator::findFilesInVPATH(ProStringList l, uchar flags, const QString QDir::NoDotAndDotDot | QDir::AllEntries); if(files.isEmpty()) { debug_msg(1, "%s:%d Failure to find %s in vpath (%s)", - __FILE__, __LINE__, - val.toLatin1().constData(), vpath.join("::").toLatin1().constData()); + __FILE__, __LINE__, val.toLatin1().constData(), + vpath.join(QString("::")).toLatin1().constData()); if(flags & VPATH_RemoveMissingFiles) remove_file = true; else if(flags & VPATH_WarnMissingFiles) @@ -780,7 +780,8 @@ MakefileGenerator::init() for (ProStringList::Iterator it = incDirs.begin(); it != incDirs.end(); ++it) deplist.append(QMakeLocalFileName((*it).toQString())); QMakeSourceFileInfo::setDependencyPaths(deplist); - debug_msg(1, "Dependency Directories: %s", incDirs.join(" :: ").toLatin1().constData()); + debug_msg(1, "Dependency Directories: %s", + incDirs.join(QString(" :: ")).toLatin1().constData()); //cache info if(project->isActiveConfig("qmake_cache")) { QString cache_file; @@ -2183,7 +2184,7 @@ MakefileGenerator::writeExtraVariables(QTextStream &t) } if (!outlist.isEmpty()) { t << "####### Custom Variables\n"; - t << outlist.join("\n") << endl << endl; + t << outlist.join('\n') << endl << endl; } } @@ -2727,7 +2728,7 @@ MakefileGenerator::writeMakeQmake(QTextStream &t, bool noDummyQmakeAll) t << escapeDependencyPath(specdir() + Option::dir_sep + "qmake.conf") << " "; } const ProStringList &included = escapeDependencyPaths(project->values("QMAKE_INTERNAL_INCLUDED_FILES")); - t << included.join(" \\\n\t\t") << "\n\t" + t << included.join(QString(" \\\n\t\t")) << "\n\t" << qmake << endl; for(int include = 0; include < included.size(); ++include) { const ProString &i = included.at(include); diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 9312f19418..c53393e268 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -241,13 +241,14 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "\\\n\t\t" << (*objit); } if(incrs_out.count() == objs.count()) { //we just switched places, no real incrementals to be done! - t << escapeFilePaths(incrs_out).join(" \\\n\t\t") << endl; + t << escapeFilePaths(incrs_out).join(QString(" \\\n\t\t")) << endl; } else if(!incrs_out.count()) { t << endl; } else { src_incremental = true; t << endl; - t << "INCREMENTAL_OBJECTS = " << escapeFilePaths(incrs_out).join(" \\\n\t\t") << endl; + t << "INCREMENTAL_OBJECTS = " + << escapeFilePaths(incrs_out).join(QString(" \\\n\t\t")) << endl; } } else { // Used all over the place in both deps and commands. diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index 9105486096..51cf5abdd4 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -490,7 +490,8 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash<QSt // Check if all requirements are fulfilled if (!tmp_proj.isEmpty("QMAKE_FAILED_REQUIREMENTS")) { fprintf(stderr, "Project file(%s) not added to Solution because all requirements not met:\n\t%s\n", - fn.toLatin1().constData(), tmp_proj.values("QMAKE_FAILED_REQUIREMENTS").join(" ").toLatin1().constData()); + fn.toLatin1().constData(), + tmp_proj.values("QMAKE_FAILED_REQUIREMENTS").join(' ').toLatin1().constData()); qmake_setpwd(oldpwd); Option::output_dir = oldoutpwd; continue; diff --git a/qmake/library/proitems.cpp b/qmake/library/proitems.cpp index 5f923744be..dc84c40d06 100644 --- a/qmake/library/proitems.cpp +++ b/qmake/library/proitems.cpp @@ -365,6 +365,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()); diff --git a/qmake/library/proitems.h b/qmake/library/proitems.h index dcff970600..f373f928df 100644 --- a/qmake/library/proitems.h +++ b/qmake/library/proitems.h @@ -233,6 +233,7 @@ public: int length() const { return size(); } + QString join(const ProString &sep) const; QString join(const QString &sep) const; QString join(QChar sep) const; diff --git a/qmake/library/qmakebuiltins.cpp b/qmake/library/qmakebuiltins.cpp index 80569e503a..d927b409b1 100644 --- a/qmake/library/qmakebuiltins.cpp +++ b/qmake/library/qmakebuiltins.cpp @@ -596,10 +596,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) |