[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdelibs/kio/bookmarks
From:       Alexander Kellett <lypanov () kde ! org>
Date:       2003-01-31 21:42:42
[Download RAW message or body]

CVS commit by lypanov: 

use addresses rather than urls for qobject names


  M +7 -4      kbookmarkmenu.cc   1.136


--- kdelibs/kio/bookmarks/kbookmarkmenu.cc  #1.135:1.136
@@ -430,8 +430,7 @@ void KBookmarkMenu::fillBookmarkMenu()
       {
         // kdDebug(7043) << "Creating URL bookmark menu item for " << bm.text() << endl;
-        // create a normal URL item, with ID as a name
         KAction * action = new KAction( text, bm.icon(), 0,
                                         this, SLOT( slotBookmarkSelected() ),
-                                        m_actionCollection, bm.url().url().utf8() );
+                                        m_actionCollection, bm.address().utf8() );
 
         action->setToolTip( bm.url().prettyURL() );
@@ -547,6 +546,10 @@ void KBookmarkMenu::slotBookmarkSelected
   //kdDebug(7043) << "KBookmarkMenu::slotBookmarkSelected()" << endl;
   if ( !m_pOwner ) return; // this view doesn't handle bookmarks...
-  // The name of the action is the URL to open
-  m_pOwner->openBookmarkURL( QString::fromUtf8(sender()->name()) );
+
+  KBookmark bookmark = m_pManager->findByAddress( QString::fromUtf8(sender()->name()) );
+  Q_ASSERT(!bookmark.isNull());
+  Q_ASSERT(!bookmark.isGroup());
+
+  m_pOwner->openBookmarkURL( bookmark.url().url() );
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic