From e45a9fe457a4e5e70bf4e62092b253675dc97819 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 13 May 2016 15:21:05 +0200 Subject: [PATCH] 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 --- qmake/generators/makefile.cpp | 11 ++++++----- qmake/generators/unix/unixmake2.cpp | 5 +++-- qmake/generators/win32/msvc_vcproj.cpp | 3 ++- qmake/library/proitems.cpp | 5 +++++ qmake/library/proitems.h | 1 + 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 12004c62c36..762ae66a1ab 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 9312f19418a..c53393e2681 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 91054860963..51cf5abdd4f 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 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)