aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Schroeder <holger.schroeder.ext@basyskom.de>2010-05-19 09:06:37 +0200
committerSergiy Dubovik <sergiy.dubovik@nokia.com>2010-05-25 13:16:07 +0300
commitc7ad927bfa952a3d8d149e61fb0219b22635a61b (patch)
tree52086bd8f77293ef8c0bf95314dd427a13a6c3af
parentf2fe0634856d6a3660a88f85e3c8fef7e7a78fbd (diff)
Changes: some fixes needed for windows port
RevBy: TrustMe Details: add variable for mmoc executable set moc.exe add template instantiation from mirek fix linking of animatedlayout fix searching for devices.conf add lib suffix for windows compile swaphook again
-rw-r--r--demos/animatedlayout/animatedlayout.pro10
-rw-r--r--demos/widgetsgallery/swaphook.cpp1
-rw-r--r--mmoc/mmoc.pro6
-rw-r--r--src/common_top.pri9
-rw-r--r--src/corelib/theme/mtheme.cpp11
-rw-r--r--src/corelib/widgets/mabstractcellcreator.cpp10
-rw-r--r--src/corelib/workspace/mdeviceprofile.cpp9
-rw-r--r--src/predeps.pri19
8 files changed, 55 insertions, 20 deletions
diff --git a/demos/animatedlayout/animatedlayout.pro b/demos/animatedlayout/animatedlayout.pro
index 82107d03..58adafe5 100644
--- a/demos/animatedlayout/animatedlayout.pro
+++ b/demos/animatedlayout/animatedlayout.pro
@@ -13,13 +13,9 @@ INCLUDEPATH += \
QMAKE_LIBDIR += \
$$MLIB
-win32|macx {
- macx {
- QMAKE_LFLAGS += -F../../lib
- LIBS += -framework meegotouchcore \
- -framework meegotouchviews
- }
- win32:LIBS += -lmeegotouch0
+macx {
+ QMAKE_LFLAGS += -F../../lib
+ LIBS += -framework meegotouchcore
} else {
LIBS += -lmeegotouchcore
}
diff --git a/demos/widgetsgallery/swaphook.cpp b/demos/widgetsgallery/swaphook.cpp
index 4984a315..786df674 100644
--- a/demos/widgetsgallery/swaphook.cpp
+++ b/demos/widgetsgallery/swaphook.cpp
@@ -1,5 +1,4 @@
#include <cstdio>
-#include <dlfcn.h>
#include <ctime>
#include <QObject>
diff --git a/mmoc/mmoc.pro b/mmoc/mmoc.pro
index 6b8d2a44..b9daccc2 100644
--- a/mmoc/mmoc.pro
+++ b/mmoc/mmoc.pro
@@ -31,7 +31,11 @@ HEADERS += \
INSTALLS += \
target\
-DEFINES += QT_MOC_PATH=\'$$quote(\"$$QMAKE_MOC\")\'
+win32: {
+ DEFINES += QT_MOC_PATH=\\\"\"moc.exe\"\\\"
+} else {
+ DEFINES += QT_MOC_PATH=\'$$quote(\"$$QMAKE_MOC\")\'
+}
QMAKE_EXTRA_TARGETS += check
check.depends = $${TARGET}
diff --git a/src/common_top.pri b/src/common_top.pri
index 89c36623..cafa74c8 100644
--- a/src/common_top.pri
+++ b/src/common_top.pri
@@ -19,18 +19,13 @@ INCLUDEPATH += $${OUT_PWD}/.gen
QMAKE_STRIP = echo
-PRE_TARGETDEPS += $$MGEN_EXECUTABLE
+PRE_TARGETDEPS += $$MGEN_EXECUTABLE $$MMOC_EXECUTABLE
CONFIG += qt warn_on depend_includepath qmake_cache target_qt dll create_prl
!win32:CONFIG += link_pkgconfig
macx:CONFIG += lib_bundle
-win32 {
- QMAKE_MOC = ..\mmoc\mmoc
- INCLUDEPATH += .
-} else {
- QMAKE_MOC = $${M_BUILD_TREE}/mmoc/mmoc
-}
+QMAKE_MOC = $$MMOC_EXECUTABLE
QMAKE_CFLAGS += -Werror
diff --git a/src/corelib/theme/mtheme.cpp b/src/corelib/theme/mtheme.cpp
index e99df88b..c01962b4 100644
--- a/src/corelib/theme/mtheme.cpp
+++ b/src/corelib/theme/mtheme.cpp
@@ -635,13 +635,22 @@ void MThemePrivate::refreshLocalThemeConfiguration(const QStringList &themeInher
void MThemePrivate::reloadThemeLibraries(const QStringList& libraryNames)
{
+ QString libsuffix;
+
+#ifdef Q_OS_WIN
+ // under windows the libraries are suffixed with a "0",
+ // e.g. meegotouchviews0.dll, so the 0 here is needed,
+ // so that the library can be loaded under windows.
+ libsuffix = "0";
+#endif
+
// store list of libraries that needs to be unloaded
QSet<QLibrary*> toUnload = openedThemeLibraries;
// load all new libraries (if the library is already loaded, it will ref the loaded one)
openedThemeLibraries.clear();
foreach(const QString& libname, libraryNames) {
- QLibrary* library = new QLibrary(libname);
+ QLibrary* library = new QLibrary(libname + libsuffix);
if(library->load()) {
openedThemeLibraries.insert(library);
} else {
diff --git a/src/corelib/widgets/mabstractcellcreator.cpp b/src/corelib/widgets/mabstractcellcreator.cpp
index 929f6ded..0a9539ba 100644
--- a/src/corelib/widgets/mabstractcellcreator.cpp
+++ b/src/corelib/widgets/mabstractcellcreator.cpp
@@ -19,3 +19,13 @@
#include "mabstractcellcreator.h"
+// this hack is needed, because under windows
+// the template symbols are not exported...
+#ifdef Q_OS_WIN
+#include "mcontentitem.h"
+#include "mimagewidget.h"
+#include "mwidgetcontroller.h"
+template class MAbstractCellCreator<MContentItem>;
+template class MAbstractCellCreator<MImageWidget>;
+template class MAbstractCellCreator<MWidgetController>;
+#endif
diff --git a/src/corelib/workspace/mdeviceprofile.cpp b/src/corelib/workspace/mdeviceprofile.cpp
index b67358f9..7810ef0f 100644
--- a/src/corelib/workspace/mdeviceprofile.cpp
+++ b/src/corelib/workspace/mdeviceprofile.cpp
@@ -21,6 +21,7 @@
#include <QSize>
#include <QSettings>
#include <QFile>
+#include <QDir>
#include "mdebug.h"
#include "mdeviceprofile.h"
@@ -35,6 +36,14 @@ MDeviceProfilePrivate::MDeviceProfilePrivate()
{
QString filename = "/etc/meegotouch/devices.conf";
+#ifdef Q_OS_WIN
+ QDir appDir(QCoreApplication::applicationDirPath());
+ appDir.cdUp();
+ appDir.cd("etc");
+ appDir.cd("meegotouch");
+ filename = appDir.path().append("/devices.conf" );
+#endif
+
if(!load(filename)) {
qFatal("Failed to load device profile.");
}
diff --git a/src/predeps.pri b/src/predeps.pri
index 5d877a9a..f200d2fd 100644
--- a/src/predeps.pri
+++ b/src/predeps.pri
@@ -1,16 +1,29 @@
-QMAKE_EXTRA_TARGETS += build_gen
+QMAKE_EXTRA_TARGETS += build_mgen build_mmoc
build_gen.target = ../mgen/mgen
win32 {
- build_gen.commands = \
+ build_mgen.commands = \
cd $$M_BUILD_TREE/mgen && mingw32-make
# FIXME make it work for release build too
MGEN_EXECUTABLE = $$M_BUILD_TREE/mgen/debug/mgen.exe
} else {
- build_gen.commands = \
+ build_mgen.commands = \
cd $$M_BUILD_TREE/mgen && qmake && make
MGEN_EXECUTABLE = $$M_BUILD_TREE/mgen/mgen
}
+build_mmoc.target = ../mmoc/mmoc
+win32 {
+ build_mmoc.commands = \
+ cd $$M_BUILD_TREE/mmoc && mingw32-make
+
+ # FIXME make it work for release build too
+ MMOC_EXECUTABLE = $$M_BUILD_TREE/mmoc/debug/mmoc.exe
+} else {
+ build_mmoc.commands = \
+ cd $$M_BUILD_TREE/mmoc && qmake && make
+
+ MMOC_EXECUTABLE = $$M_BUILD_TREE/mmoc/mmoc
+}