http://bugs.openzim.org/show_bug.cgi?id=13
Tommi Mäkitalo tommi@tntnet.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME
--- Comment #1 from Tommi Mäkitalo tommi@tntnet.org 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.