Diffstat (limited to 'qmake/generators/projectgenerator.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | qmake/generators/projectgenerator.cpp | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/qmake/generators/projectgenerator.cpp b/qmake/generators/projectgenerator.cpp index 1515216..1c17379 100644 --- a/qmake/generators/projectgenerator.cpp +++ b/qmake/generators/projectgenerator.cpp | |||
@@ -1,11 +1,9 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** |
3 | ** | 3 | ** |
4 | ** Definition of ________ class. | 4 | ** Implementation of ProjectGenerator class. |
5 | ** | 5 | ** |
6 | ** Created : 970521 | 6 | ** Copyright (C) 1992-2003 Trolltech AS. All rights reserved. |
7 | ** | 7 | ** |
8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | 8 | ** This file is part of qmake. |
9 | ** | ||
10 | ** This file is part of the network module of the Qt GUI Toolkit. | ||
11 | ** | 9 | ** |
@@ -159,2 +157,3 @@ ProjectGenerator::init() | |||
159 | dirs.prepend("."); | 157 | dirs.prepend("."); |
158 | const QString out_file = fileFixify(Option::output.name()); | ||
160 | for(QStringList::Iterator pd = dirs.begin(); pd != dirs.end(); pd++) { | 159 | for(QStringList::Iterator pd = dirs.begin(); pd != dirs.end(); pd++) { |
@@ -173,8 +172,11 @@ ProjectGenerator::init() | |||
173 | for(int i = 0; i < (int)d.count(); i++) { | 172 | for(int i = 0; i < (int)d.count(); i++) { |
174 | QString nd = newdir + QDir::separator() + d[i]; | 173 | QString nd = newdir; |
174 | if(nd == ".") | ||
175 | nd = ""; | ||
176 | else if(!nd.isEmpty() && !nd.endsWith(QString(QChar(QDir::separator())))) | ||
177 | nd += QDir::separator(); | ||
178 | nd += d[i]; | ||
175 | fileFixify(nd); | 179 | fileFixify(nd); |
176 | if(d[i] != "." && d[i] != ".." && !subdirs.contains(nd)) { | 180 | if(d[i] != "." && d[i] != ".." && !subdirs.contains(nd) && !out_file.endsWith(nd)) |
177 | if(newdir + d[i] != Option::output_dir + Option::output.name()) | 181 | subdirs.append(nd); |
178 | subdirs.append(nd); | ||
179 | } | ||
180 | } | 182 | } |
@@ -326,3 +328,3 @@ ProjectGenerator::init() | |||
326 | } | 328 | } |
327 | if(!found && (*val_it).endsWith(Option::moc_ext)) | 329 | if(!found && (*val_it).endsWith(Option::cpp_moc_ext)) |
328 | found = TRUE; | 330 | found = TRUE; |
@@ -393,3 +395,3 @@ ProjectGenerator::addFile(QString file) | |||
393 | dir = file.left(s+1); | 395 | dir = file.left(s+1); |
394 | if(file.mid(dir.length(), Option::moc_mod.length()) == Option::moc_mod) | 396 | if(file.mid(dir.length(), Option::h_moc_mod.length()) == Option::h_moc_mod) |
395 | return FALSE; | 397 | return FALSE; |
@@ -437,3 +439,3 @@ ProjectGenerator::addFile(QString file) | |||
437 | QString | 439 | QString |
438 | ProjectGenerator::getWritableVar(const QString &v, bool /*fixPath*/) | 440 | ProjectGenerator::getWritableVar(const QString &v, bool fixPath) |
439 | { | 441 | { |
@@ -457,6 +459,10 @@ ProjectGenerator::getWritableVar(const QString &v, bool /*fixPath*/) | |||
457 | } | 459 | } |
460 | #if 0 | ||
458 | // ### Commented out for now so that project generation works. | 461 | // ### Commented out for now so that project generation works. |
459 | // Sam: can you look at why this was needed? | 462 | // Sam: it had to do with trailing \'s (ie considered continuation lines) |
460 | /* if(fixPath) | 463 | if(fixPath) |
461 | join = join.replace("\\", "/");*/ | 464 | join = join.replace("\\", "/"); |
465 | #else | ||
466 | Q_UNUSED(fixPath); | ||
467 | #endif | ||
462 | return ret + join + "\n"; | 468 | return ret + join + "\n"; |