if (_source.isEmpty() && !_filePathSouce.isEmpty()) {
QFile file(_filePathSouce);
- if (!QDeclarative_isFileCaseCorrect(_filePathSouce)) {
- QDeclarativeError error;
- error.setDescription(QString::fromUtf8("cannot load module \"$$URI$$\": File name case mismatch for \"%1\"").arg(_filePathSouce));
- _errors.prepend(error);
- return false;
- } else if (file.open(QFile::ReadOnly)) {
+ if (file.open(QFile::ReadOnly)) {
_source = QString::fromUtf8(file.readAll());
} else {
QDeclarativeError error;
}
}
-bool QDeclarative_isFileCaseCorrect(const QString &fileName)
-{
- Q_UNUSED(fileName)
- return true;
-}
-
QT_END_NAMESPACE
#include "moc_qdeclarativeengine.h"
};
/*!
- Returns true if the case of \a fileName is equivalent to the file case of
- \a fileName on disk, and false otherwise.
-
- This is used to ensure that the behavior of QML on a case-insensitive file
- system is the same as on a case-sensitive file system. This function
- performs a "best effort" attempt to determine the real case of the file.
- It may have false positives (say the case is correct when it isn't), but it
- should never have a false negative (say the case is incorrect when it is
- correct).
-*/
-bool QDeclarative_isFileCaseCorrect(const QString &fileName);
-
-/*!
Makes the \a object a child of \a parent. Note that when using this method,
neither \a parent nor the object's previous parent (if it had one) will
receive ChildRemoved or ChildAdded events.
}
if (!engineInitialized || !typesRegistered) {
- if (!QDeclarative_isFileCaseCorrect(absoluteFilePath)) {
- if (errorString)
- *errorString = tr("File name case mismatch for \"%1\"").arg(absoluteFilePath);
- return false;
- }
QPluginLoader loader(absoluteFilePath);
if (!loader.load()) {
QString lf = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(blob->m_url);
if (!lf.isEmpty()) {
- if (!QDeclarative_isFileCaseCorrect(lf)) {
- QDeclarativeError error;
- error.setUrl(blob->m_url);
- error.setDescription(QLatin1String("File name case mismatch"));
- blob->setError(error);
- return;
- }
QFile file(lf);
if (file.open(QFile::ReadOnly)) {
QByteArray data = file.readAll();