forked from qt-creator/qt-creator
ClangSupport: Use simpler structures in some cases
The patch is mostly mechanical, but contains also a few spurious changes from values references for some local variables, foreach -> ranged for etc that I coulnd't resist. Change-Id: I58f0bd972546895eb318607cbfbd7ac35caf3f23 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -88,9 +88,8 @@ Utf8String debugWriteFileForInspection(const Utf8String &fileContent, const Utf8
|
||||
|
||||
Utf8String debugId(const FileContainer &fileContainer)
|
||||
{
|
||||
const Utf8String filePath = fileContainer.filePath();
|
||||
Utf8String id(Utf8StringLiteral("unsavedfilecontent-"));
|
||||
id.append(QFileInfo(filePath).fileName());
|
||||
id.append(QFileInfo(fileContainer.filePath).fileName());
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@@ -44,9 +44,9 @@ QDebug operator<<(QDebug debug, const CodeCompletedMessage &message)
|
||||
{
|
||||
debug.nospace() << "CodeCompletedMessage(";
|
||||
|
||||
debug.nospace() << message.m_codeCompletions << ", "
|
||||
<< completionCorrectionToText(message.neededCorrection()) << ", "
|
||||
<< message.m_ticketNumber;
|
||||
debug.nospace() << message.codeCompletions << ", "
|
||||
<< completionCorrectionToText(message.neededCorrection) << ", "
|
||||
<< message.ticketNumber;
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
||||
|
@@ -40,32 +40,17 @@ public:
|
||||
CodeCompletedMessage(const CodeCompletions &codeCompletions,
|
||||
CompletionCorrection neededCorrection,
|
||||
quint64 ticketNumber)
|
||||
: m_codeCompletions(codeCompletions),
|
||||
m_ticketNumber(ticketNumber),
|
||||
m_neededCorrection(neededCorrection)
|
||||
: codeCompletions(codeCompletions),
|
||||
ticketNumber(ticketNumber),
|
||||
neededCorrection(neededCorrection)
|
||||
{
|
||||
}
|
||||
|
||||
const CodeCompletions &codeCompletions() const
|
||||
{
|
||||
return m_codeCompletions;
|
||||
}
|
||||
|
||||
CompletionCorrection neededCorrection() const
|
||||
{
|
||||
return m_neededCorrection;
|
||||
}
|
||||
|
||||
quint64 ticketNumber() const
|
||||
{
|
||||
return m_ticketNumber;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const CodeCompletedMessage &message)
|
||||
{
|
||||
out << message.m_codeCompletions;
|
||||
out << static_cast<quint32>(message.m_neededCorrection);
|
||||
out << message.m_ticketNumber;
|
||||
out << message.codeCompletions;
|
||||
out << static_cast<quint32>(message.neededCorrection);
|
||||
out << message.ticketNumber;
|
||||
|
||||
return out;
|
||||
}
|
||||
@@ -74,29 +59,29 @@ public:
|
||||
{
|
||||
quint32 neededCorrection;
|
||||
|
||||
in >> message.m_codeCompletions;
|
||||
in >> message.codeCompletions;
|
||||
in >> neededCorrection;
|
||||
in >> message.m_ticketNumber;
|
||||
in >> message.ticketNumber;
|
||||
|
||||
message.m_neededCorrection = static_cast<CompletionCorrection>(neededCorrection);
|
||||
message.neededCorrection = static_cast<CompletionCorrection>(neededCorrection);
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const CodeCompletedMessage &first, const CodeCompletedMessage &second)
|
||||
{
|
||||
return first.m_ticketNumber == second.m_ticketNumber
|
||||
&& first.m_neededCorrection == second.m_neededCorrection
|
||||
&& first.m_codeCompletions == second.m_codeCompletions;
|
||||
return first.ticketNumber == second.ticketNumber
|
||||
&& first.neededCorrection == second.neededCorrection
|
||||
&& first.codeCompletions == second.codeCompletions;
|
||||
}
|
||||
|
||||
friend CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const CodeCompletedMessage &message);
|
||||
|
||||
private:
|
||||
CodeCompletions m_codeCompletions;
|
||||
quint64 m_ticketNumber = 0;
|
||||
CompletionCorrection m_neededCorrection = CompletionCorrection::NoCorrection;
|
||||
public:
|
||||
CodeCompletions codeCompletions;
|
||||
quint64 ticketNumber = 0;
|
||||
CompletionCorrection neededCorrection = CompletionCorrection::NoCorrection;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const CodeCompletedMessage &message);
|
||||
|
||||
DECLARE_MESSAGE(CodeCompletedMessage)
|
||||
} // namespace ClangBackEnd
|
||||
|
@@ -35,13 +35,13 @@ QDebug operator<<(QDebug debug, const CompleteCodeMessage &message)
|
||||
{
|
||||
debug.nospace() << "CompleteCodeMessage(";
|
||||
|
||||
debug.nospace() << message.m_filePath << ", ";
|
||||
debug.nospace() << message.m_line << ", ";
|
||||
debug.nospace() << message.m_column << ", ";
|
||||
debug.nospace() << message.m_projectPartId << ", ";
|
||||
debug.nospace() << message.m_ticketNumber;
|
||||
debug.nospace() << message.m_funcNameStartLine << ", ";
|
||||
debug.nospace() << message.m_funcNameStartColumn << ", ";
|
||||
debug.nospace() << message.filePath << ", ";
|
||||
debug.nospace() << message.line << ", ";
|
||||
debug.nospace() << message.column << ", ";
|
||||
debug.nospace() << message.projectPartId << ", ";
|
||||
debug.nospace() << message.ticketNumber;
|
||||
debug.nospace() << message.funcNameStartLine << ", ";
|
||||
debug.nospace() << message.funcNameStartColumn << ", ";
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
||||
|
@@ -35,7 +35,6 @@ namespace ClangBackEnd {
|
||||
|
||||
class CompleteCodeMessage
|
||||
{
|
||||
|
||||
public:
|
||||
CompleteCodeMessage() = default;
|
||||
CompleteCodeMessage(const Utf8String &filePath,
|
||||
@@ -44,100 +43,65 @@ public:
|
||||
const Utf8String &projectPartId,
|
||||
qint32 funcNameStartLine = -1,
|
||||
qint32 funcNameStartColumn = -1)
|
||||
: m_filePath(filePath),
|
||||
m_projectPartId(projectPartId),
|
||||
m_ticketNumber(++ticketCounter),
|
||||
m_line(line),
|
||||
m_column(column),
|
||||
m_funcNameStartLine(funcNameStartLine),
|
||||
m_funcNameStartColumn(funcNameStartColumn)
|
||||
: filePath(filePath),
|
||||
projectPartId(projectPartId),
|
||||
ticketNumber(++ticketCounter),
|
||||
line(line),
|
||||
column(column),
|
||||
funcNameStartLine(funcNameStartLine),
|
||||
funcNameStartColumn(funcNameStartColumn)
|
||||
{
|
||||
}
|
||||
|
||||
const Utf8String &filePath() const
|
||||
{
|
||||
return m_filePath;
|
||||
}
|
||||
|
||||
const Utf8String &projectPartId() const
|
||||
{
|
||||
return m_projectPartId;
|
||||
}
|
||||
|
||||
quint32 line() const
|
||||
{
|
||||
return m_line;
|
||||
}
|
||||
|
||||
quint32 column() const
|
||||
{
|
||||
return m_column;
|
||||
}
|
||||
|
||||
quint64 ticketNumber() const
|
||||
{
|
||||
return m_ticketNumber;
|
||||
}
|
||||
|
||||
qint32 funcNameStartLine() const
|
||||
{
|
||||
return m_funcNameStartLine;
|
||||
}
|
||||
|
||||
qint32 funcNameStartColumn() const
|
||||
{
|
||||
return m_funcNameStartColumn;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const CompleteCodeMessage &message)
|
||||
{
|
||||
out << message.m_filePath;
|
||||
out << message.m_projectPartId;
|
||||
out << message.m_ticketNumber;
|
||||
out << message.m_line;
|
||||
out << message.m_column;
|
||||
out << message.m_funcNameStartLine;
|
||||
out << message.m_funcNameStartColumn;
|
||||
out << message.filePath;
|
||||
out << message.projectPartId;
|
||||
out << message.ticketNumber;
|
||||
out << message.line;
|
||||
out << message.column;
|
||||
out << message.funcNameStartLine;
|
||||
out << message.funcNameStartColumn;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, CompleteCodeMessage &message)
|
||||
{
|
||||
in >> message.m_filePath;
|
||||
in >> message.m_projectPartId;
|
||||
in >> message.m_ticketNumber;
|
||||
in >> message.m_line;
|
||||
in >> message.m_column;
|
||||
in >> message.m_funcNameStartLine;
|
||||
in >> message.m_funcNameStartColumn;
|
||||
in >> message.filePath;
|
||||
in >> message.projectPartId;
|
||||
in >> message.ticketNumber;
|
||||
in >> message.line;
|
||||
in >> message.column;
|
||||
in >> message.funcNameStartLine;
|
||||
in >> message.funcNameStartColumn;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const CompleteCodeMessage &first, const CompleteCodeMessage &second)
|
||||
{
|
||||
return first.m_ticketNumber == second.m_ticketNumber
|
||||
&& first.m_filePath == second.m_filePath
|
||||
&& first.m_projectPartId == second.m_projectPartId
|
||||
&& first.m_line == second.m_line
|
||||
&& first.m_column == second.m_column
|
||||
&& first.m_funcNameStartLine == second.m_funcNameStartLine
|
||||
&& first.m_funcNameStartColumn == second.m_funcNameStartColumn;
|
||||
return first.ticketNumber == second.ticketNumber
|
||||
&& first.filePath == second.filePath
|
||||
&& first.projectPartId == second.projectPartId
|
||||
&& first.line == second.line
|
||||
&& first.column == second.column
|
||||
&& first.funcNameStartLine == second.funcNameStartLine
|
||||
&& first.funcNameStartColumn == second.funcNameStartColumn;
|
||||
}
|
||||
|
||||
friend CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const CompleteCodeMessage &message);
|
||||
|
||||
private:
|
||||
Utf8String m_filePath;
|
||||
Utf8String m_projectPartId;
|
||||
public:
|
||||
Utf8String filePath;
|
||||
Utf8String projectPartId;
|
||||
static CLANGSUPPORT_EXPORT quint64 ticketCounter;
|
||||
quint64 m_ticketNumber = 0;
|
||||
quint32 m_line = 0;
|
||||
quint32 m_column = 0;
|
||||
qint32 m_funcNameStartLine = -1;
|
||||
qint32 m_funcNameStartColumn = -1;
|
||||
quint64 ticketNumber = 0;
|
||||
quint32 line = 0;
|
||||
quint32 column = 0;
|
||||
qint32 funcNameStartLine = -1;
|
||||
qint32 funcNameStartColumn = -1;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const CompleteCodeMessage &message);
|
||||
|
||||
DECLARE_MESSAGE(CompleteCodeMessage);
|
||||
} // namespace ClangBackEnd
|
||||
|
@@ -36,36 +36,31 @@ class EchoMessage
|
||||
public:
|
||||
EchoMessage() = default;
|
||||
explicit EchoMessage(const MessageEnvelop &message)
|
||||
: m_message(message)
|
||||
: message(message)
|
||||
{
|
||||
}
|
||||
|
||||
const MessageEnvelop &message() const
|
||||
{
|
||||
return m_message;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const EchoMessage &message)
|
||||
{
|
||||
out << message.message();
|
||||
out << message.message;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, EchoMessage &message)
|
||||
{
|
||||
in >> message.m_message;
|
||||
in >> message.message;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const EchoMessage &first, const EchoMessage &second)
|
||||
{
|
||||
return first.m_message == second.m_message;
|
||||
return first.message == second.message;
|
||||
}
|
||||
|
||||
private:
|
||||
MessageEnvelop m_message;
|
||||
public:
|
||||
MessageEnvelop message;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const EchoMessage &message);
|
||||
|
@@ -33,7 +33,7 @@ QDebug operator<<(QDebug debug, const RegisterProjectPartsForEditorMessage &mess
|
||||
{
|
||||
debug.nospace() << "RegisterProjectPartsForEditorMessage(";
|
||||
|
||||
for (const ProjectPartContainer &projectContainer : message.projectContainers())
|
||||
for (const ProjectPartContainer &projectContainer : message.projectContainers)
|
||||
debug.nospace() << projectContainer<< ", ";
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
@@ -37,36 +37,31 @@ class RegisterProjectPartsForEditorMessage
|
||||
public:
|
||||
RegisterProjectPartsForEditorMessage() = default;
|
||||
RegisterProjectPartsForEditorMessage(const QVector<ProjectPartContainer> &projectContainers)
|
||||
:m_projectContainers(projectContainers)
|
||||
: projectContainers(projectContainers)
|
||||
{
|
||||
}
|
||||
|
||||
const QVector<ProjectPartContainer> &projectContainers() const
|
||||
{
|
||||
return m_projectContainers;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const RegisterProjectPartsForEditorMessage &message)
|
||||
{
|
||||
out << message.m_projectContainers;
|
||||
out << message.projectContainers;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, RegisterProjectPartsForEditorMessage &message)
|
||||
{
|
||||
in >> message.m_projectContainers;
|
||||
in >> message.projectContainers;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const RegisterProjectPartsForEditorMessage &first, const RegisterProjectPartsForEditorMessage &second)
|
||||
{
|
||||
return first.m_projectContainers == second.m_projectContainers;
|
||||
return first.projectContainers == second.projectContainers;
|
||||
}
|
||||
|
||||
private:
|
||||
QVector<ProjectPartContainer> m_projectContainers;
|
||||
public:
|
||||
QVector<ProjectPartContainer> projectContainers;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RegisterProjectPartsForEditorMessage &message);
|
||||
|
@@ -33,12 +33,12 @@ QDebug operator<<(QDebug debug, const RegisterTranslationUnitForEditorMessage &m
|
||||
{
|
||||
debug.nospace() << "RegisterTranslationUnitForEditorMessage(";
|
||||
|
||||
for (const FileContainer &fileContainer : message.fileContainers())
|
||||
for (const FileContainer &fileContainer : message.fileContainers)
|
||||
debug.nospace() << fileContainer<< ", ";
|
||||
|
||||
debug.nospace() << message.currentEditorFilePath() << ", ";
|
||||
debug.nospace() << message.currentEditorFilePath << ", ";
|
||||
|
||||
for (const Utf8String &visibleEditorFilePath : message.visibleEditorFilePaths())
|
||||
for (const Utf8String &visibleEditorFilePath : message.visibleEditorFilePaths)
|
||||
debug.nospace() << visibleEditorFilePath << ", ";
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
@@ -39,55 +39,40 @@ public:
|
||||
RegisterTranslationUnitForEditorMessage(const QVector<FileContainer> &fileContainers,
|
||||
const Utf8String ¤tEditorFilePath,
|
||||
const Utf8StringVector &visibleEditorFilePaths)
|
||||
: fileContainers_(fileContainers),
|
||||
currentEditorFilePath_(currentEditorFilePath),
|
||||
visibleEditorFilePaths_(visibleEditorFilePaths)
|
||||
: fileContainers(fileContainers),
|
||||
currentEditorFilePath(currentEditorFilePath),
|
||||
visibleEditorFilePaths(visibleEditorFilePaths)
|
||||
{
|
||||
}
|
||||
|
||||
const QVector<FileContainer> &fileContainers() const
|
||||
{
|
||||
return fileContainers_;
|
||||
}
|
||||
|
||||
const Utf8String ¤tEditorFilePath() const
|
||||
{
|
||||
return currentEditorFilePath_;
|
||||
}
|
||||
|
||||
const Utf8StringVector &visibleEditorFilePaths() const
|
||||
{
|
||||
return visibleEditorFilePaths_;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const RegisterTranslationUnitForEditorMessage &message)
|
||||
{
|
||||
out << message.fileContainers_;
|
||||
out << message.currentEditorFilePath_;
|
||||
out << message.visibleEditorFilePaths_;
|
||||
out << message.fileContainers;
|
||||
out << message.currentEditorFilePath;
|
||||
out << message.visibleEditorFilePaths;
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, RegisterTranslationUnitForEditorMessage &message)
|
||||
{
|
||||
in >> message.fileContainers_;
|
||||
in >> message.currentEditorFilePath_;
|
||||
in >> message.visibleEditorFilePaths_;
|
||||
in >> message.fileContainers;
|
||||
in >> message.currentEditorFilePath;
|
||||
in >> message.visibleEditorFilePaths;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const RegisterTranslationUnitForEditorMessage &first, const RegisterTranslationUnitForEditorMessage &second)
|
||||
{
|
||||
return first.fileContainers_ == second.fileContainers_
|
||||
&& first.currentEditorFilePath_ == second.currentEditorFilePath_
|
||||
&& first.visibleEditorFilePaths_ == second.visibleEditorFilePaths_;
|
||||
return first.fileContainers == second.fileContainers
|
||||
&& first.currentEditorFilePath == second.currentEditorFilePath
|
||||
&& first.visibleEditorFilePaths == second.visibleEditorFilePaths;
|
||||
}
|
||||
|
||||
private:
|
||||
QVector<FileContainer> fileContainers_;
|
||||
Utf8String currentEditorFilePath_;
|
||||
Utf8StringVector visibleEditorFilePaths_;
|
||||
public:
|
||||
QVector<FileContainer> fileContainers;
|
||||
Utf8String currentEditorFilePath;
|
||||
Utf8StringVector visibleEditorFilePaths;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RegisterTranslationUnitForEditorMessage &message);
|
||||
|
@@ -33,7 +33,7 @@ QDebug operator<<(QDebug debug, const UnregisterProjectPartsForEditorMessage &me
|
||||
{
|
||||
debug.nospace() << "UnregisterProjectPartsForEditorMessage(";
|
||||
|
||||
for (const Utf8String &fileNames_ : message.projectPartIds())
|
||||
for (const Utf8String &fileNames_ : message.projectPartIds)
|
||||
debug.nospace() << fileNames_ << ", ";
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
@@ -38,36 +38,31 @@ class CLANGSUPPORT_EXPORT UnregisterProjectPartsForEditorMessage
|
||||
public:
|
||||
UnregisterProjectPartsForEditorMessage() = default;
|
||||
UnregisterProjectPartsForEditorMessage(const Utf8StringVector &projectPartIds)
|
||||
: m_projectPartIds(projectPartIds)
|
||||
: projectPartIds(projectPartIds)
|
||||
{
|
||||
}
|
||||
|
||||
const Utf8StringVector &projectPartIds() const
|
||||
{
|
||||
return m_projectPartIds;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const UnregisterProjectPartsForEditorMessage &message)
|
||||
{
|
||||
out << message.m_projectPartIds;
|
||||
out << message.projectPartIds;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, UnregisterProjectPartsForEditorMessage &message)
|
||||
{
|
||||
in >> message.m_projectPartIds;
|
||||
in >> message.projectPartIds;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const UnregisterProjectPartsForEditorMessage &first, const UnregisterProjectPartsForEditorMessage &second)
|
||||
{
|
||||
return first.m_projectPartIds == second.m_projectPartIds;
|
||||
return first.projectPartIds == second.projectPartIds;
|
||||
}
|
||||
|
||||
private:
|
||||
Utf8StringVector m_projectPartIds;
|
||||
public:
|
||||
Utf8StringVector projectPartIds;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const UnregisterProjectPartsForEditorMessage &message);
|
||||
|
@@ -33,7 +33,7 @@ QDebug operator<<(QDebug debug, const UnregisterTranslationUnitsForEditorMessage
|
||||
{
|
||||
debug.nospace() << "UnregisterTranslationUnitsForEditorMessage(";
|
||||
|
||||
for (const FileContainer &fileContainer : message.fileContainers())
|
||||
for (const FileContainer &fileContainer : message.fileContainers)
|
||||
debug.nospace() << fileContainer << ", ";
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
@@ -38,36 +38,31 @@ class UnregisterTranslationUnitsForEditorMessage
|
||||
public:
|
||||
UnregisterTranslationUnitsForEditorMessage() = default;
|
||||
UnregisterTranslationUnitsForEditorMessage(const QVector<FileContainer> &fileContainers)
|
||||
: m_fileContainers(fileContainers)
|
||||
: fileContainers(fileContainers)
|
||||
{
|
||||
}
|
||||
|
||||
const QVector<FileContainer> &fileContainers() const
|
||||
{
|
||||
return m_fileContainers;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const UnregisterTranslationUnitsForEditorMessage &message)
|
||||
{
|
||||
out << message.m_fileContainers;
|
||||
out << message.fileContainers;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, UnregisterTranslationUnitsForEditorMessage &message)
|
||||
{
|
||||
in >> message.m_fileContainers;
|
||||
in >> message.fileContainers;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const UnregisterTranslationUnitsForEditorMessage &first, const UnregisterTranslationUnitsForEditorMessage &second)
|
||||
{
|
||||
return first.m_fileContainers == second.m_fileContainers;
|
||||
return first.fileContainers == second.fileContainers;
|
||||
}
|
||||
|
||||
private:
|
||||
QVector<FileContainer> m_fileContainers;
|
||||
public:
|
||||
QVector<FileContainer> fileContainers;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const UnregisterTranslationUnitsForEditorMessage &message);
|
||||
|
@@ -73,11 +73,11 @@ QDebug operator<<(QDebug debug, const CodeCompletion &message)
|
||||
{
|
||||
debug.nospace() << "CodeCompletion(";
|
||||
|
||||
debug.nospace() << message.m_text << ", ";
|
||||
debug.nospace() << message.m_priority << ", ";
|
||||
debug.nospace() << completionKindToString(message.m_completionKind) << ", ";
|
||||
debug.nospace() << availabilityToString(message.m_availability) << ", ";
|
||||
debug.nospace() << message.m_hasParameters;
|
||||
debug.nospace() << message.text << ", ";
|
||||
debug.nospace() << message.priority << ", ";
|
||||
debug.nospace() << completionKindToString(message.completionKind) << ", ";
|
||||
debug.nospace() << availabilityToString(message.availability) << ", ";
|
||||
debug.nospace() << message.hasParameters;
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
||||
|
@@ -77,93 +77,23 @@ public:
|
||||
Kind completionKind = Other,
|
||||
Availability availability = Available,
|
||||
bool hasParameters = false)
|
||||
: m_text(text),
|
||||
m_priority(priority),
|
||||
m_completionKind(completionKind),
|
||||
m_availability(availability),
|
||||
m_hasParameters(hasParameters)
|
||||
: text(text),
|
||||
priority(priority),
|
||||
completionKind(completionKind),
|
||||
availability(availability),
|
||||
hasParameters(hasParameters)
|
||||
{
|
||||
}
|
||||
|
||||
void setText(const Utf8String &text)
|
||||
{
|
||||
m_text = text;
|
||||
}
|
||||
|
||||
const Utf8String &text() const
|
||||
{
|
||||
return m_text;
|
||||
}
|
||||
|
||||
void setCompletionKind(Kind completionKind)
|
||||
{
|
||||
m_completionKind = completionKind;
|
||||
}
|
||||
|
||||
Kind completionKind() const
|
||||
{
|
||||
return m_completionKind;
|
||||
}
|
||||
|
||||
void setChunks(const CodeCompletionChunks &chunks)
|
||||
{
|
||||
m_chunks = chunks;
|
||||
}
|
||||
|
||||
const CodeCompletionChunks &chunks() const
|
||||
{
|
||||
return m_chunks;
|
||||
}
|
||||
|
||||
void setAvailability(Availability availability)
|
||||
{
|
||||
m_availability = availability;
|
||||
}
|
||||
|
||||
Availability availability() const
|
||||
{
|
||||
return m_availability;
|
||||
}
|
||||
|
||||
void setHasParameters(bool hasParameters)
|
||||
{
|
||||
m_hasParameters = hasParameters;
|
||||
}
|
||||
|
||||
bool hasParameters() const
|
||||
{
|
||||
return m_hasParameters;
|
||||
}
|
||||
|
||||
void setPriority(quint32 priority)
|
||||
{
|
||||
m_priority = priority;
|
||||
}
|
||||
|
||||
quint32 priority() const
|
||||
{
|
||||
return m_priority;
|
||||
}
|
||||
|
||||
void setBriefComment(const Utf8String &briefComment)
|
||||
{
|
||||
m_briefComment = briefComment;
|
||||
}
|
||||
|
||||
const Utf8String &briefComment() const
|
||||
{
|
||||
return m_briefComment;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const CodeCompletion &message)
|
||||
{
|
||||
out << message.m_text;
|
||||
out << message.m_briefComment;
|
||||
out << message.m_chunks;
|
||||
out << message.m_priority;
|
||||
out << static_cast<quint32>(message.m_completionKind);
|
||||
out << static_cast<quint32>(message.m_availability);
|
||||
out << message.m_hasParameters;
|
||||
out << message.text;
|
||||
out << message.briefComment;
|
||||
out << message.chunks;
|
||||
out << message.priority;
|
||||
out << static_cast<quint32>(message.completionKind);
|
||||
out << static_cast<quint32>(message.availability);
|
||||
out << message.hasParameters;
|
||||
|
||||
return out;
|
||||
}
|
||||
@@ -173,38 +103,37 @@ public:
|
||||
quint32 completionKind;
|
||||
quint32 availability;
|
||||
|
||||
in >> message.m_text;
|
||||
in >> message.m_briefComment;
|
||||
in >> message.m_chunks;
|
||||
in >> message.m_priority;
|
||||
in >> message.text;
|
||||
in >> message.briefComment;
|
||||
in >> message.chunks;
|
||||
in >> message.priority;
|
||||
in >> completionKind;
|
||||
in >> availability;
|
||||
in >> message.m_hasParameters;
|
||||
in >> message.hasParameters;
|
||||
|
||||
message.m_completionKind = static_cast<CodeCompletion::Kind>(completionKind);
|
||||
message.m_availability = static_cast<CodeCompletion::Availability>(availability);
|
||||
message.completionKind = static_cast<CodeCompletion::Kind>(completionKind);
|
||||
message.availability = static_cast<CodeCompletion::Availability>(availability);
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const CodeCompletion &first, const CodeCompletion &second)
|
||||
{
|
||||
return first.m_text == second.m_text
|
||||
&& first.m_completionKind == second.m_completionKind;
|
||||
return first.text == second.text
|
||||
&& first.completionKind == second.completionKind;
|
||||
}
|
||||
|
||||
friend CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const CodeCompletion &message);
|
||||
|
||||
private:
|
||||
Utf8String m_text;
|
||||
Utf8String m_briefComment;
|
||||
CodeCompletionChunks m_chunks;
|
||||
quint32 m_priority = 0;
|
||||
Kind m_completionKind = Other;
|
||||
Availability m_availability = NotAvailable;
|
||||
bool m_hasParameters = false;
|
||||
public:
|
||||
Utf8String text;
|
||||
Utf8String briefComment;
|
||||
CodeCompletionChunks chunks;
|
||||
quint32 priority = 0;
|
||||
Kind completionKind = Other;
|
||||
Availability availability = NotAvailable;
|
||||
bool hasParameters = false;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const CodeCompletion &message);
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, CodeCompletion::Kind kind);
|
||||
|
||||
CLANGSUPPORT_EXPORT std::ostream &operator<<(std::ostream &os, const CodeCompletion::Kind kind);
|
||||
|
@@ -64,10 +64,10 @@ static const char *completionChunkKindToString(CodeCompletionChunk::Kind kind)
|
||||
QDebug operator<<(QDebug debug, const CodeCompletionChunk &chunk)
|
||||
{
|
||||
debug.nospace() << "CodeCompletionChunk(";
|
||||
debug.nospace() << completionChunkKindToString(chunk.kind()) << ", ";
|
||||
debug.nospace() << chunk.text();
|
||||
debug.nospace() << completionChunkKindToString(chunk.kind) << ", ";
|
||||
debug.nospace() << chunk.text;
|
||||
|
||||
if (chunk.isOptional())
|
||||
if (chunk.isOptional)
|
||||
debug.nospace() << ", optional";
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
@@ -69,32 +69,17 @@ public:
|
||||
CodeCompletionChunk(Kind kind,
|
||||
const Utf8String &text,
|
||||
bool isOptional = false)
|
||||
: m_text(text),
|
||||
m_kind(kind),
|
||||
m_isOptional(isOptional)
|
||||
: text(text),
|
||||
kind(kind),
|
||||
isOptional(isOptional)
|
||||
{
|
||||
}
|
||||
|
||||
Kind kind() const
|
||||
{
|
||||
return m_kind;
|
||||
}
|
||||
|
||||
const Utf8String &text() const
|
||||
{
|
||||
return m_text;
|
||||
}
|
||||
|
||||
bool isOptional() const
|
||||
{
|
||||
return m_isOptional;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const CodeCompletionChunk &chunk)
|
||||
{
|
||||
out << static_cast<quint8>(chunk.m_kind);
|
||||
out << chunk.m_text;
|
||||
out << chunk.m_isOptional;
|
||||
out << static_cast<quint8>(chunk.kind);
|
||||
out << chunk.text;
|
||||
out << chunk.isOptional;
|
||||
|
||||
return out;
|
||||
}
|
||||
@@ -104,25 +89,25 @@ public:
|
||||
quint8 kind;
|
||||
|
||||
in >> kind;
|
||||
in >> chunk.m_text;
|
||||
in >> chunk.m_isOptional;
|
||||
in >> chunk.text;
|
||||
in >> chunk.isOptional;
|
||||
|
||||
chunk.m_kind = static_cast<CodeCompletionChunk::Kind>(kind);
|
||||
chunk.kind = static_cast<CodeCompletionChunk::Kind>(kind);
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const CodeCompletionChunk &first, const CodeCompletionChunk &second)
|
||||
{
|
||||
return first.kind() == second.kind()
|
||||
&& first.text() == second.text()
|
||||
&& first.isOptional() == second.isOptional();
|
||||
return first.kind == second.kind
|
||||
&& first.text == second.text
|
||||
&& first.isOptional == second.isOptional;
|
||||
}
|
||||
|
||||
private:
|
||||
Utf8String m_text;
|
||||
Kind m_kind = Invalid;
|
||||
bool m_isOptional = false;
|
||||
public:
|
||||
Utf8String text;
|
||||
Kind kind = Invalid;
|
||||
bool isOptional = false;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const CodeCompletionChunk &chunk);
|
||||
|
@@ -34,14 +34,14 @@ namespace ClangBackEnd {
|
||||
QDebug operator<<(QDebug debug, const DiagnosticContainer &container)
|
||||
{
|
||||
debug.nospace() << "DiagnosticContainer("
|
||||
<< container.text() << ", "
|
||||
<< container.category() << ", "
|
||||
<< container.enableOption() << ", "
|
||||
<< container.disableOption() << ", "
|
||||
<< container.location() << ", "
|
||||
<< container.ranges() << ", "
|
||||
<< container.fixIts() << ", "
|
||||
<< container.children()
|
||||
<< container.text << ", "
|
||||
<< container.category << ", "
|
||||
<< container.enableOption << ", "
|
||||
<< container.disableOption << ", "
|
||||
<< container.location << ", "
|
||||
<< container.ranges << ", "
|
||||
<< container.fixIts << ", "
|
||||
<< container.children
|
||||
<< ")";
|
||||
|
||||
return debug;
|
||||
|
@@ -47,74 +47,29 @@ public:
|
||||
const QVector<SourceRangeContainer> &ranges,
|
||||
const QVector<FixItContainer> &fixIts,
|
||||
const QVector<DiagnosticContainer> &children)
|
||||
: m_location(location),
|
||||
m_ranges(ranges),
|
||||
m_text(text),
|
||||
m_category(category),
|
||||
m_enableOption(options.first),
|
||||
m_disableOption(options.second),
|
||||
m_children(children),
|
||||
m_fixIts(fixIts),
|
||||
m_severity(severity)
|
||||
: location(location),
|
||||
ranges(ranges),
|
||||
text(text),
|
||||
category(category),
|
||||
enableOption(options.first),
|
||||
disableOption(options.second),
|
||||
children(children),
|
||||
fixIts(fixIts),
|
||||
severity(severity)
|
||||
{
|
||||
}
|
||||
|
||||
const Utf8String &text() const
|
||||
{
|
||||
return m_text;
|
||||
}
|
||||
|
||||
const Utf8String &category() const
|
||||
{
|
||||
return m_category;
|
||||
}
|
||||
|
||||
const Utf8String &enableOption() const
|
||||
{
|
||||
return m_enableOption;
|
||||
}
|
||||
|
||||
const Utf8String &disableOption() const
|
||||
{
|
||||
return m_disableOption;
|
||||
}
|
||||
|
||||
const SourceLocationContainer &location() const
|
||||
{
|
||||
return m_location;
|
||||
}
|
||||
|
||||
const QVector<SourceRangeContainer> &ranges() const
|
||||
{
|
||||
return m_ranges;
|
||||
}
|
||||
|
||||
DiagnosticSeverity severity() const
|
||||
{
|
||||
return m_severity;
|
||||
}
|
||||
|
||||
const QVector<FixItContainer> &fixIts() const
|
||||
{
|
||||
return m_fixIts;
|
||||
}
|
||||
|
||||
const QVector<DiagnosticContainer> &children() const
|
||||
{
|
||||
return m_children;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const DiagnosticContainer &container)
|
||||
{
|
||||
out << container.m_text;
|
||||
out << container.m_category;
|
||||
out << container.m_enableOption;
|
||||
out << container.m_disableOption;
|
||||
out << container.m_location;
|
||||
out << static_cast<quint32>(container.m_severity);
|
||||
out << container.m_ranges;
|
||||
out << container.m_fixIts;
|
||||
out << container.m_children;
|
||||
out << container.text;
|
||||
out << container.category;
|
||||
out << container.enableOption;
|
||||
out << container.disableOption;
|
||||
out << container.location;
|
||||
out << static_cast<quint32>(container.severity);
|
||||
out << container.ranges;
|
||||
out << container.fixIts;
|
||||
out << container.children;
|
||||
|
||||
return out;
|
||||
}
|
||||
@@ -123,25 +78,25 @@ public:
|
||||
{
|
||||
quint32 severity;
|
||||
|
||||
in >> container.m_text;
|
||||
in >> container.m_category;
|
||||
in >> container.m_enableOption;
|
||||
in >> container.m_disableOption;
|
||||
in >> container.m_location;
|
||||
in >> container.text;
|
||||
in >> container.category;
|
||||
in >> container.enableOption;
|
||||
in >> container.disableOption;
|
||||
in >> container.location;
|
||||
in >> severity;
|
||||
in >> container.m_ranges;
|
||||
in >> container.m_fixIts;
|
||||
in >> container.m_children;
|
||||
in >> container.ranges;
|
||||
in >> container.fixIts;
|
||||
in >> container.children;
|
||||
|
||||
container.m_severity = static_cast<DiagnosticSeverity>(severity);
|
||||
container.severity = static_cast<DiagnosticSeverity>(severity);
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const DiagnosticContainer &first, const DiagnosticContainer &second)
|
||||
{
|
||||
return first.m_text == second.m_text
|
||||
&& first.m_location == second.m_location;
|
||||
return first.text == second.text
|
||||
&& first.location == second.location;
|
||||
}
|
||||
|
||||
friend bool operator!=(const DiagnosticContainer &first, const DiagnosticContainer &second)
|
||||
@@ -149,16 +104,16 @@ public:
|
||||
return !(first == second);
|
||||
}
|
||||
|
||||
private:
|
||||
SourceLocationContainer m_location;
|
||||
QVector<SourceRangeContainer> m_ranges;
|
||||
Utf8String m_text;
|
||||
Utf8String m_category;
|
||||
Utf8String m_enableOption;
|
||||
Utf8String m_disableOption;
|
||||
QVector<DiagnosticContainer> m_children;
|
||||
QVector<FixItContainer> m_fixIts;
|
||||
DiagnosticSeverity m_severity = DiagnosticSeverity::Ignored;
|
||||
public:
|
||||
SourceLocationContainer location;
|
||||
QVector<SourceRangeContainer> ranges;
|
||||
Utf8String text;
|
||||
Utf8String category;
|
||||
Utf8String enableOption;
|
||||
Utf8String disableOption;
|
||||
QVector<DiagnosticContainer> children;
|
||||
QVector<FixItContainer> fixIts;
|
||||
DiagnosticSeverity severity = DiagnosticSeverity::Ignored;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const DiagnosticContainer &container);
|
||||
|
@@ -32,11 +32,11 @@ namespace ClangBackEnd {
|
||||
QDebug operator<<(QDebug debug, const DocumentAnnotationsChangedMessage &message)
|
||||
{
|
||||
debug.nospace() << "DocumentAnnotationsChangedMessage("
|
||||
<< message.fileContainer()
|
||||
<< ", " << message.diagnostics().size()
|
||||
<< ", " << !message.firstHeaderErrorDiagnostic().text().isEmpty()
|
||||
<< ", " << message.tokenInfos().size()
|
||||
<< ", " << message.skippedPreprocessorRanges().size()
|
||||
<< message.fileContainer
|
||||
<< ", " << message.diagnostics.size()
|
||||
<< ", " << !message.firstHeaderErrorDiagnostic.text.isEmpty()
|
||||
<< ", " << message.tokenInfos.size()
|
||||
<< ", " << message.skippedPreprocessorRanges.size()
|
||||
<< ")";
|
||||
|
||||
return debug;
|
||||
|
@@ -42,9 +42,9 @@ public:
|
||||
// For pure token infos update
|
||||
DocumentAnnotationsChangedMessage(const FileContainer &fileContainer,
|
||||
const QVector<TokenInfoContainer> &tokenInfos)
|
||||
: m_fileContainer(fileContainer),
|
||||
m_tokenInfos(tokenInfos),
|
||||
m_onlyTokenInfos(true)
|
||||
: fileContainer(fileContainer),
|
||||
tokenInfos(tokenInfos),
|
||||
onlyTokenInfos(true)
|
||||
{
|
||||
}
|
||||
DocumentAnnotationsChangedMessage(const FileContainer &fileContainer,
|
||||
@@ -52,68 +52,38 @@ public:
|
||||
const DiagnosticContainer &firstHeaderErrorDiagnostic,
|
||||
const QVector<TokenInfoContainer> &tokenInfos,
|
||||
const QVector<SourceRangeContainer> &skippedPreprocessorRanges)
|
||||
: m_fileContainer(fileContainer),
|
||||
m_tokenInfos(tokenInfos),
|
||||
m_diagnostics(diagnostics),
|
||||
m_firstHeaderErrorDiagnostic(firstHeaderErrorDiagnostic),
|
||||
m_skippedPreprocessorRanges(skippedPreprocessorRanges)
|
||||
: fileContainer(fileContainer),
|
||||
tokenInfos(tokenInfos),
|
||||
diagnostics(diagnostics),
|
||||
firstHeaderErrorDiagnostic(firstHeaderErrorDiagnostic),
|
||||
skippedPreprocessorRanges(skippedPreprocessorRanges)
|
||||
{
|
||||
}
|
||||
|
||||
const FileContainer &fileContainer() const
|
||||
{
|
||||
return m_fileContainer;
|
||||
}
|
||||
|
||||
const QVector<DiagnosticContainer> &diagnostics() const
|
||||
{
|
||||
return m_diagnostics;
|
||||
}
|
||||
|
||||
const DiagnosticContainer &firstHeaderErrorDiagnostic() const
|
||||
{
|
||||
return m_firstHeaderErrorDiagnostic;
|
||||
}
|
||||
|
||||
const QVector<TokenInfoContainer> &tokenInfos() const
|
||||
{
|
||||
return m_tokenInfos;
|
||||
}
|
||||
|
||||
bool onlyTokenInfos() const
|
||||
{
|
||||
return m_onlyTokenInfos;
|
||||
}
|
||||
|
||||
const QVector<SourceRangeContainer> &skippedPreprocessorRanges() const
|
||||
{
|
||||
return m_skippedPreprocessorRanges;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const DocumentAnnotationsChangedMessage &message)
|
||||
{
|
||||
out << message.m_onlyTokenInfos;
|
||||
out << message.m_fileContainer;
|
||||
out << message.m_tokenInfos;
|
||||
if (message.m_onlyTokenInfos)
|
||||
out << message.onlyTokenInfos;
|
||||
out << message.fileContainer;
|
||||
out << message.tokenInfos;
|
||||
if (message.onlyTokenInfos)
|
||||
return out;
|
||||
out << message.m_diagnostics;
|
||||
out << message.m_firstHeaderErrorDiagnostic;
|
||||
out << message.m_skippedPreprocessorRanges;
|
||||
out << message.diagnostics;
|
||||
out << message.firstHeaderErrorDiagnostic;
|
||||
out << message.skippedPreprocessorRanges;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, DocumentAnnotationsChangedMessage &message)
|
||||
{
|
||||
in >> message.m_onlyTokenInfos;
|
||||
in >> message.m_fileContainer;
|
||||
in >> message.m_tokenInfos;
|
||||
if (message.m_onlyTokenInfos)
|
||||
in >> message.onlyTokenInfos;
|
||||
in >> message.fileContainer;
|
||||
in >> message.tokenInfos;
|
||||
if (message.onlyTokenInfos)
|
||||
return in;
|
||||
in >> message.m_diagnostics;
|
||||
in >> message.m_firstHeaderErrorDiagnostic;
|
||||
in >> message.m_skippedPreprocessorRanges;
|
||||
in >> message.diagnostics;
|
||||
in >> message.firstHeaderErrorDiagnostic;
|
||||
in >> message.skippedPreprocessorRanges;
|
||||
|
||||
return in;
|
||||
}
|
||||
@@ -121,20 +91,20 @@ public:
|
||||
friend bool operator==(const DocumentAnnotationsChangedMessage &first,
|
||||
const DocumentAnnotationsChangedMessage &second)
|
||||
{
|
||||
return first.m_fileContainer == second.m_fileContainer
|
||||
&& first.m_diagnostics == second.m_diagnostics
|
||||
&& first.m_firstHeaderErrorDiagnostic == second.m_firstHeaderErrorDiagnostic
|
||||
&& first.m_tokenInfos == second.m_tokenInfos
|
||||
&& first.m_skippedPreprocessorRanges == second.m_skippedPreprocessorRanges;
|
||||
return first.fileContainer == second.fileContainer
|
||||
&& first.diagnostics == second.diagnostics
|
||||
&& first.firstHeaderErrorDiagnostic == second.firstHeaderErrorDiagnostic
|
||||
&& first.tokenInfos == second.tokenInfos
|
||||
&& first.skippedPreprocessorRanges == second.skippedPreprocessorRanges;
|
||||
}
|
||||
|
||||
private:
|
||||
FileContainer m_fileContainer;
|
||||
QVector<TokenInfoContainer> m_tokenInfos;
|
||||
QVector<DiagnosticContainer> m_diagnostics;
|
||||
DiagnosticContainer m_firstHeaderErrorDiagnostic;
|
||||
QVector<SourceRangeContainer> m_skippedPreprocessorRanges;
|
||||
bool m_onlyTokenInfos = false;
|
||||
public:
|
||||
FileContainer fileContainer;
|
||||
QVector<TokenInfoContainer> tokenInfos;
|
||||
QVector<DiagnosticContainer> diagnostics;
|
||||
DiagnosticContainer firstHeaderErrorDiagnostic;
|
||||
QVector<SourceRangeContainer> skippedPreprocessorRanges;
|
||||
bool onlyTokenInfos = false;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const DocumentAnnotationsChangedMessage &message);
|
||||
|
@@ -30,8 +30,8 @@ namespace ClangBackEnd {
|
||||
QDebug operator<<(QDebug debug, const DynamicASTMatcherDiagnosticContainer &container)
|
||||
{
|
||||
debug.nospace() << "DynamicASTMatcherDiagnosticContextContainer("
|
||||
<< container.messages() << ", "
|
||||
<< container.contexts()
|
||||
<< container.messages << ", "
|
||||
<< container.contexts
|
||||
<< ")";
|
||||
|
||||
return debug;
|
||||
|
@@ -36,45 +36,35 @@ public:
|
||||
DynamicASTMatcherDiagnosticContainer() = default;
|
||||
DynamicASTMatcherDiagnosticContainer(DynamicASTMatcherDiagnosticMessageContainers &&messages,
|
||||
DynamicASTMatcherDiagnosticContextContainers &&contexts)
|
||||
: m_messages(std::move(messages)),
|
||||
m_contexts(std::move(contexts))
|
||||
: messages(std::move(messages)),
|
||||
contexts(std::move(contexts))
|
||||
{
|
||||
}
|
||||
|
||||
const DynamicASTMatcherDiagnosticMessageContainers &messages() const
|
||||
{
|
||||
return m_messages;
|
||||
}
|
||||
|
||||
const DynamicASTMatcherDiagnosticContextContainers &contexts() const
|
||||
{
|
||||
return m_contexts;
|
||||
}
|
||||
|
||||
void insertMessage(V2::SourceRangeContainer &&sourceRange,
|
||||
ClangQueryDiagnosticErrorType errorType,
|
||||
Utils::SmallStringVector &&arguments) {
|
||||
m_messages.emplace_back(std::move(sourceRange), errorType, std::move(arguments));
|
||||
messages.emplace_back(std::move(sourceRange), errorType, std::move(arguments));
|
||||
}
|
||||
|
||||
void insertContext(V2::SourceRangeContainer &&sourceRange,
|
||||
ClangQueryDiagnosticContextType contextType,
|
||||
Utils::SmallStringVector &&arguments) {
|
||||
m_contexts.emplace_back(std::move(sourceRange), contextType, std::move(arguments));
|
||||
contexts.emplace_back(std::move(sourceRange), contextType, std::move(arguments));
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const DynamicASTMatcherDiagnosticContainer &container)
|
||||
{
|
||||
out << container.m_messages;
|
||||
out << container.m_contexts;
|
||||
out << container.messages;
|
||||
out << container.contexts;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, DynamicASTMatcherDiagnosticContainer &container)
|
||||
{
|
||||
in >> container.m_messages;
|
||||
in >> container.m_contexts;
|
||||
in >> container.messages;
|
||||
in >> container.contexts;
|
||||
|
||||
return in;
|
||||
}
|
||||
@@ -82,8 +72,8 @@ public:
|
||||
friend bool operator==(const DynamicASTMatcherDiagnosticContainer &first,
|
||||
const DynamicASTMatcherDiagnosticContainer &second)
|
||||
{
|
||||
return first.m_messages == second.m_messages
|
||||
&& first.m_contexts == second.m_contexts;
|
||||
return first.messages == second.messages
|
||||
&& first.contexts == second.contexts;
|
||||
}
|
||||
|
||||
DynamicASTMatcherDiagnosticContainer clone() const
|
||||
@@ -91,9 +81,9 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
DynamicASTMatcherDiagnosticMessageContainers m_messages;
|
||||
DynamicASTMatcherDiagnosticContextContainers m_contexts;
|
||||
public:
|
||||
DynamicASTMatcherDiagnosticMessageContainers messages;
|
||||
DynamicASTMatcherDiagnosticContextContainers contexts;
|
||||
};
|
||||
|
||||
using DynamicASTMatcherDiagnosticContainers = std::vector<DynamicASTMatcherDiagnosticContainer>;
|
||||
|
@@ -30,9 +30,9 @@ namespace ClangBackEnd {
|
||||
QDebug operator<<(QDebug debug, const DynamicASTMatcherDiagnosticContextContainer &container)
|
||||
{
|
||||
debug.nospace() << "DynamicASTMatcherDiagnosticContextContainer("
|
||||
<< container.sourceRange() << ", "
|
||||
<< container.sourceRange << ", "
|
||||
<< container.contextTypeText() << ", "
|
||||
<< container.arguments()
|
||||
<< container.arguments
|
||||
<< ")";
|
||||
|
||||
return debug;
|
||||
@@ -43,7 +43,7 @@ QDebug operator<<(QDebug debug, const DynamicASTMatcherDiagnosticContextContaine
|
||||
|
||||
Utils::SmallString DynamicASTMatcherDiagnosticContextContainer::contextTypeText() const
|
||||
{
|
||||
switch (m_contextType) {
|
||||
switch (contextType) {
|
||||
RETURN_CASE(MatcherArg)
|
||||
RETURN_CASE(MatcherConstruct)
|
||||
}
|
||||
|
@@ -39,34 +39,19 @@ public:
|
||||
DynamicASTMatcherDiagnosticContextContainer(V2::SourceRangeContainer &&sourceRange,
|
||||
ClangQueryDiagnosticContextType contextType,
|
||||
Utils::SmallStringVector &&arguments)
|
||||
: m_sourceRange(sourceRange),
|
||||
m_contextType(contextType),
|
||||
m_arguments(std::move(arguments))
|
||||
: sourceRange(sourceRange),
|
||||
contextType(contextType),
|
||||
arguments(std::move(arguments))
|
||||
{
|
||||
}
|
||||
|
||||
const V2::SourceRangeContainer &sourceRange() const
|
||||
{
|
||||
return m_sourceRange;
|
||||
}
|
||||
|
||||
ClangQueryDiagnosticContextType contextType() const
|
||||
{
|
||||
return m_contextType;
|
||||
}
|
||||
|
||||
CLANGSUPPORT_EXPORT Utils::SmallString contextTypeText() const;
|
||||
|
||||
const Utils::SmallStringVector &arguments() const
|
||||
{
|
||||
return m_arguments;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const DynamicASTMatcherDiagnosticContextContainer &container)
|
||||
{
|
||||
out << container.m_sourceRange;
|
||||
out << quint32(container.m_contextType);
|
||||
out << container.m_arguments;
|
||||
out << container.sourceRange;
|
||||
out << quint32(container.contextType);
|
||||
out << container.arguments;
|
||||
|
||||
return out;
|
||||
}
|
||||
@@ -75,11 +60,11 @@ public:
|
||||
{
|
||||
quint32 contextType;
|
||||
|
||||
in >> container.m_sourceRange;
|
||||
in >> container.sourceRange;
|
||||
in >> contextType;
|
||||
in >> container.m_arguments;
|
||||
in >> container.arguments;
|
||||
|
||||
container.m_contextType = static_cast<ClangQueryDiagnosticContextType>(contextType);
|
||||
container.contextType = static_cast<ClangQueryDiagnosticContextType>(contextType);
|
||||
|
||||
return in;
|
||||
}
|
||||
@@ -87,22 +72,22 @@ public:
|
||||
friend bool operator==(const DynamicASTMatcherDiagnosticContextContainer &first,
|
||||
const DynamicASTMatcherDiagnosticContextContainer &second)
|
||||
{
|
||||
return first.m_contextType == second.m_contextType
|
||||
&& first.m_sourceRange == second.m_sourceRange
|
||||
&& first.m_arguments == second.m_arguments;
|
||||
return first.contextType == second.contextType
|
||||
&& first.sourceRange == second.sourceRange
|
||||
&& first.arguments == second.arguments;
|
||||
}
|
||||
|
||||
DynamicASTMatcherDiagnosticContextContainer clone() const
|
||||
{
|
||||
return DynamicASTMatcherDiagnosticContextContainer(m_sourceRange.clone(),
|
||||
m_contextType,
|
||||
m_arguments.clone());
|
||||
return DynamicASTMatcherDiagnosticContextContainer(sourceRange.clone(),
|
||||
contextType,
|
||||
arguments.clone());
|
||||
}
|
||||
|
||||
private:
|
||||
V2::SourceRangeContainer m_sourceRange;
|
||||
ClangQueryDiagnosticContextType m_contextType = ClangQueryDiagnosticContextType::MatcherArg;
|
||||
Utils::SmallStringVector m_arguments;
|
||||
public:
|
||||
V2::SourceRangeContainer sourceRange;
|
||||
ClangQueryDiagnosticContextType contextType = ClangQueryDiagnosticContextType::MatcherArg;
|
||||
Utils::SmallStringVector arguments;
|
||||
};
|
||||
|
||||
using DynamicASTMatcherDiagnosticContextContainers = std::vector<DynamicASTMatcherDiagnosticContextContainer>;
|
||||
|
@@ -34,8 +34,8 @@ QDebug operator<<(QDebug debug, const DynamicASTMatcherDiagnosticMessageContaine
|
||||
{
|
||||
debug.nospace() << "DynamicASTMatcherDiagnosticMessageContainer("
|
||||
<< container.errorTypeText() << ", "
|
||||
<< container.sourceRange() << ", "
|
||||
<< container.arguments()
|
||||
<< container.sourceRange << ", "
|
||||
<< container.arguments
|
||||
<< ")";
|
||||
|
||||
return debug;
|
||||
@@ -43,7 +43,7 @@ QDebug operator<<(QDebug debug, const DynamicASTMatcherDiagnosticMessageContaine
|
||||
|
||||
Utils::SmallString DynamicASTMatcherDiagnosticMessageContainer::errorTypeText() const
|
||||
{
|
||||
switch (m_errorType) {
|
||||
switch (errorType) {
|
||||
RETURN_CASE(None)
|
||||
RETURN_CASE(RegistryMatcherNotFound)
|
||||
RETURN_CASE(RegistryWrongArgCount)
|
||||
|
@@ -39,34 +39,19 @@ public:
|
||||
DynamicASTMatcherDiagnosticMessageContainer(V2::SourceRangeContainer &&sourceRange,
|
||||
ClangQueryDiagnosticErrorType errorType,
|
||||
Utils::SmallStringVector &&arguments)
|
||||
: m_sourceRange(sourceRange),
|
||||
m_errorType(errorType),
|
||||
m_arguments(std::move(arguments))
|
||||
: sourceRange(sourceRange),
|
||||
errorType(errorType),
|
||||
arguments(std::move(arguments))
|
||||
{
|
||||
}
|
||||
|
||||
const V2::SourceRangeContainer &sourceRange() const
|
||||
{
|
||||
return m_sourceRange;
|
||||
}
|
||||
|
||||
ClangQueryDiagnosticErrorType errorType() const
|
||||
{
|
||||
return m_errorType;
|
||||
}
|
||||
|
||||
CLANGSUPPORT_EXPORT Utils::SmallString errorTypeText() const;
|
||||
|
||||
const Utils::SmallStringVector &arguments() const
|
||||
{
|
||||
return m_arguments;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const DynamicASTMatcherDiagnosticMessageContainer &container)
|
||||
{
|
||||
out << container.m_sourceRange;
|
||||
out << quint32(container.m_errorType);
|
||||
out << container.m_arguments;
|
||||
out << container.sourceRange;
|
||||
out << quint32(container.errorType);
|
||||
out << container.arguments;
|
||||
|
||||
return out;
|
||||
}
|
||||
@@ -75,11 +60,11 @@ public:
|
||||
{
|
||||
quint32 errorType;
|
||||
|
||||
in >> container.m_sourceRange;
|
||||
in >> container.sourceRange;
|
||||
in >> errorType;
|
||||
in >> container.m_arguments;
|
||||
in >> container.arguments;
|
||||
|
||||
container.m_errorType = static_cast<ClangQueryDiagnosticErrorType>(errorType);
|
||||
container.errorType = static_cast<ClangQueryDiagnosticErrorType>(errorType);
|
||||
|
||||
return in;
|
||||
}
|
||||
@@ -87,9 +72,9 @@ public:
|
||||
friend bool operator==(const DynamicASTMatcherDiagnosticMessageContainer &first,
|
||||
const DynamicASTMatcherDiagnosticMessageContainer &second)
|
||||
{
|
||||
return first.m_errorType == second.m_errorType
|
||||
&& first.m_sourceRange == second.m_sourceRange
|
||||
&& first.m_arguments == second.m_arguments;
|
||||
return first.errorType == second.errorType
|
||||
&& first.sourceRange == second.sourceRange
|
||||
&& first.arguments == second.arguments;
|
||||
}
|
||||
|
||||
DynamicASTMatcherDiagnosticMessageContainer clone() const
|
||||
@@ -97,10 +82,10 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
V2::SourceRangeContainer m_sourceRange;
|
||||
ClangQueryDiagnosticErrorType m_errorType = ClangQueryDiagnosticErrorType::None;
|
||||
Utils::SmallStringVector m_arguments;
|
||||
public:
|
||||
V2::SourceRangeContainer sourceRange;
|
||||
ClangQueryDiagnosticErrorType errorType = ClangQueryDiagnosticErrorType::None;
|
||||
Utils::SmallStringVector arguments;
|
||||
};
|
||||
|
||||
using DynamicASTMatcherDiagnosticMessageContainers = std::vector<DynamicASTMatcherDiagnosticMessageContainer>;
|
||||
|
@@ -34,15 +34,15 @@ namespace ClangBackEnd {
|
||||
QDebug operator<<(QDebug debug, const FileContainer &container)
|
||||
{
|
||||
debug.nospace() << "FileContainer("
|
||||
<< container.filePath() << ", "
|
||||
<< container.projectPartId() << ", "
|
||||
<< container.fileArguments() << ", "
|
||||
<< container.documentRevision() << ", "
|
||||
<< container.textCodecName();
|
||||
<< container.filePath << ", "
|
||||
<< container.projectPartId << ", "
|
||||
<< container.fileArguments << ", "
|
||||
<< container.documentRevision << ", "
|
||||
<< container.textCodecName;
|
||||
|
||||
if (container.hasUnsavedFileContent()) {
|
||||
if (container.hasUnsavedFileContent) {
|
||||
const Utf8String fileWithContent = debugWriteFileForInspection(
|
||||
container.unsavedFileContent(),
|
||||
container.unsavedFileContent,
|
||||
debugId(container));
|
||||
debug.nospace() << ", "
|
||||
<< "<" << fileWithContent << ">";
|
||||
|
@@ -44,12 +44,12 @@ public:
|
||||
bool hasUnsavedFileContent = false,
|
||||
quint32 documentRevision = 0,
|
||||
const Utf8String &textCodecName = Utf8String())
|
||||
: m_filePath(filePath),
|
||||
m_projectPartId(projectPartId),
|
||||
m_unsavedFileContent(unsavedFileContent),
|
||||
m_textCodecName(textCodecName),
|
||||
m_documentRevision(documentRevision),
|
||||
m_hasUnsavedFileContent(hasUnsavedFileContent)
|
||||
: filePath(filePath),
|
||||
projectPartId(projectPartId),
|
||||
unsavedFileContent(unsavedFileContent),
|
||||
textCodecName(textCodecName),
|
||||
documentRevision(documentRevision),
|
||||
hasUnsavedFileContent(hasUnsavedFileContent)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -59,12 +59,12 @@ public:
|
||||
const Utf8String &unsavedFileContent = Utf8String(),
|
||||
bool hasUnsavedFileContent = false,
|
||||
quint32 documentRevision = 0)
|
||||
: m_filePath(filePath),
|
||||
m_projectPartId(projectPartId),
|
||||
m_fileArguments(fileArguments),
|
||||
m_unsavedFileContent(unsavedFileContent),
|
||||
m_documentRevision(documentRevision),
|
||||
m_hasUnsavedFileContent(hasUnsavedFileContent)
|
||||
: filePath(filePath),
|
||||
projectPartId(projectPartId),
|
||||
fileArguments(fileArguments),
|
||||
unsavedFileContent(unsavedFileContent),
|
||||
documentRevision(documentRevision),
|
||||
hasUnsavedFileContent(hasUnsavedFileContent)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -72,88 +72,53 @@ public:
|
||||
const Utf8String &projectPartId,
|
||||
const Utf8StringVector &fileArguments,
|
||||
quint32 documentRevision)
|
||||
: m_filePath(filePath),
|
||||
m_projectPartId(projectPartId),
|
||||
m_fileArguments(fileArguments),
|
||||
m_documentRevision(documentRevision),
|
||||
m_hasUnsavedFileContent(false)
|
||||
: filePath(filePath),
|
||||
projectPartId(projectPartId),
|
||||
fileArguments(fileArguments),
|
||||
documentRevision(documentRevision),
|
||||
hasUnsavedFileContent(false)
|
||||
{
|
||||
}
|
||||
|
||||
const Utf8String &filePath() const
|
||||
{
|
||||
return m_filePath;
|
||||
}
|
||||
|
||||
const Utf8String &projectPartId() const
|
||||
{
|
||||
return m_projectPartId;
|
||||
}
|
||||
|
||||
const Utf8StringVector &fileArguments() const
|
||||
{
|
||||
return m_fileArguments;
|
||||
}
|
||||
|
||||
const Utf8String &unsavedFileContent() const
|
||||
{
|
||||
return m_unsavedFileContent;
|
||||
}
|
||||
|
||||
const Utf8String &textCodecName() const
|
||||
{
|
||||
return m_textCodecName;
|
||||
}
|
||||
|
||||
bool hasUnsavedFileContent() const
|
||||
{
|
||||
return m_hasUnsavedFileContent;
|
||||
}
|
||||
|
||||
quint32 documentRevision() const
|
||||
{
|
||||
return m_documentRevision;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const FileContainer &container)
|
||||
{
|
||||
out << container.m_filePath;
|
||||
out << container.m_projectPartId;
|
||||
out << container.m_fileArguments;
|
||||
out << container.m_unsavedFileContent;
|
||||
out << container.m_textCodecName;
|
||||
out << container.m_documentRevision;
|
||||
out << container.m_hasUnsavedFileContent;
|
||||
out << container.filePath;
|
||||
out << container.projectPartId;
|
||||
out << container.fileArguments;
|
||||
out << container.unsavedFileContent;
|
||||
out << container.textCodecName;
|
||||
out << container.documentRevision;
|
||||
out << container.hasUnsavedFileContent;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, FileContainer &container)
|
||||
{
|
||||
in >> container.m_filePath;
|
||||
in >> container.m_projectPartId;
|
||||
in >> container.m_fileArguments;
|
||||
in >> container.m_unsavedFileContent;
|
||||
in >> container.m_textCodecName;
|
||||
in >> container.m_documentRevision;
|
||||
in >> container.m_hasUnsavedFileContent;
|
||||
in >> container.filePath;
|
||||
in >> container.projectPartId;
|
||||
in >> container.fileArguments;
|
||||
in >> container.unsavedFileContent;
|
||||
in >> container.textCodecName;
|
||||
in >> container.documentRevision;
|
||||
in >> container.hasUnsavedFileContent;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const FileContainer &first, const FileContainer &second)
|
||||
{
|
||||
return first.m_filePath == second.m_filePath && first.m_projectPartId == second.m_projectPartId;
|
||||
return first.filePath == second.filePath && first.projectPartId == second.projectPartId;
|
||||
}
|
||||
|
||||
private:
|
||||
Utf8String m_filePath;
|
||||
Utf8String m_projectPartId;
|
||||
Utf8StringVector m_fileArguments;
|
||||
Utf8String m_unsavedFileContent;
|
||||
Utf8String m_textCodecName;
|
||||
quint32 m_documentRevision = 0;
|
||||
bool m_hasUnsavedFileContent = false;
|
||||
public:
|
||||
Utf8String filePath;
|
||||
Utf8String projectPartId;
|
||||
Utf8StringVector fileArguments;
|
||||
Utf8String unsavedFileContent;
|
||||
Utf8String textCodecName;
|
||||
quint32 documentRevision = 0;
|
||||
bool hasUnsavedFileContent = false;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const FileContainer &container);
|
||||
|
@@ -31,9 +31,9 @@ namespace V2 {
|
||||
QDebug operator<<(QDebug debug, const FileContainer &container)
|
||||
{
|
||||
debug.nospace() << "FileContainer("
|
||||
<< container.filePath() << ", "
|
||||
<< container.commandLineArguments() << ", "
|
||||
<< container.documentRevision();
|
||||
<< container.filePath << ", "
|
||||
<< container.commandLineArguments << ", "
|
||||
<< container.documentRevision;
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
||||
|
@@ -42,89 +42,58 @@ public:
|
||||
Utils::SmallString &&unsavedFileContent,
|
||||
Utils::SmallStringVector &&commandLineArguments,
|
||||
quint32 documentRevision = 0)
|
||||
: m_filePath(std::move(filePath)),
|
||||
m_unsavedFileContent(std::move(unsavedFileContent)),
|
||||
m_commandLineArguments(std::move(commandLineArguments)),
|
||||
m_documentRevision(documentRevision)
|
||||
: filePath(std::move(filePath)),
|
||||
unsavedFileContent(std::move(unsavedFileContent)),
|
||||
commandLineArguments(std::move(commandLineArguments)),
|
||||
documentRevision(documentRevision)
|
||||
{
|
||||
}
|
||||
|
||||
const FilePath &filePath() const
|
||||
{
|
||||
return m_filePath;
|
||||
}
|
||||
|
||||
const Utils::SmallStringVector &commandLineArguments() const
|
||||
{
|
||||
return m_commandLineArguments;
|
||||
}
|
||||
|
||||
Utils::SmallStringVector takeCommandLineArguments()
|
||||
{
|
||||
return std::move(m_commandLineArguments);
|
||||
}
|
||||
|
||||
const Utils::SmallString &unsavedFileContent() const
|
||||
{
|
||||
return m_unsavedFileContent;
|
||||
}
|
||||
|
||||
Utils::SmallString takeUnsavedFileContent()
|
||||
{
|
||||
return std::move(m_unsavedFileContent);
|
||||
}
|
||||
|
||||
quint32 documentRevision() const
|
||||
{
|
||||
return m_documentRevision;
|
||||
}
|
||||
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const FileContainer &container)
|
||||
{
|
||||
out << container.m_filePath;
|
||||
out << container.m_commandLineArguments;
|
||||
out << container.m_unsavedFileContent;
|
||||
out << container.m_documentRevision;
|
||||
out << container.filePath;
|
||||
out << container.commandLineArguments;
|
||||
out << container.unsavedFileContent;
|
||||
out << container.documentRevision;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, FileContainer &container)
|
||||
{
|
||||
in >> container.m_filePath;
|
||||
in >> container.m_commandLineArguments;
|
||||
in >> container.m_unsavedFileContent;
|
||||
in >> container.m_documentRevision;
|
||||
in >> container.filePath;
|
||||
in >> container.commandLineArguments;
|
||||
in >> container.unsavedFileContent;
|
||||
in >> container.documentRevision;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const FileContainer &first, const FileContainer &second)
|
||||
{
|
||||
return first.m_filePath == second.m_filePath
|
||||
&& first.m_commandLineArguments == second.m_commandLineArguments;
|
||||
return first.filePath == second.filePath
|
||||
&& first.commandLineArguments == second.commandLineArguments;
|
||||
}
|
||||
|
||||
friend bool operator<(const FileContainer &first, const FileContainer &second)
|
||||
{
|
||||
return std::tie(first.m_documentRevision, first.m_filePath, first.m_unsavedFileContent, first.m_commandLineArguments)
|
||||
< std::tie(second.m_documentRevision, second.m_filePath, second.m_unsavedFileContent, second.m_commandLineArguments);
|
||||
return std::tie(first.documentRevision, first.filePath, first.unsavedFileContent, first.commandLineArguments)
|
||||
< std::tie(second.documentRevision, second.filePath, second.unsavedFileContent, second.commandLineArguments);
|
||||
}
|
||||
|
||||
FileContainer clone() const
|
||||
{
|
||||
return FileContainer(m_filePath.clone(),
|
||||
m_unsavedFileContent.clone(),
|
||||
m_commandLineArguments.clone(),
|
||||
m_documentRevision);
|
||||
return FileContainer(filePath.clone(),
|
||||
unsavedFileContent.clone(),
|
||||
commandLineArguments.clone(),
|
||||
documentRevision);
|
||||
}
|
||||
|
||||
private:
|
||||
FilePath m_filePath;
|
||||
Utils::SmallString m_unsavedFileContent;
|
||||
Utils::SmallStringVector m_commandLineArguments;
|
||||
quint32 m_documentRevision = 0;
|
||||
public:
|
||||
FilePath filePath;
|
||||
Utils::SmallString unsavedFileContent;
|
||||
Utils::SmallStringVector commandLineArguments;
|
||||
quint32 documentRevision = 0;
|
||||
};
|
||||
|
||||
using FileContainers = std::vector<FileContainer>;
|
||||
|
@@ -32,8 +32,8 @@ namespace ClangBackEnd {
|
||||
QDebug operator<<(QDebug debug, const FixItContainer &container)
|
||||
{
|
||||
debug.nospace() << "FixItContainer("
|
||||
<< container.text() << ", "
|
||||
<< container.range()
|
||||
<< container.text << ", "
|
||||
<< container.range
|
||||
<< ")";
|
||||
|
||||
return debug;
|
||||
|
@@ -37,45 +37,35 @@ public:
|
||||
FixItContainer() = default;
|
||||
FixItContainer(const Utf8String &text,
|
||||
const SourceRangeContainer &range)
|
||||
: m_range(range),
|
||||
m_text(text)
|
||||
: range(range),
|
||||
text(text)
|
||||
{
|
||||
}
|
||||
|
||||
const Utf8String &text() const
|
||||
{
|
||||
return m_text;
|
||||
}
|
||||
|
||||
const SourceRangeContainer &range() const
|
||||
{
|
||||
return m_range;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const FixItContainer &container)
|
||||
{
|
||||
out << container.m_text;
|
||||
out << container.m_range;
|
||||
out << container.text;
|
||||
out << container.range;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, FixItContainer &container)
|
||||
{
|
||||
in >> container.m_text;
|
||||
in >> container.m_range;
|
||||
in >> container.text;
|
||||
in >> container.range;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const FixItContainer &first, const FixItContainer &second)
|
||||
{
|
||||
return first.m_text == second.m_text && first.m_range == second.m_range;
|
||||
return first.text == second.text && first.range == second.range;
|
||||
}
|
||||
|
||||
private:
|
||||
SourceRangeContainer m_range;
|
||||
Utf8String m_text;
|
||||
public:
|
||||
SourceRangeContainer range;
|
||||
Utf8String text;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const FixItContainer &container);
|
||||
|
@@ -32,9 +32,9 @@ namespace ClangBackEnd {
|
||||
QDebug operator<<(QDebug debug, const FollowSymbolMessage &message)
|
||||
{
|
||||
debug.nospace() << "FollowSymbolMessage("
|
||||
<< message.m_fileContainer
|
||||
<< ", " << message.m_ticketNumber
|
||||
<< ", " << message.m_sourceRange;
|
||||
<< message.fileContainer
|
||||
<< ", " << message.ticketNumber
|
||||
<< ", " << message.sourceRange;
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
||||
|
@@ -40,56 +40,43 @@ public:
|
||||
FollowSymbolMessage(const FileContainer &fileContainer,
|
||||
const SourceRangeContainer &range,
|
||||
quint64 ticketNumber)
|
||||
: m_fileContainer(fileContainer)
|
||||
, m_sourceRange(range)
|
||||
, m_ticketNumber(ticketNumber)
|
||||
: fileContainer(fileContainer)
|
||||
, sourceRange(range)
|
||||
, ticketNumber(ticketNumber)
|
||||
{
|
||||
}
|
||||
const FileContainer &fileContainer() const
|
||||
{
|
||||
return m_fileContainer;
|
||||
}
|
||||
|
||||
const SourceRangeContainer &sourceRange() const
|
||||
{
|
||||
return m_sourceRange;
|
||||
}
|
||||
|
||||
quint64 ticketNumber() const
|
||||
{
|
||||
return m_ticketNumber;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const FollowSymbolMessage &message)
|
||||
{
|
||||
out << message.m_fileContainer;
|
||||
out << message.m_sourceRange;
|
||||
out << message.m_ticketNumber;
|
||||
out << message.fileContainer;
|
||||
out << message.sourceRange;
|
||||
out << message.ticketNumber;
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, FollowSymbolMessage &message)
|
||||
{
|
||||
in >> message.m_fileContainer;
|
||||
in >> message.m_sourceRange;
|
||||
in >> message.m_ticketNumber;
|
||||
in >> message.fileContainer;
|
||||
in >> message.sourceRange;
|
||||
in >> message.ticketNumber;
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const FollowSymbolMessage &first, const FollowSymbolMessage &second)
|
||||
{
|
||||
return first.m_ticketNumber == second.m_ticketNumber
|
||||
&& first.m_fileContainer == second.m_fileContainer
|
||||
&& first.m_sourceRange == second.m_sourceRange;
|
||||
return first.ticketNumber == second.ticketNumber
|
||||
&& first.fileContainer == second.fileContainer
|
||||
&& first.sourceRange == second.sourceRange;
|
||||
}
|
||||
|
||||
friend CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const FollowSymbolMessage &message);
|
||||
private:
|
||||
FileContainer m_fileContainer;
|
||||
SourceRangeContainer m_sourceRange;
|
||||
quint64 m_ticketNumber = 0;
|
||||
public:
|
||||
FileContainer fileContainer;
|
||||
SourceRangeContainer sourceRange;
|
||||
quint64 ticketNumber = 0;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const FollowSymbolMessage &message);
|
||||
|
||||
DECLARE_MESSAGE(FollowSymbolMessage);
|
||||
|
||||
} // namespace ClangBackEnd
|
||||
|
@@ -34,29 +34,24 @@ class PrecompiledHeadersUpdatedMessage
|
||||
public:
|
||||
PrecompiledHeadersUpdatedMessage() = default;
|
||||
PrecompiledHeadersUpdatedMessage(std::vector<ProjectPartPch> &&projectPartPchs)
|
||||
: m_projectPartPchs(std::move(projectPartPchs))
|
||||
: projectPartPchs(std::move(projectPartPchs))
|
||||
{}
|
||||
|
||||
const ProjectPartPchs &projectPartPchs() const
|
||||
{
|
||||
return m_projectPartPchs;
|
||||
}
|
||||
|
||||
ProjectPartPchs takeProjectPartPchs() const
|
||||
{
|
||||
return std::move(m_projectPartPchs);
|
||||
return std::move(projectPartPchs);
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const PrecompiledHeadersUpdatedMessage &message)
|
||||
{
|
||||
out << message.m_projectPartPchs;
|
||||
out << message.projectPartPchs;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, PrecompiledHeadersUpdatedMessage &message)
|
||||
{
|
||||
in >> message.m_projectPartPchs;
|
||||
in >> message.projectPartPchs;
|
||||
|
||||
return in;
|
||||
}
|
||||
@@ -64,16 +59,16 @@ public:
|
||||
friend bool operator==(const PrecompiledHeadersUpdatedMessage &first,
|
||||
const PrecompiledHeadersUpdatedMessage &second)
|
||||
{
|
||||
return first.m_projectPartPchs == second.m_projectPartPchs;
|
||||
return first.projectPartPchs == second.projectPartPchs;
|
||||
}
|
||||
|
||||
PrecompiledHeadersUpdatedMessage clone() const
|
||||
{
|
||||
return PrecompiledHeadersUpdatedMessage(Utils::clone(m_projectPartPchs));
|
||||
return PrecompiledHeadersUpdatedMessage(Utils::clone(projectPartPchs));
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<ProjectPartPch> m_projectPartPchs;
|
||||
public:
|
||||
std::vector<ProjectPartPch> projectPartPchs;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const PrecompiledHeadersUpdatedMessage &message);
|
||||
|
@@ -31,26 +31,22 @@
|
||||
|
||||
namespace ClangBackEnd {
|
||||
|
||||
namespace {
|
||||
|
||||
Utf8String quotedArguments(const Utf8StringVector &arguments)
|
||||
static Utf8String quotedArguments(const Utf8StringVector &arguments)
|
||||
{
|
||||
const Utf8String quote = Utf8String::fromUtf8("\"");
|
||||
const Utf8String joined = arguments.join(quote + Utf8String::fromUtf8(" ") + quote);
|
||||
return quote + joined + quote;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
QDebug operator<<(QDebug debug, const ProjectPartContainer &container)
|
||||
{
|
||||
const Utf8String arguments = quotedArguments(container.arguments());
|
||||
const Utf8String arguments = quotedArguments(container.arguments);
|
||||
const Utf8String fileWithArguments = debugWriteFileForInspection(
|
||||
arguments,
|
||||
Utf8StringLiteral("projectpartargs-"));
|
||||
|
||||
debug.nospace() << "ProjectPartContainer("
|
||||
<< container.projectPartId()
|
||||
<< container.projectPartId
|
||||
<< ","
|
||||
<< "<" << fileWithArguments << ">"
|
||||
<< ")";
|
||||
|
@@ -39,45 +39,35 @@ public:
|
||||
ProjectPartContainer() = default;
|
||||
ProjectPartContainer(const Utf8String &projectPartId,
|
||||
const Utf8StringVector &arguments = Utf8StringVector())
|
||||
: m_projectPartId(projectPartId),
|
||||
m_arguments(arguments)
|
||||
: projectPartId(projectPartId),
|
||||
arguments(arguments)
|
||||
{
|
||||
}
|
||||
|
||||
const Utf8String &projectPartId() const
|
||||
{
|
||||
return m_projectPartId;
|
||||
}
|
||||
|
||||
const Utf8StringVector &arguments() const
|
||||
{
|
||||
return m_arguments;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const ProjectPartContainer &container)
|
||||
{
|
||||
out << container.m_projectPartId;
|
||||
out << container.m_arguments;
|
||||
out << container.projectPartId;
|
||||
out << container.arguments;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, ProjectPartContainer &container)
|
||||
{
|
||||
in >> container.m_projectPartId;
|
||||
in >> container.m_arguments;
|
||||
in >> container.projectPartId;
|
||||
in >> container.arguments;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const ProjectPartContainer &first, const ProjectPartContainer &second)
|
||||
{
|
||||
return first.m_projectPartId == second.m_projectPartId;
|
||||
return first.projectPartId == second.projectPartId;
|
||||
}
|
||||
|
||||
private:
|
||||
Utf8String m_projectPartId;
|
||||
Utf8StringVector m_arguments;
|
||||
public:
|
||||
Utf8String projectPartId;
|
||||
Utf8StringVector arguments;
|
||||
};
|
||||
|
||||
QDebug operator<<(QDebug debug, const ProjectPartContainer &container);
|
||||
|
@@ -31,10 +31,10 @@ namespace V2 {
|
||||
QDebug operator<<(QDebug debug, const ProjectPartContainer &container)
|
||||
{
|
||||
debug.nospace() << "ProjectPartContainer("
|
||||
<< container.projectPartId() << ","
|
||||
<< container.arguments() << ", "
|
||||
<< container.headerPathIds() << ", "
|
||||
<< container.sourcePathIds()
|
||||
<< container.projectPartId << ","
|
||||
<< container.arguments << ", "
|
||||
<< container.headerPathIds << ", "
|
||||
<< container.sourcePathIds
|
||||
<< ")";
|
||||
|
||||
return debug;
|
||||
|
@@ -45,98 +45,63 @@ public:
|
||||
Utils::SmallStringVector &&includeSearchPaths,
|
||||
FilePathIds &&headerPathIds,
|
||||
FilePathIds &&sourcePathIds)
|
||||
: m_projectPartId(std::move(projectPartId)),
|
||||
m_arguments(std::move(arguments)),
|
||||
m_compilerMacros(std::move(compilerMacros)),
|
||||
m_includeSearchPaths(std::move(includeSearchPaths)),
|
||||
m_headerPathIds(std::move(headerPathIds)),
|
||||
m_sourcePathIds(std::move(sourcePathIds))
|
||||
: projectPartId(std::move(projectPartId)),
|
||||
arguments(std::move(arguments)),
|
||||
compilerMacros(std::move(compilerMacros)),
|
||||
includeSearchPaths(std::move(includeSearchPaths)),
|
||||
headerPathIds(std::move(headerPathIds)),
|
||||
sourcePathIds(std::move(sourcePathIds))
|
||||
{
|
||||
}
|
||||
|
||||
const Utils::SmallString &projectPartId() const
|
||||
{
|
||||
return m_projectPartId;
|
||||
}
|
||||
|
||||
const Utils::SmallStringVector &arguments() const
|
||||
{
|
||||
return m_arguments;
|
||||
}
|
||||
|
||||
Utils::SmallStringVector takeArguments()
|
||||
{
|
||||
return std::move(m_arguments);
|
||||
}
|
||||
|
||||
const CompilerMacros &compilerMacros() const
|
||||
{
|
||||
return m_compilerMacros;
|
||||
}
|
||||
|
||||
const Utils::SmallStringVector &includeSearchPaths() const
|
||||
{
|
||||
return m_includeSearchPaths;
|
||||
}
|
||||
|
||||
const FilePathIds &sourcePathIds() const
|
||||
{
|
||||
return m_sourcePathIds;
|
||||
}
|
||||
|
||||
const FilePathIds &headerPathIds() const
|
||||
{
|
||||
return m_headerPathIds;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const ProjectPartContainer &container)
|
||||
{
|
||||
out << container.m_projectPartId;
|
||||
out << container.m_arguments;
|
||||
out << container.m_compilerMacros;
|
||||
out << container.m_includeSearchPaths;
|
||||
out << container.m_headerPathIds;
|
||||
out << container.m_sourcePathIds;
|
||||
out << container.projectPartId;
|
||||
out << container.arguments;
|
||||
out << container.compilerMacros;
|
||||
out << container.includeSearchPaths;
|
||||
out << container.headerPathIds;
|
||||
out << container.sourcePathIds;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, ProjectPartContainer &container)
|
||||
{
|
||||
in >> container.m_projectPartId;
|
||||
in >> container.m_arguments;
|
||||
in >> container.m_compilerMacros;
|
||||
in >> container.m_includeSearchPaths;
|
||||
in >> container.m_headerPathIds;
|
||||
in >> container.m_sourcePathIds;
|
||||
in >> container.projectPartId;
|
||||
in >> container.arguments;
|
||||
in >> container.compilerMacros;
|
||||
in >> container.includeSearchPaths;
|
||||
in >> container.headerPathIds;
|
||||
in >> container.sourcePathIds;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const ProjectPartContainer &first, const ProjectPartContainer &second)
|
||||
{
|
||||
return first.m_projectPartId == second.m_projectPartId
|
||||
&& first.m_arguments == second.m_arguments
|
||||
&& first.m_compilerMacros == second.m_compilerMacros
|
||||
&& first.m_includeSearchPaths == second.m_includeSearchPaths
|
||||
&& first.m_headerPathIds == second.m_headerPathIds
|
||||
&& first.m_sourcePathIds == second.m_sourcePathIds;
|
||||
return first.projectPartId == second.projectPartId
|
||||
&& first.arguments == second.arguments
|
||||
&& first.compilerMacros == second.compilerMacros
|
||||
&& first.includeSearchPaths == second.includeSearchPaths
|
||||
&& first.headerPathIds == second.headerPathIds
|
||||
&& first.sourcePathIds == second.sourcePathIds;
|
||||
}
|
||||
|
||||
friend bool operator<(const ProjectPartContainer &first, const ProjectPartContainer &second)
|
||||
{
|
||||
return std::tie(first.m_projectPartId,
|
||||
first.m_arguments,
|
||||
first.m_compilerMacros,
|
||||
first.m_includeSearchPaths,
|
||||
first.m_headerPathIds,
|
||||
first.m_sourcePathIds)
|
||||
< std::tie(second.m_projectPartId,
|
||||
second.m_arguments,
|
||||
second.m_compilerMacros,
|
||||
first.m_includeSearchPaths,
|
||||
second.m_headerPathIds,
|
||||
second.m_sourcePathIds);
|
||||
return std::tie(first.projectPartId,
|
||||
first.arguments,
|
||||
first.compilerMacros,
|
||||
first.includeSearchPaths,
|
||||
first.headerPathIds,
|
||||
first.sourcePathIds)
|
||||
< std::tie(second.projectPartId,
|
||||
second.arguments,
|
||||
second.compilerMacros,
|
||||
first.includeSearchPaths,
|
||||
second.headerPathIds,
|
||||
second.sourcePathIds);
|
||||
}
|
||||
|
||||
ProjectPartContainer clone() const
|
||||
@@ -144,13 +109,13 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
Utils::SmallString m_projectPartId;
|
||||
Utils::SmallStringVector m_arguments;
|
||||
CompilerMacros m_compilerMacros;
|
||||
Utils::SmallStringVector m_includeSearchPaths;
|
||||
FilePathIds m_headerPathIds;
|
||||
FilePathIds m_sourcePathIds;
|
||||
public:
|
||||
Utils::SmallString projectPartId;
|
||||
Utils::SmallStringVector arguments;
|
||||
CompilerMacros compilerMacros;
|
||||
Utils::SmallStringVector includeSearchPaths;
|
||||
FilePathIds headerPathIds;
|
||||
FilePathIds sourcePathIds;
|
||||
};
|
||||
|
||||
using ProjectPartContainers = std::vector<ProjectPartContainer>;
|
||||
|
@@ -32,10 +32,10 @@ namespace ClangBackEnd {
|
||||
QDebug operator<<(QDebug debug, const ReferencesMessage &message)
|
||||
{
|
||||
debug.nospace() << "ReferencesMessage("
|
||||
<< message.fileContainer()
|
||||
<< ", " << message.m_ticketNumber
|
||||
<< ", " << message.m_isLocalVariable
|
||||
<< ", " << message.m_references;
|
||||
<< message.fileContainer
|
||||
<< ", " << message.ticketNumber
|
||||
<< ", " << message.isLocalVariable
|
||||
<< ", " << message.references;
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
||||
|
@@ -41,69 +41,49 @@ public:
|
||||
const QVector<SourceRangeContainer> &references,
|
||||
bool isLocalVariable,
|
||||
quint64 ticketNumber)
|
||||
: m_fileContainer(fileContainer)
|
||||
, m_references(references)
|
||||
, m_ticketNumber(ticketNumber)
|
||||
, m_isLocalVariable(isLocalVariable)
|
||||
: fileContainer(fileContainer)
|
||||
, references(references)
|
||||
, ticketNumber(ticketNumber)
|
||||
, isLocalVariable(isLocalVariable)
|
||||
{
|
||||
}
|
||||
|
||||
const FileContainer &fileContainer() const
|
||||
{
|
||||
return m_fileContainer;
|
||||
}
|
||||
|
||||
bool isLocalVariable() const
|
||||
{
|
||||
return m_isLocalVariable;
|
||||
}
|
||||
|
||||
const QVector<SourceRangeContainer> &references() const
|
||||
{
|
||||
return m_references;
|
||||
}
|
||||
|
||||
quint64 ticketNumber() const
|
||||
{
|
||||
return m_ticketNumber;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const ReferencesMessage &message)
|
||||
{
|
||||
out << message.m_fileContainer;
|
||||
out << message.m_isLocalVariable;
|
||||
out << message.m_references;
|
||||
out << message.m_ticketNumber;
|
||||
out << message.fileContainer;
|
||||
out << message.isLocalVariable;
|
||||
out << message.references;
|
||||
out << message.ticketNumber;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, ReferencesMessage &message)
|
||||
{
|
||||
in >> message.m_fileContainer;
|
||||
in >> message.m_isLocalVariable;
|
||||
in >> message.m_references;
|
||||
in >> message.m_ticketNumber;
|
||||
in >> message.fileContainer;
|
||||
in >> message.isLocalVariable;
|
||||
in >> message.references;
|
||||
in >> message.ticketNumber;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const ReferencesMessage &first, const ReferencesMessage &second)
|
||||
{
|
||||
return first.m_ticketNumber == second.m_ticketNumber
|
||||
&& first.m_isLocalVariable == second.m_isLocalVariable
|
||||
&& first.m_fileContainer == second.m_fileContainer
|
||||
&& first.m_references == second.m_references;
|
||||
return first.ticketNumber == second.ticketNumber
|
||||
&& first.isLocalVariable == second.isLocalVariable
|
||||
&& first.fileContainer == second.fileContainer
|
||||
&& first.references == second.references;
|
||||
}
|
||||
|
||||
friend CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const ReferencesMessage &message);
|
||||
|
||||
private:
|
||||
FileContainer m_fileContainer;
|
||||
QVector<SourceRangeContainer> m_references;
|
||||
quint64 m_ticketNumber = 0;
|
||||
bool m_isLocalVariable = false;
|
||||
public:
|
||||
FileContainer fileContainer;
|
||||
QVector<SourceRangeContainer> references;
|
||||
quint64 ticketNumber = 0;
|
||||
bool isLocalVariable = false;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const ReferencesMessage &message);
|
||||
|
||||
DECLARE_MESSAGE(ReferencesMessage)
|
||||
} // namespace ClangBackEnd
|
||||
|
@@ -33,7 +33,7 @@ QDebug operator<<(QDebug debug, const RegisterUnsavedFilesForEditorMessage &mess
|
||||
{
|
||||
debug.nospace() << "RegisterUnsavedFilesForEditorMessage(";
|
||||
|
||||
for (const FileContainer &fileContainer : message.fileContainers())
|
||||
for (const FileContainer &fileContainer : message.fileContainers)
|
||||
debug.nospace() << fileContainer<< ", ";
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
@@ -36,36 +36,31 @@ class RegisterUnsavedFilesForEditorMessage
|
||||
public:
|
||||
RegisterUnsavedFilesForEditorMessage() = default;
|
||||
RegisterUnsavedFilesForEditorMessage(const QVector<FileContainer> &fileContainers)
|
||||
: m_fileContainers(fileContainers)
|
||||
: fileContainers(fileContainers)
|
||||
{
|
||||
}
|
||||
|
||||
const QVector<FileContainer> &fileContainers() const
|
||||
{
|
||||
return m_fileContainers;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const RegisterUnsavedFilesForEditorMessage &message)
|
||||
{
|
||||
out << message.m_fileContainers;
|
||||
out << message.fileContainers;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, RegisterUnsavedFilesForEditorMessage &message)
|
||||
{
|
||||
in >> message.m_fileContainers;
|
||||
in >> message.fileContainers;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const RegisterUnsavedFilesForEditorMessage &first, const RegisterUnsavedFilesForEditorMessage &second)
|
||||
{
|
||||
return first.m_fileContainers == second.m_fileContainers;
|
||||
return first.fileContainers == second.fileContainers;
|
||||
}
|
||||
|
||||
private:
|
||||
QVector<FileContainer> m_fileContainers;
|
||||
public:
|
||||
QVector<FileContainer> fileContainers;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RegisterUnsavedFilesForEditorMessage &message);
|
||||
|
@@ -30,7 +30,7 @@ namespace ClangBackEnd {
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RemoveProjectPartsMessage &message)
|
||||
{
|
||||
debug.nospace() << "RemoveProjectPartsMessage("
|
||||
<< message.projectsPartIds() << ")";
|
||||
<< message.projectsPartIds << ")";
|
||||
|
||||
return debug;
|
||||
}
|
||||
|
@@ -34,29 +34,24 @@ class RemoveProjectPartsMessage
|
||||
public:
|
||||
RemoveProjectPartsMessage() = default;
|
||||
RemoveProjectPartsMessage(Utils::SmallStringVector &&projectsPartIds)
|
||||
: m_projectsPartIds(std::move(projectsPartIds))
|
||||
: projectsPartIds(std::move(projectsPartIds))
|
||||
{}
|
||||
|
||||
const Utils::SmallStringVector &projectsPartIds() const
|
||||
{
|
||||
return m_projectsPartIds;
|
||||
}
|
||||
|
||||
Utils::SmallStringVector takeProjectsPartIds()
|
||||
{
|
||||
return std::move(m_projectsPartIds);
|
||||
return std::move(projectsPartIds);
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const RemoveProjectPartsMessage &message)
|
||||
{
|
||||
out << message.m_projectsPartIds;
|
||||
out << message.projectsPartIds;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, RemoveProjectPartsMessage &message)
|
||||
{
|
||||
in >> message.m_projectsPartIds;
|
||||
in >> message.projectsPartIds;
|
||||
|
||||
return in;
|
||||
}
|
||||
@@ -64,16 +59,16 @@ public:
|
||||
friend bool operator==(const RemoveProjectPartsMessage &first,
|
||||
const RemoveProjectPartsMessage &second)
|
||||
{
|
||||
return first.m_projectsPartIds == second.m_projectsPartIds;
|
||||
return first.projectsPartIds == second.projectsPartIds;
|
||||
}
|
||||
|
||||
RemoveProjectPartsMessage clone() const
|
||||
{
|
||||
return RemoveProjectPartsMessage(m_projectsPartIds.clone());
|
||||
return RemoveProjectPartsMessage(projectsPartIds.clone());
|
||||
}
|
||||
|
||||
private:
|
||||
Utils::SmallStringVector m_projectsPartIds;
|
||||
public:
|
||||
Utils::SmallStringVector projectsPartIds;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RemoveProjectPartsMessage &message);
|
||||
|
@@ -32,7 +32,7 @@ namespace ClangBackEnd {
|
||||
QDebug operator<<(QDebug debug, const RequestDocumentAnnotationsMessage &message)
|
||||
{
|
||||
debug.nospace() << "RequestDocumentAnnotationsMessage("
|
||||
<< message.fileContainer()
|
||||
<< message.fileContainer
|
||||
<< ")";
|
||||
|
||||
return debug;
|
||||
|
@@ -34,36 +34,31 @@ class RequestDocumentAnnotationsMessage
|
||||
public:
|
||||
RequestDocumentAnnotationsMessage() = default;
|
||||
RequestDocumentAnnotationsMessage(const FileContainer &fileContainer)
|
||||
: m_fileContainer(fileContainer)
|
||||
: fileContainer(fileContainer)
|
||||
{
|
||||
}
|
||||
|
||||
const FileContainer fileContainer() const
|
||||
{
|
||||
return m_fileContainer;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const RequestDocumentAnnotationsMessage &message)
|
||||
{
|
||||
out << message.m_fileContainer;
|
||||
out << message.fileContainer;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, RequestDocumentAnnotationsMessage &message)
|
||||
{
|
||||
in >> message.m_fileContainer;
|
||||
in >> message.fileContainer;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const RequestDocumentAnnotationsMessage &first, const RequestDocumentAnnotationsMessage &second)
|
||||
{
|
||||
return first.m_fileContainer == second.m_fileContainer;
|
||||
return first.fileContainer == second.fileContainer;
|
||||
}
|
||||
|
||||
private:
|
||||
FileContainer m_fileContainer;
|
||||
public:
|
||||
FileContainer fileContainer;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RequestDocumentAnnotationsMessage &message);
|
||||
|
@@ -35,10 +35,10 @@ QDebug operator<<(QDebug debug, const RequestFollowSymbolMessage &message)
|
||||
{
|
||||
debug.nospace() << "RequestFollowSymbolMessage(";
|
||||
|
||||
debug.nospace() << message.m_fileContainer << ", ";
|
||||
debug.nospace() << message.m_ticketNumber << ", ";
|
||||
debug.nospace() << message.m_line << ", ";
|
||||
debug.nospace() << message.m_column << ", ";
|
||||
debug.nospace() << message.fileContainer << ", ";
|
||||
debug.nospace() << message.ticketNumber << ", ";
|
||||
debug.nospace() << message.line << ", ";
|
||||
debug.nospace() << message.column << ", ";
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
||||
|
@@ -40,49 +40,29 @@ public:
|
||||
RequestFollowSymbolMessage(const FileContainer &fileContainer,
|
||||
quint32 line,
|
||||
quint32 column)
|
||||
: m_fileContainer(fileContainer)
|
||||
, m_ticketNumber(++ticketCounter)
|
||||
, m_line(line)
|
||||
, m_column(column)
|
||||
: fileContainer(fileContainer)
|
||||
, ticketNumber(++ticketCounter)
|
||||
, line(line)
|
||||
, column(column)
|
||||
{
|
||||
}
|
||||
|
||||
const FileContainer &fileContainer() const
|
||||
{
|
||||
return m_fileContainer;
|
||||
}
|
||||
|
||||
quint32 line() const
|
||||
{
|
||||
return m_line;
|
||||
}
|
||||
|
||||
quint32 column() const
|
||||
{
|
||||
return m_column;
|
||||
}
|
||||
|
||||
quint64 ticketNumber() const
|
||||
{
|
||||
return m_ticketNumber;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const RequestFollowSymbolMessage &message)
|
||||
{
|
||||
out << message.m_fileContainer;
|
||||
out << message.m_ticketNumber;
|
||||
out << message.m_line;
|
||||
out << message.m_column;
|
||||
out << message.fileContainer;
|
||||
out << message.ticketNumber;
|
||||
out << message.line;
|
||||
out << message.column;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, RequestFollowSymbolMessage &message)
|
||||
{
|
||||
in >> message.m_fileContainer;
|
||||
in >> message.m_ticketNumber;
|
||||
in >> message.m_line;
|
||||
in >> message.m_column;
|
||||
in >> message.fileContainer;
|
||||
in >> message.ticketNumber;
|
||||
in >> message.line;
|
||||
in >> message.column;
|
||||
|
||||
return in;
|
||||
}
|
||||
@@ -90,20 +70,21 @@ public:
|
||||
friend bool operator==(const RequestFollowSymbolMessage &first,
|
||||
const RequestFollowSymbolMessage &second)
|
||||
{
|
||||
return first.m_ticketNumber == second.m_ticketNumber
|
||||
&& first.m_line == second.m_line
|
||||
&& first.m_column == second.m_column
|
||||
&& first.m_fileContainer == second.m_fileContainer;
|
||||
return first.ticketNumber == second.ticketNumber
|
||||
&& first.line == second.line
|
||||
&& first.column == second.column
|
||||
&& first.fileContainer == second.fileContainer;
|
||||
}
|
||||
|
||||
friend CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RequestFollowSymbolMessage &message);
|
||||
private:
|
||||
FileContainer m_fileContainer;
|
||||
quint64 m_ticketNumber = 0;
|
||||
quint32 m_line = 0;
|
||||
quint32 m_column = 0;
|
||||
public:
|
||||
FileContainer fileContainer;
|
||||
quint64 ticketNumber = 0;
|
||||
quint32 line = 0;
|
||||
quint32 column = 0;
|
||||
static CLANGSUPPORT_EXPORT quint64 ticketCounter;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RequestFollowSymbolMessage &message);
|
||||
|
||||
DECLARE_MESSAGE(RequestFollowSymbolMessage);
|
||||
} // namespace ClangBackEnd
|
||||
|
@@ -35,11 +35,11 @@ QDebug operator<<(QDebug debug, const RequestReferencesMessage &message)
|
||||
{
|
||||
debug.nospace() << "RequestReferencesMessage(";
|
||||
|
||||
debug.nospace() << message.m_fileContainer << ", ";
|
||||
debug.nospace() << message.m_ticketNumber << ", ";
|
||||
debug.nospace() << message.m_line << ", ";
|
||||
debug.nospace() << message.m_column << ", ";
|
||||
debug.nospace() << message.m_local << ", ";
|
||||
debug.nospace() << message.fileContainer << ", ";
|
||||
debug.nospace() << message.ticketNumber << ", ";
|
||||
debug.nospace() << message.line << ", ";
|
||||
debug.nospace() << message.column << ", ";
|
||||
debug.nospace() << message.local << ", ";
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
||||
|
@@ -41,57 +41,32 @@ public:
|
||||
quint32 line,
|
||||
quint32 column,
|
||||
bool local = false)
|
||||
: m_fileContainer(fileContainer)
|
||||
, m_ticketNumber(++ticketCounter)
|
||||
, m_line(line)
|
||||
, m_column(column)
|
||||
, m_local(local)
|
||||
: fileContainer(fileContainer)
|
||||
, ticketNumber(++ticketCounter)
|
||||
, line(line)
|
||||
, column(column)
|
||||
, local(local)
|
||||
{
|
||||
}
|
||||
|
||||
const FileContainer fileContainer() const
|
||||
{
|
||||
return m_fileContainer;
|
||||
}
|
||||
|
||||
quint32 line() const
|
||||
{
|
||||
return m_line;
|
||||
}
|
||||
|
||||
quint32 column() const
|
||||
{
|
||||
return m_column;
|
||||
}
|
||||
|
||||
quint64 ticketNumber() const
|
||||
{
|
||||
return m_ticketNumber;
|
||||
}
|
||||
|
||||
bool local() const
|
||||
{
|
||||
return m_local;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const RequestReferencesMessage &message)
|
||||
{
|
||||
out << message.m_fileContainer;
|
||||
out << message.m_ticketNumber;
|
||||
out << message.m_line;
|
||||
out << message.m_column;
|
||||
out << message.m_local;
|
||||
out << message.fileContainer;
|
||||
out << message.ticketNumber;
|
||||
out << message.line;
|
||||
out << message.column;
|
||||
out << message.local;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, RequestReferencesMessage &message)
|
||||
{
|
||||
in >> message.m_fileContainer;
|
||||
in >> message.m_ticketNumber;
|
||||
in >> message.m_line;
|
||||
in >> message.m_column;
|
||||
in >> message.m_local;
|
||||
in >> message.fileContainer;
|
||||
in >> message.ticketNumber;
|
||||
in >> message.line;
|
||||
in >> message.column;
|
||||
in >> message.local;
|
||||
|
||||
return in;
|
||||
}
|
||||
@@ -99,23 +74,23 @@ public:
|
||||
friend bool operator==(const RequestReferencesMessage &first,
|
||||
const RequestReferencesMessage &second)
|
||||
{
|
||||
return first.m_ticketNumber == second.m_ticketNumber
|
||||
&& first.m_line == second.m_line
|
||||
&& first.m_column == second.m_column
|
||||
&& first.m_fileContainer == second.m_fileContainer
|
||||
&& first.m_local == second.m_local;
|
||||
return first.ticketNumber == second.ticketNumber
|
||||
&& first.line == second.line
|
||||
&& first.column == second.column
|
||||
&& first.fileContainer == second.fileContainer
|
||||
&& first.local == second.local;
|
||||
}
|
||||
|
||||
friend CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RequestReferencesMessage &message);
|
||||
|
||||
private:
|
||||
FileContainer m_fileContainer;
|
||||
quint64 m_ticketNumber = 0;
|
||||
quint32 m_line = 0;
|
||||
quint32 m_column = 0;
|
||||
bool m_local = false;
|
||||
public:
|
||||
FileContainer fileContainer;
|
||||
quint64 ticketNumber = 0;
|
||||
quint32 line = 0;
|
||||
quint32 column = 0;
|
||||
bool local = false;
|
||||
static CLANGSUPPORT_EXPORT quint64 ticketCounter;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RequestReferencesMessage &message);
|
||||
|
||||
DECLARE_MESSAGE(RequestReferencesMessage);
|
||||
} // namespace ClangBackEnd
|
||||
|
@@ -30,10 +30,10 @@ namespace ClangBackEnd {
|
||||
QDebug operator<<(QDebug debug, const RequestSourceLocationsForRenamingMessage &message)
|
||||
{
|
||||
debug.nospace() << "RequestSourceLocationsForRenamingMessage("
|
||||
<< message.filePath() << ", "
|
||||
<< message.line() << ", "
|
||||
<< message.column() << ", "
|
||||
<< message.unsavedContent() << ")";
|
||||
<< message.filePath << ", "
|
||||
<< message.line << ", "
|
||||
<< message.column << ", "
|
||||
<< message.unsavedContent << ")";
|
||||
|
||||
return debug;
|
||||
}
|
||||
|
@@ -42,94 +42,64 @@ public:
|
||||
Utils::SmallString &&unsavedContent,
|
||||
Utils::SmallStringVector &&commandLine,
|
||||
int textDocumentRevision)
|
||||
: m_filePath(std::move(filePath)),
|
||||
m_unsavedContent(std::move(unsavedContent)),
|
||||
m_commandLine(std::move(commandLine)),
|
||||
m_line(line),
|
||||
m_column(column),
|
||||
m_revision(textDocumentRevision)
|
||||
: filePath(std::move(filePath)),
|
||||
unsavedContent(std::move(unsavedContent)),
|
||||
commandLine(std::move(commandLine)),
|
||||
line(line),
|
||||
column(column),
|
||||
textDocumentRevision(textDocumentRevision)
|
||||
{}
|
||||
|
||||
const FilePath &filePath() const
|
||||
{
|
||||
return m_filePath;
|
||||
}
|
||||
|
||||
uint line() const
|
||||
{
|
||||
return m_line;
|
||||
}
|
||||
|
||||
uint column() const
|
||||
{
|
||||
return m_column;
|
||||
}
|
||||
|
||||
const Utils::SmallString &unsavedContent() const
|
||||
{
|
||||
return m_unsavedContent;
|
||||
}
|
||||
|
||||
const Utils::SmallStringVector &commandLine() const
|
||||
{
|
||||
return m_commandLine;
|
||||
}
|
||||
|
||||
int textDocumentRevision() const
|
||||
{
|
||||
return m_revision;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const RequestSourceLocationsForRenamingMessage &message)
|
||||
{
|
||||
out << message.m_filePath;
|
||||
out << message.m_unsavedContent;
|
||||
out << message.m_commandLine;
|
||||
out << message.m_line;
|
||||
out << message.m_column;
|
||||
out << message.m_revision;
|
||||
out << message.filePath;
|
||||
out << message.unsavedContent;
|
||||
out << message.commandLine;
|
||||
out << message.line;
|
||||
out << message.column;
|
||||
out << message.textDocumentRevision;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, RequestSourceLocationsForRenamingMessage &message)
|
||||
{
|
||||
in >> message.m_filePath;
|
||||
in >> message.m_unsavedContent;
|
||||
in >> message.m_commandLine;
|
||||
in >> message.m_line;
|
||||
in >> message.m_column;
|
||||
in >> message.m_revision;
|
||||
in >> message.filePath;
|
||||
in >> message.unsavedContent;
|
||||
in >> message.commandLine;
|
||||
in >> message.line;
|
||||
in >> message.column;
|
||||
in >> message.textDocumentRevision;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const RequestSourceLocationsForRenamingMessage &first, const RequestSourceLocationsForRenamingMessage &second)
|
||||
{
|
||||
return first.m_filePath == second.m_filePath
|
||||
&& first.m_line == second.m_line
|
||||
&& first.m_column == second.m_column
|
||||
&& first.m_revision == second.m_revision
|
||||
&& first.m_unsavedContent == second.m_unsavedContent
|
||||
&& first.m_commandLine == second.m_commandLine;
|
||||
return first.filePath == second.filePath
|
||||
&& first.line == second.line
|
||||
&& first.column == second.column
|
||||
&& first.textDocumentRevision == second.textDocumentRevision
|
||||
&& first.unsavedContent == second.unsavedContent
|
||||
&& first.commandLine == second.commandLine;
|
||||
}
|
||||
|
||||
RequestSourceLocationsForRenamingMessage clone() const
|
||||
{
|
||||
return RequestSourceLocationsForRenamingMessage(m_filePath.clone(),
|
||||
m_line, m_column,
|
||||
m_unsavedContent.clone(),
|
||||
m_commandLine.clone(),
|
||||
m_revision);
|
||||
return RequestSourceLocationsForRenamingMessage(filePath.clone(),
|
||||
line, column,
|
||||
unsavedContent.clone(),
|
||||
commandLine.clone(),
|
||||
textDocumentRevision);
|
||||
}
|
||||
|
||||
private:
|
||||
FilePath m_filePath;
|
||||
Utils::SmallString m_unsavedContent;
|
||||
Utils::SmallStringVector m_commandLine;
|
||||
uint m_line = 1;
|
||||
uint m_column = 1;
|
||||
int m_revision = 1;
|
||||
public:
|
||||
FilePath filePath;
|
||||
Utils::SmallString unsavedContent;
|
||||
Utils::SmallStringVector commandLine;
|
||||
uint line = 1;
|
||||
uint column = 1;
|
||||
int textDocumentRevision = 1;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RequestSourceLocationsForRenamingMessage &message);
|
||||
|
@@ -30,8 +30,8 @@ namespace ClangBackEnd {
|
||||
QDebug operator<<(QDebug debug, const RequestSourceRangesAndDiagnosticsForQueryMessage &message)
|
||||
{
|
||||
debug.nospace() << "RequestSourceRangesAndDiagnosticsForQuery("
|
||||
<< message.query() << ", "
|
||||
<< message.source() << ")";
|
||||
<< message.query << ", "
|
||||
<< message.source << ")";
|
||||
|
||||
return debug;
|
||||
}
|
||||
|
@@ -35,43 +35,33 @@ public:
|
||||
RequestSourceRangesAndDiagnosticsForQueryMessage() = default;
|
||||
RequestSourceRangesAndDiagnosticsForQueryMessage(Utils::SmallString &&query,
|
||||
V2::FileContainer &&source)
|
||||
: m_query(std::move(query)),
|
||||
m_source(std::move(source))
|
||||
: query(std::move(query)),
|
||||
source(std::move(source))
|
||||
|
||||
{}
|
||||
|
||||
const V2::FileContainer &source() const
|
||||
{
|
||||
return m_source;
|
||||
}
|
||||
|
||||
V2::FileContainer takeSource()
|
||||
{
|
||||
return std::move(m_source);
|
||||
}
|
||||
|
||||
const Utils::SmallString &query() const
|
||||
{
|
||||
return m_query;
|
||||
return std::move(source);
|
||||
}
|
||||
|
||||
Utils::SmallString takeQuery()
|
||||
{
|
||||
return std::move(m_query);
|
||||
return std::move(query);
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const RequestSourceRangesAndDiagnosticsForQueryMessage &message)
|
||||
{
|
||||
out << message.m_query;
|
||||
out << message.m_source;
|
||||
out << message.query;
|
||||
out << message.source;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, RequestSourceRangesAndDiagnosticsForQueryMessage &message)
|
||||
{
|
||||
in >> message.m_query;
|
||||
in >> message.m_source;
|
||||
in >> message.query;
|
||||
in >> message.source;
|
||||
|
||||
return in;
|
||||
}
|
||||
@@ -79,8 +69,8 @@ public:
|
||||
friend bool operator==(const RequestSourceRangesAndDiagnosticsForQueryMessage &first,
|
||||
const RequestSourceRangesAndDiagnosticsForQueryMessage &second)
|
||||
{
|
||||
return first.m_query == second.m_query
|
||||
&& first.m_source == second.m_source;
|
||||
return first.query == second.query
|
||||
&& first.source == second.source;
|
||||
}
|
||||
|
||||
RequestSourceRangesAndDiagnosticsForQueryMessage clone() const
|
||||
@@ -88,9 +78,9 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
Utils::SmallString m_query;
|
||||
V2::FileContainer m_source;
|
||||
public:
|
||||
Utils::SmallString query;
|
||||
V2::FileContainer source;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RequestSourceRangesAndDiagnosticsForQueryMessage &message);
|
||||
|
@@ -30,7 +30,7 @@ namespace ClangBackEnd {
|
||||
QDebug operator<<(QDebug debug, const RequestSourceRangesForQueryMessage &message)
|
||||
{
|
||||
debug.nospace() << "RequestSourceRangesForQueryMessage("
|
||||
<< message.query() << ")";
|
||||
<< message.query << ")";
|
||||
|
||||
return debug;
|
||||
}
|
||||
|
@@ -36,56 +36,41 @@ public:
|
||||
RequestSourceRangesForQueryMessage(Utils::SmallString &&query,
|
||||
std::vector<V2::FileContainer> &&sources,
|
||||
std::vector<V2::FileContainer> &&unsavedContent)
|
||||
: m_query(std::move(query)),
|
||||
m_sources(std::move(sources)),
|
||||
m_unsavedContent(std::move(unsavedContent))
|
||||
: query(std::move(query)),
|
||||
sources(std::move(sources)),
|
||||
unsavedContent(std::move(unsavedContent))
|
||||
|
||||
{}
|
||||
|
||||
const std::vector<V2::FileContainer> &sources() const
|
||||
{
|
||||
return m_sources;
|
||||
}
|
||||
|
||||
std::vector<V2::FileContainer> takeSources()
|
||||
{
|
||||
return std::move(m_sources);
|
||||
}
|
||||
|
||||
const std::vector<V2::FileContainer> &unsavedContent() const
|
||||
{
|
||||
return m_unsavedContent;
|
||||
return std::move(sources);
|
||||
}
|
||||
|
||||
std::vector<V2::FileContainer> takeUnsavedContent()
|
||||
{
|
||||
return std::move(m_unsavedContent);
|
||||
}
|
||||
|
||||
const Utils::SmallString &query() const
|
||||
{
|
||||
return m_query;
|
||||
return std::move(unsavedContent);
|
||||
}
|
||||
|
||||
Utils::SmallString takeQuery()
|
||||
{
|
||||
return std::move(m_query);
|
||||
return std::move(query);
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const RequestSourceRangesForQueryMessage &message)
|
||||
{
|
||||
out << message.m_query;
|
||||
out << message.m_sources;
|
||||
out << message.m_unsavedContent;
|
||||
out << message.query;
|
||||
out << message.sources;
|
||||
out << message.unsavedContent;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, RequestSourceRangesForQueryMessage &message)
|
||||
{
|
||||
in >> message.m_query;
|
||||
in >> message.m_sources;
|
||||
in >> message.m_unsavedContent;
|
||||
in >> message.query;
|
||||
in >> message.sources;
|
||||
in >> message.unsavedContent;
|
||||
|
||||
return in;
|
||||
}
|
||||
@@ -93,9 +78,9 @@ public:
|
||||
friend bool operator==(const RequestSourceRangesForQueryMessage &first,
|
||||
const RequestSourceRangesForQueryMessage &second)
|
||||
{
|
||||
return first.m_query == second.m_query
|
||||
&& first.m_sources == second.m_sources
|
||||
&& first.m_unsavedContent == second.m_unsavedContent;
|
||||
return first.query == second.query
|
||||
&& first.sources == second.sources
|
||||
&& first.unsavedContent == second.unsavedContent;
|
||||
}
|
||||
|
||||
RequestSourceRangesForQueryMessage clone() const
|
||||
@@ -103,10 +88,10 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
Utils::SmallString m_query;
|
||||
std::vector<V2::FileContainer> m_sources;
|
||||
std::vector<V2::FileContainer> m_unsavedContent;
|
||||
public:
|
||||
Utils::SmallString query;
|
||||
std::vector<V2::FileContainer> sources;
|
||||
std::vector<V2::FileContainer> unsavedContent;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -35,10 +35,10 @@ QDebug operator<<(QDebug debug, const RequestToolTipMessage &message)
|
||||
{
|
||||
debug.nospace() << "RequestToolTipMessage(";
|
||||
|
||||
debug.nospace() << message.m_fileContainer << ", ";
|
||||
debug.nospace() << message.m_ticketNumber << ", ";
|
||||
debug.nospace() << message.m_line << ", ";
|
||||
debug.nospace() << message.m_column << ", ";
|
||||
debug.nospace() << message.fileContainer << ", ";
|
||||
debug.nospace() << message.ticketNumber << ", ";
|
||||
debug.nospace() << message.line << ", ";
|
||||
debug.nospace() << message.column << ", ";
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
||||
|
@@ -39,34 +39,29 @@ class RequestToolTipMessage
|
||||
public:
|
||||
RequestToolTipMessage() = default;
|
||||
RequestToolTipMessage(const FileContainer &fileContainer, quint32 line, quint32 column)
|
||||
: m_fileContainer(fileContainer)
|
||||
, m_ticketNumber(++ticketCounter)
|
||||
, m_line(line)
|
||||
, m_column(column)
|
||||
: fileContainer(fileContainer)
|
||||
, ticketNumber(++ticketCounter)
|
||||
, line(line)
|
||||
, column(column)
|
||||
{
|
||||
}
|
||||
|
||||
const FileContainer fileContainer() const { return m_fileContainer; }
|
||||
quint32 line() const { return m_line; }
|
||||
quint32 column() const { return m_column; }
|
||||
quint64 ticketNumber() const { return m_ticketNumber; }
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const RequestToolTipMessage &message)
|
||||
{
|
||||
out << message.m_fileContainer;
|
||||
out << message.m_ticketNumber;
|
||||
out << message.m_line;
|
||||
out << message.m_column;
|
||||
out << message.fileContainer;
|
||||
out << message.ticketNumber;
|
||||
out << message.line;
|
||||
out << message.column;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, RequestToolTipMessage &message)
|
||||
{
|
||||
in >> message.m_fileContainer;
|
||||
in >> message.m_ticketNumber;
|
||||
in >> message.m_line;
|
||||
in >> message.m_column;
|
||||
in >> message.fileContainer;
|
||||
in >> message.ticketNumber;
|
||||
in >> message.line;
|
||||
in >> message.column;
|
||||
|
||||
return in;
|
||||
}
|
||||
@@ -74,21 +69,21 @@ public:
|
||||
friend bool operator==(const RequestToolTipMessage &first,
|
||||
const RequestToolTipMessage &second)
|
||||
{
|
||||
return first.m_ticketNumber == second.m_ticketNumber
|
||||
&& first.m_line == second.m_line
|
||||
&& first.m_column == second.m_column
|
||||
&& first.m_fileContainer == second.m_fileContainer;
|
||||
return first.ticketNumber == second.ticketNumber
|
||||
&& first.line == second.line
|
||||
&& first.column == second.column
|
||||
&& first.fileContainer == second.fileContainer;
|
||||
}
|
||||
|
||||
friend CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RequestToolTipMessage &message);
|
||||
|
||||
private:
|
||||
FileContainer m_fileContainer;
|
||||
quint64 m_ticketNumber = 0;
|
||||
quint32 m_line = 0;
|
||||
quint32 m_column = 0;
|
||||
public:
|
||||
FileContainer fileContainer;
|
||||
quint64 ticketNumber = 0;
|
||||
quint32 line = 0;
|
||||
quint32 column = 0;
|
||||
static CLANGSUPPORT_EXPORT quint64 ticketCounter;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RequestToolTipMessage &message);
|
||||
|
||||
DECLARE_MESSAGE(RequestToolTipMessage);
|
||||
} // namespace ClangBackEnd
|
||||
|
@@ -30,45 +30,20 @@
|
||||
|
||||
namespace ClangBackEnd {
|
||||
|
||||
SourceLocationContainer::SourceLocationContainer(const Utf8String &filePath,
|
||||
uint line,
|
||||
uint column)
|
||||
: m_filePath(filePath),
|
||||
m_line(line),
|
||||
m_column(column)
|
||||
{
|
||||
}
|
||||
|
||||
const Utf8String &SourceLocationContainer::filePath() const
|
||||
{
|
||||
return m_filePath;
|
||||
}
|
||||
|
||||
uint SourceLocationContainer::line() const
|
||||
{
|
||||
return m_line;
|
||||
}
|
||||
|
||||
|
||||
uint SourceLocationContainer::column() const
|
||||
{
|
||||
return m_column;
|
||||
}
|
||||
|
||||
QDataStream &operator<<(QDataStream &out, const SourceLocationContainer &container)
|
||||
{
|
||||
out << container.m_filePath;
|
||||
out << container.m_line;
|
||||
out << container.m_column;
|
||||
out << container.filePath;
|
||||
out << container.line;
|
||||
out << container.column;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
QDataStream &operator>>(QDataStream &in, SourceLocationContainer &container)
|
||||
{
|
||||
in >> container.m_filePath;
|
||||
in >> container.m_line;
|
||||
in >> container.m_column;
|
||||
in >> container.filePath;
|
||||
in >> container.line;
|
||||
in >> container.column;
|
||||
|
||||
return in;
|
||||
}
|
||||
@@ -80,17 +55,17 @@ bool operator==(const SourceLocationContainer &first, const SourceLocationContai
|
||||
|
||||
bool operator!=(const SourceLocationContainer &first, const SourceLocationContainer &second)
|
||||
{
|
||||
return first.m_line != second.m_line
|
||||
|| first.m_column != second.m_column
|
||||
|| first.m_filePath != second.m_filePath;
|
||||
return first.line != second.line
|
||||
|| first.column != second.column
|
||||
|| first.filePath != second.filePath;
|
||||
}
|
||||
|
||||
QDebug operator<<(QDebug debug, const SourceLocationContainer &container)
|
||||
{
|
||||
debug.nospace() << "SourceLocationContainer("
|
||||
<< container.filePath() << ", "
|
||||
<< container.line() << ", "
|
||||
<< container.column()
|
||||
<< container.filePath << ", "
|
||||
<< container.line << ", "
|
||||
<< container.column
|
||||
<< ")";
|
||||
return debug;
|
||||
}
|
||||
|
@@ -33,24 +33,21 @@ namespace ClangBackEnd {
|
||||
|
||||
class CLANGSUPPORT_EXPORT SourceLocationContainer
|
||||
{
|
||||
friend CLANGSUPPORT_EXPORT QDataStream &operator<<(QDataStream &out, const SourceLocationContainer &container);
|
||||
friend CLANGSUPPORT_EXPORT QDataStream &operator>>(QDataStream &in, SourceLocationContainer &container);
|
||||
friend CLANGSUPPORT_EXPORT bool operator==(const SourceLocationContainer &first, const SourceLocationContainer &second);
|
||||
friend CLANGSUPPORT_EXPORT bool operator!=(const SourceLocationContainer &first, const SourceLocationContainer &second);
|
||||
public:
|
||||
SourceLocationContainer() = default;
|
||||
SourceLocationContainer(const Utf8String &filePath,
|
||||
uint line,
|
||||
uint column);
|
||||
uint column)
|
||||
: filePath(filePath),
|
||||
line(line),
|
||||
column(column)
|
||||
{
|
||||
}
|
||||
|
||||
const Utf8String &filePath() const;
|
||||
uint line() const;
|
||||
uint column() const;
|
||||
|
||||
private:
|
||||
Utf8String m_filePath;
|
||||
uint m_line = 0;
|
||||
uint m_column = 0;
|
||||
public:
|
||||
Utf8String filePath;
|
||||
uint line = 0;
|
||||
uint column = 0;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDataStream &operator<<(QDataStream &out, const SourceLocationContainer &container);
|
||||
|
@@ -33,10 +33,10 @@ namespace V2 {
|
||||
QDebug operator<<(QDebug debug, const SourceLocationContainer &container)
|
||||
{
|
||||
debug.nospace() << "SourceLocationContainer("
|
||||
<< container.line() << ", "
|
||||
<< container.column() << ", "
|
||||
<< container.offset() << ", "
|
||||
<< container.filePathId().filePathId
|
||||
<< container.line << ", "
|
||||
<< container.column << ", "
|
||||
<< container.offset << ", "
|
||||
<< container.filePathId.filePathId
|
||||
<< ")";
|
||||
return debug;
|
||||
}
|
||||
|
@@ -33,7 +33,6 @@
|
||||
namespace ClangBackEnd {
|
||||
namespace V2 {
|
||||
|
||||
|
||||
class SourceLocationContainer
|
||||
{
|
||||
public:
|
||||
@@ -42,49 +41,29 @@ public:
|
||||
uint line,
|
||||
uint column,
|
||||
uint offset)
|
||||
: m_filePathId(filePathId),
|
||||
m_line(line),
|
||||
m_column(column),
|
||||
m_offset(offset)
|
||||
: filePathId(filePathId),
|
||||
line(line),
|
||||
column(column),
|
||||
offset(offset)
|
||||
{
|
||||
}
|
||||
|
||||
FilePathId filePathId() const
|
||||
{
|
||||
return m_filePathId;
|
||||
}
|
||||
|
||||
uint line() const
|
||||
{
|
||||
return m_line;
|
||||
}
|
||||
|
||||
uint column() const
|
||||
{
|
||||
return m_column;
|
||||
}
|
||||
|
||||
uint offset() const
|
||||
{
|
||||
return m_offset;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const SourceLocationContainer &container)
|
||||
{
|
||||
out << container.m_filePathId;
|
||||
out << container.m_line;
|
||||
out << container.m_column;
|
||||
out << container.m_offset;
|
||||
out << container.filePathId;
|
||||
out << container.line;
|
||||
out << container.column;
|
||||
out << container.offset;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, SourceLocationContainer &container)
|
||||
{
|
||||
in >> container.m_filePathId;
|
||||
in >> container.m_line;
|
||||
in >> container.m_column;
|
||||
in >> container.m_offset;
|
||||
in >> container.filePathId;
|
||||
in >> container.line;
|
||||
in >> container.column;
|
||||
in >> container.offset;
|
||||
|
||||
return in;
|
||||
}
|
||||
@@ -96,16 +75,16 @@ public:
|
||||
|
||||
friend bool operator!=(const SourceLocationContainer &first, const SourceLocationContainer &second)
|
||||
{
|
||||
return first.m_line != second.m_line
|
||||
|| first.m_column != second.m_column
|
||||
|| first.m_filePathId != second.m_filePathId;
|
||||
return first.line != second.line
|
||||
|| first.column != second.column
|
||||
|| first.filePathId != second.filePathId;
|
||||
}
|
||||
|
||||
friend bool operator<(const SourceLocationContainer &first,
|
||||
const SourceLocationContainer &second)
|
||||
{
|
||||
return std::tie(first.m_filePathId, first.m_line, first.m_column)
|
||||
< std::tie(second.m_filePathId, second.m_line, second.m_column);
|
||||
return std::tie(first.filePathId, first.line, first.column)
|
||||
< std::tie(second.filePathId, second.line, second.column);
|
||||
}
|
||||
|
||||
SourceLocationContainer clone() const
|
||||
@@ -113,11 +92,11 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
FilePathId m_filePathId;
|
||||
uint m_line = 1;
|
||||
uint m_column = 1;
|
||||
uint m_offset = 0;
|
||||
public:
|
||||
FilePathId filePathId;
|
||||
uint line = 1;
|
||||
uint column = 1;
|
||||
uint offset = 0;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const SourceLocationContainer &container);
|
||||
|
@@ -34,9 +34,9 @@ QDebug operator<<(QDebug debug, const SourceLocationsContainer &container)
|
||||
debug.nospace() << "SourceLocationsContainer([";
|
||||
for (const auto &sourceLocation: container.sourceLocationContainers()) {
|
||||
debug.nospace() << "("
|
||||
<< sourceLocation.filePathId() << ","
|
||||
<< sourceLocation.line() << ","
|
||||
<< sourceLocation.column() << "), ";
|
||||
<< sourceLocation.filePathId << ","
|
||||
<< sourceLocation.line << ","
|
||||
<< sourceLocation.column << "), ";
|
||||
}
|
||||
|
||||
debug.nospace() << "])";
|
||||
|
@@ -30,7 +30,7 @@ namespace ClangBackEnd {
|
||||
QDebug operator<<(QDebug debug, const SourceLocationsForRenamingMessage &message)
|
||||
{
|
||||
debug.nospace() << "SourceLocationsForRenamingMessage("
|
||||
<< message.sourceLocations()
|
||||
<< message.sourceLocations
|
||||
<< ")";
|
||||
|
||||
return debug;
|
||||
|
@@ -38,62 +38,47 @@ public:
|
||||
SourceLocationsForRenamingMessage(Utils::SmallString &&symbolName,
|
||||
SourceLocationsContainer &&sourceLocationContainer,
|
||||
int textDocumentRevision)
|
||||
: m_symbolName(std::move(symbolName)),
|
||||
m_sourceLocationContainer(std::move(sourceLocationContainer)),
|
||||
m_revision(textDocumentRevision)
|
||||
: symbolName(std::move(symbolName)),
|
||||
sourceLocations(std::move(sourceLocationContainer)),
|
||||
textDocumentRevision(textDocumentRevision)
|
||||
{}
|
||||
|
||||
const Utils::SmallString &symbolName() const
|
||||
{
|
||||
return m_symbolName;
|
||||
}
|
||||
|
||||
int textDocumentRevision() const
|
||||
{
|
||||
return m_revision;
|
||||
}
|
||||
|
||||
const SourceLocationsContainer &sourceLocations() const
|
||||
{
|
||||
return m_sourceLocationContainer;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const SourceLocationsForRenamingMessage &message)
|
||||
{
|
||||
out << message.m_symbolName;
|
||||
out << message.m_sourceLocationContainer;
|
||||
out << message.m_revision;
|
||||
out << message.symbolName;
|
||||
out << message.sourceLocations;
|
||||
out << message.textDocumentRevision;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, SourceLocationsForRenamingMessage &message)
|
||||
{
|
||||
in >> message.m_symbolName;
|
||||
in >> message.m_sourceLocationContainer;
|
||||
in >> message.m_revision;
|
||||
in >> message.symbolName;
|
||||
in >> message.sourceLocations;
|
||||
in >> message.textDocumentRevision;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const SourceLocationsForRenamingMessage &first, const SourceLocationsForRenamingMessage &second)
|
||||
{
|
||||
return first.m_revision == second.m_revision
|
||||
&& first.m_symbolName == second.m_symbolName
|
||||
&& first.m_sourceLocationContainer == second.m_sourceLocationContainer;
|
||||
return first.textDocumentRevision == second.textDocumentRevision
|
||||
&& first.symbolName == second.symbolName
|
||||
&& first.sourceLocations == second.sourceLocations;
|
||||
}
|
||||
|
||||
SourceLocationsForRenamingMessage clone() const
|
||||
{
|
||||
return SourceLocationsForRenamingMessage(m_symbolName.clone(),
|
||||
m_sourceLocationContainer.clone(),
|
||||
m_revision);
|
||||
return SourceLocationsForRenamingMessage(symbolName.clone(),
|
||||
sourceLocations.clone(),
|
||||
textDocumentRevision);
|
||||
}
|
||||
|
||||
private:
|
||||
Utils::SmallString m_symbolName;
|
||||
SourceLocationsContainer m_sourceLocationContainer;
|
||||
int m_revision = 0;
|
||||
public:
|
||||
Utils::SmallString symbolName;
|
||||
SourceLocationsContainer sourceLocations;
|
||||
int textDocumentRevision = 0;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const SourceLocationsForRenamingMessage &message);
|
||||
|
@@ -29,16 +29,14 @@
|
||||
|
||||
namespace ClangBackEnd {
|
||||
|
||||
|
||||
QDebug operator<<(QDebug debug, const SourceRangeContainer &container)
|
||||
{
|
||||
debug.nospace() << "SourceRangeContainer("
|
||||
<< container.start() << ", "
|
||||
<< container.end()
|
||||
<< container.start << ", "
|
||||
<< container.end
|
||||
<< ")";
|
||||
|
||||
return debug;
|
||||
}
|
||||
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
|
@@ -37,46 +37,35 @@ public:
|
||||
SourceRangeContainer() = default;
|
||||
SourceRangeContainer(SourceLocationContainer start,
|
||||
SourceLocationContainer end)
|
||||
: m_start(start),
|
||||
m_end(end)
|
||||
: start(start),
|
||||
end(end)
|
||||
{
|
||||
}
|
||||
|
||||
SourceLocationContainer start() const
|
||||
{
|
||||
return m_start;
|
||||
}
|
||||
|
||||
SourceLocationContainer end() const
|
||||
{
|
||||
return m_end;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const SourceRangeContainer &container)
|
||||
{
|
||||
out << container.m_start;
|
||||
out << container.m_end;
|
||||
out << container.start;
|
||||
out << container.end;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, SourceRangeContainer &container)
|
||||
{
|
||||
in >> container.m_start;
|
||||
in >> container.m_end;
|
||||
in >> container.start;
|
||||
in >> container.end;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const SourceRangeContainer &first, const SourceRangeContainer &second)
|
||||
{
|
||||
return first.m_start == second.m_start && first.m_end == second.m_end;
|
||||
return first.start == second.start && first.end == second.end;
|
||||
}
|
||||
|
||||
private:
|
||||
SourceLocationContainer m_start;
|
||||
SourceLocationContainer m_end;
|
||||
|
||||
public:
|
||||
SourceLocationContainer start;
|
||||
SourceLocationContainer end;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const SourceRangeContainer &container);
|
||||
|
@@ -33,8 +33,8 @@ namespace V2 {
|
||||
QDebug operator<<(QDebug debug, const SourceRangeContainer &container)
|
||||
{
|
||||
debug.nospace() << "SourceRangeContainer("
|
||||
<< container.start() << ", "
|
||||
<< container.end()
|
||||
<< container.start << ", "
|
||||
<< container.end
|
||||
<< ")";
|
||||
|
||||
return debug;
|
||||
|
@@ -38,8 +38,8 @@ public:
|
||||
SourceRangeContainer() = default;
|
||||
SourceRangeContainer(SourceLocationContainer start,
|
||||
SourceLocationContainer end)
|
||||
: m_start(start),
|
||||
m_end(end)
|
||||
: start(start),
|
||||
end(end)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -50,51 +50,41 @@ public:
|
||||
uint endLine,
|
||||
uint endColumn,
|
||||
uint endOffset)
|
||||
: m_start(filePathId, startLine, startColumn, startOffset),
|
||||
m_end(filePathId, endLine, endColumn, endOffset)
|
||||
: start(filePathId, startLine, startColumn, startOffset),
|
||||
end(filePathId, endLine, endColumn, endOffset)
|
||||
{
|
||||
}
|
||||
|
||||
SourceLocationContainer start() const
|
||||
{
|
||||
return m_start;
|
||||
}
|
||||
|
||||
SourceLocationContainer end() const
|
||||
{
|
||||
return m_end;
|
||||
}
|
||||
|
||||
FilePathId filePathId() const
|
||||
{
|
||||
return m_start.filePathId();
|
||||
return start.filePathId;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const SourceRangeContainer &container)
|
||||
{
|
||||
out << container.m_start;
|
||||
out << container.m_end;
|
||||
out << container.start;
|
||||
out << container.end;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, SourceRangeContainer &container)
|
||||
{
|
||||
in >> container.m_start;
|
||||
in >> container.m_end;
|
||||
in >> container.start;
|
||||
in >> container.end;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const SourceRangeContainer &first, const SourceRangeContainer &second)
|
||||
{
|
||||
return first.m_start == second.m_start && first.m_end == second.m_end;
|
||||
return first.start == second.start && first.end == second.end;
|
||||
}
|
||||
|
||||
friend bool operator<(const SourceRangeContainer &first,
|
||||
const SourceRangeContainer &second)
|
||||
{
|
||||
return std::tie(first.m_start, first.m_end) < std::tie(second.m_start, second.m_end);
|
||||
return std::tie(first.start, first.end) < std::tie(second.start, second.end);
|
||||
}
|
||||
|
||||
SourceRangeContainer clone() const
|
||||
@@ -102,9 +92,9 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
SourceLocationContainer m_start;
|
||||
SourceLocationContainer m_end;
|
||||
public:
|
||||
SourceLocationContainer start;
|
||||
SourceLocationContainer end;
|
||||
};
|
||||
|
||||
using SourceRangeContainers = std::vector<SourceRangeContainer>;
|
||||
|
@@ -30,8 +30,8 @@ namespace ClangBackEnd {
|
||||
QDebug operator<<(QDebug debug, const SourceRangesAndDiagnosticsForQueryMessage &message)
|
||||
{
|
||||
debug.nospace() << "SourceRangesAndDiagnosticsForQueryMessage("
|
||||
<< message.sourceRanges() << ", "
|
||||
<< message.diagnostics() << ")";
|
||||
<< message.sourceRanges << ", "
|
||||
<< message.diagnostics << ")";
|
||||
|
||||
return debug;
|
||||
}
|
||||
|
@@ -38,61 +38,46 @@ public:
|
||||
SourceRangesAndDiagnosticsForQueryMessage() = default;
|
||||
SourceRangesAndDiagnosticsForQueryMessage(SourceRangesContainer &&sourceRangesContainer,
|
||||
std::vector<DynamicASTMatcherDiagnosticContainer> &&diagnosticContainers)
|
||||
: m_sourceRangesContainer(std::move(sourceRangesContainer)),
|
||||
m_diagnosticContainers(std::move(diagnosticContainers))
|
||||
: sourceRanges(std::move(sourceRangesContainer)),
|
||||
diagnostics(std::move(diagnosticContainers))
|
||||
{}
|
||||
|
||||
const SourceRangesContainer &sourceRanges() const
|
||||
{
|
||||
return m_sourceRangesContainer;
|
||||
}
|
||||
|
||||
SourceRangesContainer &sourceRanges()
|
||||
{
|
||||
return m_sourceRangesContainer;
|
||||
}
|
||||
|
||||
SourceRangesContainer takeSourceRanges()
|
||||
{
|
||||
return std::move(m_sourceRangesContainer);
|
||||
}
|
||||
|
||||
const DynamicASTMatcherDiagnosticContainers &diagnostics() const
|
||||
{
|
||||
return m_diagnosticContainers;
|
||||
return std::move(sourceRanges);
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const SourceRangesAndDiagnosticsForQueryMessage &message)
|
||||
{
|
||||
out << message.m_sourceRangesContainer;
|
||||
out << message.m_diagnosticContainers;
|
||||
out << message.sourceRanges;
|
||||
out << message.diagnostics;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, SourceRangesAndDiagnosticsForQueryMessage &message)
|
||||
{
|
||||
in >> message.m_sourceRangesContainer;
|
||||
in >> message.m_diagnosticContainers;
|
||||
in >> message.sourceRanges;
|
||||
in >> message.diagnostics;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const SourceRangesAndDiagnosticsForQueryMessage &first, const SourceRangesAndDiagnosticsForQueryMessage &second)
|
||||
{
|
||||
return first.m_sourceRangesContainer == second.m_sourceRangesContainer
|
||||
&& first.m_diagnosticContainers == second.m_diagnosticContainers;
|
||||
return first.sourceRanges == second.sourceRanges
|
||||
&& first.diagnostics == second.diagnostics;
|
||||
}
|
||||
|
||||
SourceRangesAndDiagnosticsForQueryMessage clone() const
|
||||
{
|
||||
return SourceRangesAndDiagnosticsForQueryMessage(m_sourceRangesContainer.clone(),
|
||||
Utils::clone(m_diagnosticContainers));
|
||||
return SourceRangesAndDiagnosticsForQueryMessage(sourceRanges.clone(),
|
||||
Utils::clone(diagnostics));
|
||||
}
|
||||
|
||||
private:
|
||||
SourceRangesContainer m_sourceRangesContainer;
|
||||
DynamicASTMatcherDiagnosticContainers m_diagnosticContainers;
|
||||
public:
|
||||
SourceRangesContainer sourceRanges;
|
||||
DynamicASTMatcherDiagnosticContainers diagnostics;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const SourceRangesAndDiagnosticsForQueryMessage &message);
|
||||
|
@@ -30,12 +30,12 @@ namespace ClangBackEnd {
|
||||
QDebug operator<<(QDebug debug, const SourceRangesContainer &container)
|
||||
{
|
||||
debug.nospace() << "SourceRangesContainer([";
|
||||
for (const auto &sourceRangeWithText: container.sourceRangeWithTextContainers()) {
|
||||
for (const auto &sourceRangeWithText: container.sourceRangeWithTextContainers) {
|
||||
debug.nospace() << "("
|
||||
<< sourceRangeWithText.start().line() << ","
|
||||
<< sourceRangeWithText.start().column() << "), ("
|
||||
<< sourceRangeWithText.end().line() << ","
|
||||
<< sourceRangeWithText.end().column() << "), ";
|
||||
<< sourceRangeWithText.start.line << ","
|
||||
<< sourceRangeWithText.start.column << "), ("
|
||||
<< sourceRangeWithText.end.line << ","
|
||||
<< sourceRangeWithText.end.column << "), ";
|
||||
}
|
||||
|
||||
debug.nospace() << "])";
|
||||
|
@@ -36,27 +36,17 @@ class SourceRangesContainer
|
||||
public:
|
||||
SourceRangesContainer() = default;
|
||||
SourceRangesContainer(SourceRangeWithTextContainers &&sourceRangeWithTextContainers)
|
||||
: m_sourceRangeWithTextContainers(std::move(sourceRangeWithTextContainers))
|
||||
: sourceRangeWithTextContainers(std::move(sourceRangeWithTextContainers))
|
||||
{}
|
||||
|
||||
const SourceRangeWithTextContainers &sourceRangeWithTextContainers() const
|
||||
{
|
||||
return m_sourceRangeWithTextContainers;
|
||||
}
|
||||
|
||||
SourceRangeWithTextContainers takeSourceRangeWithTextContainers()
|
||||
{
|
||||
return std::move(m_sourceRangeWithTextContainers);
|
||||
}
|
||||
|
||||
void setSourceRangeWithTextContainers(SourceRangeWithTextContainers &&sourceRanges)
|
||||
{
|
||||
m_sourceRangeWithTextContainers = std::move(sourceRanges);
|
||||
return std::move(sourceRangeWithTextContainers);
|
||||
}
|
||||
|
||||
bool hasContent() const
|
||||
{
|
||||
return !m_sourceRangeWithTextContainers.empty();
|
||||
return !sourceRangeWithTextContainers.empty();
|
||||
}
|
||||
|
||||
void insertSourceRange(FilePathId filePathId,
|
||||
@@ -68,7 +58,7 @@ public:
|
||||
uint endOffset,
|
||||
Utils::SmallString &&text)
|
||||
{
|
||||
m_sourceRangeWithTextContainers.emplace_back(filePathId,
|
||||
sourceRangeWithTextContainers.emplace_back(filePathId,
|
||||
startLine,
|
||||
startColumn,
|
||||
startOffset,
|
||||
@@ -80,26 +70,26 @@ public:
|
||||
|
||||
void reserve(std::size_t size)
|
||||
{
|
||||
m_sourceRangeWithTextContainers.reserve(size);
|
||||
sourceRangeWithTextContainers.reserve(size);
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const SourceRangesContainer &container)
|
||||
{
|
||||
out << container.m_sourceRangeWithTextContainers;
|
||||
out << container.sourceRangeWithTextContainers;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, SourceRangesContainer &container)
|
||||
{
|
||||
in >> container.m_sourceRangeWithTextContainers;
|
||||
in >> container.sourceRangeWithTextContainers;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const SourceRangesContainer &first, const SourceRangesContainer &second)
|
||||
{
|
||||
return first.m_sourceRangeWithTextContainers == second.m_sourceRangeWithTextContainers;
|
||||
return first.sourceRangeWithTextContainers == second.sourceRangeWithTextContainers;
|
||||
}
|
||||
|
||||
SourceRangesContainer clone() const
|
||||
@@ -107,10 +97,10 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SourceRangeWithTextContainers m_sourceRangeWithTextContainers;
|
||||
public:
|
||||
SourceRangeWithTextContainers sourceRangeWithTextContainers;
|
||||
};
|
||||
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const SourceRangesContainer &container);
|
||||
|
||||
} // namespace ClangBackEnd
|
||||
|
@@ -30,7 +30,7 @@ namespace ClangBackEnd {
|
||||
QDebug operator<<(QDebug debug, const SourceRangesForQueryMessage &message)
|
||||
{
|
||||
debug.nospace() << "SourceRangesForQueryMessage("
|
||||
<< message.sourceRanges() << ")";
|
||||
<< message.sourceRanges << ")";
|
||||
|
||||
return debug;
|
||||
}
|
||||
|
@@ -36,37 +36,27 @@ class SourceRangesForQueryMessage
|
||||
{
|
||||
public:
|
||||
SourceRangesForQueryMessage() = default;
|
||||
SourceRangesForQueryMessage(SourceRangesContainer &&m_sourceRangesContainer)
|
||||
: m_sourceRangesContainer(std::move(m_sourceRangesContainer))
|
||||
SourceRangesForQueryMessage(SourceRangesContainer &&sourceRanges)
|
||||
: sourceRanges(std::move(sourceRanges))
|
||||
{}
|
||||
|
||||
const SourceRangesContainer &sourceRanges() const
|
||||
{
|
||||
return m_sourceRangesContainer;
|
||||
}
|
||||
|
||||
SourceRangesContainer &sourceRanges()
|
||||
{
|
||||
return m_sourceRangesContainer;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const SourceRangesForQueryMessage &message)
|
||||
{
|
||||
out << message.m_sourceRangesContainer;
|
||||
out << message.sourceRanges;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, SourceRangesForQueryMessage &message)
|
||||
{
|
||||
in >> message.m_sourceRangesContainer;
|
||||
in >> message.sourceRanges;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const SourceRangesForQueryMessage &first, const SourceRangesForQueryMessage &second)
|
||||
{
|
||||
return first.m_sourceRangesContainer == second.m_sourceRangesContainer;
|
||||
return first.sourceRanges == second.sourceRanges;
|
||||
}
|
||||
|
||||
SourceRangesForQueryMessage clone() const
|
||||
@@ -74,8 +64,8 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
SourceRangesContainer m_sourceRangesContainer;
|
||||
public:
|
||||
SourceRangesContainer sourceRanges;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const SourceRangesForQueryMessage &message);
|
||||
|
@@ -30,9 +30,9 @@ namespace ClangBackEnd {
|
||||
QDebug operator<<(QDebug debug, const SourceRangeWithTextContainer &container)
|
||||
{
|
||||
debug.nospace() << "SourceRangeWithTextContainer("
|
||||
<< container.start() << ", "
|
||||
<< container.end() << ", "
|
||||
<< container.text()
|
||||
<< container.start << ", "
|
||||
<< container.end << ", "
|
||||
<< container.text
|
||||
<< ")";
|
||||
|
||||
return debug;
|
||||
|
@@ -50,21 +50,16 @@ public:
|
||||
endLine,
|
||||
endColumn,
|
||||
endOffset),
|
||||
m_text(std::move(text))
|
||||
text(std::move(text))
|
||||
{}
|
||||
|
||||
SourceRangeWithTextContainer(V2::SourceRangeContainer &&base,
|
||||
Utils::SmallString &&text)
|
||||
: V2::SourceRangeContainer(std::move(base)),
|
||||
m_text(std::move(text))
|
||||
text(std::move(text))
|
||||
{
|
||||
}
|
||||
|
||||
const Utils::SmallString &text() const
|
||||
{
|
||||
return m_text;
|
||||
}
|
||||
|
||||
using V2::SourceRangeContainer::start;
|
||||
using V2::SourceRangeContainer::end;
|
||||
using V2::SourceRangeContainer::filePathId;
|
||||
@@ -72,7 +67,7 @@ public:
|
||||
friend QDataStream &operator<<(QDataStream &out, const SourceRangeWithTextContainer &container)
|
||||
{
|
||||
out << container.base();
|
||||
out << container.m_text;
|
||||
out << container.text;
|
||||
|
||||
return out;
|
||||
}
|
||||
@@ -80,7 +75,7 @@ public:
|
||||
friend QDataStream &operator>>(QDataStream &in, SourceRangeWithTextContainer &container)
|
||||
{
|
||||
in >> container.base();
|
||||
in >> container.m_text;
|
||||
in >> container.text;
|
||||
|
||||
return in;
|
||||
}
|
||||
@@ -88,7 +83,7 @@ public:
|
||||
friend bool operator==(const SourceRangeWithTextContainer &first,
|
||||
const SourceRangeWithTextContainer &second)
|
||||
{
|
||||
return first.base() == second.base() && first.m_text == second.m_text;
|
||||
return first.base() == second.base() && first.text == second.text;
|
||||
}
|
||||
|
||||
V2::SourceRangeContainer &base()
|
||||
@@ -106,8 +101,8 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
Utils::SmallString m_text;
|
||||
public:
|
||||
Utils::SmallString text;
|
||||
};
|
||||
|
||||
using SourceRangeWithTextContainers = std::vector<SourceRangeWithTextContainer>;
|
||||
|
@@ -95,11 +95,11 @@ QDebug operator<<(QDebug debug, const ExtraInfo &extraInfo)
|
||||
QDebug operator<<(QDebug debug, const TokenInfoContainer &container)
|
||||
{
|
||||
debug.nospace() << "TokenInfosContainer("
|
||||
<< container.line() << ", "
|
||||
<< container.column() << ", "
|
||||
<< container.length() << ", "
|
||||
<< highlightingTypeToCStringLiteral(container.types().mainHighlightingType) << ", "
|
||||
<< container.extraInfo()
|
||||
<< container.line << ", "
|
||||
<< container.column << ", "
|
||||
<< container.length << ", "
|
||||
<< highlightingTypeToCStringLiteral(container.types.mainHighlightingType) << ", "
|
||||
<< container.extraInfo
|
||||
<< ")";
|
||||
|
||||
return debug;
|
||||
|
@@ -104,103 +104,77 @@ class TokenInfoContainer
|
||||
public:
|
||||
TokenInfoContainer() = default;
|
||||
TokenInfoContainer(uint line, uint column, uint length, HighlightingTypes types)
|
||||
: line_(line)
|
||||
, column_(column)
|
||||
, length_(length)
|
||||
, types_(types)
|
||||
: line(line)
|
||||
, column(column)
|
||||
, length(length)
|
||||
, types(types)
|
||||
{
|
||||
}
|
||||
|
||||
TokenInfoContainer(uint line, uint column, uint length, HighlightingTypes types,
|
||||
const ExtraInfo &extraInfo)
|
||||
: line_(line)
|
||||
, column_(column)
|
||||
, length_(length)
|
||||
, types_(types)
|
||||
, extraInfo_(extraInfo)
|
||||
, noExtraInfo_(false)
|
||||
: line(line)
|
||||
, column(column)
|
||||
, length(length)
|
||||
, types(types)
|
||||
, extraInfo(extraInfo)
|
||||
, noExtraInfo(false)
|
||||
{
|
||||
}
|
||||
|
||||
uint line() const
|
||||
{
|
||||
return line_;
|
||||
}
|
||||
|
||||
uint column() const
|
||||
{
|
||||
return column_;
|
||||
}
|
||||
|
||||
uint length() const
|
||||
{
|
||||
return length_;
|
||||
}
|
||||
|
||||
HighlightingTypes types() const
|
||||
{
|
||||
return types_;
|
||||
}
|
||||
|
||||
const ExtraInfo &extraInfo() const
|
||||
{
|
||||
return extraInfo_;
|
||||
}
|
||||
|
||||
bool isInvalid() const
|
||||
{
|
||||
return line_ == 0 && column_ == 0 && length_ == 0;
|
||||
return line == 0 && column == 0 && length == 0;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const TokenInfoContainer &container)
|
||||
{
|
||||
out << container.line_;
|
||||
out << container.column_;
|
||||
out << container.length_;
|
||||
out << container.types_;
|
||||
out << container.noExtraInfo_;
|
||||
out << container.line;
|
||||
out << container.column;
|
||||
out << container.length;
|
||||
out << container.types;
|
||||
out << container.noExtraInfo;
|
||||
|
||||
if (container.noExtraInfo_)
|
||||
if (container.noExtraInfo)
|
||||
return out;
|
||||
|
||||
out << container.extraInfo_;
|
||||
out << container.extraInfo;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, TokenInfoContainer &container)
|
||||
{
|
||||
in >> container.line_;
|
||||
in >> container.column_;
|
||||
in >> container.length_;
|
||||
in >> container.types_;
|
||||
in >> container.noExtraInfo_;
|
||||
in >> container.line;
|
||||
in >> container.column;
|
||||
in >> container.length;
|
||||
in >> container.types;
|
||||
in >> container.noExtraInfo;
|
||||
|
||||
if (container.noExtraInfo_)
|
||||
if (container.noExtraInfo)
|
||||
return in;
|
||||
|
||||
in >> container.extraInfo_;
|
||||
in >> container.extraInfo;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const TokenInfoContainer &first, const TokenInfoContainer &second)
|
||||
{
|
||||
return first.line_ == second.line_
|
||||
&& first.column_ == second.column_
|
||||
&& first.length_ == second.length_
|
||||
&& first.types_ == second.types_
|
||||
&& first.noExtraInfo_ == second.noExtraInfo_
|
||||
&& first.extraInfo_ == second.extraInfo_;
|
||||
return first.line == second.line
|
||||
&& first.column == second.column
|
||||
&& first.length == second.length
|
||||
&& first.types == second.types
|
||||
&& first.noExtraInfo == second.noExtraInfo
|
||||
&& first.extraInfo == second.extraInfo;
|
||||
}
|
||||
|
||||
private:
|
||||
uint line_ = 0;
|
||||
uint column_ = 0;
|
||||
uint length_ = 0;
|
||||
HighlightingTypes types_;
|
||||
ExtraInfo extraInfo_;
|
||||
bool noExtraInfo_ = true;
|
||||
uint line = 0;
|
||||
uint column = 0;
|
||||
uint length = 0;
|
||||
HighlightingTypes types;
|
||||
ExtraInfo extraInfo;
|
||||
bool noExtraInfo = true;
|
||||
};
|
||||
|
||||
inline QDataStream &operator<<(QDataStream &out, const ExtraInfo &extraInfo)
|
||||
|
@@ -50,12 +50,12 @@ QDebug operator<<(QDebug debug, const ToolTipInfo &message)
|
||||
{
|
||||
debug.nospace() << "ToolTipInfo(";
|
||||
|
||||
debug.nospace() << message.m_text << ", ";
|
||||
debug.nospace() << message.m_briefComment << ", ";
|
||||
debug.nospace() << message.m_qdocIdCandidates << ", ";
|
||||
debug.nospace() << message.m_qdocMark << ", ";
|
||||
debug.nospace() << qdocCategoryToString(message.m_qdocCategory) << ", ";
|
||||
debug.nospace() << message.m_sizeInBytes << ", ";
|
||||
debug.nospace() << message.text << ", ";
|
||||
debug.nospace() << message.briefComment << ", ";
|
||||
debug.nospace() << message.qdocIdCandidates << ", ";
|
||||
debug.nospace() << message.qdocMark << ", ";
|
||||
debug.nospace() << qdocCategoryToString(message.qdocCategory) << ", ";
|
||||
debug.nospace() << message.sizeInBytes << ", ";
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
||||
|
@@ -45,35 +45,16 @@ public:
|
||||
|
||||
public:
|
||||
ToolTipInfo() = default;
|
||||
ToolTipInfo(const Utf8String &text) : m_text(text) {}
|
||||
|
||||
const Utf8String &text() const { return m_text; }
|
||||
void setText(const Utf8String &text) { m_text = text; }
|
||||
|
||||
const Utf8String &briefComment() const { return m_briefComment; }
|
||||
void setBriefComment(const Utf8String &briefComment) { m_briefComment = briefComment; }
|
||||
|
||||
const Utf8StringVector &qdocIdCandidates() const { return m_qdocIdCandidates; }
|
||||
void setQdocIdCandidates(const Utf8StringVector &qdocIdCandidates)
|
||||
{ m_qdocIdCandidates = qdocIdCandidates; }
|
||||
|
||||
const Utf8String &qdocMark() const { return m_qdocMark; }
|
||||
void setQdocMark(const Utf8String &qdocMark) { m_qdocMark = qdocMark; }
|
||||
|
||||
const QdocCategory &qdocCategory() const { return m_qdocCategory; }
|
||||
void setQdocCategory(const QdocCategory &qdocCategory) { m_qdocCategory = qdocCategory; }
|
||||
|
||||
const Utf8String &sizeInBytes() const { return m_sizeInBytes; }
|
||||
void setSizeInBytes(const Utf8String &sizeInBytes) { m_sizeInBytes = sizeInBytes; }
|
||||
ToolTipInfo(const Utf8String &text) : text(text) {}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const ToolTipInfo &message)
|
||||
{
|
||||
out << message.m_text;
|
||||
out << message.m_briefComment;
|
||||
out << message.m_qdocIdCandidates;
|
||||
out << message.m_qdocMark;
|
||||
out << static_cast<quint8>(message.m_qdocCategory);
|
||||
out << message.m_sizeInBytes;
|
||||
out << message.text;
|
||||
out << message.briefComment;
|
||||
out << message.qdocIdCandidates;
|
||||
out << message.qdocMark;
|
||||
out << static_cast<quint8>(message.qdocCategory);
|
||||
out << message.sizeInBytes;
|
||||
|
||||
return out;
|
||||
}
|
||||
@@ -82,43 +63,43 @@ public:
|
||||
{
|
||||
quint8 qdocCategory;
|
||||
|
||||
in >> message.m_text;
|
||||
in >> message.m_briefComment;
|
||||
in >> message.m_qdocIdCandidates;
|
||||
in >> message.m_qdocMark;
|
||||
in >> message.text;
|
||||
in >> message.briefComment;
|
||||
in >> message.qdocIdCandidates;
|
||||
in >> message.qdocMark;
|
||||
in >> qdocCategory;
|
||||
in >> message.m_sizeInBytes;
|
||||
in >> message.sizeInBytes;
|
||||
|
||||
message.m_qdocCategory = static_cast<QdocCategory>(qdocCategory);
|
||||
message.qdocCategory = static_cast<QdocCategory>(qdocCategory);
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const ToolTipInfo &first, const ToolTipInfo &second)
|
||||
{
|
||||
return first.m_text == second.m_text
|
||||
&& first.m_briefComment == second.m_briefComment
|
||||
&& first.m_qdocIdCandidates == second.m_qdocIdCandidates
|
||||
&& first.m_qdocMark == second.m_qdocMark
|
||||
&& first.m_qdocCategory == second.m_qdocCategory
|
||||
&& first.m_sizeInBytes == second.m_sizeInBytes;
|
||||
return first.text == second.text
|
||||
&& first.briefComment == second.briefComment
|
||||
&& first.qdocIdCandidates == second.qdocIdCandidates
|
||||
&& first.qdocMark == second.qdocMark
|
||||
&& first.qdocCategory == second.qdocCategory
|
||||
&& first.sizeInBytes == second.sizeInBytes;
|
||||
}
|
||||
|
||||
friend QDebug operator<<(QDebug debug, const ToolTipInfo &message);
|
||||
friend std::ostream &operator<<(std::ostream &os, const ToolTipInfo &message);
|
||||
public:
|
||||
Utf8String text;
|
||||
Utf8String briefComment;
|
||||
|
||||
private:
|
||||
Utf8String m_text;
|
||||
Utf8String m_briefComment;
|
||||
|
||||
Utf8StringVector m_qdocIdCandidates;
|
||||
Utf8String m_qdocMark;
|
||||
QdocCategory m_qdocCategory = Unknown;
|
||||
Utf8StringVector qdocIdCandidates;
|
||||
Utf8String qdocMark;
|
||||
QdocCategory qdocCategory = Unknown;
|
||||
|
||||
// For class definition and for class fields.
|
||||
Utf8String m_sizeInBytes;
|
||||
Utf8String sizeInBytes;
|
||||
};
|
||||
|
||||
QDebug operator<<(QDebug debug, const ToolTipInfo &message);
|
||||
std::ostream &operator<<(std::ostream &os, const ToolTipInfo &message);
|
||||
|
||||
const char *qdocCategoryToString(ToolTipInfo::QdocCategory category);
|
||||
|
||||
} // namespace ClangBackEnd
|
||||
|
@@ -32,9 +32,9 @@ namespace ClangBackEnd {
|
||||
QDebug operator<<(QDebug debug, const ToolTipMessage &message)
|
||||
{
|
||||
debug.nospace() << "ToolTipMessage("
|
||||
<< message.fileContainer()
|
||||
<< ", " << message.m_ticketNumber
|
||||
<< ", " << message.m_toolTipInfo;
|
||||
<< message.fileContainer
|
||||
<< ", " << message.ticketNumber
|
||||
<< ", " << message.toolTipInfo;
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
||||
|
@@ -39,49 +39,44 @@ public:
|
||||
ToolTipMessage(const FileContainer &fileContainer,
|
||||
const ToolTipInfo &toolTipInfo,
|
||||
quint64 ticketNumber)
|
||||
: m_fileContainer(fileContainer)
|
||||
, m_toolTipInfo(toolTipInfo)
|
||||
, m_ticketNumber(ticketNumber)
|
||||
: fileContainer(fileContainer)
|
||||
, toolTipInfo(toolTipInfo)
|
||||
, ticketNumber(ticketNumber)
|
||||
{
|
||||
}
|
||||
|
||||
const FileContainer &fileContainer() const { return m_fileContainer; }
|
||||
const ToolTipInfo &toolTipInfo() const { return m_toolTipInfo; }
|
||||
quint64 ticketNumber() const { return m_ticketNumber; }
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const ToolTipMessage &message)
|
||||
{
|
||||
out << message.m_fileContainer;
|
||||
out << message.m_toolTipInfo;;
|
||||
out << message.m_ticketNumber;
|
||||
out << message.fileContainer;
|
||||
out << message.toolTipInfo;;
|
||||
out << message.ticketNumber;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, ToolTipMessage &message)
|
||||
{
|
||||
in >> message.m_fileContainer;
|
||||
in >> message.m_toolTipInfo;
|
||||
in >> message.m_ticketNumber;
|
||||
in >> message.fileContainer;
|
||||
in >> message.toolTipInfo;
|
||||
in >> message.ticketNumber;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const ToolTipMessage &first, const ToolTipMessage &second)
|
||||
{
|
||||
return first.m_ticketNumber == second.m_ticketNumber
|
||||
&& first.m_fileContainer == second.m_fileContainer
|
||||
&& first.m_toolTipInfo == second.m_toolTipInfo;
|
||||
return first.ticketNumber == second.ticketNumber
|
||||
&& first.fileContainer == second.fileContainer
|
||||
&& first.toolTipInfo == second.toolTipInfo;
|
||||
}
|
||||
|
||||
friend CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const ToolTipMessage &message);
|
||||
friend std::ostream &operator<<(std::ostream &os, const ToolTipMessage &message);
|
||||
|
||||
private:
|
||||
FileContainer m_fileContainer;
|
||||
ToolTipInfo m_toolTipInfo;
|
||||
quint64 m_ticketNumber = 0;
|
||||
public:
|
||||
FileContainer fileContainer;
|
||||
ToolTipInfo toolTipInfo;
|
||||
quint64 ticketNumber = 0;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const ToolTipMessage &message);
|
||||
|
||||
DECLARE_MESSAGE(ToolTipMessage)
|
||||
} // namespace ClangBackEnd
|
||||
|
@@ -33,7 +33,7 @@ QDebug operator<<(QDebug debug, const UnregisterUnsavedFilesForEditorMessage &me
|
||||
{
|
||||
debug.nospace() << "UnregisterUnsavedFilesForEditorMessage(";
|
||||
|
||||
for (const FileContainer &fileContainer : message.fileContainers())
|
||||
for (const FileContainer &fileContainer : message.fileContainers)
|
||||
debug.nospace() << fileContainer<< ", ";
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
@@ -36,37 +36,31 @@ class UnregisterUnsavedFilesForEditorMessage
|
||||
public:
|
||||
UnregisterUnsavedFilesForEditorMessage() = default;
|
||||
UnregisterUnsavedFilesForEditorMessage(const QVector<FileContainer> &fileContainers)
|
||||
: m_fileContainers(fileContainers)
|
||||
: fileContainers(fileContainers)
|
||||
{
|
||||
}
|
||||
|
||||
const QVector<FileContainer> &fileContainers() const
|
||||
{
|
||||
return m_fileContainers;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const UnregisterUnsavedFilesForEditorMessage &message)
|
||||
{
|
||||
out << message.m_fileContainers;
|
||||
out << message.fileContainers;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, UnregisterUnsavedFilesForEditorMessage &message)
|
||||
{
|
||||
in >> message.m_fileContainers;
|
||||
in >> message.fileContainers;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const UnregisterUnsavedFilesForEditorMessage &first, const UnregisterUnsavedFilesForEditorMessage &second)
|
||||
{
|
||||
return first.m_fileContainers == second.m_fileContainers;
|
||||
return first.fileContainers == second.fileContainers;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
QVector<FileContainer> m_fileContainers;
|
||||
public:
|
||||
QVector<FileContainer> fileContainers;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const UnregisterUnsavedFilesForEditorMessage &message);
|
||||
|
@@ -30,7 +30,7 @@ namespace ClangBackEnd {
|
||||
QDebug operator<<(QDebug debug, const UpdateProjectPartsMessage &message)
|
||||
{
|
||||
debug.nospace() << "UpdateProjectPartsMessage("
|
||||
<< message.projectsParts() << ")";
|
||||
<< message.projectsParts << ")";
|
||||
|
||||
return debug;
|
||||
}
|
||||
|
@@ -36,42 +36,32 @@ public:
|
||||
UpdateProjectPartsMessage() = default;
|
||||
UpdateProjectPartsMessage(V2::ProjectPartContainers &&projectsParts,
|
||||
V2::FileContainers &&generatedFiles)
|
||||
: m_projectsParts(std::move(projectsParts)),
|
||||
m_generatedFiles(std::move(generatedFiles))
|
||||
: projectsParts(std::move(projectsParts)),
|
||||
generatedFiles(std::move(generatedFiles))
|
||||
{}
|
||||
|
||||
const V2::ProjectPartContainers &projectsParts() const
|
||||
{
|
||||
return m_projectsParts;
|
||||
}
|
||||
|
||||
V2::ProjectPartContainers takeProjectsParts()
|
||||
{
|
||||
return std::move(m_projectsParts);
|
||||
}
|
||||
|
||||
const V2::FileContainers &generatedFiles() const
|
||||
{
|
||||
return m_generatedFiles;
|
||||
return std::move(projectsParts);
|
||||
}
|
||||
|
||||
V2::FileContainers takeGeneratedFiles()
|
||||
{
|
||||
return std::move(m_generatedFiles);
|
||||
return std::move(generatedFiles);
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const UpdateProjectPartsMessage &message)
|
||||
{
|
||||
out << message.m_projectsParts;
|
||||
out << message.m_generatedFiles;
|
||||
out << message.projectsParts;
|
||||
out << message.generatedFiles;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, UpdateProjectPartsMessage &message)
|
||||
{
|
||||
in >> message.m_projectsParts;
|
||||
in >> message.m_generatedFiles;
|
||||
in >> message.projectsParts;
|
||||
in >> message.generatedFiles;
|
||||
|
||||
return in;
|
||||
}
|
||||
@@ -79,19 +69,19 @@ public:
|
||||
friend bool operator==(const UpdateProjectPartsMessage &first,
|
||||
const UpdateProjectPartsMessage &second)
|
||||
{
|
||||
return first.m_projectsParts == second.m_projectsParts
|
||||
&& first.m_generatedFiles == second.m_generatedFiles;
|
||||
return first.projectsParts == second.projectsParts
|
||||
&& first.generatedFiles == second.generatedFiles;
|
||||
}
|
||||
|
||||
UpdateProjectPartsMessage clone() const
|
||||
{
|
||||
return UpdateProjectPartsMessage(Utils::clone(m_projectsParts),
|
||||
Utils::clone(m_generatedFiles));
|
||||
return UpdateProjectPartsMessage(Utils::clone(projectsParts),
|
||||
Utils::clone(generatedFiles));
|
||||
}
|
||||
|
||||
private:
|
||||
V2::ProjectPartContainers m_projectsParts;
|
||||
V2::FileContainers m_generatedFiles;
|
||||
public:
|
||||
V2::ProjectPartContainers projectsParts;
|
||||
V2::FileContainers generatedFiles;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const UpdateProjectPartsMessage &message);
|
||||
|
@@ -33,7 +33,7 @@ QDebug operator<<(QDebug debug, const UpdateTranslationUnitsForEditorMessage &me
|
||||
{
|
||||
debug.nospace() << "UpdateTranslationUnitsForEditorMessage(";
|
||||
|
||||
for (const FileContainer &fileContainer : message.fileContainers())
|
||||
for (const FileContainer &fileContainer : message.fileContainers)
|
||||
debug.nospace() << fileContainer<< ", ";
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
@@ -36,36 +36,31 @@ class UpdateTranslationUnitsForEditorMessage
|
||||
public:
|
||||
UpdateTranslationUnitsForEditorMessage() = default;
|
||||
UpdateTranslationUnitsForEditorMessage(const QVector<FileContainer> &fileContainers)
|
||||
: m_fileContainers(fileContainers)
|
||||
: fileContainers(fileContainers)
|
||||
{
|
||||
}
|
||||
|
||||
const QVector<FileContainer> &fileContainers() const
|
||||
{
|
||||
return m_fileContainers;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const UpdateTranslationUnitsForEditorMessage &message)
|
||||
{
|
||||
out << message.m_fileContainers;
|
||||
out << message.fileContainers;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, UpdateTranslationUnitsForEditorMessage &message)
|
||||
{
|
||||
in >> message.m_fileContainers;
|
||||
in >> message.fileContainers;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const UpdateTranslationUnitsForEditorMessage &first, const UpdateTranslationUnitsForEditorMessage &second)
|
||||
{
|
||||
return first.m_fileContainers == second.m_fileContainers;
|
||||
return first.fileContainers == second.fileContainers;
|
||||
}
|
||||
|
||||
private:
|
||||
QVector<FileContainer> m_fileContainers;
|
||||
public:
|
||||
QVector<FileContainer> fileContainers;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const UpdateTranslationUnitsForEditorMessage &message);
|
||||
|
@@ -33,9 +33,9 @@ QDebug operator<<(QDebug debug, const UpdateVisibleTranslationUnitsMessage &mess
|
||||
{
|
||||
debug.nospace() << "UpdateVisibleTranslationUnitsMessage(";
|
||||
|
||||
debug.nospace() << message.currentEditorFilePath() << ", ";
|
||||
debug.nospace() << message.currentEditorFilePath << ", ";
|
||||
|
||||
for (const Utf8String &visibleEditorFilePath : message.visibleEditorFilePaths())
|
||||
for (const Utf8String &visibleEditorFilePath : message.visibleEditorFilePaths)
|
||||
debug.nospace() << visibleEditorFilePath << ", ";
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
@@ -39,45 +39,36 @@ public:
|
||||
UpdateVisibleTranslationUnitsMessage() = default;
|
||||
UpdateVisibleTranslationUnitsMessage(const Utf8String ¤tEditorFilePath,
|
||||
const Utf8StringVector &visibleEditorFilePaths)
|
||||
: currentEditorFilePath_(currentEditorFilePath),
|
||||
visibleEditorFilePaths_(visibleEditorFilePaths)
|
||||
: currentEditorFilePath(currentEditorFilePath),
|
||||
visibleEditorFilePaths(visibleEditorFilePaths)
|
||||
{
|
||||
}
|
||||
|
||||
const Utf8String ¤tEditorFilePath() const
|
||||
{
|
||||
return currentEditorFilePath_;
|
||||
}
|
||||
const Utf8StringVector &visibleEditorFilePaths() const
|
||||
{
|
||||
return visibleEditorFilePaths_;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const UpdateVisibleTranslationUnitsMessage &message)
|
||||
{
|
||||
out << message.currentEditorFilePath_;
|
||||
out << message.visibleEditorFilePaths_;
|
||||
out << message.currentEditorFilePath;
|
||||
out << message.visibleEditorFilePaths;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, UpdateVisibleTranslationUnitsMessage &message)
|
||||
{
|
||||
in >> message.currentEditorFilePath_;
|
||||
in >> message.visibleEditorFilePaths_;
|
||||
in >> message.currentEditorFilePath;
|
||||
in >> message.visibleEditorFilePaths;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const UpdateVisibleTranslationUnitsMessage &first, const UpdateVisibleTranslationUnitsMessage &second)
|
||||
{
|
||||
return first.currentEditorFilePath_ == second.currentEditorFilePath_
|
||||
&& first.visibleEditorFilePaths_ == second.visibleEditorFilePaths_;
|
||||
return first.currentEditorFilePath == second.currentEditorFilePath
|
||||
&& first.visibleEditorFilePaths == second.visibleEditorFilePaths;
|
||||
}
|
||||
|
||||
private:
|
||||
Utf8String currentEditorFilePath_;
|
||||
Utf8StringVector visibleEditorFilePaths_;
|
||||
public:
|
||||
Utf8String currentEditorFilePath;
|
||||
Utf8StringVector visibleEditorFilePaths;
|
||||
};
|
||||
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const UpdateVisibleTranslationUnitsMessage &message);
|
||||
|
@@ -53,7 +53,7 @@ bool ClangAssistProposalItem::prematurelyApplies(const QChar &typedCharacter) co
|
||||
applies = QString::fromLatin1("(,").contains(typedCharacter);
|
||||
else if (m_completionOperator == T_STRING_LITERAL || m_completionOperator == T_ANGLE_STRING_LITERAL)
|
||||
applies = (typedCharacter == QLatin1Char('/')) && text().endsWith(QLatin1Char('/'));
|
||||
else if (codeCompletion().completionKind() == CodeCompletion::ObjCMessageCompletionKind)
|
||||
else if (codeCompletion().completionKind == CodeCompletion::ObjCMessageCompletionKind)
|
||||
applies = QString::fromLatin1(";.,").contains(typedCharacter);
|
||||
else
|
||||
applies = QString::fromLatin1(";.,:(").contains(typedCharacter);
|
||||
@@ -130,31 +130,31 @@ void ClangAssistProposalItem::apply(TextEditor::TextDocumentManipulatorInterface
|
||||
extraCharacters += QLatin1Char(')');
|
||||
if (m_typedCharacter == QLatin1Char('(')) // Eat the opening parenthesis
|
||||
m_typedCharacter = QChar();
|
||||
} else if (ccr.completionKind() == CodeCompletion::KeywordCompletionKind) {
|
||||
} else if (ccr.completionKind == CodeCompletion::KeywordCompletionKind) {
|
||||
CompletionChunksToTextConverter converter;
|
||||
converter.setupForKeywords();
|
||||
|
||||
converter.parseChunks(ccr.chunks());
|
||||
converter.parseChunks(ccr.chunks);
|
||||
|
||||
textToBeInserted = converter.text();
|
||||
if (converter.hasPlaceholderPositions())
|
||||
cursorOffset = converter.placeholderPositions().at(0) - converter.text().size();
|
||||
} else if (ccr.completionKind() == CodeCompletion::NamespaceCompletionKind) {
|
||||
} else if (ccr.completionKind == CodeCompletion::NamespaceCompletionKind) {
|
||||
CompletionChunksToTextConverter converter;
|
||||
|
||||
converter.parseChunks(ccr.chunks()); // Appends "::" after name space name
|
||||
converter.parseChunks(ccr.chunks); // Appends "::" after name space name
|
||||
|
||||
textToBeInserted = converter.text();
|
||||
} else if (!ccr.text().isEmpty()) {
|
||||
} else if (!ccr.text.isEmpty()) {
|
||||
const TextEditor::CompletionSettings &completionSettings =
|
||||
TextEditor::TextEditorSettings::instance()->completionSettings();
|
||||
const bool autoInsertBrackets = completionSettings.m_autoInsertBrackets;
|
||||
|
||||
if (autoInsertBrackets &&
|
||||
(ccr.completionKind() == CodeCompletion::FunctionCompletionKind
|
||||
|| ccr.completionKind() == CodeCompletion::DestructorCompletionKind
|
||||
|| ccr.completionKind() == CodeCompletion::SignalCompletionKind
|
||||
|| ccr.completionKind() == CodeCompletion::SlotCompletionKind)) {
|
||||
(ccr.completionKind == CodeCompletion::FunctionCompletionKind
|
||||
|| ccr.completionKind == CodeCompletion::DestructorCompletionKind
|
||||
|| ccr.completionKind == CodeCompletion::SignalCompletionKind
|
||||
|| ccr.completionKind == CodeCompletion::SlotCompletionKind)) {
|
||||
// When the user typed the opening parenthesis, he'll likely also type the closing one,
|
||||
// in which case it would be annoying if we put the cursor after the already automatically
|
||||
// inserted closing parenthesis.
|
||||
@@ -195,7 +195,7 @@ void ClangAssistProposalItem::apply(TextEditor::TextDocumentManipulatorInterface
|
||||
}
|
||||
|
||||
// If the function takes no arguments, automatically place the closing parenthesis
|
||||
if (!hasOverloadsWithParameters() && !ccr.hasParameters() && skipClosingParenthesis) {
|
||||
if (!hasOverloadsWithParameters() && !ccr.hasParameters && skipClosingParenthesis) {
|
||||
extraCharacters += QLatin1Char(')');
|
||||
if (endWithSemicolon) {
|
||||
extraCharacters += semicolon;
|
||||
@@ -257,7 +257,7 @@ void ClangAssistProposalItem::apply(TextEditor::TextDocumentManipulatorInterface
|
||||
if (setAutoCompleteSkipPos)
|
||||
manipulator.setAutoCompleteSkipPosition(manipulator.currentPosition());
|
||||
|
||||
if (ccr.completionKind() == CodeCompletion::KeywordCompletionKind)
|
||||
if (ccr.completionKind == CodeCompletion::KeywordCompletionKind)
|
||||
manipulator.autoIndent(basePosition, textToBeInserted.size());
|
||||
}
|
||||
}
|
||||
@@ -278,7 +278,7 @@ QIcon ClangAssistProposalItem::icon() const
|
||||
static const char SNIPPET_ICON_PATH[] = ":/texteditor/images/snippet.png";
|
||||
static const QIcon snippetIcon = QIcon(QLatin1String(SNIPPET_ICON_PATH));
|
||||
|
||||
switch (m_codeCompletion.completionKind()) {
|
||||
switch (m_codeCompletion.completionKind) {
|
||||
case CodeCompletion::ClassCompletionKind:
|
||||
case CodeCompletion::TemplateClassCompletionKind:
|
||||
case CodeCompletion::TypeAliasCompletionKind:
|
||||
@@ -292,7 +292,7 @@ QIcon ClangAssistProposalItem::icon() const
|
||||
case CodeCompletion::FunctionCompletionKind:
|
||||
case CodeCompletion::TemplateFunctionCompletionKind:
|
||||
case CodeCompletion::ObjCMessageCompletionKind:
|
||||
switch (m_codeCompletion.availability()) {
|
||||
switch (m_codeCompletion.availability) {
|
||||
case CodeCompletion::Available:
|
||||
case CodeCompletion::Deprecated:
|
||||
return Icons::iconForType(Icons::FuncPublicIconType);
|
||||
@@ -302,7 +302,7 @@ QIcon ClangAssistProposalItem::icon() const
|
||||
case CodeCompletion::SignalCompletionKind:
|
||||
return Icons::iconForType(Icons::SignalIconType);
|
||||
case CodeCompletion::SlotCompletionKind:
|
||||
switch (m_codeCompletion.availability()) {
|
||||
switch (m_codeCompletion.availability) {
|
||||
case CodeCompletion::Available:
|
||||
case CodeCompletion::Deprecated:
|
||||
return Icons::iconForType(Icons::SlotPublicIconType);
|
||||
@@ -316,7 +316,7 @@ QIcon ClangAssistProposalItem::icon() const
|
||||
case CodeCompletion::PreProcessorCompletionKind:
|
||||
return Icons::iconForType(Icons::MacroIconType);
|
||||
case CodeCompletion::VariableCompletionKind:
|
||||
switch (m_codeCompletion.availability()) {
|
||||
switch (m_codeCompletion.availability) {
|
||||
case CodeCompletion::Available:
|
||||
case CodeCompletion::Deprecated:
|
||||
return Icons::iconForType(Icons::VarPublicIconType);
|
||||
@@ -339,10 +339,10 @@ QIcon ClangAssistProposalItem::icon() const
|
||||
QString ClangAssistProposalItem::detail() const
|
||||
{
|
||||
QString detail = CompletionChunksToTextConverter::convertToToolTipWithHtml(
|
||||
m_codeCompletion.chunks(), m_codeCompletion.completionKind());
|
||||
m_codeCompletion.chunks, m_codeCompletion.completionKind);
|
||||
|
||||
if (!m_codeCompletion.briefComment().isEmpty())
|
||||
detail += QStringLiteral("\n\n") + m_codeCompletion.briefComment().toString();
|
||||
if (!m_codeCompletion.briefComment.isEmpty())
|
||||
detail += QStringLiteral("\n\n") + m_codeCompletion.briefComment.toString();
|
||||
|
||||
return detail;
|
||||
}
|
||||
|
@@ -351,10 +351,10 @@ static void setLastSentDocumentRevision(const QString &filePath, uint revision)
|
||||
|
||||
void BackendCommunicator::updateTranslationUnitWithRevisionCheck(const FileContainer &fileContainer)
|
||||
{
|
||||
if (documentHasChanged(fileContainer.filePath(), fileContainer.documentRevision())) {
|
||||
if (documentHasChanged(fileContainer.filePath, fileContainer.documentRevision)) {
|
||||
updateTranslationUnitsForEditor({fileContainer});
|
||||
setLastSentDocumentRevision(fileContainer.filePath(),
|
||||
fileContainer.documentRevision());
|
||||
setLastSentDocumentRevision(fileContainer.filePath,
|
||||
fileContainer.documentRevision);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,7 +373,7 @@ QFuture<CppTools::CursorInfo> BackendCommunicator::requestReferences(
|
||||
const RequestReferencesMessage message(fileContainer, line, column);
|
||||
m_sender->requestReferences(message);
|
||||
|
||||
return m_receiver.addExpectedReferencesMessage(message.ticketNumber(), localUses);
|
||||
return m_receiver.addExpectedReferencesMessage(message.ticketNumber, localUses);
|
||||
}
|
||||
|
||||
QFuture<CppTools::CursorInfo> BackendCommunicator::requestLocalReferences(
|
||||
@@ -384,7 +384,7 @@ QFuture<CppTools::CursorInfo> BackendCommunicator::requestLocalReferences(
|
||||
const RequestReferencesMessage message(fileContainer, line, column, true);
|
||||
m_sender->requestReferences(message);
|
||||
|
||||
return m_receiver.addExpectedReferencesMessage(message.ticketNumber());
|
||||
return m_receiver.addExpectedReferencesMessage(message.ticketNumber);
|
||||
}
|
||||
|
||||
QFuture<CppTools::ToolTipInfo> BackendCommunicator::requestToolTip(
|
||||
@@ -393,7 +393,7 @@ QFuture<CppTools::ToolTipInfo> BackendCommunicator::requestToolTip(
|
||||
const RequestToolTipMessage message(fileContainer, line, column);
|
||||
m_sender->requestToolTip(message);
|
||||
|
||||
return m_receiver.addExpectedToolTipMessage(message.ticketNumber());
|
||||
return m_receiver.addExpectedToolTipMessage(message.ticketNumber);
|
||||
}
|
||||
|
||||
QFuture<CppTools::SymbolInfo> BackendCommunicator::requestFollowSymbol(
|
||||
@@ -406,7 +406,7 @@ QFuture<CppTools::SymbolInfo> BackendCommunicator::requestFollowSymbol(
|
||||
column);
|
||||
m_sender->requestFollowSymbol(message);
|
||||
|
||||
return m_receiver.addExpectedRequestFollowSymbolMessage(message.ticketNumber());
|
||||
return m_receiver.addExpectedRequestFollowSymbolMessage(message.ticketNumber);
|
||||
}
|
||||
|
||||
void BackendCommunicator::updateTranslationUnitWithRevisionCheck(Core::IDocument *document)
|
||||
@@ -574,7 +574,7 @@ void BackendCommunicator::completeCode(ClangCompletionAssistProcessor *assistPro
|
||||
const CompleteCodeMessage message(filePath, line, column, projectFilePath, funcNameStartLine,
|
||||
funcNameStartColumn);
|
||||
m_sender->completeCode(message);
|
||||
m_receiver.addExpectedCodeCompletedMessage(message.ticketNumber(), assistProcessor);
|
||||
m_receiver.addExpectedCodeCompletedMessage(message.ticketNumber, assistProcessor);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
@@ -182,56 +182,56 @@ void BackendReceiver::echo(const EchoMessage &message)
|
||||
|
||||
void BackendReceiver::codeCompleted(const CodeCompletedMessage &message)
|
||||
{
|
||||
qCDebugIpc() << "CodeCompletedMessage with" << message.codeCompletions().size()
|
||||
qCDebugIpc() << "CodeCompletedMessage with" << message.codeCompletions.size()
|
||||
<< "items";
|
||||
|
||||
const quint64 ticket = message.ticketNumber();
|
||||
const quint64 ticket = message.ticketNumber;
|
||||
QScopedPointer<ClangCompletionAssistProcessor> processor(m_assistProcessorsTable.take(ticket));
|
||||
if (processor) {
|
||||
processor->handleAvailableCompletions(message.codeCompletions(),
|
||||
message.neededCorrection());
|
||||
processor->handleAvailableCompletions(message.codeCompletions,
|
||||
message.neededCorrection);
|
||||
}
|
||||
}
|
||||
|
||||
void BackendReceiver::documentAnnotationsChanged(const DocumentAnnotationsChangedMessage &message)
|
||||
{
|
||||
qCDebugIpc() << "DocumentAnnotationsChangedMessage with"
|
||||
<< message.diagnostics().size() << "diagnostics"
|
||||
<< message.tokenInfos().size() << "highlighting marks"
|
||||
<< message.skippedPreprocessorRanges().size() << "skipped preprocessor ranges";
|
||||
<< message.diagnostics.size() << "diagnostics"
|
||||
<< message.tokenInfos.size() << "highlighting marks"
|
||||
<< message.skippedPreprocessorRanges.size() << "skipped preprocessor ranges";
|
||||
|
||||
auto processor = ClangEditorDocumentProcessor::get(message.fileContainer().filePath());
|
||||
auto processor = ClangEditorDocumentProcessor::get(message.fileContainer.filePath);
|
||||
|
||||
if (!processor)
|
||||
return;
|
||||
|
||||
const QString projectPartId = message.fileContainer().projectPartId();
|
||||
const QString filePath = message.fileContainer().filePath();
|
||||
const QString projectPartId = message.fileContainer.projectPartId;
|
||||
const QString filePath = message.fileContainer.filePath;
|
||||
const QString documentProjectPartId = CppTools::CppToolsBridge::projectPartIdForFile(filePath);
|
||||
if (projectPartId != documentProjectPartId)
|
||||
return;
|
||||
|
||||
const quint32 documentRevision = message.fileContainer().documentRevision();
|
||||
if (message.onlyTokenInfos()) {
|
||||
processor->updateTokenInfos(message.tokenInfos(), documentRevision);
|
||||
const quint32 documentRevision = message.fileContainer.documentRevision;
|
||||
if (message.onlyTokenInfos) {
|
||||
processor->updateTokenInfos(message.tokenInfos, documentRevision);
|
||||
return;
|
||||
}
|
||||
processor->updateCodeWarnings(message.diagnostics(),
|
||||
message.firstHeaderErrorDiagnostic(),
|
||||
processor->updateCodeWarnings(message.diagnostics,
|
||||
message.firstHeaderErrorDiagnostic,
|
||||
documentRevision);
|
||||
processor->updateHighlighting(message.tokenInfos(),
|
||||
message.skippedPreprocessorRanges(),
|
||||
processor->updateHighlighting(message.tokenInfos,
|
||||
message.skippedPreprocessorRanges,
|
||||
documentRevision);
|
||||
}
|
||||
|
||||
static
|
||||
CppTools::CursorInfo::Range toCursorInfoRange(const SourceRangeContainer &sourceRange)
|
||||
{
|
||||
const SourceLocationContainer start = sourceRange.start();
|
||||
const SourceLocationContainer end = sourceRange.end();
|
||||
const unsigned length = end.column() - start.column();
|
||||
const SourceLocationContainer &start = sourceRange.start;
|
||||
const SourceLocationContainer &end = sourceRange.end;
|
||||
const unsigned length = end.column - start.column;
|
||||
|
||||
return CppTools::CursorInfo::Range(start.line(), start.column(), length);
|
||||
return CppTools::CursorInfo::Range(start.line, start.column, length);
|
||||
}
|
||||
|
||||
static
|
||||
@@ -239,9 +239,9 @@ CppTools::CursorInfo toCursorInfo(const CppTools::SemanticInfo::LocalUseMap &loc
|
||||
const ReferencesMessage &message)
|
||||
{
|
||||
CppTools::CursorInfo result;
|
||||
const QVector<SourceRangeContainer> references = message.references();
|
||||
const QVector<SourceRangeContainer> &references = message.references;
|
||||
|
||||
result.areUseRangesForLocalVariable = message.isLocalVariable();
|
||||
result.areUseRangesForLocalVariable = message.isLocalVariable;
|
||||
for (const SourceRangeContainer &reference : references)
|
||||
result.useRanges.append(toCursorInfoRange(reference));
|
||||
|
||||
@@ -255,15 +255,15 @@ static
|
||||
CppTools::SymbolInfo toSymbolInfo(const FollowSymbolMessage &message)
|
||||
{
|
||||
CppTools::SymbolInfo result;
|
||||
const SourceRangeContainer &range = message.sourceRange();
|
||||
const SourceRangeContainer &range = message.sourceRange;
|
||||
|
||||
const SourceLocationContainer start = range.start();
|
||||
const SourceLocationContainer end = range.end();
|
||||
result.startLine = static_cast<int>(start.line());
|
||||
result.startColumn = static_cast<int>(start.column());
|
||||
result.endLine = static_cast<int>(end.line());
|
||||
result.endColumn = static_cast<int>(end.column());
|
||||
result.fileName = start.filePath();
|
||||
const SourceLocationContainer &start = range.start;
|
||||
const SourceLocationContainer &end = range.end;
|
||||
result.startLine = static_cast<int>(start.line);
|
||||
result.startColumn = static_cast<int>(start.column);
|
||||
result.endLine = static_cast<int>(end.line);
|
||||
result.endColumn = static_cast<int>(end.column);
|
||||
result.fileName = start.filePath;
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -271,9 +271,9 @@ CppTools::SymbolInfo toSymbolInfo(const FollowSymbolMessage &message)
|
||||
void BackendReceiver::references(const ReferencesMessage &message)
|
||||
{
|
||||
qCDebugIpc() << "ReferencesMessage with"
|
||||
<< message.references().size() << "references";
|
||||
<< message.references.size() << "references";
|
||||
|
||||
const quint64 ticket = message.ticketNumber();
|
||||
const quint64 ticket = message.ticketNumber;
|
||||
const ReferencesEntry entry = m_referencesTable.take(ticket);
|
||||
QFutureInterface<CppTools::CursorInfo> futureInterface = entry.futureInterface;
|
||||
QTC_CHECK(futureInterface != QFutureInterface<CppTools::CursorInfo>());
|
||||
@@ -322,25 +322,25 @@ static CppTools::ToolTipInfo toToolTipInfo(const ToolTipMessage &message)
|
||||
{
|
||||
CppTools::ToolTipInfo info;
|
||||
|
||||
const ToolTipInfo backendInfo = message.toolTipInfo();
|
||||
const ToolTipInfo &backendInfo = message.toolTipInfo;
|
||||
|
||||
info.text = backendInfo.text();
|
||||
info.briefComment = backendInfo.briefComment();
|
||||
info.text = backendInfo.text;
|
||||
info.briefComment = backendInfo.briefComment;
|
||||
|
||||
info.qDocIdCandidates = toStringList(backendInfo.qdocIdCandidates());
|
||||
info.qDocMark = backendInfo.qdocMark();
|
||||
info.qDocCategory = toHelpItemCategory(backendInfo.qdocCategory());
|
||||
info.qDocIdCandidates = toStringList(backendInfo.qdocIdCandidates);
|
||||
info.qDocMark = backendInfo.qdocMark;
|
||||
info.qDocCategory = toHelpItemCategory(backendInfo.qdocCategory);
|
||||
|
||||
info.sizeInBytes = backendInfo.sizeInBytes();
|
||||
info.sizeInBytes = backendInfo.sizeInBytes;
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
void BackendReceiver::tooltip(const ToolTipMessage &message)
|
||||
{
|
||||
qCDebugIpc() << "ToolTipMessage" << message.toolTipInfo().text();
|
||||
qCDebugIpc() << "ToolTipMessage" << message.toolTipInfo.text;
|
||||
|
||||
const quint64 ticket = message.ticketNumber();
|
||||
const quint64 ticket = message.ticketNumber;
|
||||
QFutureInterface<CppTools::ToolTipInfo> futureInterface = m_toolTipsTable.take(ticket);
|
||||
QTC_CHECK(futureInterface != QFutureInterface<CppTools::ToolTipInfo>());
|
||||
|
||||
@@ -354,9 +354,9 @@ void BackendReceiver::tooltip(const ToolTipMessage &message)
|
||||
void BackendReceiver::followSymbol(const ClangBackEnd::FollowSymbolMessage &message)
|
||||
{
|
||||
qCDebugIpc() << "FollowSymbolMessage with"
|
||||
<< message.sourceRange() << "range";
|
||||
<< message.sourceRange << "range";
|
||||
|
||||
const quint64 ticket = message.ticketNumber();
|
||||
const quint64 ticket = message.ticketNumber;
|
||||
QFutureInterface<CppTools::SymbolInfo> futureInterface = m_followTable.take(ticket);
|
||||
QTC_CHECK(futureInterface != QFutureInterface<CppTools::SymbolInfo>());
|
||||
|
||||
|
@@ -74,30 +74,30 @@ QList<AssistProposalItemInterface *> toAssistProposalItems(const CodeCompletions
|
||||
bool slotCompletion = false; // TODO
|
||||
|
||||
QHash<QString, ClangAssistProposalItem *> items;
|
||||
foreach (const CodeCompletion &codeCompletion, completions) {
|
||||
if (codeCompletion.text().isEmpty()) // TODO: Make isValid()?
|
||||
for (const CodeCompletion &codeCompletion : completions) {
|
||||
if (codeCompletion.text.isEmpty()) // TODO: Make isValid()?
|
||||
continue;
|
||||
if (signalCompletion && codeCompletion.completionKind() != CodeCompletion::SignalCompletionKind)
|
||||
if (signalCompletion && codeCompletion.completionKind != CodeCompletion::SignalCompletionKind)
|
||||
continue;
|
||||
if (slotCompletion && codeCompletion.completionKind() != CodeCompletion::SlotCompletionKind)
|
||||
if (slotCompletion && codeCompletion.completionKind != CodeCompletion::SlotCompletionKind)
|
||||
continue;
|
||||
|
||||
QString name;
|
||||
if (codeCompletion.completionKind() == CodeCompletion::KeywordCompletionKind)
|
||||
name = CompletionChunksToTextConverter::convertToName(codeCompletion.chunks());
|
||||
if (codeCompletion.completionKind == CodeCompletion::KeywordCompletionKind)
|
||||
name = CompletionChunksToTextConverter::convertToName(codeCompletion.chunks);
|
||||
else
|
||||
name = codeCompletion.text().toString();
|
||||
name = codeCompletion.text.toString();
|
||||
|
||||
ClangAssistProposalItem *item = items.value(name, 0);
|
||||
if (item) {
|
||||
if (codeCompletion.hasParameters())
|
||||
if (codeCompletion.hasParameters)
|
||||
item->setHasOverloadsWithParameters(true);
|
||||
} else {
|
||||
item = new ClangAssistProposalItem;
|
||||
items.insert(name, item);
|
||||
|
||||
item->setText(name);
|
||||
item->setOrder(int(codeCompletion.priority()));
|
||||
item->setOrder(int(codeCompletion.priority));
|
||||
item->setCodeCompletion(codeCompletion);
|
||||
}
|
||||
}
|
||||
@@ -139,7 +139,7 @@ IAssistProposal *ClangCompletionAssistProcessor::perform(const AssistInterface *
|
||||
static CodeCompletions filterFunctionSignatures(const CodeCompletions &completions)
|
||||
{
|
||||
return ::Utils::filtered(completions, [](const CodeCompletion &completion) {
|
||||
return completion.completionKind() == CodeCompletion::FunctionOverloadCompletionKind;
|
||||
return completion.completionKind == CodeCompletion::FunctionOverloadCompletionKind;
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -174,8 +174,8 @@ void CompletionChunksToTextConverter::parse(
|
||||
{
|
||||
using ClangBackEnd::CodeCompletionChunk;
|
||||
|
||||
switch (codeCompletionChunk.kind()) {
|
||||
case CodeCompletionChunk::ResultType: parseResultType(codeCompletionChunk.text()); break;
|
||||
switch (codeCompletionChunk.kind) {
|
||||
case CodeCompletionChunk::ResultType: parseResultType(codeCompletionChunk.text); break;
|
||||
// Do not rely on CurrentParameter because it might be wrong for
|
||||
// invalid code. Instead, handle it as PlaceHolder.
|
||||
case CodeCompletionChunk::CurrentParameter:
|
||||
@@ -183,7 +183,7 @@ void CompletionChunksToTextConverter::parse(
|
||||
parsePlaceHolder(codeCompletionChunk); break;
|
||||
case CodeCompletionChunk::LeftParen: parseLeftParen(codeCompletionChunk); break;
|
||||
case CodeCompletionChunk::LeftBrace: parseLeftBrace(codeCompletionChunk); break;
|
||||
default: parseText(codeCompletionChunk.text()); break;
|
||||
default: parseText(codeCompletionChunk.text); break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ void CompletionChunksToTextConverter::parseResultType(const Utf8String &resultTy
|
||||
void CompletionChunksToTextConverter::parseText(const Utf8String &text)
|
||||
{
|
||||
if (canAddSpace()
|
||||
&& m_previousCodeCompletionChunk.kind() == ClangBackEnd::CodeCompletionChunk::RightBrace) {
|
||||
&& m_previousCodeCompletionChunk.kind == ClangBackEnd::CodeCompletionChunk::RightBrace) {
|
||||
m_text += QChar(QChar::Space);
|
||||
}
|
||||
|
||||
@@ -217,9 +217,9 @@ void CompletionChunksToTextConverter::wrapInCursiveTagIfOptional(
|
||||
{
|
||||
if (m_addOptional) {
|
||||
if (m_emphasizeOptional && m_textFormat == TextFormat::Html) {
|
||||
if (!m_previousCodeCompletionChunk.isOptional() && codeCompletionChunk.isOptional())
|
||||
if (!m_previousCodeCompletionChunk.isOptional && codeCompletionChunk.isOptional)
|
||||
m_text += QStringLiteral("<i>");
|
||||
else if (m_previousCodeCompletionChunk.isOptional() && !codeCompletionChunk.isOptional())
|
||||
else if (m_previousCodeCompletionChunk.isOptional && !codeCompletionChunk.isOptional)
|
||||
m_text += QStringLiteral("</i>");
|
||||
}
|
||||
}
|
||||
@@ -229,7 +229,7 @@ void CompletionChunksToTextConverter::parsePlaceHolder(
|
||||
const ClangBackEnd::CodeCompletionChunk &codeCompletionChunk)
|
||||
{
|
||||
if (m_addPlaceHolderText) {
|
||||
appendText(inDesiredTextFormat(codeCompletionChunk.text()),
|
||||
appendText(inDesiredTextFormat(codeCompletionChunk.text),
|
||||
emphasizeCurrentPlaceHolder());
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ void CompletionChunksToTextConverter::parseLeftParen(
|
||||
{
|
||||
if (canAddSpace())
|
||||
m_text += QChar(QChar::Space);
|
||||
m_text += codeCompletionChunk.text().toString();
|
||||
m_text += codeCompletionChunk.text.toString();
|
||||
}
|
||||
|
||||
void CompletionChunksToTextConverter::parseLeftBrace(
|
||||
@@ -251,7 +251,7 @@ void CompletionChunksToTextConverter::parseLeftBrace(
|
||||
if (canAddSpace())
|
||||
m_text += QChar(QChar::Space);
|
||||
|
||||
m_text += codeCompletionChunk.text().toString();
|
||||
m_text += codeCompletionChunk.text.toString();
|
||||
}
|
||||
|
||||
void CompletionChunksToTextConverter::addExtraVerticalSpaceBetweenBraces()
|
||||
@@ -266,15 +266,15 @@ void CompletionChunksToTextConverter::addExtraVerticalSpaceBetweenBraces(
|
||||
using ClangBackEnd::CodeCompletionChunk;
|
||||
|
||||
const auto leftBraceCompare = [] (const CodeCompletionChunk &chunk) {
|
||||
return chunk.kind() == CodeCompletionChunk::LeftBrace;
|
||||
return chunk.kind == CodeCompletionChunk::LeftBrace;
|
||||
};
|
||||
|
||||
const auto rightBraceCompare = [] (const CodeCompletionChunk &chunk) {
|
||||
return chunk.kind() == CodeCompletionChunk::RightBrace;
|
||||
return chunk.kind == CodeCompletionChunk::RightBrace;
|
||||
};
|
||||
|
||||
const auto verticalSpaceCompare = [] (const CodeCompletionChunk &chunk) {
|
||||
return chunk.kind() == CodeCompletionChunk::VerticalSpace;
|
||||
return chunk.kind == CodeCompletionChunk::VerticalSpace;
|
||||
};
|
||||
|
||||
auto leftBrace = std::find_if(begin, m_codeCompletionChunks.end(), leftBraceCompare);
|
||||
@@ -337,15 +337,15 @@ void CompletionChunksToTextConverter::appendText(const QString &text, bool boldF
|
||||
bool CompletionChunksToTextConverter::canAddSpace() const
|
||||
{
|
||||
return m_addSpaces
|
||||
&& m_previousCodeCompletionChunk.kind() != ClangBackEnd::CodeCompletionChunk::HorizontalSpace
|
||||
&& m_previousCodeCompletionChunk.kind() != ClangBackEnd::CodeCompletionChunk::RightAngle
|
||||
&& m_previousCodeCompletionChunk.kind != ClangBackEnd::CodeCompletionChunk::HorizontalSpace
|
||||
&& m_previousCodeCompletionChunk.kind != ClangBackEnd::CodeCompletionChunk::RightAngle
|
||||
&& m_codeCompletionKind != ClangBackEnd::CodeCompletion::FunctionCompletionKind;
|
||||
}
|
||||
|
||||
bool CompletionChunksToTextConverter::isNotOptionalOrAddOptionals(
|
||||
const ClangBackEnd::CodeCompletionChunk &codeCompletionChunk) const
|
||||
{
|
||||
return !codeCompletionChunk.isOptional() || m_addOptional;
|
||||
return !codeCompletionChunk.isOptional || m_addOptional;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
@@ -81,13 +81,12 @@ static QString addTypeToVariableName(const QString &name, const ClangBackEnd::Ex
|
||||
static Core::LocatorFilterEntry makeEntry(Core::ILocatorFilter *filter,
|
||||
const ClangBackEnd::TokenInfoContainer &info)
|
||||
{
|
||||
const ClangBackEnd::ExtraInfo &extraInfo = info.extraInfo();
|
||||
const ClangBackEnd::ExtraInfo &extraInfo = info.extraInfo;
|
||||
QString displayName = extraInfo.token;
|
||||
::Utils::LineColumn lineColumn(static_cast<int>(info.line()),
|
||||
static_cast<int>(info.column()));
|
||||
::Utils::LineColumn lineColumn(static_cast<int>(info.line), static_cast<int>(info.column));
|
||||
Core::LocatorFilterEntry entry(filter, displayName, qVariantFromValue(lineColumn));
|
||||
QString extra;
|
||||
ClangBackEnd::HighlightingType mainType = info.types().mainHighlightingType;
|
||||
ClangBackEnd::HighlightingType mainType = info.types.mainHighlightingType;
|
||||
if (mainType == ClangBackEnd::HighlightingType::VirtualFunction
|
||||
|| mainType == ClangBackEnd::HighlightingType::Function) {
|
||||
displayName = addResultTypeToFunctionSignature(displayName, extraInfo);
|
||||
@@ -129,11 +128,11 @@ QList<Core::LocatorFilterEntry> ClangCurrentDocumentFilter::matchesFor(
|
||||
const QVector<TokInfoContainer> &infos = processor->tokenInfos();
|
||||
|
||||
for (const TokInfoContainer &info : infos) {
|
||||
if (!info.extraInfo().declaration)
|
||||
if (!info.extraInfo.declaration)
|
||||
continue;
|
||||
if (info.types().mainHighlightingType == ClangBackEnd::HighlightingType::LocalVariable)
|
||||
if (info.types.mainHighlightingType == ClangBackEnd::HighlightingType::LocalVariable)
|
||||
continue;
|
||||
QRegularExpressionMatch match = regexp.match(info.extraInfo().token);
|
||||
QRegularExpressionMatch match = regexp.match(info.extraInfo.token);
|
||||
if (match.hasMatch())
|
||||
goodEntries.push_back(makeEntry(this, info));
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user