[Nepomuk] Re: Review Request: Extra function for SimpleResource and SimpleResourceGraph
Sebastian Trueg
sebastian at trueg.de
Fri Jul 8 11:43:38 CEST 2011
> On July 7, 2011, 12:03 p.m., Sebastian Trueg wrote:
> > nepomuk/services/storage/lib/simpleresourcegraph.cpp, line 259
> > <http://git.reviewboard.kde.org/r/101856/diff/3/?file=26212#file26212line259>
> >
> > Why not use graph.toList() and avoid the need of making it a friend?
> > Also storing a list is sufficient since the URIs are contained in the SimpleResources anyway.
>
> Artem Serebriyskiy wrote:
> I think that it will make oposite operator ( operator>> ) more complex and less intuitive.
>
> operator>>(QDataStream & stream, const Nepomuk::SimpleResourceGraph& graph)
> {
> QList<SimpleResource> l;
> stream >> l;
> graph = SimpleResourceGraph(l);
> return stream;
> }
>
> But it is possible and I can use this method.
Looks much better to me actually. The API is the same so I do not see the "less intuitive" here.
- Sebastian
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101856/#review4492
-----------------------------------------------------------
On July 7, 2011, 8:08 p.m., Artem Serebriyskiy wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101856/
> -----------------------------------------------------------
>
> (Updated July 7, 2011, 8:08 p.m.)
>
>
> Review request for Nepomuk.
>
>
> Summary
> -------
>
> Extra functions to SimpleResource|Graph
> 1. Operator comparison for Graph
> 2. addGraph for Graph - merges 2 graphs into one
> 3. Serialization operators to QDataStream to both classes.
> 4. Tests for simpleresourcetest
>
>
> Diffs
> -----
>
> nepomuk/services/storage/lib/simpleresource.h c6c3b04
> nepomuk/services/storage/lib/simpleresource.cpp 3d529bb
> nepomuk/services/storage/lib/simpleresourcegraph.h 6a3a0ee
> nepomuk/services/storage/lib/simpleresourcegraph.cpp 419a949
> nepomuk/services/storage/test/CMakeLists.txt f8d00de
> nepomuk/services/storage/test/simpleresourceclassestest.h PRE-CREATION
> nepomuk/services/storage/test/simpleresourceclassestest.cpp PRE-CREATION
>
> Diff: http://git.reviewboard.kde.org/r/101856/diff
>
>
> Testing
> -------
>
> Provide tests for this operations. Currently failing addGraph test, because of SimpleResource::addProperties behaviour. But may be it is intended, then I will rewrite test case.
>
>
> Thanks,
>
> Artem
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/nepomuk/attachments/20110708/7efeb724/attachment-0001.htm
More information about the Nepomuk
mailing list