Commit ec4391fb authored by Christoph Cullmann's avatar Christoph Cullmann

load terminal on demand to have some parent widget for WINDOWID computation

CCBUG: 411965
parent b25b6ce9
...@@ -39,11 +39,6 @@ KateProjectInfoViewTerminal::KateProjectInfoViewTerminal(KateProjectPluginView * ...@@ -39,11 +39,6 @@ KateProjectInfoViewTerminal::KateProjectInfoViewTerminal(KateProjectPluginView *
m_layout = new QVBoxLayout(this); m_layout = new QVBoxLayout(this);
m_layout->setSpacing(0); m_layout->setSpacing(0);
m_layout->setContentsMargins(0, 0, 0, 0); m_layout->setContentsMargins(0, 0, 0, 0);
/**
* initial terminal creation
*/
loadTerminal();
} }
KateProjectInfoViewTerminal::~KateProjectInfoViewTerminal() KateProjectInfoViewTerminal::~KateProjectInfoViewTerminal()
...@@ -64,6 +59,16 @@ KPluginFactory *KateProjectInfoViewTerminal::pluginFactory() ...@@ -64,6 +59,16 @@ KPluginFactory *KateProjectInfoViewTerminal::pluginFactory()
return s_pluginFactory = KPluginLoader(QStringLiteral("konsolepart")).factory(); return s_pluginFactory = KPluginLoader(QStringLiteral("konsolepart")).factory();
} }
void KateProjectInfoViewTerminal::showEvent(QShowEvent *)
{
/**
* we delay the terminal construction until we have some part to have a usable WINDOWID, see bug 411965
*/
if (!m_konsolePart) {
loadTerminal();
}
}
void KateProjectInfoViewTerminal::loadTerminal() void KateProjectInfoViewTerminal::loadTerminal()
{ {
/** /**
......
...@@ -70,6 +70,13 @@ private Q_SLOTS: ...@@ -70,6 +70,13 @@ private Q_SLOTS:
*/ */
void overrideShortcut(QKeyEvent *event, bool &override); void overrideShortcut(QKeyEvent *event, bool &override);
protected:
/**
* the konsole get shown
* @param ev show event
*/
void showEvent(QShowEvent *ev) override;
private: private:
/** /**
* plugin factory for the terminal * plugin factory for the terminal
......
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