summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-07-15 09:29:16 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-07-15 09:35:21 (GMT)
commitcd4c5a65b9d91fd84408205c3d20554122037730 (patch)
tree3495b44cf34e129c3156224fb2353949221203ee /src/corelib
parentfde7966c1b6122ed904d30e1f6e83eb8cd3a80b2 (diff)
downloadQt-cd4c5a65b9d91fd84408205c3d20554122037730.zip
Qt-cd4c5a65b9d91fd84408205c3d20554122037730.tar.gz
Qt-cd4c5a65b9d91fd84408205c3d20554122037730.tar.bz2
Make S60 integration optional.
This is more a cleanup of the usage of Q_WS_S60 vs. Q_OS_SYMBIAN than anything else. One of the side effects of this work was that it was relatively little work to get QtGui compiling when Q_WS_S60 is not defined. Based on this we introduce two new configure options that control S60 integration. Currently the -no-s60 option will not work entirely because the 's60main' module has not yet been refactored and still has a dependancy on the S60 libraries. Reviewed-by: axis <qt-info@nokia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/qglobal.cpp14
-rw-r--r--src/corelib/global/qglobal.h15
-rw-r--r--src/corelib/global/qnamespace.h2
-rw-r--r--src/corelib/kernel/qcore_symbian_p.cpp5
4 files changed, 24 insertions, 12 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 351c556..76ffb6a 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1819,9 +1819,6 @@ QSysInfo::S60Version QSysInfo::s60Version()
return cachedS60Version = SV_S60_Unknown;
# endif
}
-# else
-# error Qt does not support non-S60 Symbian versions yet.
-# endif // ifdef Q_WS_S60
QSysInfo::SymVersion QSysInfo::symbianVersion()
{
switch (s60Version()) {
@@ -1835,6 +1832,17 @@ QSysInfo::SymVersion QSysInfo::symbianVersion()
return SV_Unknown;
}
}
+#else
+QSysInfo::S60Version QSysInfo::s60Version()
+{
+ return SV_S60_None;
+}
+
+QSysInfo::SymVersion QSysInfo::symbianVersion()
+{
+ return SV_Unknown;
+}
+# endif // ifdef Q_WS_S60
#endif // ifdef Q_OS_SYMBIAN
/*!
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 9e5715a..e6508a8 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -822,7 +822,9 @@ namespace QT_NAMESPACE {}
# define Q_WS_MAC32
# endif
# elif defined(Q_OS_SYMBIAN)
-# define Q_WS_S60
+# if (defined(__SERIES60_31__) || defined(__S60_32__) || defined(__S60_50__)) && !defined(QT_NO_S60)
+# define Q_WS_S60
+# endif
# elif !defined(Q_WS_QWS)
# define Q_WS_X11
# endif
@@ -1472,15 +1474,14 @@ public:
SV_9_4 = 0x0004
};
static SymVersion symbianVersion();
-# ifdef Q_WS_S60
enum S60Version {
- SV_S60_Unknown = 0x0000,
- SV_S60_3_1 = 0x0001,
- SV_S60_3_2 = 0x0002,
- SV_S60_5_0 = 0x0004
+ SV_S60_None = 0x0000,
+ SV_S60_Unknown = 0x0001,
+ SV_S60_3_1 = 0x0002,
+ SV_S60_3_2 = 0x0004,
+ SV_S60_5_0 = 0x0008
};
static S60Version s60Version();
-# endif
#endif
};
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index c3c2653..fdd7eee 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -1523,7 +1523,7 @@ public:
typedef unsigned long HANDLE;
#elif defined(Q_WS_QWS)
typedef void * HANDLE;
-#elif defined(Q_WS_S60)
+#elif defined(Q_OS_SYMBIAN)
typedef unsigned long int HANDLE; // equivalent to TUint32
#endif
typedef WindowFlags WFlags;
diff --git a/src/corelib/kernel/qcore_symbian_p.cpp b/src/corelib/kernel/qcore_symbian_p.cpp
index 101ed44..a3a85b0 100644
--- a/src/corelib/kernel/qcore_symbian_p.cpp
+++ b/src/corelib/kernel/qcore_symbian_p.cpp
@@ -131,7 +131,9 @@ public:
}
private:
- void init() {
+ void init()
+ {
+#ifdef Q_WS_S60
_LIT(KLibName_3_1, "qts60plugin_3_1.dll");
_LIT(KLibName_3_2, "qts60plugin_3_2.dll");
_LIT(KLibName_5_0, "qts60plugin_5_0.dll");
@@ -156,6 +158,7 @@ private:
TUidType libUid(KDynamicLibraryUid, KSharedLibraryUid, TUid::Uid(uidValue));
lib.Load(libName, libUid);
+#endif
}
RLibrary lib;