CppInclude::CppInclude(const Document::Include &includeFile) :
    path(QDir::toNativeSeparators(includeFile.resolvedFileName())),
    fileName(QFileInfo(includeFile.resolvedFileName()).fileName())
{
    helpCategory = TextEditor::HelpItem::Brief;
    helpIdCandidates = QStringList(fileName);
    helpMark = fileName;
    link = CPPEditorWidget::Link(path);
    tooltip = path;
}
 explicit CppInclude(const Document::Include &includeFile)
     : path(QDir::toNativeSeparators(includeFile.resolvedFileName()))
     , fileName(Utils::FileName::fromString(includeFile.resolvedFileName()).fileName())
 {
     helpCategory = Core::HelpItem::Brief;
     helpIdCandidates = QStringList(fileName);
     helpMark = fileName;
     link = Utils::Link(path);
     tooltip = path;
 }
Example #3
0
// This assumes to be called with a QDir::cleanPath cleaned fileName.
void Document::addIncludeFile(const Document::Include &include)
{
    if (include.resolvedFileName().isEmpty())
        _unresolvedIncludes.append(include);
    else
        _resolvedIncludes.append(include);
}