forked from qt-creator/qt-creator
C++ editor: Try to find a help item if there is a syntax error
Task-number: QTCREATORBUG-2674
This commit is contained in:
@@ -70,11 +70,15 @@ public:
|
||||
void setTextCursor(const QTextCursor &tc);
|
||||
void setLookupBaseClasses(const bool lookup);
|
||||
|
||||
QSharedPointer<CppElement> identifyCppElement();
|
||||
void execute();
|
||||
bool identifiedCppElement() const;
|
||||
const QSharedPointer<CppElement> &cppElement() const;
|
||||
bool hasDiagnosis() const;
|
||||
const QString &diagnosis() const;
|
||||
|
||||
private:
|
||||
void evaluate();
|
||||
bool matchDiagnosticMessage(const CPlusPlus::Document::Ptr &document, unsigned line);
|
||||
void clear();
|
||||
void checkDiagnosticMessage(const CPlusPlus::Document::Ptr &document, unsigned line);
|
||||
bool matchIncludeFile(const CPlusPlus::Document::Ptr &document, unsigned line);
|
||||
bool matchMacroInUse(const CPlusPlus::Document::Ptr &document, unsigned pos);
|
||||
void handleLookupItemMatch(const CPlusPlus::Snapshot &snapshot,
|
||||
@@ -86,6 +90,7 @@ private:
|
||||
QTextCursor m_tc;
|
||||
bool m_lookupBaseClasses;
|
||||
QSharedPointer<CppElement> m_element;
|
||||
QString m_diagnosis;
|
||||
};
|
||||
|
||||
class CppElement
|
||||
@@ -129,18 +134,6 @@ private:
|
||||
QString m_type;
|
||||
};
|
||||
|
||||
class CppDiagnosis : public CppElement
|
||||
{
|
||||
public:
|
||||
CppDiagnosis(const CPlusPlus::Document::DiagnosticMessage &message);
|
||||
virtual ~CppDiagnosis();
|
||||
|
||||
const QString &text() const;
|
||||
|
||||
private:
|
||||
QString m_text;
|
||||
};
|
||||
|
||||
class CppInclude : public CppElement
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user