Skip to content
Snippets Groups Projects
Commit b6f2c4cf authored by Andreas Schenk's avatar Andreas Schenk
Browse files

fixed BZDNG-170 (code completion issues)

parent 269ed983
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,6 @@ QString PythonCompleter::pathFromIndex(const QModelIndex & index) const
void PythonCompleter::SetCompletionPrefix(const QString& prefix)
{
dynamic_cast<PythonNamespaceTreeModel*>(this->model())->Reset();
this->setCompletionPrefix("");
this->setCompletionPrefix(prefix);
}
......
......@@ -47,8 +47,11 @@ void PythonNamespaceTreeItem::DeleteChildren()
children_.clear();
initialized_=false;
}
unsigned int PythonNamespaceTreeItem::ChildCount() const
unsigned int PythonNamespaceTreeItem::ChildCount()
{
if(CanFetchMore()){
FetchMore();
}
return children_.size();
}
......@@ -56,8 +59,11 @@ PythonNamespaceTreeItem* PythonNamespaceTreeItem::GetParent() const
{
return parent_;
}
PythonNamespaceTreeItem* PythonNamespaceTreeItem::GetChild(unsigned int index) const
PythonNamespaceTreeItem* PythonNamespaceTreeItem::GetChild(unsigned int index)
{
if(CanFetchMore()){
FetchMore();
}
return children_.value(index);
}
unsigned int PythonNamespaceTreeItem::GetRow() const
......
......@@ -35,8 +35,8 @@ public:
PythonNamespaceTreeItem(const bp::object& ns, const QString& name, PythonNamespaceTreeItem* parent=0);
virtual ~PythonNamespaceTreeItem();
PythonNamespaceTreeItem* GetParent() const;
PythonNamespaceTreeItem* GetChild(unsigned int index) const;
unsigned int ChildCount() const;
PythonNamespaceTreeItem* GetChild(unsigned int index);
unsigned int ChildCount();
void DeleteChildren();
unsigned int GetRow() const;
QString GetName() const;
......
......@@ -19,7 +19,7 @@
#include "python_interpreter.hh"
#include "python_namespace_tree_model.hh"
#include "python_namespace_tree_item.hh"
#include <QDebug>
namespace ost{namespace gui{
PythonNamespaceTreeModel::PythonNamespaceTreeModel():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment