forked from qt-creator/qt-creator
CppEditor: Move two functions to cpptoolsreuse.{h,cpp}
They do not really depend on CppEditorWidget and will be re-used in a
follow-up change.
CppEditorWidget::identifierUnderCursor()
CppEditorWidget::findCanonicalMacro()
Change-Id: I553bb68694fb4b5f1baa331debf33ae234e3dedf
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
committed by
Erik Verbruggen
parent
a87fa1e223
commit
fa4e839bbe
@@ -32,11 +32,16 @@
|
||||
|
||||
#include "cpptools_global.h"
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QChar)
|
||||
QT_FORWARD_DECLARE_CLASS(QTextCursor)
|
||||
QT_FORWARD_DECLARE_CLASS(QStringRef)
|
||||
#include <cplusplus/CppDocument.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QChar;
|
||||
class QStringRef;
|
||||
class QTextCursor;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace CPlusPlus {
|
||||
class Macro;
|
||||
class Symbol;
|
||||
class LookupContext;
|
||||
} // namespace CPlusPlus
|
||||
@@ -46,15 +51,20 @@ namespace CppTools {
|
||||
void CPPTOOLS_EXPORT moveCursorToEndOfIdentifier(QTextCursor *tc);
|
||||
void CPPTOOLS_EXPORT moveCursorToStartOfIdentifier(QTextCursor *tc);
|
||||
|
||||
bool CPPTOOLS_EXPORT isOwnershipRAIIType(CPlusPlus::Symbol *symbol,
|
||||
const CPlusPlus::LookupContext &context);
|
||||
bool CPPTOOLS_EXPORT isQtKeyword(const QStringRef &text);
|
||||
|
||||
bool CPPTOOLS_EXPORT isValidAsciiIdentifierChar(const QChar &ch);
|
||||
bool CPPTOOLS_EXPORT isValidFirstIdentifierChar(const QChar &ch);
|
||||
bool CPPTOOLS_EXPORT isValidIdentifierChar(const QChar &ch);
|
||||
bool CPPTOOLS_EXPORT isValidIdentifier(const QString &s);
|
||||
|
||||
bool CPPTOOLS_EXPORT isQtKeyword(const QStringRef &text);
|
||||
QString CPPTOOLS_EXPORT identifierUnderCursor(QTextCursor *cursor);
|
||||
|
||||
bool CPPTOOLS_EXPORT isOwnershipRAIIType(CPlusPlus::Symbol *symbol,
|
||||
const CPlusPlus::LookupContext &context);
|
||||
|
||||
const CPlusPlus::Macro CPPTOOLS_EXPORT *findCanonicalMacro(const QTextCursor &cursor,
|
||||
CPlusPlus::Document::Ptr document);
|
||||
|
||||
QString CPPTOOLS_EXPORT correspondingHeaderOrSource(const QString &fileName, bool *wasHeader = 0);
|
||||
void CPPTOOLS_EXPORT switchHeaderSource();
|
||||
|
||||
Reference in New Issue
Block a user