summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/makefile.h34
-rw-r--r--qmake/generators/metamakefile.cpp2
-rw-r--r--qmake/generators/symbian/symbiancommon.cpp2
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;