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;
 }
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;
}
CppInclude::CppInclude(const Document::Include &includeFile) :
    CppElement(),
    m_path(QDir::toNativeSeparators(includeFile.fileName())),
    m_fileName(QFileInfo(includeFile.fileName()).fileName())
{
    setHelpCategory(TextEditor::HelpItem::Brief);
    setHelpIdCandidates(QStringList(m_fileName));
    setHelpMark(m_fileName);
    setLink(CPPEditorWidget::Link(m_path));
    setTooltip(m_path);
}
Exemple #4
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);
}