void BookmarkList::slotExecuted( QTreeWidgetItem * item ) { BookmarkItem* bmItem = dynamic_cast<BookmarkItem*>( item ); if ( !bmItem || !bmItem->viewport().isValid() ) return; goTo( bmItem ); }
void BookmarkList::slotChanged( QTreeWidgetItem * item ) { BookmarkItem* bmItem = dynamic_cast<BookmarkItem*>( item ); if ( bmItem && bmItem->viewport().isValid() ) { bmItem->bookmark().setFullText( bmItem->text( 0 ) ); m_document->bookmarkManager()->save(); } FileItem* fItem = dynamic_cast<FileItem*>( item ); if ( fItem ) { const KUrl url = fItem->data( 0, UrlRole ).value< KUrl >(); m_document->bookmarkManager()->renameBookmark( url, fItem->text( 0 ) ); m_document->bookmarkManager()->save(); } }