qglobal: Remove symbian specific features
authorOlivier Goffart <ogoffart@woboq.com>
Sun, 15 Jan 2012 12:51:04 +0000 (13:51 +0100)
committerQt by Nokia <qt-info@nokia.com>
Mon, 16 Jan 2012 02:52:32 +0000 (03:52 +0100)
Change-Id: Ie0480b0c80b68a86e77bf3552546f494cdaf66c1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
src/corelib/global/qglobal.cpp
src/corelib/global/qglobal.h

index 05a3c1e..f8fc49d 100644 (file)
 #include <CoreServices/CoreServices.h>
 #endif
 
-#if defined(Q_OS_SYMBIAN)
-#include <e32def.h>
-#include <e32debug.h>
-#include <f32file.h>
-#include <e32math.h>
-# include "private/qcore_symbian_p.h"
-
-_LIT(qt_S60Filter, "Series60v?.*.sis");
-_LIT(qt_symbianSystemInstallDir, "z:\\system\\install\\");
-#endif
-
 QT_BEGIN_NAMESPACE
 
 
@@ -970,22 +959,6 @@ bool qSharedBuild()
 */
 
 /*!
-    \fn QSysInfo::SymbianVersion QSysInfo::symbianVersion()
-    \since 4.6
-
-    Returns the version of the Symbian operating system on which the
-    application is run (Symbian only).
-*/
-
-/*!
-    \fn QSysInfo::S60Version QSysInfo::s60Version()
-    \since 4.6
-
-    Returns the version of the S60 SDK system on which the
-    application is run (S60 only).
-*/
-
-/*!
     \enum QSysInfo::Endian
 
     \value BigEndian  Big-endian byte order (also called Network byte order)
@@ -1041,7 +1014,7 @@ bool qSharedBuild()
     \value WV_NT_based  NT-based version of Windows
     \value WV_CE_based  CE-based version of Windows
 
-    \sa MacVersion, SymbianVersion
+    \sa MacVersion
 */
 
 /*!
@@ -1072,50 +1045,7 @@ bool qSharedBuild()
     \value MV_SNOWLEOPARD  Apple codename for MV_10_6
     \value MV_LION     Apple codename for MV_10_7
 
-    \sa WinVersion, SymbianVersion
-*/
-
-/*!
-    \enum QSysInfo::SymbianVersion
-
-    This enum provides symbolic names for the various versions of the
-    Symbian operating system. On Symbian, the
-    QSysInfo::symbianVersion() function gives the version of the
-    system on which the application is run.
-
-    \value SV_9_2 Symbian OS v9.2
-    \value SV_9_3 Symbian OS v9.3
-    \value SV_9_4 Symbian OS v9.4
-    \value SV_SF_1 S60 5th Edition (Symbian^1)
-    \value SV_SF_2 Symbian^2
-    \value SV_SF_3 Symbian^3 or Symbian Anna
-    \value SV_SF_4 \e{This enum value is deprecated.}
-    \value SV_API_5_3 Symbian/S60 API version 5.3 release
-    \value SV_API_5_4 Symbian/S60 API version 5.4 release
-    \value SV_Unknown An unknown and currently unsupported platform
-
-    \sa S60Version, WinVersion, MacVersion
-*/
-
-/*!
-    \enum QSysInfo::S60Version
-
-    This enum provides symbolic names for the various versions of the
-    S60 SDK. On S60, the
-    QSysInfo::s60Version() function gives the version of the
-    SDK on which the application is run.
-
-    \value SV_S60_3_1 S60 3rd Edition Feature Pack 1
-    \value SV_S60_3_2 S60 3rd Edition Feature Pack 2
-    \value SV_S60_5_0 S60 5th Edition
-    \value SV_S60_5_1 \e{This enum value is deprecated.}
-    \value SV_S60_5_2 Symbian^3 and Symbian Anna
-    \value SV_S60_5_3 Symbian/S60 API version 5.3 release
-    \value SV_S60_5_4 Symbian/S60 API version 5.4 release
-    \value SV_S60_Unknown An unknown and currently unsupported platform
-    \omitvalue SV_S60_None
-
-    \sa SymbianVersion, WinVersion, MacVersion
+    \sa WinVersion
 */
 
 /*!
@@ -1625,108 +1555,6 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
 
 #endif
 
-#ifdef Q_OS_SYMBIAN
-static QSysInfo::SymbianVersion cachedSymbianVersion = QSysInfo::SymbianVersion(-1);
-static QSysInfo::S60Version cachedS60Version = QSysInfo::S60Version(-1);
-
-static void symbianInitVersions()
-{
-    // Use pure Symbian code, because if done using QDir, there will be a call back
-    // to this method, resulting doing this expensive operation twice before the cache kicks in.
-    // Pure Symbian code also makes this method ~10x faster, speeding up the application launch.
-    RFs rfs = qt_s60GetRFs();
-    TFindFile fileFinder(rfs);
-    CDir* contents;
-
-    // Check for platform version
-    TInt err = fileFinder.FindWildByDir(qt_S60Filter, qt_symbianSystemInstallDir, contents);
-    if (err == KErrNone) {
-        QScopedPointer<CDir> contentsDeleter(contents);
-        err = contents->Sort(EDescending|ESortByName);
-        if (err == KErrNone && contents->Count() > 0 && (*contents)[0].iName.Length() >= 12) {
-            TInt major = (*contents)[0].iName[9] - '0';
-            TInt minor = (*contents)[0].iName[11] - '0';
-            if (major == 3) {
-                if (minor == 1) {
-                    cachedS60Version = QSysInfo::SV_S60_3_1;
-                    cachedSymbianVersion = QSysInfo::SV_9_2;
-                } else if (minor == 2) {
-                    cachedS60Version = QSysInfo::SV_S60_3_2;
-                    cachedSymbianVersion = QSysInfo::SV_9_3;
-                }
-            } else if (major == 5) {
-                if (minor == 0) {
-                    cachedS60Version = QSysInfo::SV_S60_5_0;
-                    cachedSymbianVersion = QSysInfo::SV_9_4;
-                } else if (minor == 1) {
-                    cachedS60Version = QSysInfo::SV_S60_5_1;
-                    cachedSymbianVersion = QSysInfo::SV_SF_2;
-                } else if (minor == 2) {
-                    cachedS60Version = QSysInfo::SV_S60_5_2;
-                    cachedSymbianVersion = QSysInfo::SV_SF_3;
-                } else if (minor == 3) {
-                    cachedS60Version = QSysInfo::SV_S60_5_3;
-                    cachedSymbianVersion = QSysInfo::SV_API_5_3;
-                } else if (minor >= 4) {
-                    cachedS60Version = QSysInfo::SV_S60_5_4;
-                    cachedSymbianVersion = QSysInfo::SV_API_5_4;
-                }
-            }
-        }
-    }
-
-#  ifdef Q_CC_NOKIAX86
-    if (cachedS60Version == -1) {
-        // Some emulator environments may not contain the version specific .sis files, so
-        // simply hardcode the version on those environments. Note that can't use
-        // S60_VERSION_* defines for S60 3.x/5.0 platforms, as they do not define them
-        // right anyway in case .sis files are not found.
-#   if defined(__SERIES60_31__)
-        cachedS60Version = QSysInfo::SV_S60_3_1;
-        cachedSymbianVersion = QSysInfo::SV_9_2;
-#   elif defined(__S60_32__)
-        cachedS60Version = QSysInfo::SV_S60_3_2;
-        cachedSymbianVersion = QSysInfo::SV_9_3;
-#   elif defined(__S60_50__)
-        cachedS60Version = QSysInfo::SV_S60_5_0;
-        cachedSymbianVersion = QSysInfo::SV_9_4;
-#   elif defined(S60_VERSION_5_2)
-        cachedS60Version = QSysInfo::SV_S60_5_2;
-        cachedSymbianVersion = QSysInfo::SV_SF_3;
-#   elif defined(S60_VERSION_5_3)
-        cachedS60Version = QSysInfo::SV_S60_5_3;
-        cachedSymbianVersion = QSysInfo::SV_API_5_3;
-#   elif defined(S60_VERSION_5_4)
-        cachedS60Version = QSysInfo::SV_S60_5_4;
-        cachedSymbianVersion = QSysInfo::SV_API_5_4;
-#   endif
-    }
-#  endif
-
-    if (cachedS60Version == -1) {
-        //If reaching here, it was not possible to determine the version
-        cachedS60Version = QSysInfo::SV_S60_Unknown;
-        cachedSymbianVersion = QSysInfo::SV_Unknown;
-    }
-}
-
-QSysInfo::SymbianVersion QSysInfo::symbianVersion()
-{
-    if (cachedSymbianVersion == -1)
-        symbianInitVersions();
-
-    return cachedSymbianVersion;
-}
-
-QSysInfo::S60Version QSysInfo::s60Version()
-{
-    if (cachedS60Version == -1)
-        symbianInitVersions();
-
-    return cachedS60Version;
-}
-#endif // ifdef Q_OS_SYMBIAN
-
 /*!
     \macro void Q_ASSERT(bool test)
     \relates <QtGlobal>
@@ -2037,18 +1865,6 @@ static void qDefaultMsgHandler(QtMsgType, const char *buf)
         QString fstr = QString::fromLatin1(buf);
         fstr += QLatin1Char('\n');
         OutputDebugString(reinterpret_cast<const wchar_t *> (fstr.utf16()));
-#elif defined(Q_OS_SYMBIAN)
-        // RDebug::Print has a cap of 256 characters so break it up
-        _LIT(format, "[Qt Message] %S");
-        const int maxBlockSize = 256 - ((const TDesC &)format).Length();
-        const TPtrC8 ptr(reinterpret_cast<const TUint8*>(buf));
-        HBufC* hbuffer = HBufC::New(qMin(maxBlockSize, ptr.Length()));
-        Q_CHECK_PTR(hbuffer);
-        for (int i = 0; i < ptr.Length(); i += hbuffer->Length()) {
-            hbuffer->Des().Copy(ptr.Mid(i, qMin(maxBlockSize, ptr.Length()-i)));
-            RDebug::Print(format, hbuffer);
-        }
-        delete hbuffer;
 #else
         fprintf(stderr, "%s\n", buf);
         fflush(stderr);
@@ -2099,15 +1915,7 @@ void qt_message_output(QtMsgType msgType, const char *buf)
             _CrtDbgBreak();
 #endif
 
-#if defined(Q_OS_SYMBIAN)
-        __DEBUGGER(); // on the emulator, get the debugger to kick in if there's one around
-        TBuf<256> tmp;
-        TPtrC8 ptr(reinterpret_cast<const TUint8*>(buf));
-        TInt len = Min(tmp.MaxLength(), ptr.Length());
-        tmp.Copy(ptr.Left(len));
-        // Panic the current thread. We don't use real panic codes, so 0 has no special meaning.
-        User::Panic(tmp, 0);
-#elif (defined(Q_OS_UNIX) || defined(Q_CC_MINGW))
+#if (defined(Q_OS_UNIX) || defined(Q_CC_MINGW))
         abort(); // trap; generates core dump
 #else
         exit(1); // goodbye cruel world
@@ -2400,7 +2208,7 @@ bool qputenv(const char *varName, const QByteArray& value)
 #endif
 }
 
-#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) && !defined(QT_NO_THREAD)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_THREAD)
 
 #  if defined(Q_OS_INTEGRITY) && defined(__GHS_VERSION_NUMBER) && (__GHS_VERSION_NUMBER < 500)
 // older versions of INTEGRITY used a long instead of a uint for the seed.
@@ -2431,7 +2239,7 @@ Q_GLOBAL_STATIC(SeedStorage, randTLS)  // Thread Local Storage for seed value
 */
 void qsrand(uint seed)
 {
-#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) && !defined(QT_NO_THREAD)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_THREAD)
     SeedStorage *seedStorage = randTLS();
     if (seedStorage) {
         SeedStorageType *pseed = seedStorage->localData();
@@ -2446,7 +2254,7 @@ void qsrand(uint seed)
         srand(seed);
     }
 #else
-    // On Windows and Symbian srand() and rand() already use Thread-Local-Storage
+    // On Windows srand() and rand() already use Thread-Local-Storage
     // to store the seed between calls
     // this is also valid for QT_NO_THREAD
     srand(seed);
@@ -2470,7 +2278,7 @@ void qsrand(uint seed)
 */
 int qrand()
 {
-#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) && !defined(QT_NO_THREAD)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_THREAD)
     SeedStorage *seedStorage = randTLS();
     if (seedStorage) {
         SeedStorageType *pseed = seedStorage->localData();
@@ -2487,7 +2295,7 @@ int qrand()
         return rand();
     }
 #else
-    // On Windows and Symbian srand() and rand() already use Thread-Local-Storage
+    // On Windows srand() and rand() already use Thread-Local-Storage
     // to store the seed between calls
     // this is also valid for QT_NO_THREAD
     return rand();
@@ -3171,185 +2979,4 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
     otherwise.
 */
 
-#if defined(Q_OS_SYMBIAN)
-
-#include <typeinfo>
-
-/*! \macro QT_TRAP_THROWING(function)
-    \relates <QtGlobal>
-    \ingroup qts60
-
-    TRAP leaves from Symbian \a function and throws an appropriate
-    standard C++ exception instead.
-    This must be used when calling Symbian OS leaving functions
-    from inside Qt or standard C++ code, so that the code can respond
-    correctly to the exception.
-
-    \warning This macro is only available on Symbian.
-
-    Example:
-
-    \code
-    // A Symbian leaving function is being called within a Qt function.
-    // Any leave must be converted to an exception
-    CAknTitlePane* titlePane = S60->titlePane();
-    if (titlePane) {
-        TPtrC captionPtr(qt_QString2TPtrC(caption));
-        QT_TRAP_THROWING(titlePane->SetTextL(captionPtr));
-    }
-    \endcode
-
-    \sa QT_TRYCATCH_ERROR(), QT_TRYCATCH_LEAVING()
-*/
-
-/*! \macro QT_TRYCATCH_ERROR(error, function)
-    \relates <QtGlobal>
-    \ingroup qts60
-
-    Catch standard C++ exceptions from a \a function and convert them to a Symbian OS
-    \a error code, or \c KErrNone if there is no exception.
-    This must be used inside Qt or standard C++ code when using exception throwing
-    code (practically anything) and returning an error code to Symbian OS.
-
-    \warning This macro is only available on Symbian.
-
-    Example:
-
-    \code
-    // An exception might be thrown in this Symbian TInt error returning function.
-    // It is caught and translated to an error code
-    TInt QServerApp::Connect(const QString &serverName)
-    {
-        TPtrC name;
-        TInt err;
-        QT_TRYCATCH_ERROR(err, name.Set(qt_QString2TPtrC(serverName)));
-        if (err != KErrNone)
-            return err;
-        return iServer.Connect(name);
-    }
-    \endcode
-}
-
-    \sa QT_TRYCATCH_LEAVING(), QT_TRAP_THROWING()
-*/
-
-/*! \macro QT_TRYCATCH_LEAVING(function)
-    \relates <QtGlobal>
-    \ingroup qts60
-
-    Catch standard C++ exceptions from \a function and convert them to Symbian OS
-    leaves. This must be used inside Qt or standard C++ code when using exception
-    throwing code (practically anything) and returning to Symbian OS from a leaving function.
-    For example inside a Symbian active object's \c RunL function implemented with Qt code.
-
-    \warning This macro is only available on Symbian.
-
-    Example:
-
-    \code
-    // This active object signals Qt code
-    // Exceptions from the Qt code must be converted to Symbian OS leaves for the active scheduler
-    void QWakeUpActiveObject::RunL()
-    {
-        iStatus = KRequestPending;
-        SetActive();
-        QT_TRYCATCH_LEAVING(m_dispatcher->wakeUpWasCalled());
-    }
-    \endcode
-
-    \sa QT_TRAP_THROWING(), QT_TRYCATCH_ERROR()
-*/
-
-#include <stdexcept>
-
-class QSymbianLeaveException : public std::exception
-{
-public:
-    inline QSymbianLeaveException(int err) : error(err) {}
-    inline const char* what() const throw() { return "Symbian leave exception"; }
-
-public:
-    int error;
-};
-
-/*! \relates <QtGlobal>
-    \ingroup qts60
-
-    Throws an exception if the \a error parameter is a symbian error code.
-    This is the exception throwing equivalent of Symbian's User::LeaveIfError.
-
-    \warning This function is only available on Symbian.
-
-    \sa qt_symbian_exception2LeaveL(), qt_symbian_exception2Error()
-*/
-void qt_symbian_throwIfError(int error)
-{
-    if (error >= KErrNone)
-        return;  // do nothing - not an exception
-    switch (error) {
-    case KErrNoMemory:
-        throw std::bad_alloc();
-    case KErrArgument:
-        throw std::invalid_argument("from Symbian error");
-    case KErrOverflow:
-        throw std::overflow_error("from Symbian error");
-    case KErrUnderflow:
-        throw std::underflow_error("from Symbian error");
-    default:
-        throw QSymbianLeaveException(error);
-    }
-}
-
-/*! \relates <QtGlobal>
-    \ingroup qts60
-
-    Convert a caught standard C++ exception \a aThrow to a Symbian leave
-
-    \warning This function is only available on Symbian.
-
-    \sa qt_symbian_throwIfError(), qt_symbian_exception2Error()
-*/
-void qt_symbian_exception2LeaveL(const std::exception& aThrow)
-{
-    User::Leave(qt_symbian_exception2Error(aThrow));
-}
-
-/*! \relates <QtGlobal>
-    \ingroup qts60
-
-    Convert a caught standard C++ exception \a aThrow to a Symbian error code
-
-    \warning This function is only available on Symbian.
-
-    \sa qt_symbian_throwIfError(), qt_symbian_exception2LeaveL()
-*/
-int qt_symbian_exception2Error(const std::exception& aThrow)
-{
-    const std::type_info& atype = typeid(aThrow);
-    int err = KErrGeneral;
-
-    if(atype == typeid (std::bad_alloc))
-        err = KErrNoMemory;
-    else if(atype == typeid(QSymbianLeaveException))
-        err = static_cast<const QSymbianLeaveException&>(aThrow).error;
-    else {
-        if(atype == typeid(std::invalid_argument))
-            err =  KErrArgument;
-        else if(atype == typeid(std::out_of_range))
-            // std::out_of_range is of type logic_error which by definition means that it is
-            // "presumably detectable before the program executes".
-            // std::out_of_range is used to report an argument is not within the expected range.
-            // The description of KErrArgument says an argument is out of range. Hence the mapping.
-            err =  KErrArgument;
-        else if(atype == typeid(std::overflow_error))
-            err =  KErrOverflow;
-        else if(atype == typeid(std::underflow_error))
-            err =  KErrUnderflow;
-        qWarning("translation from std exception \"%s\" to %d", aThrow.what(), err);
-    }
-
-    return err;
-}
-#endif
-
 QT_END_NAMESPACE
index 65accca..fd5c5d6 100644 (file)
@@ -965,14 +965,6 @@ QT_END_INCLUDE_NAMESPACE
 */
 
 #ifndef QT_LINUXBASE /* the LSB defines TRUE and FALSE for us */
-/* Symbian OS defines TRUE = 1 and FALSE = 0,
-redefine to built-in booleans to make autotests work properly */
-#ifdef Q_OS_SYMBIAN
-    #include <e32def.h> /* Symbian OS defines */
-
-    #undef TRUE
-    #undef FALSE
-#endif
 #  ifndef TRUE
 #   define TRUE true
 #   define FALSE false
@@ -1155,7 +1147,7 @@ typedef int QNoImplicitBoolCast;
 // This logic must match the one in qmetatype.h
 #if defined(QT_COORD_TYPE)
 typedef QT_COORD_TYPE qreal;
-#elif defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE) || defined(QT_ARCH_SYMBIAN)
+#elif defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE)
 typedef float qreal;
 #else
 typedef double qreal;
@@ -1251,10 +1243,10 @@ class QDataStream;
 
 
 /*
-   Create Qt DLL if QT_DLL is defined (Windows and Symbian only)
+   Create Qt DLL if QT_DLL is defined (Windows only)
 */
 
-#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_WIN)
 #  if defined(QT_NODLL)
 #    undef QT_MAKEDLL
 #    undef QT_DLL
@@ -1497,11 +1489,11 @@ class QDataStream;
    for Qt's internal unit tests. If you want slower loading times and more
    symbols that can vanish from version to version, feel free to define QT_BUILD_INTERNAL.
 */
-#if defined(QT_BUILD_INTERNAL) && (defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)) && defined(QT_MAKEDLL)
+#if defined(QT_BUILD_INTERNAL) && defined(Q_OS_WIN) && defined(QT_MAKEDLL)
 #    define Q_AUTOTEST_EXPORT Q_DECL_EXPORT
-#elif defined(QT_BUILD_INTERNAL) && (defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)) && defined(QT_DLL)
+#elif defined(QT_BUILD_INTERNAL) && defined(Q_OS_WIN) && defined(QT_DLL)
 #    define Q_AUTOTEST_EXPORT Q_DECL_IMPORT
-#elif defined(QT_BUILD_INTERNAL) && !(defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)) && defined(QT_SHARED)
+#elif defined(QT_BUILD_INTERNAL) && !defined(Q_OS_WIN) && defined(QT_SHARED)
 #    define Q_AUTOTEST_EXPORT Q_DECL_EXPORT
 #else
 #    define Q_AUTOTEST_EXPORT
@@ -1634,35 +1626,6 @@ public:
     };
     static const MacVersion MacintoshVersion;
 #endif
-#ifdef Q_OS_SYMBIAN
-    enum SymbianVersion {
-        SV_Unknown = 1000000, // Assume unknown is something newer than what is supported
-        //These are the Symbian Ltd versions 9.2-9.4
-        SV_9_2 = 10,
-        SV_9_3 = 20,
-        SV_9_4 = 30,
-        //Following values are the symbian foundation versions, i.e. Symbian^1 == SV_SF_1
-        SV_SF_1 = SV_9_4,
-        SV_SF_2 = 40,
-        SV_SF_3 = 50,
-        SV_SF_4 = 60,  // Deprecated
-        SV_API_5_3 = 70,
-        SV_API_5_4 = 80
-    };
-    static SymbianVersion symbianVersion();
-    enum S60Version {
-        SV_S60_None = 0,
-        SV_S60_Unknown = SV_Unknown,
-        SV_S60_3_1 = SV_9_2,
-        SV_S60_3_2 = SV_9_3,
-        SV_S60_5_0 = SV_9_4,
-        SV_S60_5_1 = SV_SF_2,  // Deprecated
-        SV_S60_5_2 = SV_SF_3,
-        SV_S60_5_3 = SV_API_5_3,
-        SV_S60_5_4 = SV_API_5_4
-    };
-    static S60Version s60Version();
-#endif
 };
 
 Q_CORE_EXPORT const char *qVersion();
