qmake/generators/makefile.h
changeset 30 5dc02b23752f
parent 18 2f34d5167611
--- a/qmake/generators/makefile.h	Wed Jun 23 19:07:03 2010 +0300
+++ b/qmake/generators/makefile.h	Tue Jul 06 15:10:48 2010 +0300
@@ -248,7 +248,41 @@
     virtual bool supportsMergedBuilds() { return false; }
     virtual bool mergeBuildProject(MakefileGenerator * /*other*/) { return false; }
     virtual bool openOutput(QFile &, const QString &build) const;
-    virtual bool isWindowsShell() const { return Option::target_mode == Option::TARG_WIN_MODE; }
+    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)