summaryrefslogtreecommitdiffstats
path: root/qmake/generators/makefile.h
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/generators/makefile.h')
-rw-r--r--qmake/generators/makefile.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
index addb1f5..4c3be3d 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
@@ -249,6 +249,39 @@ public:
virtual bool openOutput(QFile &, const QString &build) const;
virtual bool isWindowsShell() const { return Option::host_mode == Option::HOST_WIN_MODE; }
virtual bool isForSymbianSbsv2() const { return false; } // FIXME: killme - i'm ugly!
+
+ /* 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;
};
inline void MakefileGenerator::setNoIO(bool o)