Commit 13bc81e1 authored by Kurt Hindenburg's avatar Kurt Hindenburg

Fix the warning message 'Attempt to use QAction "change-profile" with KXMLGUIFactory!'

CCBUG: 183244

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1098369
parent 6d0e0652
......@@ -540,9 +540,10 @@ void SessionController::setupActions()
action->setIcon( KIcon("document-properties") );
connect( action , SIGNAL(triggered()) , this , SLOT(editCurrentProfile()) );
_changeProfileMenu = new KMenu(i18n("Change Profile"),_view);
collection->addAction("change-profile",_changeProfileMenu->menuAction());
connect( _changeProfileMenu , SIGNAL(aboutToShow()) , this , SLOT(prepareChangeProfileMenu()) );
_changeProfileMenu = new KActionMenu(i18n("Change Profile"), _view);
collection->addAction("change-profile", _changeProfileMenu);
connect( _changeProfileMenu->menu() , SIGNAL(aboutToShow()) , this , SLOT(prepareChangeProfileMenu()) );
}
void SessionController::changeProfile(Profile::Ptr profile)
{
......@@ -550,15 +551,15 @@ void SessionController::changeProfile(Profile::Ptr profile)
}
void SessionController::prepareChangeProfileMenu()
{
if ( _changeProfileMenu->isEmpty() )
if ( _changeProfileMenu->menu()->isEmpty() )
{
_profileList = new ProfileList(false,this);
connect( _profileList , SIGNAL(profileSelected(Profile::Ptr)) ,
this , SLOT(changeProfile(Profile::Ptr)) );
}
_changeProfileMenu->clear();
_changeProfileMenu->addActions(_profileList->actions());
_changeProfileMenu->menu()->clear();
_changeProfileMenu->menu()->addActions(_profileList->actions());
}
void SessionController::updateCodecAction()
{
......
......@@ -31,6 +31,7 @@
// KDE
#include <KActionCollection>
#include <KActionMenu>
#include <KIcon>
#include <KXMLGUIClient>
......@@ -260,7 +261,7 @@ private:
KCodecAction* _codecAction;
KMenu* _changeProfileMenu;
KActionMenu* _changeProfileMenu;
bool _listenForScreenWindowUpdates;
bool _preventClose;
......
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