Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 9c9c19fa authored by David Nolden's avatar David Nolden

Adapt to changes in kdevplatorm: usesCount() instead of uses().count().

parent d5ee0abf
......@@ -61,6 +61,7 @@ While construction:
#include <duchain/duchainlock.h>
#include <duchain/duchain.h>
#include <duchain/topducontext.h>
#include <duchain/arrayhelpers.h>
#include <duchain/classfunctiondeclaration.h>
#include <duchain/namespacealiasdeclaration.h>
#include "typeutils.h"
......
......@@ -426,7 +426,7 @@ void TestDUChain::testTypedefUses()
DUChainWriteLocker lock(DUChain::lock());
QCOMPARE(top->localDeclarations().count(), 4);
QCOMPARE(top->uses().count(), 3);
QCOMPARE(top->usesCount(), 3);
QCOMPARE(top->localDeclarations()[0]->uses().count(), 1); //1 File
QCOMPARE(top->localDeclarations()[1]->uses().count(), 1); //1 File
......
......@@ -338,7 +338,7 @@ void CppHighlighting::deleteHighlighting(KDevelop::DUContext* context) const {
if(dec->smartRange())
dec->smartRange()->setAttribute(KTextEditor::Attribute::Ptr());
for(int a = 0; a < context->uses().count(); ++a)
for(int a = 0; a < context->usesCount(); ++a)
if(context->useSmartRange(a))
context->useSmartRange(a)->setAttribute(KTextEditor::Attribute::Ptr());
......@@ -396,7 +396,7 @@ void CppHighlighting::highlightDUChain(DUContext* context, QHash<Declaration*, u
highlightDeclaration(dec, colors[colorNum]);
}
for(int a = 0; a < context->uses().count(); ++a) {
for(int a = 0; a < context->usesCount(); ++a) {
Declaration* decl = context->topContext()->usedDeclarationForIndex(context->uses()[a].m_declarationIndex);
uint colorNum = validColorCount;
if( colorsForDeclarations.contains(decl) )
......@@ -552,7 +552,7 @@ void CppHighlighting::highlightUse(DUContext* context, int index, uint color) co
void CppHighlighting::highlightUses(DUContext* context) const
{
for(int a = 0; a < context->uses().count(); ++a) {
for(int a = 0; a < context->usesCount(); ++a) {
if (SmartRange* range = context->useSmartRange(a)) {
Types type = ErrorVariableType;
Declaration* decl = context->topContext()->usedDeclarationForIndex(context->uses()[a].m_declarationIndex);
......
......@@ -37,6 +37,7 @@
#include "navigationwidget.h"
#include "cppcodecompletionmodel.h"
#include "cpplanguagesupport.h"
#include <arrayhelpers.h>
using namespace KDevelop;
using namespace Cpp;
......
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