mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 02:42:55 +00:00
remove redundant QDeclarative_isFileCaseCorrect()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
f8e63fbd39
commit
44cd141531
5 changed files with 1 additions and 37 deletions
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue