Commit e4748fe8 authored by Nikolai Kosjar's avatar Nikolai Kosjar
Browse files

Clang: Typedef some often used types



using CodeCompletions = QVector<CodeCompletion>;
using CodeCompletionChunks = QVector<CodeCompletionChunk>;

Change-Id: Id729a43566c23dc000e44d79ccf4a49e4f235f51
Reviewed-by: default avatarMarco Bubke <marco.bubke@theqtcompany.com>
parent 5643a45a
......@@ -37,13 +37,13 @@
namespace ClangBackEnd {
CodeCompletedCommand::CodeCompletedCommand(const QVector<CodeCompletion> &codeCompletions, quint64 ticketNumber)
CodeCompletedCommand::CodeCompletedCommand(const CodeCompletions &codeCompletions, quint64 ticketNumber)
: codeCompletions_(codeCompletions),
ticketNumber_(ticketNumber)
{
}
const QVector<CodeCompletion> &CodeCompletedCommand::codeCompletions() const
const CodeCompletions &CodeCompletedCommand::codeCompletions() const
{
return codeCompletions_;
}
......
......@@ -48,14 +48,14 @@ class CMBIPC_EXPORT CodeCompletedCommand
friend void PrintTo(const CodeCompletedCommand &command, ::std::ostream* os);
public:
CodeCompletedCommand() = default;
CodeCompletedCommand(const QVector<CodeCompletion> &codeCompletions, quint64 ticketNumber);
CodeCompletedCommand(const CodeCompletions &codeCompletions, quint64 ticketNumber);
const QVector<CodeCompletion> &codeCompletions() const;
const CodeCompletions &codeCompletions() const;
quint64 ticketNumber() const;
private:
QVector<CodeCompletion> codeCompletions_;
CodeCompletions codeCompletions_;
quint64 ticketNumber_ = 0;
};
......
......@@ -70,12 +70,12 @@ CodeCompletion::Kind CodeCompletion::completionKind() const
return completionKind_;
}
void CodeCompletion::setChunks(const QVector<CodeCompletionChunk> &chunks)
void CodeCompletion::setChunks(const CodeCompletionChunks &chunks)
{
chunks_ = chunks;
}
const QVector<CodeCompletionChunk> &CodeCompletion::chunks() const
const CodeCompletionChunks &CodeCompletion::chunks() const
{
return chunks_;
}
......
......@@ -37,9 +37,13 @@
#include <utf8string.h>
#include <QMetaType>
#include <QVector>
namespace ClangBackEnd {
class CodeCompletion;
using CodeCompletions = QVector<CodeCompletion>;
class CMBIPC_EXPORT CodeCompletion
{
friend CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const CodeCompletion &command);
......@@ -91,8 +95,8 @@ public:
void setCompletionKind(Kind completionKind);
Kind completionKind() const;
void setChunks(const QVector<CodeCompletionChunk> &chunks);
const QVector<CodeCompletionChunk> &chunks() const;
void setChunks(const CodeCompletionChunks &chunks);
const CodeCompletionChunks &chunks() const;
void setAvailability(Availability availability);
Availability availability() const;
......@@ -109,7 +113,7 @@ private:
private:
Utf8String text_;
QVector<CodeCompletionChunk> chunks_;
CodeCompletionChunks chunks_;
quint32 priority_ = 0;
Kind completionKind_ = Other;
Availability availability_ = NotAvailable;
......
......@@ -44,7 +44,7 @@ CodeCompletionChunk::CodeCompletionChunk()
CodeCompletionChunk::CodeCompletionChunk(CodeCompletionChunk::Kind kind,
const Utf8String &text,
const QVector<CodeCompletionChunk> &optionalChunks)
const CodeCompletionChunks &optionalChunks)
: text_(text),
optionalChunks_(optionalChunks),
kind_(kind)
......@@ -61,7 +61,7 @@ const Utf8String &CodeCompletionChunk::text() const
return text_;
}
const QVector<CodeCompletionChunk> &CodeCompletionChunk::optionalChunks() const
const CodeCompletionChunks &CodeCompletionChunk::optionalChunks() const
{
return optionalChunks_;
}
......
......@@ -39,6 +39,9 @@
namespace ClangBackEnd {
class CodeCompletionChunk;
using CodeCompletionChunks = QVector<CodeCompletionChunk>;
class CMBIPC_EXPORT CodeCompletionChunk
{
friend CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const CodeCompletionChunk &chunk);
......@@ -73,18 +76,18 @@ public:
CodeCompletionChunk();
CodeCompletionChunk(Kind kind,
const Utf8String &text,
const QVector<CodeCompletionChunk> &optionalChunks = QVector<CodeCompletionChunk>());
const CodeCompletionChunks &optionalChunks = CodeCompletionChunks());
Kind kind() const;
const Utf8String &text() const;
const QVector<CodeCompletionChunk> &optionalChunks() const;
const CodeCompletionChunks &optionalChunks() const;
private:
quint32 &kindAsInt();
private:
Utf8String text_;
QVector<CodeCompletionChunk> optionalChunks_;
CodeCompletionChunks optionalChunks_;
Kind kind_ = Invalid;
};
......
......@@ -61,6 +61,7 @@
namespace ClangCodeModel {
namespace Internal {
using ClangBackEnd::CodeCompletion;
using TextEditor::AssistProposalItem;
namespace {
......@@ -107,7 +108,6 @@ QList<AssistProposalItem *> toAssistProposalItems(const CodeCompletions &complet
}
// FIXME: show the effective accessebility instead of availability
using ClangBackEnd::CodeCompletion;
using CPlusPlus::Icons;
switch (ccr.completionKind()) {
......@@ -193,10 +193,10 @@ bool isFunctionHintLikeCompletion(CodeCompletion::Kind kind)
|| kind == CodeCompletion::SlotCompletionKind;
}
QVector<CodeCompletion> matchingFunctionCompletions(const QVector<CodeCompletion> completions,
const QString &functionName)
CodeCompletions matchingFunctionCompletions(const CodeCompletions completions,
const QString &functionName)
{
QVector<CodeCompletion> matching;
CodeCompletions matching;
foreach (const CodeCompletion &completion, completions) {
if (isFunctionHintLikeCompletion(completion.completionKind())
......
......@@ -34,20 +34,16 @@
#include "clangcompletionassistinterface.h"
#include <cpptools/cppcompletionassistprocessor.h>
#include <texteditor/texteditor.h>
#include <QCoreApplication>
#include <clangbackendipc/codecompletion.h>
namespace ClangBackEnd {
class CodeCompletion;
}
#include <QCoreApplication>
namespace ClangCodeModel {
namespace Internal {
using CodeCompletions = QVector<ClangBackEnd::CodeCompletion>;
using ClangBackEnd::CodeCompletion;
using ClangBackEnd::CodeCompletions;
class ClangCompletionAssistProcessor : public CppTools::CppCompletionAssistProcessor
{
......
......@@ -39,7 +39,7 @@ namespace Internal {
using namespace CPlusPlus;
ClangFunctionHintModel::ClangFunctionHintModel(const CodeCompletions &functionSymbols)
ClangFunctionHintModel::ClangFunctionHintModel(const ClangBackEnd::CodeCompletions &functionSymbols)
: m_functionSymbols(functionSymbols)
, m_currentArg(-1)
{
......
......@@ -38,12 +38,10 @@
namespace ClangCodeModel {
namespace Internal {
using CodeCompletions = QVector<ClangBackEnd::CodeCompletion>;
class ClangFunctionHintModel : public TextEditor::IFunctionHintProposalModel
{
public:
ClangFunctionHintModel(const CodeCompletions &functionSymbols);
ClangFunctionHintModel(const ClangBackEnd::CodeCompletions &functionSymbols);
void reset() override;
int size() const override;
......@@ -51,7 +49,7 @@ public:
int activeArgument(const QString &prefix) const override;
private:
CodeCompletions m_functionSymbols;
ClangBackEnd::CodeCompletions m_functionSymbols;
mutable int m_currentArg;
};
......
......@@ -36,7 +36,7 @@
namespace ClangCodeModel {
namespace Internal {
void CompletionChunksToTextConverter::parseChunks(const QVector<ClangBackEnd::CodeCompletionChunk> &codeCompletionChunks)
void CompletionChunksToTextConverter::parseChunks(const ClangBackEnd::CodeCompletionChunks &codeCompletionChunks)
{
m_text.clear();
m_placeholderPositions.clear();
......@@ -94,7 +94,7 @@ bool CompletionChunksToTextConverter::hasPlaceholderPositions() const
return m_placeholderPositions.size() > 0;
}
QString CompletionChunksToTextConverter::convertToFunctionSignature(const QVector<ClangBackEnd::CodeCompletionChunk> &codeCompletionChunks)
QString CompletionChunksToTextConverter::convertToFunctionSignature(const ClangBackEnd::CodeCompletionChunks &codeCompletionChunks)
{
CompletionChunksToTextConverter converter;
converter.setAddPlaceHolderText(true);
......@@ -105,7 +105,7 @@ QString CompletionChunksToTextConverter::convertToFunctionSignature(const QVecto
return converter.text();
}
QString CompletionChunksToTextConverter::convertToName(const QVector<ClangBackEnd::CodeCompletionChunk> &codeCompletionChunks)
QString CompletionChunksToTextConverter::convertToName(const ClangBackEnd::CodeCompletionChunks &codeCompletionChunks)
{
CompletionChunksToTextConverter converter;
......@@ -114,7 +114,7 @@ QString CompletionChunksToTextConverter::convertToName(const QVector<ClangBackEn
return converter.text();
}
QString CompletionChunksToTextConverter::convertToToolTip(const QVector<ClangBackEnd::CodeCompletionChunk> &codeCompletionChunks)
QString CompletionChunksToTextConverter::convertToToolTip(const ClangBackEnd::CodeCompletionChunks &codeCompletionChunks)
{
CompletionChunksToTextConverter converter;
converter.setAddPlaceHolderText(true);
......@@ -196,7 +196,7 @@ void CompletionChunksToTextConverter::addExtraVerticalSpaceBetweenBraces()
addExtraVerticalSpaceBetweenBraces(m_codeCompletionChunks.begin());
}
void CompletionChunksToTextConverter::addExtraVerticalSpaceBetweenBraces(const QVector<ClangBackEnd::CodeCompletionChunk>::iterator &begin)
void CompletionChunksToTextConverter::addExtraVerticalSpaceBetweenBraces(const ClangBackEnd::CodeCompletionChunks::iterator &begin)
{
using ClangBackEnd::CodeCompletionChunk;
......
......@@ -45,7 +45,7 @@ namespace Internal {
class CompletionChunksToTextConverter
{
public:
void parseChunks(const QVector<ClangBackEnd::CodeCompletionChunk> &codeCompletionChunks);
void parseChunks(const ClangBackEnd::CodeCompletionChunks &codeCompletionChunks);
void setAddPlaceHolderText(bool addPlaceHolderText);
void setAddPlaceHolderPositions(bool addPlaceHolderPositions);
......@@ -57,9 +57,9 @@ public:
const std::vector<int> &placeholderPositions() const;
bool hasPlaceholderPositions() const;
static QString convertToFunctionSignature(const QVector<ClangBackEnd::CodeCompletionChunk> &codeCompletionChunks);
static QString convertToName(const QVector<ClangBackEnd::CodeCompletionChunk> &codeCompletionChunks);
static QString convertToToolTip(const QVector<ClangBackEnd::CodeCompletionChunk> &codeCompletionChunks);
static QString convertToFunctionSignature(const ClangBackEnd::CodeCompletionChunks &codeCompletionChunks);
static QString convertToName(const ClangBackEnd::CodeCompletionChunks &codeCompletionChunks);
static QString convertToToolTip(const ClangBackEnd::CodeCompletionChunks &codeCompletionChunks);
private:
void parse(const ClangBackEnd::CodeCompletionChunk & codeCompletionChunk);
void parseResultType(const Utf8String &text);
......@@ -69,13 +69,13 @@ private:
void parseLeftParen(const ClangBackEnd::CodeCompletionChunk &codeCompletionChunk);
void parseLeftBrace(const ClangBackEnd::CodeCompletionChunk &codeCompletionChunk);
void addExtraVerticalSpaceBetweenBraces();
void addExtraVerticalSpaceBetweenBraces(const QVector<ClangBackEnd::CodeCompletionChunk>::iterator &);
void addExtraVerticalSpaceBetweenBraces(const ClangBackEnd::CodeCompletionChunks::iterator &);
bool canAddSpace() const;
private:
std::vector<int> m_placeholderPositions;
QVector<ClangBackEnd::CodeCompletionChunk> m_codeCompletionChunks;
ClangBackEnd::CodeCompletionChunks m_codeCompletionChunks;
ClangBackEnd::CodeCompletionChunk m_previousCodeCompletionChunk;
QString m_text;
bool m_addPlaceHolderText = false;
......
......@@ -47,7 +47,7 @@ CodeCompleter::CodeCompleter(TranslationUnit translationUnit)
{
}
QVector<CodeCompletion> CodeCompleter::complete(uint line, uint column)
CodeCompletions CodeCompleter::complete(uint line, uint column)
{
translationUnit.reparse();
......
......@@ -47,7 +47,7 @@ public:
CodeCompleter() = default;
CodeCompleter(TranslationUnit translationUnit);
QVector<CodeCompletion> complete(uint line, uint column);
CodeCompletions complete(uint line, uint column);
private:
Utf8String filePath() const;
......
......@@ -71,7 +71,7 @@ CodeCompletionChunk::Kind CodeCompletionChunkConverter::chunkKind(CXCompletionSt
return CodeCompletionChunk::Kind(clang_getCompletionChunkKind(completionString, chunkIndex));
}
QVector<CodeCompletionChunk> CodeCompletionChunkConverter::extract(CXCompletionString completionString)
CodeCompletionChunks CodeCompletionChunkConverter::extract(CXCompletionString completionString)
{
CodeCompletionChunkConverter converter;
......@@ -85,7 +85,7 @@ Utf8String CodeCompletionChunkConverter::chunkText(CXCompletionString completion
return ClangString(clang_getCompletionChunkText(completionString, chunkIndex));
}
QVector<CodeCompletionChunk> CodeCompletionChunkConverter::optionalChunks(CXCompletionString completionString, uint chunkIndex)
CodeCompletionChunks CodeCompletionChunkConverter::optionalChunks(CXCompletionString completionString, uint chunkIndex)
{
CodeCompletionChunkConverter converter;
......
......@@ -42,18 +42,18 @@ namespace ClangBackEnd {
class CodeCompletionChunkConverter
{
public:
static QVector<CodeCompletionChunk> extract(CXCompletionString completionString);
static CodeCompletionChunks extract(CXCompletionString completionString);
static Utf8String chunkText(CXCompletionString completionString, uint chunkIndex);
private:
QVector<CodeCompletionChunk> optionalChunks(CXCompletionString completionString, uint chunkIndex);
CodeCompletionChunks optionalChunks(CXCompletionString completionString, uint chunkIndex);
static CodeCompletionChunk::Kind chunkKind(CXCompletionString completionString, uint chunkIndex);
void extractCompletionChunks(CXCompletionString completionString);
void extractOptionalCompletionChunks(CXCompletionString completionString);
private:
QVector<CodeCompletionChunk> chunks;
CodeCompletionChunks chunks;
};
} // namespace ClangBackEnd
......
......@@ -88,9 +88,9 @@ bool CodeCompletionsExtractor::peek(const Utf8String &name)
return false;
}
QVector<CodeCompletion> CodeCompletionsExtractor::extractAll()
CodeCompletions CodeCompletionsExtractor::extractAll()
{
QVector<CodeCompletion> codeCompletions;
CodeCompletions codeCompletions;
codeCompletions.reserve(cxCodeCompleteResults->NumResults);
while (next())
......
......@@ -53,7 +53,7 @@ public:
bool next();
bool peek(const Utf8String &name);
QVector<CodeCompletion> extractAll();
CodeCompletions extractAll();
const CodeCompletion &currentCodeCompletion() const;
......
......@@ -145,7 +145,7 @@ TEST_F(ClientServerInProcess, SendCompleteCodeCommand)
TEST_F(ClientServerInProcess, SendCodeCompletedCommand)
{
QVector<ClangBackEnd::CodeCompletion> codeCompletions({Utf8StringLiteral("newFunction()")});
ClangBackEnd::CodeCompletions codeCompletions({Utf8StringLiteral("newFunction()")});
ClangBackEnd::CodeCompletedCommand command(codeCompletions, 1);
EXPECT_CALL(mockIpcClient, codeCompleted(command))
......
......@@ -51,8 +51,7 @@ using ClangBackEnd::TranslationUnit;
using ClangBackEnd::CodeCompletion;
using ClangBackEnd::UnsavedFiles;
using ClangBackEnd::CodeCompletionChunk;
using ClangBackEnd::CodeCompletionChunks;
namespace {
......@@ -591,10 +590,10 @@ TEST_F(CodeCompletionsExtractor, CompletionChunksFunction)
::CodeCompletionsExtractor extractor(completeResults.data());
ASSERT_THAT(extractor, HasCompletionChunks(Utf8StringLiteral("Function"),
QVector<CodeCompletionChunk>({{CodeCompletionChunk::ResultType, Utf8StringLiteral("void")},
{CodeCompletionChunk::TypedText, Utf8StringLiteral("Function")},
{CodeCompletionChunk::LeftParen, Utf8StringLiteral("(")},
{CodeCompletionChunk::RightParen, Utf8StringLiteral(")")}})));
CodeCompletionChunks({{CodeCompletionChunk::ResultType, Utf8StringLiteral("void")},
{CodeCompletionChunk::TypedText, Utf8StringLiteral("Function")},
{CodeCompletionChunk::LeftParen, Utf8StringLiteral("(")},
{CodeCompletionChunk::RightParen, Utf8StringLiteral(")")}})));
}
TEST_F(CodeCompletionsExtractor, CompletionChunksFunctionWithOptionalChunks)
......@@ -604,16 +603,16 @@ TEST_F(CodeCompletionsExtractor, CompletionChunksFunctionWithOptionalChunks)
::CodeCompletionsExtractor extractor(completeResults.data());
ASSERT_THAT(extractor, HasCompletionChunks(Utf8StringLiteral("FunctionWithOptional"),
QVector<CodeCompletionChunk>({{CodeCompletionChunk::ResultType, Utf8StringLiteral("void")},
{CodeCompletionChunk::TypedText, Utf8StringLiteral("FunctionWithOptional")},
{CodeCompletionChunk::LeftParen, Utf8StringLiteral("(")},
{CodeCompletionChunk::Placeholder, Utf8StringLiteral("int x")},
{CodeCompletionChunk::Optional, Utf8String(), QVector<CodeCompletionChunk>({
{CodeCompletionChunk::Comma, Utf8StringLiteral(", ")},
{CodeCompletionChunk::Placeholder, Utf8StringLiteral("char y")},
{CodeCompletionChunk::Comma, Utf8StringLiteral(", ")},
{CodeCompletionChunk::Placeholder, Utf8StringLiteral("int z")}})},
{CodeCompletionChunk::RightParen, Utf8StringLiteral(")")}})));
CodeCompletionChunks({{CodeCompletionChunk::ResultType, Utf8StringLiteral("void")},
{CodeCompletionChunk::TypedText, Utf8StringLiteral("FunctionWithOptional")},
{CodeCompletionChunk::LeftParen, Utf8StringLiteral("(")},
{CodeCompletionChunk::Placeholder, Utf8StringLiteral("int x")},
{CodeCompletionChunk::Optional, Utf8String(), CodeCompletionChunks({
{CodeCompletionChunk::Comma, Utf8StringLiteral(", ")},
{CodeCompletionChunk::Placeholder, Utf8StringLiteral("char y")},
{CodeCompletionChunk::Comma, Utf8StringLiteral(", ")},
{CodeCompletionChunk::Placeholder, Utf8StringLiteral("int z")}})},
{CodeCompletionChunk::RightParen, Utf8StringLiteral(")")}})));
}
TEST_F(CodeCompletionsExtractor, CompletionChunksField)
......@@ -623,8 +622,8 @@ TEST_F(CodeCompletionsExtractor, CompletionChunksField)
::CodeCompletionsExtractor extractor(completeResults.data());
ASSERT_THAT(extractor, HasCompletionChunks(Utf8StringLiteral("Field"),
QVector<CodeCompletionChunk>({{CodeCompletionChunk::ResultType, Utf8StringLiteral("int")},
{CodeCompletionChunk::TypedText, Utf8StringLiteral("Field")}})));
CodeCompletionChunks({{CodeCompletionChunk::ResultType, Utf8StringLiteral("int")},
{CodeCompletionChunk::TypedText, Utf8StringLiteral("Field")}})));
}
TEST_F(CodeCompletionsExtractor, CompletionChunksEnumerator)
......@@ -634,8 +633,8 @@ TEST_F(CodeCompletionsExtractor, CompletionChunksEnumerator)
::CodeCompletionsExtractor extractor(completeResults.data());
ASSERT_THAT(extractor, HasCompletionChunks(Utf8StringLiteral("Enumerator"),
QVector<CodeCompletionChunk>({{CodeCompletionChunk::ResultType, Utf8StringLiteral("Enumeration")},
{CodeCompletionChunk::TypedText, Utf8StringLiteral("Enumerator")}})));
CodeCompletionChunks({{CodeCompletionChunk::ResultType, Utf8StringLiteral("Enumeration")},
{CodeCompletionChunk::TypedText, Utf8StringLiteral("Enumerator")}})));
}
TEST_F(CodeCompletionsExtractor, CompletionChunksEnumeration)
......@@ -645,7 +644,7 @@ TEST_F(CodeCompletionsExtractor, CompletionChunksEnumeration)
::CodeCompletionsExtractor extractor(completeResults.data());
ASSERT_THAT(extractor, HasCompletionChunks(Utf8StringLiteral("Enumeration"),
QVector<CodeCompletionChunk>({{CodeCompletionChunk::TypedText, Utf8StringLiteral("Enumeration")}})));
CodeCompletionChunks({{CodeCompletionChunk::TypedText, Utf8StringLiteral("Enumeration")}})));
}
TEST_F(CodeCompletionsExtractor, CompletionChunksClass)
......@@ -655,7 +654,7 @@ TEST_F(CodeCompletionsExtractor, CompletionChunksClass)
::CodeCompletionsExtractor extractor(completeResults.data());
ASSERT_THAT(extractor, HasCompletionChunks(Utf8StringLiteral("Class"),
QVector<CodeCompletionChunk>({{CodeCompletionChunk::TypedText, Utf8StringLiteral("Class")}})));
CodeCompletionChunks({{CodeCompletionChunk::TypedText, Utf8StringLiteral("Class")}})));
}
......
......@@ -39,6 +39,7 @@
namespace {
using ClangBackEnd::CodeCompletionChunk;
using ClangBackEnd::CodeCompletionChunks;
using Converter = ClangCodeModel::Internal::CompletionChunksToTextConverter;
class CompletionChunksToTextConverter : public ::testing::Test
......@@ -84,7 +85,7 @@ protected:
TEST_F(CompletionChunksToTextConverter, ParseIsClearingText)
{
QVector<CodeCompletionChunk> completionChunks({integerResultType, functionName, leftParen, rightParen});
CodeCompletionChunks completionChunks({integerResultType, functionName, leftParen, rightParen});
converter.setAddResultType(true);
converter.parseChunks(completionChunks);
......@@ -94,7 +95,7 @@ TEST_F(CompletionChunksToTextConverter, ParseIsClearingText)
TEST_F(CompletionChunksToTextConverter, ConvertFunction)
{
QVector<CodeCompletionChunk> completionChunks({integerResultType, functionName, leftParen, rightParen});
CodeCompletionChunks completionChunks({integerResultType, functionName, leftParen, rightParen});
converter.setAddResultType(true);
converter.parseChunks(completionChunks);
......@@ -104,7 +105,7 @@ TEST_F(CompletionChunksToTextConverter, ConvertFunction)
TEST_F(CompletionChunksToTextConverter, ConvertFunctionWithParameters)
{
QVector<CodeCompletionChunk> completionChunks({integerResultType, functionName, leftParen, functionArgumentX,rightParen});
CodeCompletionChunks completionChunks({integerResultType, functionName, leftParen, functionArgumentX,rightParen});
converter.setAddResultType(true);
converter.setAddPlaceHolderText(true);
......@@ -115,7 +116,7 @@ TEST_F(CompletionChunksToTextConverter, ConvertFunctionWithParameters)
TEST_F(CompletionChunksToTextConverter, ConvertFunctionWithOptionalParameter)
{
QVector<CodeCompletionChunk> completionChunks({integerResultType, functionName, leftParen, functionArgumentX, optional,rightParen});
CodeCompletionChunks completionChunks({integerResultType, functionName, leftParen, functionArgumentX, optional,rightParen});
converter.setAddResultType(true);
converter.setAddPlaceHolderText(true);
......@@ -126,7 +127,7 @@ TEST_F(CompletionChunksToTextConverter, ConvertFunctionWithOptionalParameter)
TEST_F(CompletionChunksToTextConverter, ConvertVariable)
{
QVector<CodeCompletionChunk> completionChunks({integerResultType, variableName});
CodeCompletionChunks completionChunks({integerResultType, variableName});
converter.setAddResultType(true);
converter.parseChunks(completionChunks);
......@@ -136,7 +137,7 @@ TEST_F(CompletionChunksToTextConverter, ConvertVariable)
TEST_F(CompletionChunksToTextConverter, Enumerator)
{
QVector<CodeCompletionChunk> completionChunks({enumerationResultType, enumeratorName});
CodeCompletionChunks completionChunks({enumerationResultType, enumeratorName});
converter.setAddResultType(true);
converter.parseChunks(completionChunks);
......@@ -146,7 +147,7 @@ TEST_F(CompletionChunksToTextConverter, Enumerator)
TEST_F(CompletionChunksToTextConverter, Enumeration)
{
QVector<CodeCompletionChunk> completionChunks({className});
CodeCompletionChunks completionChunks({className});
converter.parseChunks(completionChunks);
......@@ -155,7 +156,7 @@ TEST_F(CompletionChunksToTextConverter, Enumeration)
TEST_F(CompletionChunksToTextConverter, Switch)
{
QVector<CodeCompletionChunk> completionChunks({switchName,
CodeCompletionChunks completionChunks({switchName,
leftParen,
condition,
rightParen,
......@@ -172,7 +173,7 @@ TEST_F(CompletionChunksToTextConverter, Switch)
TEST_F(CompletionChunksToTextConverter, For)
{
QVector<CodeCompletionChunk> completionChunks({forName,
CodeCompletionChunks completionChunks({forName,
leftParen,
initStatement,
semicolon,
......@@ -194,7 +195,7 @@ TEST_F(CompletionChunksToTextConverter, For)
TEST_F(CompletionChunksToTextConverter, const_cast)
{
QVector<CodeCompletionChunk> completionChunks({constCastName,
CodeCompletionChunks completionChunks({constCastName,
leftAngle,
rightAngle,
leftParen,
......@@ -208,7 +209,7 @@ TEST_F(CompletionChunksToTextConverter, const_cast)