diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-11-09 03:34:23 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-11-09 03:34:23 (GMT) |
commit | 828ccd1c02796b6bb9439c93d4741596b1a5992e (patch) | |
tree | bbd94e3a005180695b04b335b9bdecfd10823586 /src | |
parent | d5cf162c3de9c599ac490bcc7954c1b70ef564da (diff) | |
parent | 865ad5053f053c9274973bb07e9f0ca04fd043d3 (diff) | |
download | Qt-828ccd1c02796b6bb9439c93d4741596b1a5992e.zip Qt-828ccd1c02796b6bb9439c93d4741596b1a5992e.tar.gz Qt-828ccd1c02796b6bb9439c93d4741596b1a5992e.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public:
symbian - handle path being passed as part of filename in QTranslator
Symbian - fix compile error when default configured
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/kernel/qtranslator.cpp | 18 | ||||
-rw-r--r-- | src/gui/painting/qgraphicssystemex_symbian.cpp | 6 |
2 files changed, 18 insertions, 6 deletions
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp index 8c08760..ca30db1 100644 --- a/src/corelib/kernel/qtranslator.cpp +++ b/src/corelib/kernel/qtranslator.cpp @@ -405,13 +405,26 @@ bool QTranslator::load(const QString & filename, const QString & directory, Q_D(QTranslator); d->clear(); + QString fname = filename; QString prefix; if (QFileInfo(filename).isRelative()) { #ifdef Q_OS_SYMBIAN - if (directory.isEmpty()) + //TFindFile doesn't like path in the filename + QString dir(directory); + int slash = filename.lastIndexOf(QLatin1Char('/')); + slash = qMax(slash, filename.lastIndexOf(QLatin1Char('\\'))); + if (slash >=0) { + //so move the path component into the directory prefix + if (dir.isEmpty()) + dir = filename.left(slash + 1); + else + dir = dir + QLatin1Char('/') + filename.left(slash + 1); + fname = fname.mid(slash + 1); + } + if (dir.isEmpty()) prefix = QCoreApplication::applicationDirPath(); else - prefix = QFileInfo(directory).absoluteFilePath(); //TFindFile doesn't like dirty paths + prefix = QFileInfo(dir).absoluteFilePath(); //TFindFile doesn't like dirty paths if (prefix.length() > 2 && prefix.at(1) == QLatin1Char(':') && prefix.at(0).isLetter()) prefix[0] = QLatin1Char('Y'); #else @@ -425,7 +438,6 @@ bool QTranslator::load(const QString & filename, const QString & directory, QString nativePrefix = QDir::toNativeSeparators(prefix); #endif - QString fname = filename; QString realname; QString delims; delims = search_delimiters.isNull() ? QString::fromLatin1("_.") : search_delimiters; diff --git a/src/gui/painting/qgraphicssystemex_symbian.cpp b/src/gui/painting/qgraphicssystemex_symbian.cpp index 32e040f..5a182ff 100644 --- a/src/gui/painting/qgraphicssystemex_symbian.cpp +++ b/src/gui/painting/qgraphicssystemex_symbian.cpp @@ -46,7 +46,7 @@ #include <e32property.h> -#ifdef Q_SYMBIAN_SUPPORTS_SURFACES +#if defined(Q_SYMBIAN_SUPPORTS_SURFACES) && !defined (QT_NO_EGL) #include "private/qegl_p.h" #endif @@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE static bool bcm2727Initialized = false; static bool bcm2727 = false; -#ifdef Q_SYMBIAN_SUPPORTS_SURFACES +#if defined(Q_SYMBIAN_SUPPORTS_SURFACES) && !defined (QT_NO_EGL) typedef EGLBoolean (*NOK_resource_profiling)(EGLDisplay, EGLint, EGLint*, EGLint, EGLint*); #define EGL_PROF_TOTAL_MEMORY_NOK 0x3070 #endif @@ -69,7 +69,7 @@ bool QSymbianGraphicsSystemEx::hasBCM2727() if (bcm2727Initialized) return bcm2727; -#ifdef Q_SYMBIAN_SUPPORTS_SURFACES +#if defined(Q_SYMBIAN_SUPPORTS_SURFACES) && !defined (QT_NO_EGL) EGLDisplay display = QEgl::display(); #if 1 // Hacky but fast ~0ms. |