summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2011-05-20 08:07:16 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2011-05-20 12:40:32 (GMT)
commit358d5b2fd70010c1b5f65b820dfadf38f51f65b4 (patch)
treed7f10c0efe276083fc1f31395fa83b808ca0970a /src/gui
parented0ecda733b5f844b385f57fb00f3801427c30b6 (diff)
downloadQt-358d5b2fd70010c1b5f65b820dfadf38f51f65b4.zip
Qt-358d5b2fd70010c1b5f65b820dfadf38f51f65b4.tar.gz
Qt-358d5b2fd70010c1b5f65b820dfadf38f51f65b4.tar.bz2
Remove S60 version plugins
S60 version plugins serve no purpose now that S60 3.x support has been dropped, so remove them to improve performance. Task-number: QTBUG-18614 Reviewed-by: Janne Koskinen
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/util/qdesktopservices_s60.cpp37
-rw-r--r--src/gui/util/util.pri6
2 files changed, 33 insertions, 10 deletions
diff --git a/src/gui/util/qdesktopservices_s60.cpp b/src/gui/util/qdesktopservices_s60.cpp
index 8caeb74..f5ba144 100644
--- a/src/gui/util/qdesktopservices_s60.cpp
+++ b/src/gui/util/qdesktopservices_s60.cpp
@@ -70,6 +70,10 @@
#include <schemehandler.h>
#endif
+#ifdef Q_WS_S60
+#include <CDirectoryLocalizer.h> // CDirectoryLocalizer
+#endif
+
QT_BEGIN_NAMESPACE
_LIT(KCacheSubDir, "Cache\\");
@@ -444,18 +448,31 @@ static QString defaultLocalizedDirectoryName(QString&)
QString QDesktopServices::displayName(StandardLocation type)
{
- static LocalizerFunc ptrLocalizerFunc = NULL;
-
- if (!ptrLocalizerFunc) {
- ptrLocalizerFunc = reinterpret_cast<LocalizerFunc>
- (qt_resolveS60PluginFunc(S60Plugin_LocalizedDirectoryName));
- if (!ptrLocalizerFunc)
- ptrLocalizerFunc = &defaultLocalizedDirectoryName;
- }
+ QString ret;
+#ifdef Q_WS_S60
QString rawPath = storageLocation(type);
- return ptrLocalizerFunc(rawPath);
-}
+ TRAPD(err,
+ QT_TRYCATCH_LEAVING(
+ CDirectoryLocalizer* localizer = CDirectoryLocalizer::NewL();
+ CleanupStack::PushL(localizer);
+ localizer->SetFullPath(qt_QString2TPtrC(QDir::toNativeSeparators(rawPath)));
+ if (localizer->IsLocalized()) {
+ TPtrC locName(localizer->LocalizedName());
+ ret = qt_TDesC2QString(locName);
+ }
+ CleanupStack::PopAndDestroy(localizer);
+ )
+ )
+
+ if (err != KErrNone)
+ ret = QString();
+#else
+ qWarning("QDesktopServices::displayName() not implemented for this platform version");
+#endif
+
+ return ret;
+}
QT_END_NAMESPACE
diff --git a/src/gui/util/util.pri b/src/gui/util/util.pri
index f125f82..7395604 100644
--- a/src/gui/util/util.pri
+++ b/src/gui/util/util.pri
@@ -56,4 +56,10 @@ symbian {
} else {
DEFINES += USE_SCHEMEHANDLER
}
+
+ contains(CONFIG, is_using_gnupoc) {
+ LIBS += -ldirectorylocalizer
+ } else {
+ LIBS += -lDirectoryLocalizer
+ }
}