forked from qt-creator/qt-creator
Move Help item from text editor to core
The functionality is not text editor specific. Change-Id: Iee531572f14673e75129f4bfbb64a1437899d31e Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -31,8 +31,8 @@
|
||||
#include "cppsemanticinfo.h"
|
||||
#include "cpptools_global.h"
|
||||
|
||||
#include <coreplugin/helpitem.h>
|
||||
#include <texteditor/codeassist/assistinterface.h>
|
||||
#include <texteditor/helpitem.h>
|
||||
#include <texteditor/quickfix.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
@@ -56,7 +56,7 @@ struct CPPTOOLS_EXPORT ToolTipInfo {
|
||||
|
||||
QStringList qDocIdCandidates;
|
||||
QString qDocMark;
|
||||
TextEditor::HelpItem::Category qDocCategory;
|
||||
Core::HelpItem::Category qDocCategory;
|
||||
|
||||
QString sizeInBytes;
|
||||
};
|
||||
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
: path(QDir::toNativeSeparators(includeFile.resolvedFileName()))
|
||||
, fileName(Utils::FileName::fromString(includeFile.resolvedFileName()).fileName())
|
||||
{
|
||||
helpCategory = TextEditor::HelpItem::Brief;
|
||||
helpCategory = Core::HelpItem::Brief;
|
||||
helpIdCandidates = QStringList(fileName);
|
||||
helpMark = fileName;
|
||||
link = Utils::Link(path);
|
||||
@@ -102,7 +102,7 @@ class CppMacro : public CppElement
|
||||
public:
|
||||
explicit CppMacro(const Macro ¯o)
|
||||
{
|
||||
helpCategory = TextEditor::HelpItem::Macro;
|
||||
helpCategory = Core::HelpItem::Macro;
|
||||
const QString macroName = QString::fromUtf8(macro.name(), macro.name().size());
|
||||
helpIdCandidates = QStringList(macroName);
|
||||
helpMark = macroName;
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
explicit CppNamespace(Symbol *declaration)
|
||||
: CppDeclarableElement(declaration)
|
||||
{
|
||||
helpCategory = TextEditor::HelpItem::ClassOrNamespace;
|
||||
helpCategory = Core::HelpItem::ClassOrNamespace;
|
||||
tooltip = qualifiedName;
|
||||
}
|
||||
};
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
|
||||
CppClass::CppClass(Symbol *declaration) : CppDeclarableElement(declaration)
|
||||
{
|
||||
helpCategory = TextEditor::HelpItem::ClassOrNamespace;
|
||||
helpCategory = Core::HelpItem::ClassOrNamespace;
|
||||
tooltip = qualifiedName;
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ public:
|
||||
explicit CppFunction(Symbol *declaration)
|
||||
: CppDeclarableElement(declaration)
|
||||
{
|
||||
helpCategory = TextEditor::HelpItem::Function;
|
||||
helpCategory = Core::HelpItem::Function;
|
||||
|
||||
const FullySpecifiedType &type = declaration->type();
|
||||
|
||||
@@ -242,7 +242,7 @@ public:
|
||||
explicit CppEnum(Enum *declaration)
|
||||
: CppDeclarableElement(declaration)
|
||||
{
|
||||
helpCategory = TextEditor::HelpItem::Enum;
|
||||
helpCategory = Core::HelpItem::Enum;
|
||||
tooltip = qualifiedName;
|
||||
}
|
||||
};
|
||||
@@ -253,7 +253,7 @@ public:
|
||||
explicit CppTypedef(Symbol *declaration)
|
||||
: CppDeclarableElement(declaration)
|
||||
{
|
||||
helpCategory = TextEditor::HelpItem::Typedef;
|
||||
helpCategory = Core::HelpItem::Typedef;
|
||||
tooltip = Overview().prettyType(declaration->type(), qualifiedName);
|
||||
}
|
||||
};
|
||||
@@ -288,7 +288,7 @@ public:
|
||||
LookupContext::fullyQualifiedName(symbol));
|
||||
if (!name.isEmpty()) {
|
||||
tooltip = name;
|
||||
helpCategory = TextEditor::HelpItem::ClassOrNamespace;
|
||||
helpCategory = Core::HelpItem::ClassOrNamespace;
|
||||
const QStringList &allNames = stripName(name);
|
||||
if (!allNames.isEmpty()) {
|
||||
helpMark = allNames.last();
|
||||
@@ -307,7 +307,7 @@ public:
|
||||
explicit CppEnumerator(EnumeratorDeclaration *declaration)
|
||||
: CppDeclarableElement(declaration)
|
||||
{
|
||||
helpCategory = TextEditor::HelpItem::Enum;
|
||||
helpCategory = Core::HelpItem::Enum;
|
||||
|
||||
Overview overview;
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
|
||||
#include "cpptools_global.h"
|
||||
|
||||
#include <coreplugin/helpitem.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/helpitem.h>
|
||||
|
||||
#include <cplusplus/CppDocument.h>
|
||||
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
|
||||
virtual CppClass *toCppClass();
|
||||
|
||||
TextEditor::HelpItem::Category helpCategory = TextEditor::HelpItem::Unknown;
|
||||
Core::HelpItem::Category helpCategory = Core::HelpItem::Unknown;
|
||||
QStringList helpIdCandidates;
|
||||
QString helpMark;
|
||||
Utils::Link link;
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace CppTools {
|
||||
class CPPTOOLS_EXPORT CppHoverHandler : public TextEditor::BaseHoverHandler
|
||||
{
|
||||
public:
|
||||
static QString tooltipTextForHelpItem(const TextEditor::HelpItem &help);
|
||||
static QString tooltipTextForHelpItem(const Core::HelpItem &help);
|
||||
|
||||
private:
|
||||
void identifyMatch(TextEditor::TextEditorWidget *editorWidget,
|
||||
|
||||
Reference in New Issue
Block a user