Commit e0f1c5cf authored by Stephan Kulow's avatar Stephan Kulow
Browse files

more replacements of action->plug

svn path=/trunk/KDE/kdebase/konqueror/; revision=537551
parent efd4044b
......@@ -4899,7 +4899,7 @@ void KonqMainWindow::updateViewModeActions()
this, SLOT( slotViewModeToggle( bool ) ) );
m_viewModeActions.append( action );
action->plug( m_viewModeMenu->popupMenu() );
m_viewModeMenu->popupMenu()->addAction( action );
const QString library = viewModeActionKey( *it );
......@@ -4983,7 +4983,7 @@ void KonqMainWindow::updateViewModeActions()
}
// plug action also into the delayed popupmenu of appropriate toolbar action
action->plug( (*mapIt)->menu() );
(*mapIt)->menu()->addAction( action );
}
#ifndef NDEBUG
......
......@@ -105,13 +105,13 @@ bool KonqSidebarBookmarkModule::handleTopLevelContextMenu( KonqSidebarTreeTopLev
QMenu *menu = new QMenu;
if (tree()->tabSupport()) {
m_collection->action("folder_open_tabs")->plug(menu);
menu->addAction( m_collection->action("folder_open_tabs") );
menu->insertSeparator();
}
m_collection->action("create_folder")->plug(menu);
menu->addAction( m_collection->action("create_folder") );
menu->insertSeparator();
m_collection->action("edit_bookmarks")->plug(menu);
menu->addAction( m_collection->action("edit_bookmarks") );
menu->exec( QCursor::pos() );
delete menu;
......@@ -130,22 +130,22 @@ void KonqSidebarBookmarkModule::showPopupMenu()
if (bi->bookmark().isGroup()) {
if (tabSupported) {
m_collection->action("folder_open_tabs")->plug(menu);
menu->addAction( m_collection->action("folder_open_tabs") );
menu->insertSeparator();
}
m_collection->action("create_folder")->plug(menu);
m_collection->action("delete_folder")->plug(menu);
menu->addAction( m_collection->action("create_folder") );
menu->addAction( m_collection->action("delete_folder") );
} else {
m_collection->action("open_window")->plug(menu);
menu->addAction( m_collection->action("open_window") );
if (tabSupported)
m_collection->action("open_tab")->plug(menu);
m_collection->action("copy_location")->plug(menu);
menu->addAction( m_collection->action("open_tab") );
menu->addAction( m_collection->action("copy_location") );
menu->insertSeparator();
m_collection->action("create_folder")->plug(menu);
m_collection->action("delete_bookmark")->plug(menu);
menu->addAction( m_collection->action("create_folder") );
menu->addAction( m_collection->action("delete_bookmark") );
}
menu->insertSeparator();
m_collection->action("item_properties")->plug(menu);
menu->addAction( m_collection->action("item_properties") );
menu->exec( QCursor::pos() );
delete menu;
......
......@@ -228,23 +228,23 @@ void KonqSidebarHistoryModule::showPopupMenu()
void KonqSidebarHistoryModule::showPopupMenu( int which, const QPoint& pos )
{
QMenu *sortMenu = new QMenu;
m_collection->action("byName")->plug( sortMenu );
m_collection->action("byDate")->plug( sortMenu );
sortMenu->addAction( m_collection->action("byName") );
sortMenu->addAction( m_collection->action("byDate") );
QMenu *menu = new QMenu;
if ( which & EntryContextMenu )
{
m_collection->action("open_new")->plug( menu );
menu->addAction( m_collection->action("open_new") );
menu->insertSeparator();
m_collection->action("remove")->plug( menu );
menu->addAction( m_collection->action("remove") );
}
m_collection->action("clear")->plug( menu );
menu->addAction( m_collection->action("clear") );
menu->insertSeparator();
menu->insertItem( i18n("Sort"), sortMenu );
menu->insertSeparator();
m_collection->action("preferences")->plug( menu );
menu->addAction( m_collection->action("preferences") );
menu->exec( pos );
delete menu;
......
......@@ -945,23 +945,23 @@ void KonqSidebarTree::showToplevelContextMenu()
if (item) {
if (item->isTopLevelGroup()) {
m_collection->action("rename")->plug(menu);
m_collection->action("delete_folder")->plug(menu);
menu->addAction( m_collection->action("rename") );
menu->addAction( m_collection->action("delete_folder") );
menu->insertSeparator();
m_collection->action("create_folder")->plug(menu);
menu->addAction( m_collection->action("create_folder") );
} else {
if (tabSupport())
m_collection->action("open_tab")->plug(menu);
m_collection->action("open_window")->plug(menu);
m_collection->action("copy_location")->plug(menu);
menu->addAction( m_collection->action("open_tab") );
menu->addAction( m_collection->action("open_window") );
menu->addAction( m_collection->action("copy_location") );
menu->insertSeparator();
m_collection->action("rename")->plug(menu);
m_collection->action("delete_link")->plug(menu);
menu->addAction( m_collection->action("rename") );
menu->addAction( m_collection->action("delete_link") );
}
menu->insertSeparator();
m_collection->action("item_properties")->plug(menu);
menu->addAction( m_collection->action("item_properties") );
} else {
m_collection->action("create_folder")->plug(menu);
menu->addAction( m_collection->action("create_folder") );
}
m_currentTopLevelItem = item;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment