{
FavoriteThreads* instance = FavoriteThreads::getInstance();
+ FavoritesXmlParser parser;
+ QXmlSimpleReader reader;
+ QXmlInputSource source;
+ source.setData( xml );
+ reader.setContentHandler( &parser );
+ reader.parse( &source );
+
+ if( parser.isValid() ) {
+ QPtrList<Kita::Thread> threads = parser.getThreads();
+
+ instance->m_threadMap.clear();
+ for( Kita::Thread* thread = threads.first(); thread; thread = threads.next() ) {
+ instance->insert( Kita::Thread( *(thread->getBoard()), thread->datURL(), thread->name(), thread->resNum() ) );
+ }
+ } else {
+ qDebug("inValid");
+ }
+
return instance;
}
"</board>\n"
"</thread>\n"
"</favorites>\n";
+
return true;
}