diff options
author | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2014-11-27 14:49:16 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2015-02-02 11:14:43 +0000 |
commit | 4b486cb88c410a006fb528794709ea40dc77ec53 (patch) | |
tree | 1ea3833022199a49c300f2df456e9ee4038c923d /qmake/generators/unix | |
parent | 365eb897130708c3f413f87a866c0240c9c6fb34 (diff) |
values(foo).first() => first(foo)
Change-Id: Ic5bb8ae3166c76299881970f83d20206bec704bc
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'qmake/generators/unix')
-rw-r--r-- | qmake/generators/unix/unixmake.cpp | 18 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 20 |
2 files changed, 17 insertions, 21 deletions
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 8ca2b0a820..b3acbd8d0d 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -53,10 +53,6 @@ UnixMakefileGenerator::init() } } - if (project->isEmpty("QMAKE_PREFIX_SHLIB")) - // Prevent crash when using the empty variable. - project->values("QMAKE_PREFIX_SHLIB").append(""); - if(!project->isEmpty("QMAKE_FAILED_REQUIREMENTS")) /* no point */ return; @@ -513,12 +509,12 @@ UnixMakefileGenerator::findLibraries() if(!extn.isNull()) extens << extn; else - extens << project->values("QMAKE_EXTENSION_SHLIB").first() << "a"; + extens << project->first("QMAKE_EXTENSION_SHLIB") << "a"; 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 - + project->values("QMAKE_PREFIX_SHLIB").first() + + project->first("QMAKE_PREFIX_SHLIB") + stub + "." + (*extit)); if(exists(pathToLib)) { (*it) = "-l" + stub; @@ -527,7 +523,7 @@ UnixMakefileGenerator::findLibraries() } } } else { - QString lib = dir + project->values("QMAKE_PREFIX_SHLIB").first() + stub + "." + (*extit); + QString lib = dir + project->first("QMAKE_PREFIX_SHLIB") + stub + "." + (*extit); if (exists(lib)) { (*it) = lib; found = true; @@ -537,8 +533,8 @@ 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->values("QMAKE_PREFIX_SHLIB").first() + stub + Option::libtool_ext)) { - (*it) = libdirs[dep_i].real() + Option::dir_sep + project->values("QMAKE_PREFIX_SHLIB").first() + stub + Option::libtool_ext; + if (exists(libdirs[dep_i].local() + Option::dir_sep + 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; } @@ -585,7 +581,7 @@ 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->values("QMAKE_PREFIX_SHLIB").first() + lib + Option::libtool_ext; + 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 dot_libs = lfn.real() + Option::dir_sep + ".libs"; l.append("-L" + dot_libs); @@ -593,7 +589,7 @@ UnixMakefileGenerator::processPrlFiles() } } - QString prl = lfn.local() + Option::dir_sep + project->values("QMAKE_PREFIX_SHLIB").first() + lib + prl_ext; + QString prl = lfn.local() + Option::dir_sep + 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 149a58459d..f5be8717bf 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -75,14 +75,14 @@ UnixMakefileGenerator::writeMakefile(QTextStream &t) if (writeDummyMakefile(t)) return true; - if (project->values("TEMPLATE").first() == "app" || - project->values("TEMPLATE").first() == "lib" || - project->values("TEMPLATE").first() == "aux") { + if (project->first("TEMPLATE") == "app" || + project->first("TEMPLATE") == "lib" || + project->first("TEMPLATE") == "aux") { if(Option::mkfile::do_stub_makefile && MakefileGenerator::writeStubMakefile(t)) return true; writeMakeParts(t); return MakefileGenerator::writeMakefile(t); - } else if(project->values("TEMPLATE").first() == "subdirs") { + } else if (project->first("TEMPLATE") == "subdirs") { MakefileGenerator::writeSubDirs(t); return true; } @@ -456,7 +456,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } else { //actual target QString incr_target_dir = var("DESTDIR") + "lib" + incr_target + "." + - project->values("QMAKE_EXTENSION_SHLIB").first(); + project->first("QMAKE_EXTENSION_SHLIB"); QString incr_lflags = var("QMAKE_LFLAGS_SHLIB") + " "; if(project->isActiveConfig("debug")) incr_lflags += var("QMAKE_LFLAGS_DEBUG"); @@ -1126,9 +1126,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) void UnixMakefileGenerator::init2() { if(project->isEmpty("QMAKE_FRAMEWORK_VERSION")) - project->values("QMAKE_FRAMEWORK_VERSION").append(project->values("VER_MAJ").first()); + project->values("QMAKE_FRAMEWORK_VERSION").append(project->first("VER_MAJ")); - if (project->values("TEMPLATE").first() == "aux") + if (project->first("TEMPLATE") == "aux") return; if (!project->values("QMAKE_APP_FLAG").isEmpty()) { @@ -1245,7 +1245,7 @@ void UnixMakefileGenerator::init2() project->first("VER_MAJ") + "." + project->first("VER_MIN") + "." + project->first("VER_PAT") + "." + - project->values("QMAKE_EXTENSION_SHLIB").first()); + project->first("QMAKE_EXTENSION_SHLIB")); } else { project->values("TARGET_x").append("lib" + project->first("TARGET") + "." + project->first("QMAKE_EXTENSION_SHLIB") + @@ -1256,8 +1256,8 @@ void UnixMakefileGenerator::init2() "." + project->first("VER_MIN")); project->values("TARGET_x.y.z").append("lib" + project->first("TARGET") + "." + - project->values( - "QMAKE_EXTENSION_SHLIB").first() + "." + + project->first( + "QMAKE_EXTENSION_SHLIB") + "." + project->first("VER_MAJ") + "." + project->first("VER_MIN") + "." + project->first("VER_PAT")); |