summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativeimport.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-10-12 22:06:19 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-10-12 22:06:19 (GMT)
commitff41e5c637a522ce596a2f1bf5a6d8d242828c27 (patch)
treedd29e38211ad426dd9a62c1c78d4ec66b24cc618 /src/declarative/qml/qdeclarativeimport.cpp
parent0c1e85db7e810e5ac7496dd5fb4c0bd37746be11 (diff)
parentdb2c3c8dc14369e9c2d987916bf10c04567c41d1 (diff)
downloadQt-ff41e5c637a522ce596a2f1bf5a6d8d242828c27.zip
Qt-ff41e5c637a522ce596a2f1bf5a6d8d242828c27.tar.gz
Qt-ff41e5c637a522ce596a2f1bf5a6d8d242828c27.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (25 commits) Update QtDeclarative def files Update QtCore def files Compile on MSVC2008 Bug: TextEdit ignores plain text format when pasting text Update sections if model content changes. Fix autotest on windows Test for absent qmldir Allow objectName to be used in QML bindings Install the declarative objectNameChanged callback Don't give focus to a FocusScope that has had focus explicitly cleared. Add a declarative callback for when a QObject's objectName changes Ensure GridView header is visible at the top of the view. Allow aliases to value type properties Image.sourceSize is incorrect after changing Image.source Test for QTBUG-13685 Don't forward keys to invisible items. Disable Text {} image caching by default Check plugin and QML file case on Mac and Windows Add test for QTBUG-14279 Ensure that onRelease is called for doubleClick events. ...
Diffstat (limited to 'src/declarative/qml/qdeclarativeimport.cpp')
-rw-r--r--src/declarative/qml/qdeclarativeimport.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp
index fe4ed48..6f5216a 100644
--- a/src/declarative/qml/qdeclarativeimport.cpp
+++ b/src/declarative/qml/qdeclarativeimport.cpp
@@ -351,7 +351,11 @@ bool QDeclarativeImportsPrivate::importExtension(const QString &absoluteFilePath
{
QFile file(absoluteFilePath);
QString filecontent;
- if (file.open(QFile::ReadOnly)) {
+ if (!QDeclarative_isFileCaseCorrect(absoluteFilePath)) {
+ if (errorString)
+ *errorString = QDeclarativeImportDatabase::tr("cannot load module \"%1\": File name case mismatch for \"%2\"").arg(uri).arg(absoluteFilePath);
+ return false;
+ } else if (file.open(QFile::ReadOnly)) {
filecontent = QString::fromUtf8(file.readAll());
if (qmlImportTrace())
qDebug().nospace() << "QDeclarativeImports(" << qPrintable(base.toString()) << "::importExtension: "
@@ -913,6 +917,11 @@ bool QDeclarativeImportDatabase::importPlugin(const QString &filePath, const QSt
}
if (!engineInitialized || !typesRegistered) {
+ if (!QDeclarative_isFileCaseCorrect(absoluteFilePath)) {
+ if (errorString)
+ *errorString = tr("File name case mismatch for \"%2\"").arg(absoluteFilePath);
+ return false;
+ }
QPluginLoader loader(absoluteFilePath);
if (!loader.load()) {