FeedReeder:

- Fixed memory leak in xpath processing
- Stop long loops when closing the preview dialog or shutdown
- Added drag and drop to xpath lists in preview dialog
- Fixed save of xpaths lists

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6074 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2013-01-16 23:20:47 +00:00
parent 66c4a3d71b
commit 13f2863569
5 changed files with 254 additions and 149 deletions

View file

@ -71,12 +71,25 @@ bool XPathWrapper::compile(const char *expression)
return true;
}
xmlXPathObjectType XPathWrapper::type()
{
if (mResult) {
return mResult->type;
}
return XPATH_UNDEFINED;
}
unsigned int XPathWrapper::count()
{
if (!mResult) {
return 0;
}
if (mResult->type != XPATH_NODESET) {
return 0;
}
if (xmlXPathNodeSetIsEmpty(mResult->nodesetval)) {
return 0;
}
@ -90,6 +103,10 @@ xmlNodePtr XPathWrapper::node(unsigned int index)
return NULL;
}
if (mResult->type != XPATH_NODESET) {
return NULL;
}
if (xmlXPathNodeSetIsEmpty(mResult->nodesetval)) {
return NULL;
}

View file

@ -37,6 +37,8 @@ public:
bool compile(const char *expression);
xmlXPathObjectType type();
unsigned int count();
xmlNodePtr node(unsigned int index);
@ -48,4 +50,4 @@ protected:
xmlXPathObjectPtr mResult;
};
#endif
#endif