diff options
author | axis <qt-info@nokia.com> | 2010-02-12 10:03:03 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2010-02-12 10:26:12 (GMT) |
commit | 12b5471062a52f6745f4309568b4c27c5e12d91f (patch) | |
tree | 48df9322513566518c0b8ea5c3d35d3bb4823797 /qmake/generators | |
parent | 4b4021443ba06b966c46994eeeceb34dd607bd9b (diff) | |
download | Qt-12b5471062a52f6745f4309568b4c27c5e12d91f.zip Qt-12b5471062a52f6745f4309568b4c27c5e12d91f.tar.gz Qt-12b5471062a52f6745f4309568b4c27c5e12d91f.tar.bz2 |
Made some changes after code review.
- Changed makefile generator name to SYMBIAN_UNIX, to be more in line
with the other generators.
- Explained the reason for avoiding virtual inheritance in a bit more
detail.
- Removed an unnecessary string replacement.
- Fixed the location of s60 plugins for MMP based generators.
RevBy: Miikka Heikkinen
Diffstat (limited to 'qmake/generators')
-rw-r--r-- | qmake/generators/makefile.h | 34 | ||||
-rw-r--r-- | qmake/generators/metamakefile.cpp | 2 | ||||
-rw-r--r-- | qmake/generators/symbian/symbiancommon.cpp | 2 |
3 files changed, 33 insertions, 5 deletions
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 0b3bdfa..85510ea 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -249,9 +249,37 @@ public: virtual bool openOutput(QFile &, const QString &build) const; virtual bool isWindowsShell() const { return Option::target_mode == Option::TARG_WIN_MODE; } - // This is to avoid having SymbianCommonGenerator as a virtually inherited class - // of this class. Instead it is without a base class (avoiding the virtual - // inheritance problem), and is allowed to use functions defined in here. + /* The next one is to avoid having SymbianCommonGenerator as a virtually + inherited class of this class. Instead it is without a base class + (avoiding the virtual inheritance problem), and is allowed to use + functions defined in here. + + To illustrate: + +-------------------+ + | MakefileGenerator | + +-------------------+ + ^ ^ + | | + | X <-- Avoid this inheritance + | | + +------------------------+ +------------------------+ + | UnixMakefileGenerator | | SymbianCommonGenerator | + | or | | | + | NmakeMakefileGenerator | | | + +------------------------+ +------------------------+ + ^ ^ + | | + | | + | | + +-----------------------------+ + | SymbianMakefileTemplate<> | + +-----------------------------+ + + We want to avoid the famous diamond problem, because if we have that, we need + virtual inheritance, which not all compilers like. Therefore, we break the + link as illustrated. Instead, we have a pointer to MakefileGenerator inside + SymbianCommonGenerator, and allows full access by making it a friend here. + */ friend class SymbianCommonGenerator; }; diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index 54df7bc..d4d1d43 100644 --- a/qmake/generators/metamakefile.cpp +++ b/qmake/generators/metamakefile.cpp @@ -477,7 +477,7 @@ MetaMakefileGenerator::createMakefileGenerator(QMakeProject *proj, bool noIO) mkfile = new SymbianAbldMakefileGenerator; } else if(gen == "SYMBIAN_SBSV2") { mkfile = new SymbianSbsv2MakefileGenerator; - } else if(gen == "UNIX_SYMBIAN") { + } else if(gen == "SYMBIAN_UNIX") { mkfile = new SymbianMakefileTemplate<UnixMakefileGenerator>; } else { fprintf(stderr, "Unknown generator specified: %s\n", gen.toLatin1().constData()); diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp index 7100b57..e66a909 100644 --- a/qmake/generators/symbian/symbiancommon.cpp +++ b/qmake/generators/symbian/symbiancommon.cpp @@ -274,7 +274,7 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, Deployment t << "; DEPLOYMENT" << endl; for (int i = 0; i < depList.size(); ++i) { t << QString("\"%1\" - \"%2\"") - .arg(QString(depList.at(i).from).replace('\\','/')) + .arg(depList.at(i).from) .arg(depList.at(i).to) << endl; } t << endl; |