Commit b5769764 authored by Kevin Funk's avatar Kevin Funk

Minor: Code cleanup

Changes:
- Remove unused methods
- Reformat code
parent cb4c30a7
......@@ -97,7 +97,7 @@ protected:
class OverrideItem : public CompletionItem<CompletionTreeItem>
{
public:
OverrideItem(QString& nameAndParams, QString& returnType)
OverrideItem(const QString& nameAndParams, const QString& returnType)
: CompletionItem<KDevelop::CompletionTreeItem>(
nameAndParams,
i18n("Override %1", returnType),
......@@ -121,7 +121,7 @@ public:
class ImplementsItem : public CompletionItem<CompletionTreeItem>
{
public:
ImplementsItem(FuncImplementInfo& item)
ImplementsItem(const FuncImplementInfo& item)
: CompletionItem<KDevelop::CompletionTreeItem>(
item.prototype,
i18n("Implement %1", item.isConstructor ? "<constructor>" :
......@@ -531,7 +531,8 @@ QList<CompletionTreeItemPointer> ClangCodeCompletionContext::completionItems(boo
return items;
}
void ClangCodeCompletionContext::eventuallyAddGroup(const QString& name, int priority, const QList<CompletionTreeItemPointer>& items)
void ClangCodeCompletionContext::eventuallyAddGroup(const QString& name, int priority,
const QList<CompletionTreeItemPointer>& items)
{
if (items.isEmpty()) {
return;
......
......@@ -60,21 +60,6 @@ void TestCodeCompletion::cleanupTestCase()
}
namespace {
QString formatFuncOverrideInfo(const FuncOverrideInfo& info)
{
return QString(info.returnType + ' ' + info.name + '(' + info.params.join(", ") +
')' + (info.isConst ? " const" : "") + (info.isVirtual ? " = 0" : ""));
}
QString formatFuncImplementInfo(const FuncImplementInfo& info)
{
return QString(info.templatePrefix + (!info.isDestructor && !info.isConstructor ? info.returnType + ' ' : "") + info.prototype);
}
ParseSessionData::Ptr sessionData(const TestFile& file, ClangIndex* index)
{
return ParseSessionData::Ptr(new ParseSessionData(file.url(), file.fileContents().toUtf8(), index));
}
void executeCompletionTest(const QString& code, const CompletionItemsList& expectedCompletionItems,
const ClangCodeCompletionContext::ContextFilters& filters = ClangCodeCompletionContext::ContextFilters(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment