remove overuse of trimmed()
there is no reason to expect the various list elements to be space-encumbered, or to tolerate it if they were. Change-Id: I1a2e5c8d30456b640408503334c55f9262792db5 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
parent
34a967abc9
commit
c111e1553e
@ -816,7 +816,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
for(int x = 0; x < tmp.count();) {
|
||||
bool remove = false;
|
||||
QString library, name;
|
||||
ProString opt = tmp[x].trimmed();
|
||||
ProString opt = tmp[x];
|
||||
if(opt.startsWith("-L")) {
|
||||
QString r = opt.mid(2).toQString();
|
||||
fixForOutput(r);
|
||||
|
@ -448,7 +448,7 @@ UnixMakefileGenerator::findLibraries()
|
||||
for (int i = 0; lflags[i]; i++) {
|
||||
ProStringList &l = project->values(lflags[i]);
|
||||
for (ProStringList::Iterator it = l.begin(); it != l.end(); ) {
|
||||
QString stub, dir, extn, opt = (*it).trimmed().toQString();
|
||||
QString stub, dir, extn, opt = (*it).toQString();
|
||||
if(opt.startsWith("-")) {
|
||||
if(opt.startsWith("-L")) {
|
||||
QString lib = opt.mid(2);
|
||||
@ -555,7 +555,7 @@ UnixMakefileGenerator::processPrlFiles()
|
||||
for (int i = 0; lflags[i]; i++) {
|
||||
ProStringList &l = project->values(lflags[i]);
|
||||
for(int lit = 0; lit < l.size(); ++lit) {
|
||||
QString opt = l.at(lit).trimmed().toQString();
|
||||
QString opt = l.at(lit).toQString();
|
||||
if(opt.startsWith("-")) {
|
||||
if (opt.startsWith(libArg)) {
|
||||
QMakeLocalFileName l(opt.mid(libArg.length()));
|
||||
@ -589,10 +589,9 @@ UnixMakefileGenerator::processPrlFiles()
|
||||
frameworkdirs.insert(fwidx++, f);
|
||||
} else if (target_mode == TARG_MAC_MODE && opt.startsWith("-framework")) {
|
||||
if(opt.length() > 11)
|
||||
opt = opt.mid(11);
|
||||
opt = opt.mid(11).trimmed();
|
||||
else
|
||||
opt = l.at(++lit).toQString();
|
||||
opt = opt.trimmed();
|
||||
foreach (const QMakeLocalFileName &dir, frameworkdirs) {
|
||||
QString prl = dir.local() + "/" + opt + ".framework/" + opt + Option::prl_ext;
|
||||
if(processPrlFile(prl))
|
||||
@ -624,7 +623,7 @@ UnixMakefileGenerator::processPrlFiles()
|
||||
QHash<ProKey, ProStringList> lflags;
|
||||
for(int lit = 0; lit < l.size(); ++lit) {
|
||||
ProKey arch("default");
|
||||
ProString opt = l.at(lit).trimmed();
|
||||
ProString opt = l.at(lit);
|
||||
if(opt.startsWith("-")) {
|
||||
if (target_mode == TARG_MAC_MODE && opt.startsWith("-Xarch")) {
|
||||
if (opt.length() > 7) {
|
||||
|
@ -2412,7 +2412,7 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
|
||||
// Make sure that all deps are only once
|
||||
QStringList uniqDeps;
|
||||
for (int c = 0; c < deps.count(); ++c) {
|
||||
QString aDep = deps.at(c).trimmed();
|
||||
QString aDep = deps.at(c);
|
||||
if (!aDep.isEmpty())
|
||||
uniqDeps << aDep;
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ Win32MakefileGenerator::findLibraries()
|
||||
ProStringList &l = project->values(lflags[i]);
|
||||
for (ProStringList::Iterator it = l.begin(); it != l.end();) {
|
||||
bool remove = false;
|
||||
QString opt = (*it).trimmed().toQString();
|
||||
QString opt = (*it).toQString();
|
||||
if(opt.startsWith("/LIBPATH:")) {
|
||||
QString libpath = opt.mid(9);
|
||||
QMakeLocalFileName l(libpath);
|
||||
@ -210,7 +210,7 @@ Win32MakefileGenerator::processPrlFiles()
|
||||
for (int i = 0; lflags[i]; i++) {
|
||||
ProStringList &l = project->values(lflags[i]);
|
||||
for (int lit = 0; lit < l.size(); ++lit) {
|
||||
QString opt = l.at(lit).trimmed().toQString();
|
||||
QString opt = l.at(lit).toQString();
|
||||
if (opt.startsWith(libArg)) {
|
||||
QMakeLocalFileName l(opt.mid(libArg.length()));
|
||||
if (!libdirs.contains(l))
|
||||
@ -239,7 +239,7 @@ Win32MakefileGenerator::processPrlFiles()
|
||||
if (!project->isActiveConfig("no_smart_library_merge") && !project->isActiveConfig("no_lflags_merge")) {
|
||||
ProStringList lflags;
|
||||
for (int lit = 0; lit < l.size(); ++lit) {
|
||||
ProString opt = l.at(lit).trimmed();
|
||||
ProString opt = l.at(lit);
|
||||
if (opt.startsWith(libArg)) {
|
||||
if (!lflags.contains(opt))
|
||||
lflags.append(opt);
|
||||
|
Loading…
Reference in New Issue
Block a user