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 | |
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
-rw-r--r-- | mkspecs/common/symbian/symbian-makefile.conf | 2 | ||||
-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 | ||||
-rw-r--r-- | src/s60installs/s60installs.pro | 16 |
5 files changed, 44 insertions, 12 deletions
diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf index 65796b6..c8a88dd 100644 --- a/mkspecs/common/symbian/symbian-makefile.conf +++ b/mkspecs/common/symbian/symbian-makefile.conf @@ -2,7 +2,7 @@ # qmake configuration for makefile based symbian # -MAKEFILE_GENERATOR = UNIX_SYMBIAN +MAKEFILE_GENERATOR = SYMBIAN_UNIX include(symbian.conf) 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; diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 8cb7c18..cff8426 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -27,20 +27,24 @@ symbian: { $$QMAKE_LIBDIR_QT/QtSql.dll symbian-abld|symbian-sbsv2 { - pluginLocations = $${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET) + defineReplace(pluginLocations) { + return ($${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)) + } } else { - pluginLocations = $$QT_BUILD_TREE/src/plugins/s60 + defineReplace(pluginLocations) { + return ($$QT_BUILD_TREE/src/plugins/s60/$$1) + } } qts60plugindeployment = \ "IF package(0x1028315F)" \ - " \"$${pluginLocations}/5_0/qts60plugin_5_0.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0.dll\"" \ + " \"$$pluginLocations(5_0)/qts60plugin_5_0.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0.dll\"" \ "ELSEIF package(0x102752AE)" \ - " \"$${pluginLocations}/3_2/qts60plugin_3_2.dll\" - \"c:\\sys\\bin\\qts60plugin_3_2.dll\"" \ + " \"$$pluginLocations(3_2)/qts60plugin_3_2.dll\" - \"c:\\sys\\bin\\qts60plugin_3_2.dll\"" \ "ELSEIF package(0x102032BE)" \ - " \"$${pluginLocations}/3_1/qts60plugin_3_1.dll\" - \"c:\\sys\\bin\\qts60plugin_3_1.dll\"" \ + " \"$$pluginLocations(3_1)/qts60plugin_3_1.dll\" - \"c:\\sys\\bin\\qts60plugin_3_1.dll\"" \ "ELSE" \ - " \"$${pluginLocations}/5_0/qts60plugin_5_0.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0.dll\"" \ + " \"$$pluginLocations(5_0)/qts60plugin_5_0.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0.dll\"" \ "ENDIF" qtlibraries.pkg_postrules += qts60plugindeployment |