Commit c08fd3a2 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer

Fixed typo 'mimeDatase' -> 'mimeDatabase'

Change-Id: Id2ff2fb1e5e009fd267c7fcacf59e9a4ad6f2364
Reviewed-by: default avatarThorbjørn Lindeijer <bjorn@lindeijer.nl>
parent a39f140e
......@@ -216,9 +216,9 @@ enum FileType {
UnknownType
};
static inline FileType fileType(const Core::MimeDatabase *mimeDatase, const QFileInfo & fi)
static inline FileType fileType(const Core::MimeDatabase *mimeDatabase, const QFileInfo & fi)
{
const Core::MimeType mimeType = mimeDatase->findByFile(fi);
const Core::MimeType mimeType = mimeDatabase->findByFile(fi);
if (!mimeType)
return UnknownType;
const QString typeName = mimeType.type();
......@@ -236,20 +236,20 @@ static inline FileType fileType(const Core::MimeDatabase *mimeDatase, const QFi
// Return the suffixes that should be checked when trying to find a
// source belonging to a header and vice versa
static QStringList matchingCandidateSuffixes(const Core::MimeDatabase *mimeDatase, FileType type)
static QStringList matchingCandidateSuffixes(const Core::MimeDatabase *mimeDatabase, FileType type)
{
switch (type) {
case UnknownType:
break;
case HeaderFile: // Note that C/C++ headers are undistinguishable
return mimeDatase->findByType(QLatin1String(CppTools::Constants::C_SOURCE_MIMETYPE)).suffixes()
+ mimeDatase->findByType(QLatin1String(CppTools::Constants::CPP_SOURCE_MIMETYPE)).suffixes()
+ mimeDatase->findByType(QLatin1String(CppTools::Constants::OBJECTIVE_CPP_SOURCE_MIMETYPE)).suffixes();
return mimeDatabase->findByType(QLatin1String(CppTools::Constants::C_SOURCE_MIMETYPE)).suffixes()
+ mimeDatabase->findByType(QLatin1String(CppTools::Constants::CPP_SOURCE_MIMETYPE)).suffixes()
+ mimeDatabase->findByType(QLatin1String(CppTools::Constants::OBJECTIVE_CPP_SOURCE_MIMETYPE)).suffixes();
case C_SourceFile:
return mimeDatase->findByType(QLatin1String(CppTools::Constants::C_HEADER_MIMETYPE)).suffixes();
return mimeDatabase->findByType(QLatin1String(CppTools::Constants::C_HEADER_MIMETYPE)).suffixes();
case CPP_SourceFile:
case ObjectiveCPP_SourceFile:
return mimeDatase->findByType(QLatin1String(CppTools::Constants::CPP_HEADER_MIMETYPE)).suffixes();
return mimeDatabase->findByType(QLatin1String(CppTools::Constants::CPP_HEADER_MIMETYPE)).suffixes();
}
return QStringList();
}
......@@ -282,15 +282,15 @@ QString correspondingHeaderOrSource(const QString &fileName, bool *wasHeader)
{
using namespace Internal;
const Core::MimeDatabase *mimeDatase = Core::ICore::mimeDatabase();
const Core::MimeDatabase *mimeDatabase = Core::ICore::mimeDatabase();
const QFileInfo fi(fileName);
if (m_headerSourceMapping.contains(fi.absoluteFilePath())) {
if (wasHeader)
*wasHeader = fileType(mimeDatase, fi) == HeaderFile;
*wasHeader = fileType(mimeDatabase, fi) == HeaderFile;
return m_headerSourceMapping.value(fi.absoluteFilePath());
}
FileType type = fileType(mimeDatase, fi);
FileType type = fileType(mimeDatabase, fi);
if (wasHeader)
*wasHeader = type == HeaderFile;
......@@ -302,7 +302,7 @@ QString correspondingHeaderOrSource(const QString &fileName, bool *wasHeader)
const QString baseName = fi.completeBaseName();
const QString privateHeaderSuffix = QLatin1String("_p");
const QStringList suffixes = matchingCandidateSuffixes(mimeDatase, type);
const QStringList suffixes = matchingCandidateSuffixes(mimeDatabase, type);
QStringList candidateFileNames = baseNameWithAllSuffixes(baseName, suffixes);
if (type == HeaderFile) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment