remove redundant QDeclarative_isFileCaseCorrect()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2020-12-27 06:30:01 +00:00
parent f8e63fbd39
commit 44cd141531
5 changed files with 1 additions and 37 deletions

View file

@ -98,12 +98,7 @@ bool QDeclarativeDirParser::parse()
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;

View file

@ -2398,12 +2398,6 @@ const QMetaObject *QDeclarativeEnginePrivate::metaObjectForType(int t) const
}
}
bool QDeclarative_isFileCaseCorrect(const QString &fileName)
{
Q_UNUSED(fileName)
return true;
}
QT_END_NAMESPACE
#include "moc_qdeclarativeengine.h"

View file

@ -61,19 +61,6 @@ struct QDeclarativeGraphics_DerivedObject : public QObject
}
};
/*!
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

View file

@ -932,11 +932,6 @@ bool QDeclarativeImportDatabase::importPlugin(const QString &filePath, const QSt
}
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()) {

View file

@ -517,13 +517,6 @@ void QDeclarativeDataLoader::load(QDeclarativeDataBlob *blob)
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();