diff options
Diffstat (limited to 'src/plugins/s60')
-rw-r--r-- | src/plugins/s60/3_1/3_1.pro | 8 | ||||
-rw-r--r-- | src/plugins/s60/3_2/3_2.pro | 15 | ||||
-rw-r--r-- | src/plugins/s60/5_0/5_0.pro | 15 | ||||
-rw-r--r-- | src/plugins/s60/bwins/qts60pluginu.def | 7 | ||||
-rw-r--r-- | src/plugins/s60/eabi/qts60pluginu.def | 7 | ||||
-rw-r--r-- | src/plugins/s60/s60.pro | 3 | ||||
-rw-r--r-- | src/plugins/s60/s60pluginbase.pri | 15 | ||||
-rw-r--r-- | src/plugins/s60/src/qdesktopservices_3_1.cpp | 50 | ||||
-rw-r--r-- | src/plugins/s60/src/qdesktopservices_3_2.cpp | 69 | ||||
-rw-r--r-- | src/plugins/s60/src/qlocale_3_1.cpp | 62 | ||||
-rw-r--r-- | src/plugins/s60/src/qlocale_3_2.cpp | 63 |
11 files changed, 314 insertions, 0 deletions
diff --git a/src/plugins/s60/3_1/3_1.pro b/src/plugins/s60/3_1/3_1.pro new file mode 100644 index 0000000..568a33c --- /dev/null +++ b/src/plugins/s60/3_1/3_1.pro @@ -0,0 +1,8 @@ +include(../s60pluginbase.pri) + +TARGET = qts60plugin_3_1 + +SOURCES += ../src/qlocale_3_1.cpp \ + ../src/qdesktopservices_3_1.cpp + +TARGET.UID3=0x2001E620 diff --git a/src/plugins/s60/3_2/3_2.pro b/src/plugins/s60/3_2/3_2.pro new file mode 100644 index 0000000..97409d3 --- /dev/null +++ b/src/plugins/s60/3_2/3_2.pro @@ -0,0 +1,15 @@ +include(../s60pluginbase.pri) + +TARGET = qts60plugin_3_2 + +contains(S60_VERSION, 3.1) { + SOURCES += ../src/qlocale_3_1.cpp \ + ../src/qdesktopservices_3_1.cpp +} else { + SOURCES += ../src/qlocale_3_2.cpp \ + ../src/qdesktopservices_3_2.cpp + LIBS += -ldirectorylocalizer + INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE +} + +TARGET.UID3=0x2001E621 diff --git a/src/plugins/s60/5_0/5_0.pro b/src/plugins/s60/5_0/5_0.pro new file mode 100644 index 0000000..878a466 --- /dev/null +++ b/src/plugins/s60/5_0/5_0.pro @@ -0,0 +1,15 @@ +include(../s60pluginbase.pri) + +TARGET = qts60plugin_5_0 + +contains(S60_VERSION, 3.1) { + SOURCES += ../src/qlocale_3_1.cpp \ + ../src/qdesktopservices_3_1.cpp +} else { + SOURCES += ../src/qlocale_3_2.cpp \ + ../src/qdesktopservices_3_2.cpp + LIBS += -ldirectorylocalizer + INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE +} + +TARGET.UID3=0x2001E622 diff --git a/src/plugins/s60/bwins/qts60pluginu.def b/src/plugins/s60/bwins/qts60pluginu.def new file mode 100644 index 0000000..549f71f --- /dev/null +++ b/src/plugins/s60/bwins/qts60pluginu.def @@ -0,0 +1,7 @@ +EXPORTS + ?defaultFormatL@@YAXAAVTTime@@AAVTDes16@@ABVTDesC16@@ABVTLocale@@@Z @ 1 NONAME ; void defaultFormatL(class TTime &, class TDes16 &, class TDesC16 const &, class TLocale const &) + ?defaultGetTimeFormatSpec@@YA?AVTPtrC16@@AAVTExtendedLocale@@@Z @ 2 NONAME ; class TPtrC16 defaultGetTimeFormatSpec(class TExtendedLocale &) + ?defaultGetLongDateFormatSpec@@YA?AVTPtrC16@@AAVTExtendedLocale@@@Z @ 3 NONAME ; class TPtrC16 defaultGetLongDateFormatSpec(class TExtendedLocale &) + ?defaultGetShortDateFormatSpec@@YA?AVTPtrC16@@AAVTExtendedLocale@@@Z @ 4 NONAME ; class TPtrC16 defaultGetShortDateFormatSpec(class TExtendedLocale &) + ?localizedDirectoryName@@YA?AVQString@@AAV1@@Z @ 5 NONAME ; class QString localizedDirectoryName(class QString &) + diff --git a/src/plugins/s60/eabi/qts60pluginu.def b/src/plugins/s60/eabi/qts60pluginu.def new file mode 100644 index 0000000..a433a5d --- /dev/null +++ b/src/plugins/s60/eabi/qts60pluginu.def @@ -0,0 +1,7 @@ +EXPORTS + _Z14defaultFormatLR5TTimeR6TDes16RK7TDesC16RK7TLocale @ 1 NONAME + _Z24defaultGetTimeFormatSpecR15TExtendedLocale @ 2 NONAME + _Z28defaultGetLongDateFormatSpecR15TExtendedLocale @ 3 NONAME + _Z29defaultGetShortDateFormatSpecR15TExtendedLocale @ 4 NONAME + _Z22localizedDirectoryNameR7QString @ 5 NONAME + diff --git a/src/plugins/s60/s60.pro b/src/plugins/s60/s60.pro new file mode 100644 index 0000000..8ae639c --- /dev/null +++ b/src/plugins/s60/s60.pro @@ -0,0 +1,3 @@ +TEMPLATE = subdirs + +symbian:SUBDIRS = 3_1 3_2 5_0 diff --git a/src/plugins/s60/s60pluginbase.pri b/src/plugins/s60/s60pluginbase.pri new file mode 100644 index 0000000..62100f9 --- /dev/null +++ b/src/plugins/s60/s60pluginbase.pri @@ -0,0 +1,15 @@ +# Note: These version based 'plugins' are not an actual Qt plugins, +# they are just regular runtime loaded libraries +include(../../qpluginbase.pri) + +CONFIG -= plugin +MMP_RULES -= EXPORTUNFROZEN + +defBlock = \ + "$${LITERAL_HASH}ifdef WINSCW" \ + "DEFFILE ../bwins/qts60plugin.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../eabi/qts60plugin.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock
\ No newline at end of file diff --git a/src/plugins/s60/src/qdesktopservices_3_1.cpp b/src/plugins/s60/src/qdesktopservices_3_1.cpp new file mode 100644 index 0000000..0551a74 --- /dev/null +++ b/src/plugins/s60/src/qdesktopservices_3_1.cpp @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the $MODULE$ of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <qglobal.h> +#include <qstring.h> + +EXPORT_C QString localizedDirectoryName(QString&) +{ + qWarning("QDesktopServices::displayName() not implemented for this platform version"); + return QString(); +} + diff --git a/src/plugins/s60/src/qdesktopservices_3_2.cpp b/src/plugins/s60/src/qdesktopservices_3_2.cpp new file mode 100644 index 0000000..7695f00 --- /dev/null +++ b/src/plugins/s60/src/qdesktopservices_3_2.cpp @@ -0,0 +1,69 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the $MODULE$ of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <private/qcore_symbian_p.h> +#include <qstring.h> +#include <qdir.h> + +#include <e32base.h> // CBase -> Required by cdirectorylocalizer.h +#include <cdirectorylocalizer.h> // CDirectoryLocalizer + +EXPORT_C QString localizedDirectoryName(QString& rawPath) +{ + QString ret; + + TRAPD(err, + CDirectoryLocalizer* localizer = CDirectoryLocalizer::NewL(); + CleanupStack::PushL(localizer); + localizer->SetFullPath(qt_QString2TPtrC(QDir::toNativeSeparators(rawPath))); + if(localizer->IsLocalized()){ + TPtrC locName(localizer->LocalizedName()); + ret = qt_TDesC2QStringL(locName); + } + CleanupStack::PopAndDestroy(localizer); + ) + + if (err != KErrNone) + ret = QString(); + + return ret; +} + diff --git a/src/plugins/s60/src/qlocale_3_1.cpp b/src/plugins/s60/src/qlocale_3_1.cpp new file mode 100644 index 0000000..b2e6a5d --- /dev/null +++ b/src/plugins/s60/src/qlocale_3_1.cpp @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the $MODULE$ of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <e32std.h> + +EXPORT_C void defaultFormatL(TTime&, TDes& des, const TDesC&, const TLocale&) +{ + des.Zero(); +} + +EXPORT_C TPtrC defaultGetTimeFormatSpec(TExtendedLocale&) +{ + return TPtrC(KNullDesC); +} + +EXPORT_C TPtrC defaultGetLongDateFormatSpec(TExtendedLocale&) +{ + return TPtrC(KNullDesC); +} + +EXPORT_C TPtrC defaultGetShortDateFormatSpec(TExtendedLocale&) +{ + return TPtrC(KNullDesC); +} diff --git a/src/plugins/s60/src/qlocale_3_2.cpp b/src/plugins/s60/src/qlocale_3_2.cpp new file mode 100644 index 0000000..ab3040b --- /dev/null +++ b/src/plugins/s60/src/qlocale_3_2.cpp @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the $MODULE$ of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <e32std.h> +#include <e32base.h> + +EXPORT_C TPtrC defaultGetLongDateFormatSpec(TExtendedLocale& locale) +{ + return locale.GetLongDateFormatSpec(); +} + +EXPORT_C TPtrC defaultGetShortDateFormatSpec(TExtendedLocale& locale) +{ + return locale.GetShortDateFormatSpec(); +} + +EXPORT_C TPtrC defaultGetTimeFormatSpec(TExtendedLocale& locale) +{ + return locale.GetTimeFormatSpec(); +} + +EXPORT_C void defaultFormatL(TTime& time, TDes& des, const TDesC& format, const TLocale& locale) +{ + time.FormatL(des, format, locale); +} |