summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-09-21 11:31:40 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-09-21 11:31:40 (GMT)
commit0981754cb42a7943cb3cc12345c82b4f301d65a3 (patch)
treea90e40673c24984c48e8c175b6a424bd8d99c804 /src/declarative
parenta55e82b3525d6fee5d4e50441c6d268c23d24c40 (diff)
parent849694e4cb9d010517b54b2b30035485487b0e12 (diff)
downloadQt-0981754cb42a7943cb3cc12345c82b4f301d65a3.zip
Qt-0981754cb42a7943cb3cc12345c82b4f301d65a3.tar.gz
Qt-0981754cb42a7943cb3cc12345c82b4f301d65a3.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: QML import path puts Qt dirs in correct Symbian order
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/qml/qdeclarativeimport.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp
index 6e0b348..c25207a 100644
--- a/src/declarative/qml/qdeclarativeimport.cpp
+++ b/src/declarative/qml/qdeclarativeimport.cpp
@@ -46,6 +46,7 @@
#include <QtCore/qfileinfo.h>
#include <QtCore/qpluginloader.h>
#include <QtCore/qlibraryinfo.h>
+#include <QtCore/qalgorithms.h>
#include <QtDeclarative/qdeclarativeextensioninterface.h>
#include <private/qdeclarativeglobal_p.h>
#include <private/qdeclarativetypenamecache_p.h>
@@ -733,8 +734,12 @@ QDeclarativeImportDatabase::QDeclarativeImportDatabase(QDeclarativeEngine *e)
}
RFs& fs = qt_s60GetRFs();
TPtrC tempPathPtr(reinterpret_cast<const TText*> (tempPath.constData()));
+ // Symbian searches should start from Y:. Fix start drive otherwise TFindFile starts from the session drive
+ _LIT(KStartDir, "Y:");
+ TFileName dirPath(KStartDir);
+ dirPath.Append(tempPathPtr);
TFindFile finder(fs);
- TInt err = finder.FindByDir(tempPathPtr, tempPathPtr);
+ TInt err = finder.FindByDir(tempPathPtr, dirPath);
while (err == KErrNone) {
QString foundDir(reinterpret_cast<const QChar *>(finder.File().Ptr()),
finder.File().Length());
@@ -742,6 +747,9 @@ QDeclarativeImportDatabase::QDeclarativeImportDatabase(QDeclarativeEngine *e)
addImportPath(foundDir);
err = finder.Find();
}
+ // TFindFile found the directories in the order we want, but addImportPath reverses it.
+ // Reverse the order again to get it right.
+ QAlgorithmsPrivate::qReverse(fileImportPath.begin(), fileImportPath.end());
} else {
addImportPath(installImportsPath);
}