CppTools: Move ProjectPart in its own header file

Also extracting inline HeaderPath class and change projects list in vector
because the size is  larger than a pointer.

Change-Id: I885fdff3fe9bccc877634d1615249755f5b674fd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Marco Bubke
2016-01-13 14:12:15 +01:00
parent 42d570a3fe
commit 2b4cadf1fe
34 changed files with 532 additions and 372 deletions

View File

@@ -1339,16 +1339,16 @@ bool InternalCppCompletionAssistProcessor::completeInclude(const QTextCursor &cu
}
// Make completion for all relevant includes
ProjectPart::HeaderPaths headerPaths = m_interface->headerPaths();
const ProjectPart::HeaderPath currentFilePath(QFileInfo(m_interface->fileName()).path(),
ProjectPart::HeaderPath::IncludePath);
ProjectPartHeaderPaths headerPaths = m_interface->headerPaths();
const ProjectPartHeaderPath currentFilePath(QFileInfo(m_interface->fileName()).path(),
ProjectPartHeaderPath::IncludePath);
if (!headerPaths.contains(currentFilePath))
headerPaths.append(currentFilePath);
Utils::MimeDatabase mdb;
const QStringList suffixes = mdb.mimeTypeForName(QLatin1String("text/x-c++hdr")).suffixes();
foreach (const ProjectPart::HeaderPath &headerPath, headerPaths) {
foreach (const ProjectPartHeaderPath &headerPath, headerPaths) {
QString realPath = headerPath.path;
if (!directoryPrefix.isEmpty()) {
realPath += QLatin1Char('/');