mirror of
https://github.com/KDE/konsole.git
synced 2026-02-01 10:51:33 -05:00
Create a KXMLGUIFactory for the context menu on the fly, if needed, instead of forcibly merging with the hosts GUI.
BUG: 153646 svn path=/trunk/KDE/kdebase/apps/konsole/; revision=747059
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include <KToggleAction>
|
||||
#include <KUrl>
|
||||
#include <KXMLGUIFactory>
|
||||
#include <KXMLGUIBuilder>
|
||||
#include <kdebug.h>
|
||||
#include <kcodecaction.h>
|
||||
#include <kdeversion.h>
|
||||
@@ -899,6 +900,16 @@ void SessionController::showDisplayContextMenu(TerminalDisplay* /*display*/ , in
|
||||
{
|
||||
QMenu* popup = 0;
|
||||
|
||||
// needed to make sure the popup menu is available, even if a hosting
|
||||
// application did not merge our GUI.
|
||||
if (!factory()) {
|
||||
if (!clientBuilder()) {
|
||||
setClientBuilder(new KXMLGUIBuilder(_view));
|
||||
}
|
||||
KXMLGUIFactory* f = new KXMLGUIFactory(clientBuilder(), this);
|
||||
f->addClient(this);
|
||||
}
|
||||
|
||||
if ( factory() )
|
||||
popup = qobject_cast<QMenu*>(factory()->container("session-popup-menu",this));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user