http://bugs.openzim.org/show_bug.cgi?id=13


Tommi Mäkitalo <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME




--- Comment #1 from Tommi Mäkitalo <[email protected]>  2009-11-08 17:14:44 CET 
---
zim::File::find returns always the next article when no excact match was found.

There is another method "zim::File::findx(char ns, const QUnicodeString& title,
bool collate = false)". This returns a "std::pair<bool, const_iterator>". The
first element is true, if a excact match was found and false otherwise. The
second element returns the const_iterator. zim::File::find is actually a
wrapper around findx, which throws the bool-flag away and returns just the
const_iterator.

You may as well use zim::File::getArticle. This uses findx as well but returns
a null article (article.good() returns false) if no exact match was found.

-- 
Configure bugmail: http://bugs.openzim.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
dev-l mailing list
[email protected]
https://intern.openzim.org/mailman/listinfo/dev-l

Reply via email to