author | zecke <zecke> | 2004-07-15 17:36:57 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-07-15 17:36:57 (UTC) |
commit | 323e9a7472a110b4befba7320540263147505bae (patch) (side-by-side diff) | |
tree | 14c810bdb9c0603a30356b17b4bdf9ccb72741c6 /qmake/generators/projectgenerator.cpp | |
parent | aa292b322f1ecb43dd8f4e3cd295855730dd9f59 (diff) | |
download | opie-323e9a7472a110b4befba7320540263147505bae.zip opie-323e9a7472a110b4befba7320540263147505bae.tar.gz opie-323e9a7472a110b4befba7320540263147505bae.tar.bz2 |
Manually updatet to qmake1.06a which includes support for precompiled
headers.
Opies 'PRO' keyword was already reintroduced
Diffstat (limited to 'qmake/generators/projectgenerator.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | qmake/generators/projectgenerator.cpp | 36 |
1 files changed, 21 insertions, 15 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,13 +1,11 @@ /**************************************************************************** -** $Id$ ** -** Definition of ________ class. ** -** Created : 970521 +** Implementation of ProjectGenerator class. ** -** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** Copyright (C) 1992-2003 Trolltech AS. All rights reserved. ** -** This file is part of the network module of the Qt GUI Toolkit. +** This file is part of qmake. ** ** This file may be distributed under the terms of the Q Public License ** as defined by Trolltech AS of Norway and appearing in the file @@ -157,6 +155,7 @@ ProjectGenerator::init() QStringList dirs = Option::projfile::project_dirs; if(Option::projfile::do_pwd) dirs.prepend("."); + const QString out_file = fileFixify(Option::output.name()); for(QStringList::Iterator pd = dirs.begin(); pd != dirs.end(); pd++) { if(QFile::exists((*pd))) { QString newdir = (*pd); @@ -171,14 +170,17 @@ ProjectGenerator::init() QDir d(newdir, "*.pro"); d.setFilter(QDir::Files); for(int i = 0; i < (int)d.count(); i++) { - QString nd = newdir + QDir::separator() + d[i]; + QString nd = newdir; + if(nd == ".") + nd = ""; + else if(!nd.isEmpty() && !nd.endsWith(QString(QChar(QDir::separator())))) + nd += QDir::separator(); + nd += d[i]; fileFixify(nd); - if(d[i] != "." && d[i] != ".." && !subdirs.contains(nd)) { - if(newdir + d[i] != Option::output_dir + Option::output.name()) + if(d[i] != "." && d[i] != ".." && !subdirs.contains(nd) && !out_file.endsWith(nd)) subdirs.append(nd); } } - } if(Option::projfile::do_recursive) { QDir d(newdir); d.setFilter(QDir::Dirs); @@ -324,7 +326,7 @@ ProjectGenerator::init() break; } } - if(!found && (*val_it).endsWith(Option::moc_ext)) + if(!found && (*val_it).endsWith(Option::cpp_moc_ext)) found = TRUE; if(found) val_it = l.remove(val_it); @@ -391,7 +393,7 @@ ProjectGenerator::addFile(QString file) int s = file.findRev(Option::dir_sep); if(s != -1) dir = file.left(s+1); - if(file.mid(dir.length(), Option::moc_mod.length()) == Option::moc_mod) + if(file.mid(dir.length(), Option::h_moc_mod.length()) == Option::h_moc_mod) return FALSE; QString where; @@ -435,7 +437,7 @@ ProjectGenerator::addFile(QString file) QString -ProjectGenerator::getWritableVar(const QString &v, bool /*fixPath*/) +ProjectGenerator::getWritableVar(const QString &v, bool fixPath) { QStringList &vals = project->variables()[v]; if(vals.isEmpty()) @@ -455,10 +457,14 @@ ProjectGenerator::getWritableVar(const QString &v, bool /*fixPath*/) spaces += " "; join = vals.join(" \\\n" + spaces); } +#if 0 // ### Commented out for now so that project generation works. - // Sam: can you look at why this was needed? - /* if(fixPath) - join = join.replace("\\", "/");*/ + // Sam: it had to do with trailing \'s (ie considered continuation lines) + if(fixPath) + join = join.replace("\\", "/"); +#else + Q_UNUSED(fixPath); +#endif return ret + join + "\n"; } |