@@ -1823,7 +1786,7 @@ inline T *q_check_ptr(T *p) { Q_CHECK_PTR(p); return p; }
 #elif defined(_MSC_VER)
 #  define Q_FUNC_INFO __FUNCSIG__
 #else
-#   if defined(Q_OS_SOLARIS) || defined(Q_CC_XLC) || defined(Q_OS_SYMBIAN)
+#   if defined(Q_OS_SOLARIS) || defined(Q_CC_XLC)
 #      define Q_FUNC_INFO __FILE__ "(line number unavailable)"
 #   else
         /* These two macros makes it possible to turn the builtin line expander into a
@@ -2513,77 +2476,6 @@ inline int qIntCast(float f) { return int(f); }
 Q_CORE_EXPORT void qsrand(uint seed);
 Q_CORE_EXPORT int qrand();
 
-#if defined(Q_OS_SYMBIAN)
-
-#ifdef SYMBIAN_BUILD_GCE
-#define Q_SYMBIAN_SUPPORTS_SURFACES
-//RWsPointerCursor is fixed, so don't use low performance sprites
-#define Q_SYMBIAN_FIXED_POINTER_CURSORS
-#define Q_SYMBIAN_HAS_EXTENDED_BITMAP_TYPE
-#define Q_SYMBIAN_WINDOW_SIZE_CACHE
-#define QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER
-
-//enabling new graphics resources
-#ifdef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE
-#  define QT_SYMBIAN_SUPPORTS_SGIMAGE
-#endif
-
-#ifdef SYMBIAN_GRAPHICS_SET_SURFACE_TRANSPARENCY_AVAILABLE
-#  define Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE
-#endif
-
-#ifdef SYMBIAN_GRAPHICS_TRANSITION_EFFECTS_SIGNALING_AVAILABLE
-#  define Q_SYMBIAN_TRANSITION_EFFECTS
-#endif
-#endif
-
-#ifdef SYMBIAN_WSERV_AND_CONE_MULTIPLE_SCREENS
-#define Q_SYMBIAN_SUPPORTS_MULTIPLE_SCREENS
-#endif
-
-#ifdef SYMBIAN_GRAPHICS_FIXNATIVEORIENTATION
-#define Q_SYMBIAN_SUPPORTS_FIXNATIVEORIENTATION
-#endif
-
-//Symbian does not support data imports from a DLL
-#define Q_NO_DATA_RELOCATION
-
-QT_END_NAMESPACE
-// forward declare std::exception
-#ifdef __cplusplus
-namespace std { class exception; }
-#endif
-QT_BEGIN_NAMESPACE
-Q_CORE_EXPORT void qt_symbian_throwIfError(int error);
-Q_CORE_EXPORT void qt_symbian_exception2LeaveL(const std::exception& ex);
-Q_CORE_EXPORT int qt_symbian_exception2Error(const std::exception& ex);
-
-#define QT_TRAP_THROWING(_f)                        \
-    {                                               \
-        TInt ____error;                             \
-        TRAP(____error, _f);                        \
-        qt_symbian_throwIfError(____error);                 \
-     }
-
-#define QT_TRYCATCH_ERROR(_err, _f)                         \
-    {                                                       \
-        _err = KErrNone;                                    \
-        try {                                               \
-            _f;                                             \
-        } catch (const std::exception &____ex) {            \
-            _err = qt_symbian_exception2Error(____ex);       \
-        }                                                   \
-    }
-
-#define QT_TRYCATCH_LEAVING(_f)                         \
-    {                                                   \
-    TInt ____err;                                       \
-    QT_TRYCATCH_ERROR(____err, _f)                      \
-    User::LeaveIfError(____err);                        \
-    }
-#endif
-
-
 /*
    This gives us the possibility to check which modules the user can
    use. These are purely compile time checks and will generate no code.