diff options
author | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2014-11-24 16:02:38 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2015-02-17 18:27:44 +0000 |
commit | e0962270d74db5950b9567d4996189f115a1c75a (patch) | |
tree | 45fd68d3c18cb57ca1c1d17912c3478f2cf97c3f /qmake/generators/unix | |
parent | 1cacf1e70d01cc989d973739ce4d5c7f00c5068c (diff) |
replace incorrect uses of fixPathToLocalOS() (mostly)
in most cases, it actually means normalizePath() (because the file name is
used with qt i/o functions afterwards).
this affects QMakeLocalFile::local() as well, so many not immediately
obvious places are affected as well.
there was also one case of fixPathToTargetOS() falling into this category.
this is mostly a no-op, as the qt functions are agnostic to the path
separator.
in some other cases (in particular in the vcproj generator), it actually
means fixPathToTargetOS().
this is mostly a no-op as well, as the two functions are equal except on
msys anyway.
in the <meta file>FileName() functions, the use of a fixPath*() function
is bogus in the first place - fileFixify() already does
fixPathToTargetOS(), and this is correct when the file name is used
verbatim in a make command (which it is). otherwise it's irrelevant.
Change-Id: I26712da8f888c704f8b7f42dbe24c941b6ad031d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'qmake/generators/unix')
-rw-r--r-- | qmake/generators/unix/unixmake.cpp | 10 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 2c98e716d0..4ee18c46ab 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -511,7 +511,7 @@ UnixMakefileGenerator::findLibraries() for (ProStringList::Iterator extit = extens.begin(); extit != extens.end(); ++extit) { if(dir.isNull()) { for(QList<QMakeLocalFileName>::Iterator dep_it = libdirs.begin(); dep_it != libdirs.end(); ++dep_it) { - QString pathToLib = ((*dep_it).local() + Option::dir_sep + QString pathToLib = ((*dep_it).local() + '/' + project->first("QMAKE_PREFIX_SHLIB") + stub + "." + (*extit)); if(exists(pathToLib)) { @@ -531,7 +531,7 @@ UnixMakefileGenerator::findLibraries() } if(!found && project->isActiveConfig("compile_libtool")) { for(int dep_i = 0; dep_i < libdirs.size(); ++dep_i) { - if (exists(libdirs[dep_i].local() + Option::dir_sep + project->first("QMAKE_PREFIX_SHLIB") + stub + Option::libtool_ext)) { + if (exists(libdirs[dep_i].local() + '/' + project->first("QMAKE_PREFIX_SHLIB") + stub + Option::libtool_ext)) { (*it) = libdirs[dep_i].real() + Option::dir_sep + project->first("QMAKE_PREFIX_SHLIB") + stub + Option::libtool_ext; found = true; break; @@ -579,15 +579,15 @@ UnixMakefileGenerator::processPrlFiles() for(int dep_i = 0; dep_i < libdirs.size(); ++dep_i) { const QMakeLocalFileName &lfn = libdirs[dep_i]; if(!project->isActiveConfig("compile_libtool")) { //give them the .libs.. - QString la = lfn.local() + Option::dir_sep + project->first("QMAKE_PREFIX_SHLIB") + lib + Option::libtool_ext; - if(exists(la) && QFile::exists(lfn.local() + Option::dir_sep + ".libs")) { + QString la = lfn.local() + '/' + project->first("QMAKE_PREFIX_SHLIB") + lib + Option::libtool_ext; + if (exists(la) && QFile::exists(lfn.local() + "/.libs")) { QString dot_libs = lfn.real() + Option::dir_sep + ".libs"; l.append("-L" + dot_libs); libdirs.insert(libidx++, QMakeLocalFileName(dot_libs)); } } - QString prl = lfn.local() + Option::dir_sep + project->first("QMAKE_PREFIX_SHLIB") + lib + prl_ext; + QString prl = lfn.local() + '/' + project->first("QMAKE_PREFIX_SHLIB") + lib + prl_ext; if(processPrlFile(prl)) { if(prl.startsWith(lfn.local())) prl.replace(0, lfn.local().length(), lfn.real()); diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 641b475cba..ea9a03b174 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -805,7 +805,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) QString info_plist = fileFixify(project->first("QMAKE_INFO_PLIST").toQString()); if (info_plist.isEmpty()) info_plist = specdir() + QDir::separator() + "Info.plist." + project->first("TEMPLATE"); - if (!exists(Option::fixPathToLocalOS(info_plist))) { + if (!exists(Option::normalizePath(info_plist))) { warn_msg(WarnLogic, "Could not resolve Info.plist: '%s'. Check if QMAKE_INFO_PLIST points to a valid file.", info_plist.toLatin1().constData()); break; @@ -898,12 +898,12 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) int pos = name.indexOf('/'); if (pos > 0) name = name.mid(0, pos); - symlinks[Option::fixPathToLocalOS(path + name)] = + symlinks[Option::fixPathToTargetOS(path + name)] = project->first(vkey) + "/Current/" + name; path += version; } path += project->first(pkey).toQString(); - path = Option::fixPathToLocalOS(path); + path = Option::fixPathToTargetOS(path); for(int file = 0; file < files.count(); file++) { QString fn = files.at(file).toQString(); QString src = fileFixify(fn, FileFixifyAbsolute); @@ -1397,7 +1397,7 @@ UnixMakefileGenerator::libtoolFileName(bool fixify) if(fixify) { if(QDir::isRelativePath(ret) && !project->isEmpty("DESTDIR")) ret.prepend(project->first("DESTDIR").toQString()); - ret = Option::fixPathToLocalOS(fileFixify(ret, qmake_getpwd(), Option::output_dir)); + ret = fileFixify(ret, qmake_getpwd(), Option::output_dir); } return ret; } |