do not append a trailing slash to output directory

it's entirely counterproductive and confuses the subsequent code.

Change-Id: Iadcfd2af80acd2d7ed50807b3e001e26d83075a5
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
Oswald Buddenhagen 2013-02-25 15:11:45 +01:00 committed by The Qt Project
parent c1771a78ed
commit 64d03e1c34
2 changed files with 2 additions and 11 deletions

View File

@ -387,8 +387,6 @@ SubdirsMetaMakefileGenerator::write()
const Subdir *sub = subs.at(i);
qmake_setpwd(subs.at(i)->input_dir);
Option::output_dir = QFileInfo(subs.at(i)->output_dir).absoluteFilePath();
if(Option::output_dir.at(Option::output_dir.length()-1) != QLatin1Char('/'))
Option::output_dir += QLatin1Char('/');
Option::output.setFileName(subs.at(i)->output_file);
if(i != subs.count()-1) {
for (int ind = 0; ind < sub->indent; ++ind)

View File

@ -97,15 +97,8 @@ int runQMake(int argc, char **argv)
}
QString oldpwd = qmake_getpwd();
#ifdef Q_OS_WIN
if(!(oldpwd.length() == 3 && oldpwd[0].isLetter() && oldpwd.endsWith(":/")))
#endif
{
if(!oldpwd.endsWith(QLatin1Char('/')))
oldpwd += QLatin1Char('/');
}
Option::output_dir = oldpwd; //for now this is the output dir
Option::output_dir = oldpwd; //for now this is the output dir
if(Option::output.fileName() != "-") {
QFileInfo fi(Option::output);
QString dir;
@ -119,7 +112,7 @@ int runQMake(int argc, char **argv)
if(!dir.isNull() && dir != ".")
Option::output_dir = dir;
if(QDir::isRelativePath(Option::output_dir))
Option::output_dir.prepend(oldpwd);
Option::output_dir.prepend(oldpwd + QLatin1Char('/'));
Option::output_dir = QDir::cleanPath(Option::output_dir);
}