From 0319f13f1a9bdd5570977952f7b206a910bbb7a4 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 12 Dec 2011 13:56:56 +0100 Subject: Remove symbian cases from library and plugin loading code. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I381873449b1520152cd2a7aede9c7253e110ef7a Reviewed-by: Robin Burchell Reviewed-by: João Abecasis --- src/corelib/plugin/qpluginloader.cpp | 60 ------------------------------------ 1 file changed, 60 deletions(-) (limited to 'src/corelib/plugin/qpluginloader.cpp') diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp index 591e36e20a..f1ec09439d 100644 --- a/src/corelib/plugin/qpluginloader.cpp +++ b/src/corelib/plugin/qpluginloader.cpp @@ -48,11 +48,6 @@ #include "qdebug.h" #include "qdir.h" -#if defined(Q_OS_SYMBIAN) -# include -# include "private/qcore_symbian_p.h" -#endif - #ifndef QT_NO_LIBRARY QT_BEGIN_NAMESPACE @@ -106,16 +101,6 @@ QT_BEGIN_NAMESPACE link to plugins statically. You can use QLibrary if you need to load dynamic libraries in a statically linked application. - \note In Symbian the plugin stub files must be used whenever a - path to plugin is needed. For the purposes of loading plugins, - the stubs can be considered to have the same name as the actual - plugin binary. In practice they have ".qtplugin" extension - instead of ".dll", but this difference is handled transparently - by QPluginLoader and QLibrary to avoid need for Symbian specific - plugin handling in most Qt applications. Plugin stubs are needed - because Symbian Platform Security denies all access to the directory - where the actual plugin binaries are located. - \sa QLibrary, {Plug & Paint Example} */ @@ -136,8 +121,6 @@ QPluginLoader::QPluginLoader(QObject *parent) Unix, - \c .dylib on Mac OS X, and \c .dll on Windows. The suffix can be verified with QLibrary::isLibrary(). - Note: In Symbian the \a fileName must point to plugin stub file. - \sa setFileName() */ QPluginLoader::QPluginLoader(const QString &fileName, QObject *parent) @@ -263,8 +246,6 @@ bool QPluginLoader::isLoaded() const By default, this property contains an empty string. - Note: In Symbian the \a fileName must point to plugin stub file. - \sa load() */ void QPluginLoader::setFileName(const QString &fileName) @@ -278,48 +259,7 @@ void QPluginLoader::setFileName(const QString &fileName) did_load = false; } -#if defined(Q_OS_SYMBIAN) - // In Symbian we actually look for plugin stub, so modify the filename - // to make canonicalFilePath find the file, if .dll is specified. - QFileInfo fi(fileName); - - if (fi.suffix() == QLatin1String("dll")) { - QString stubName = fileName; - stubName.chop(3); - stubName += QLatin1String("qtplugin"); - fi = QFileInfo(stubName); - } - - QString fn = fi.canonicalFilePath(); - // If not found directly, check also all the available drives - if (!fn.length()) { - QString stubPath(fi.fileName().length() ? fi.absoluteFilePath() : QString()); - if (stubPath.length() > 1) { - if (stubPath.at(1).toAscii() == ':') - stubPath.remove(0,2); - QFileInfoList driveList(QDir::drives()); - RFs rfs = qt_s60GetRFs(); - foreach(const QFileInfo& drive, driveList) { - QString testFilePath(drive.absolutePath() + stubPath); - testFilePath = QDir::cleanPath(testFilePath); - // Use native Symbian code to check for file existence, because checking - // for file from under non-existent protected dir like E:/private/ using - // QFile::exists causes platform security violations on most apps. - QString nativePath = QDir::toNativeSeparators(testFilePath); - TPtrC ptr(qt_QString2TPtrC(nativePath)); - TUint attributes; - TInt err = rfs.Att(ptr, attributes); - if (err == KErrNone) { - fn = testFilePath; - break; - } - } - } - } - -#else QString fn = QFileInfo(fileName).canonicalFilePath(); -#endif d = QLibraryPrivate::findOrCreate(fn); d->loadHints = lh; -- cgit v1.2.3