From 9ba5a81e9b2e3f68efdd460c2b426677ae39a0fc Mon Sep 17 00:00:00 2001 From: con Date: Mon, 4 May 2009 17:11:10 +0200 Subject: Switch header source between .h and .mm files. --- src/plugins/cpptools/cpptoolsplugin.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/plugins/cpptools/cpptoolsplugin.cpp') diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp index cdfda4c24b..4aa16e9e23 100644 --- a/src/plugins/cpptools/cpptoolsplugin.cpp +++ b/src/plugins/cpptools/cpptoolsplugin.cpp @@ -185,6 +185,7 @@ enum FileType { HeaderFile, C_SourceFile, CPP_SourceFile, + ObjectiveCPP_SourceFile, UnknownType }; @@ -198,6 +199,8 @@ static inline FileType fileType(const Core::MimeDatabase *mimeDatase, const QFi return C_SourceFile; if (typeName == QLatin1String(CppTools::Constants::CPP_SOURCE_MIMETYPE)) return CPP_SourceFile; + if (typeName == QLatin1String(CppTools::Constants::OBJECTIVE_CPP_SOURCE_MIMETYPE)) + return ObjectiveCPP_SourceFile; if (typeName == QLatin1String(CppTools::Constants::C_HEADER_MIMETYPE) || typeName == QLatin1String(CppTools::Constants::CPP_HEADER_MIMETYPE)) return HeaderFile; @@ -212,11 +215,13 @@ static QStringList matchingCandidateSuffixes(const Core::MimeDatabase *mimeDatas 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(); + 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(); case C_SourceFile: return mimeDatase->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 QStringList(); -- cgit v1.2.1