void BookmarkManager::setBookmarks(const QList<URLBookmark>& urls, const QList<ConferenceBookmark>& conferences) { urls_ = urls; conferences_ = conferences; QStringList localMucs; QList<ConferenceBookmark> remoteMucs; QStringList ignoreMucs; foreach (const ConferenceBookmark &cb, conferences) { if (cb.autoJoin() == ConferenceBookmark::OnlyThisComputer) { localMucs.append(cb.jid().withResource(cb.nick()).full()); } else { if (cb.autoJoin() == ConferenceBookmark::ExceptThisComputer) { ignoreMucs.append(cb.jid().bare()); } remoteMucs.append(cb); } } account_->setLocalMucBookmarks(localMucs); PsiOptions::instance()->setOption("options.muc.bookmarks.ignore-join", ignoreMucs); BookmarkTask* t = new BookmarkTask(account_->client()->rootTask()); connect(t,SIGNAL(finished()),SLOT(setBookmarks_finished())); t->set(urls,remoteMucs); t->go(true); }
void BookmarkManager::setBookmarks(const QList<URLBookmark>& urls, const QList<ConferenceBookmark>& conferences) { urls_ = urls; conferences_ = conferences; BookmarkTask* t = new BookmarkTask(account_->client()->rootTask()); connect(t,SIGNAL(finished()),SLOT(setBookmarks_finished())); t->set(urls,conferences); t->go(true); }