def __bookmarkLink(self):
     """
     Private slot to bookmark a link via the context menu.
     """
     act = self.sender()
     url = act.data().toUrl()
     if url.isEmpty():
         return
     
     dlg = AddBookmarkDialog()
     dlg.setUrl(QString(url.toEncoded()))
     dlg.exec_()
 def __addBookmark(self):
     """
     Private slot to bookmark the current link.
     """
     dlg = AddBookmarkDialog()
     dlg.setUrl(QString(self.url().toEncoded()))
     dlg.setTitle(self.title())
     dlg.exec_()