summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cpptools')
-rw-r--r--src/plugins/cpptools/cpptoolsplugin.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp
index db50b07380..493b672b98 100644
--- a/src/plugins/cpptools/cpptoolsplugin.cpp
+++ b/src/plugins/cpptools/cpptoolsplugin.cpp
@@ -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) {