Commit 478914a9 authored by Nikolai Kosjar's avatar Nikolai Kosjar

CppTools: Unexport ProjectFileAdder

Change-Id: Icf53019b594a5c45b06f7f1fab0f4bf36e891918
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent 77db03a9
...@@ -102,6 +102,28 @@ bool ProjectFile::isSource(ProjectFile::Kind kind) ...@@ -102,6 +102,28 @@ bool ProjectFile::isSource(ProjectFile::Kind kind)
} }
} }
QDebug operator<<(QDebug stream, const CppTools::ProjectFile &cxxFile)
{
const char *kind;
switch (cxxFile.kind) {
case CppTools::ProjectFile::CHeader: kind = "CHeader"; break;
case CppTools::ProjectFile::CSource: kind = "CSource"; break;
case CppTools::ProjectFile::CXXHeader: kind = "CXXHeader"; break;
case CppTools::ProjectFile::CXXSource: kind = "CXXSource"; break;
case CppTools::ProjectFile::ObjCHeader: kind = "ObjCHeader"; break;
case CppTools::ProjectFile::ObjCSource: kind = "ObjCSource"; break;
case CppTools::ProjectFile::ObjCXXHeader: kind = "ObjCXXHeader"; break;
case CppTools::ProjectFile::ObjCXXSource: kind = "ObjCXXSource"; break;
case CppTools::ProjectFile::CudaSource: kind = "CudaSource"; break;
case CppTools::ProjectFile::OpenCLSource: kind = "OpenCLSource"; break;
default: kind = "INVALID"; break;
}
stream << cxxFile.path << QLatin1String(", ") << kind;
return stream;
}
namespace Internal {
ProjectFileAdder::ProjectFileAdder(QList<ProjectFile> &files) ProjectFileAdder::ProjectFileAdder(QList<ProjectFile> &files)
: m_files(files) : m_files(files)
{ {
...@@ -135,24 +157,6 @@ void ProjectFileAdder::addMapping(const char *mimeName, ProjectFile::Kind kind) ...@@ -135,24 +157,6 @@ void ProjectFileAdder::addMapping(const char *mimeName, ProjectFile::Kind kind)
m_mapping.append(Pair(mimeType, kind)); m_mapping.append(Pair(mimeType, kind));
} }
QDebug operator<<(QDebug stream, const CppTools::ProjectFile &cxxFile) } // namespace Internal
{
const char *kind;
switch (cxxFile.kind) {
case CppTools::ProjectFile::CHeader: kind = "CHeader"; break;
case CppTools::ProjectFile::CSource: kind = "CSource"; break;
case CppTools::ProjectFile::CXXHeader: kind = "CXXHeader"; break;
case CppTools::ProjectFile::CXXSource: kind = "CXXSource"; break;
case CppTools::ProjectFile::ObjCHeader: kind = "ObjCHeader"; break;
case CppTools::ProjectFile::ObjCSource: kind = "ObjCSource"; break;
case CppTools::ProjectFile::ObjCXXHeader: kind = "ObjCXXHeader"; break;
case CppTools::ProjectFile::ObjCXXSource: kind = "ObjCXXSource"; break;
case CppTools::ProjectFile::CudaSource: kind = "CudaSource"; break;
case CppTools::ProjectFile::OpenCLSource: kind = "OpenCLSource"; break;
default: kind = "INVALID"; break;
}
stream << cxxFile.path << QLatin1String(", ") << kind;
return stream;
}
} // namespace CppTools } // namespace CppTools
...@@ -68,7 +68,11 @@ public: ...@@ -68,7 +68,11 @@ public:
Kind kind; Kind kind;
}; };
class CPPTOOLS_EXPORT ProjectFileAdder QDebug operator<<(QDebug stream, const CppTools::ProjectFile &cxxFile);
namespace Internal {
class ProjectFileAdder
{ {
public: public:
ProjectFileAdder(QList<ProjectFile> &files); ProjectFileAdder(QList<ProjectFile> &files);
...@@ -86,8 +90,7 @@ private: ...@@ -86,8 +90,7 @@ private:
QFileInfo m_fileInfo; QFileInfo m_fileInfo;
}; };
QDebug operator<<(QDebug stream, const CppTools::ProjectFile &cxxFile); } // namespace Internal
} // namespace CppTools } // namespace CppTools
#endif // CPPTOOLS_CPPPROJECTFILE_H #endif // CPPTOOLS_CPPPROJECTFILE_H
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include <QTextStream> #include <QTextStream>
using namespace CppTools; using namespace CppTools;
using namespace CppTools::Internal;
using namespace ProjectExplorer; using namespace ProjectExplorer;
ProjectPart::ProjectPart() ProjectPart::ProjectPart()
......
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