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/makefile.h | |
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/makefile.h')
-rw-r--r-- | qmake/generators/makefile.h | 34 |
1 files changed, 31 insertions, 3 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; }; |