KDE/kdevplatform/debugger/variable

Niko Sams niko.sams at gmail.com
Wed Oct 14 18:16:57 UTC 2009


On Wed, Oct 14, 2009 at 16:41, Vladimir Prus <ghost at cs.msu.su> wrote:
> On Wednesday 14 October 2009 Niko Sams wrote:
>
>> On Tue, Oct 13, 2009 at 22:27, Vladimir Prus <ghost at cs.msu.su> wrote:
>> > On Sunday 11 October 2009 Niko Sams wrote:
>> >
>> >> SVN commit 1033903 by nsams:
>> >>
>> >> Make methods public to modify children from outside.
>> >> (Needed in xdebug plugin)
>> >>
>> >>  M  +5 -1      variablecollection.h
>> >>
>> >>
>> >> --- trunk/KDE/kdevplatform/debugger/variable/variablecollection.h #1033902:1033903
>> >> @@ -140,8 +140,12 @@
>> >>      Locals(TreeModel* model, TreeItem* parent);
>> >>      void updateLocals(QStringList locals);
>> >>
>> >> +    using TreeItem::setHasMore;
>> >> +    using TreeItem::child;
>> >> +    using TreeItem::childCount;
>> >> +    using TreeItem::appendChild;
>> >> +    using TreeItem::removeChild;
>> >>      using TreeItem::deleteChildren;
>> >> -    using TreeItem::setHasMore;
>> >
>> > Why is this actually needed? Why can't xdebug plugin derive from the Variable class?
>> I added this to Locals only.
>> Because I can't use updateLocals - as I get more information from the
>> debugger (like
>> values and children) for the locals.
>
> Can you clarify this part? Are you fetching things more incrementally?
> Or, can you point me at whatever implementation for xdebug you have,
> so that I can take a look.
Sure, see here:
http://websvn.kde.org/trunk/playground/devtools/kdevelop4-extra-plugins/xdebug/variablecontroller.cpp?revision=1033901&view=markup
VariableController::handleLocals

XDebug returns almost all information needed to buid the locals tree
by just one call.

It would be nice to have an improved updateLocals in kdevplatform, as basically
this is a copy of it.
It could return the created variables - however I couldn't use QXmlStreamReader
that way then.


Niko




More information about the KDevelop-devel mailing list