diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-07-15 09:29:16 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-07-15 09:35:21 (GMT) |
commit | cd4c5a65b9d91fd84408205c3d20554122037730 (patch) | |
tree | 3495b44cf34e129c3156224fb2353949221203ee /src/gui/util | |
parent | fde7966c1b6122ed904d30e1f6e83eb8cd3a80b2 (diff) | |
download | Qt-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/gui/util')
-rw-r--r-- | src/gui/util/qdesktopservices.cpp | 2 | ||||
-rw-r--r-- | src/gui/util/qdesktopservices_s60.cpp | 22 | ||||
-rw-r--r-- | src/gui/util/util.pri | 5 |
3 files changed, 25 insertions, 4 deletions
diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp index 2722f83..eb2d92e 100644 --- a/src/gui/util/qdesktopservices.cpp +++ b/src/gui/util/qdesktopservices.cpp @@ -53,7 +53,7 @@ #include "qdesktopservices_win.cpp" #elif defined(Q_WS_MAC) #include "qdesktopservices_mac.cpp" -#elif defined(Q_WS_S60) +#elif defined(Q_OS_SYMBIAN) #include "qdesktopservices_s60.cpp" #endif diff --git a/src/gui/util/qdesktopservices_s60.cpp b/src/gui/util/qdesktopservices_s60.cpp index 3588ec9..77cf254 100644 --- a/src/gui/util/qdesktopservices_s60.cpp +++ b/src/gui/util/qdesktopservices_s60.cpp @@ -56,9 +56,14 @@ #include <apgtask.h> // TApaTaskList, TApaTask #include <rsendas.h> // RSendAs #include <rsendasmessage.h> // RSendAsMessage -#include <pathinfo.h> // PathInfo -#ifdef USE_DOCUMENTHANDLER -#include <documenthandler.h> // CDocumentHandler + +#ifdef Q_WS_S60 +# include <pathinfo.h> // PathInfo +# ifdef USE_DOCUMENTHANDLER +# include <documenthandler.h> // CDocumentHandler +# endif +#elif defined(USE_DOCUMENTHANDLER) +# error CDocumentHandler requires support for S60 #endif QT_BEGIN_NAMESPACE @@ -200,6 +205,7 @@ static TDriveUnit writableExeDrive() static TPtrC writableDataRoot() { TDriveUnit drive = exeDrive(); +#ifdef Q_WS_S60 switch( drive.operator TInt() ){ case EDriveC: return PathInfo::PhoneMemoryRootPath(); @@ -217,6 +223,10 @@ static TPtrC writableDataRoot() return PathInfo::PhoneMemoryRootPath(); break; } +#else +#warning No fallback implementation of writableDataRoot() + return 0; +#endif } static void openDocumentL(const TDesC& aUrl) @@ -330,15 +340,21 @@ QString QDesktopServices::storageLocation(StandardLocation type) break; case MusicLocation: path.Append(writableDataRoot()); +#ifdef Q_WS_S60 path.Append(PathInfo::SoundsPath()); +#endif break; case MoviesLocation: path.Append(writableDataRoot()); +#ifdef Q_WS_S60 path.Append(PathInfo::VideosPath()); +#endif break; case PicturesLocation: path.Append(writableDataRoot()); +#ifdef Q_WS_S60 path.Append(PathInfo::ImagesPath()); +#endif break; case TempLocation: path.Append(writableExeDrive().Name()); diff --git a/src/gui/util/util.pri b/src/gui/util/util.pri index e628229..cdbb7cc 100644 --- a/src/gui/util/util.pri +++ b/src/gui/util/util.pri @@ -38,3 +38,8 @@ embedded { !embedded:!x11:mac { OBJECTIVE_SOURCES += util/qsystemtrayicon_mac.mm } + +symbian { + LIBS += -lsendas2 -letext -lapmime + contains(QT_CONFIG, s60): LIBS += -lplatformenv -lcommonui +} |