+
+ // needed to collect the correct KonsolePart actionCollection
+ // namely the one of the single inner terminal and not the outer KonsolePart
+ if (!m_konsolePart->factory() && m_terminalWidget) {
+ if (!m_konsolePart->clientBuilder()) {
+ m_konsolePart->setClientBuilder(new KXMLGUIBuilder(m_terminalWidget));
+ }
+
+ auto factory = new KXMLGUIFactory(m_konsolePart->clientBuilder(), this);
+ factory->addClient(m_konsolePart);
+
+ // Prevents the KXMLGui warning about removing the client
+ connect(m_terminalWidget, &QObject::destroyed, this, [factory, this] {
+ factory->removeClient(m_konsolePart);
+ });
+ }
+