Commit 820775f3 authored by Milian Wolff's avatar Milian Wolff

adapt to KDevelop API changes

parent 17d18631
......@@ -44,7 +44,7 @@ public:
QWidget* createExpandingWidget(const CodeCompletionModel* /*model*/) const override
{
return new Python::NavigationWidget(m_declaration, {}, {}, {}, KDevelop::AbstractNavigationWidget::EmbeddableWidget);
return new Python::NavigationWidget(m_declaration, {}, KDevelop::AbstractNavigationWidget::EmbeddableWidget);
}
protected:
......
......@@ -27,7 +27,7 @@ using namespace KDevelop;
namespace Python {
NavigationWidget::NavigationWidget(KDevelop::DeclarationPointer declaration, KDevelop::TopDUContextPointer topContext,
const QString& /* htmlPrefix */, const QString& /* htmlSuffix */, KDevelop::AbstractNavigationWidget::DisplayHints hints)
KDevelop::AbstractNavigationWidget::DisplayHints hints)
: KDevelop::AbstractNavigationWidget()
{
setDisplayHints(hints);
......@@ -39,7 +39,7 @@ NavigationWidget::NavigationWidget(KDevelop::DeclarationPointer declaration, KDe
}
NavigationWidget::NavigationWidget(const IncludeItem &/*includeItem*/, TopDUContextPointer /*topContext*/,
const QString &/*htmlPrefix*/, const QString &/*htmlSuffix*/, KDevelop::AbstractNavigationWidget::DisplayHints hints)
KDevelop::AbstractNavigationWidget::DisplayHints hints)
: KDevelop::AbstractNavigationWidget()
{
setDisplayHints(hints);
......
......@@ -33,10 +33,8 @@ class KDEVPYTHONDUCHAIN_EXPORT NavigationWidget : public KDevelop::AbstractNavig
public:
NavigationWidget(KDevelop::DeclarationPointer declaration, KDevelop::TopDUContextPointer topContext,
const QString& htmlPrefix = QString(), const QString& htmlSuffix = QString(),
KDevelop::AbstractNavigationWidget::DisplayHints hints = KDevelop::AbstractNavigationWidget::NoHints);
NavigationWidget(const KDevelop::IncludeItem& includeItem, KDevelop::TopDUContextPointer topContext,
const QString& htmlPrefix = QString(), const QString& htmlSuffix = QString(),
KDevelop::AbstractNavigationWidget::DisplayHints hints = KDevelop::AbstractNavigationWidget::NoHints);
static QString shortDescription(const KDevelop::IncludeItem&) { return QString(); };
......
......@@ -39,24 +39,22 @@ REGISTER_DUCHAIN_ITEM_WITH_DATA(PythonNormalDUContext, DUContextData);
template<>
QWidget* PythonTopDUContext::createNavigationWidget(Declaration* decl, TopDUContext* topContext,
const QString& htmlPrefix, const QString& htmlSuffix,
KDevelop::AbstractNavigationWidget::DisplayHints hints) const {
if ( ! decl ) {
qCDebug(KDEV_PYTHON_DUCHAIN) << "no declaration, not returning navigationwidget";
return nullptr;
}
return new NavigationWidget(DeclarationPointer(decl), TopDUContextPointer(topContext), htmlPrefix, htmlSuffix, hints);
return new NavigationWidget(DeclarationPointer(decl), TopDUContextPointer(topContext), hints);
}
template<>
QWidget* PythonNormalDUContext::createNavigationWidget(Declaration* decl, TopDUContext* topContext,
const QString& htmlPrefix, const QString& htmlSuffix,
KDevelop::AbstractNavigationWidget::DisplayHints hints) const {
if ( ! decl ) {
qCDebug(KDEV_PYTHON_DUCHAIN) << "no declaration, not returning navigationwidget";
return nullptr;
}
return new NavigationWidget(DeclarationPointer(decl), TopDUContextPointer(topContext), htmlPrefix, htmlSuffix, hints);
return new NavigationWidget(DeclarationPointer(decl), TopDUContextPointer(topContext), hints);
}
}
......@@ -60,7 +60,6 @@ public:
}
QWidget* createNavigationWidget(KDevelop::Declaration* decl, KDevelop::TopDUContext* topContext,
const QString& htmlPrefix, const QString& htmlSuffix,
KDevelop::AbstractNavigationWidget::DisplayHints hints) const override;
enum {
......
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