mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Easier code
svn path=/trunk/KDE/kdebase/apps/; revision=750473
This commit is contained in:
parent
38b45d4c52
commit
40744e5404
1 changed files with 1 additions and 14 deletions
|
@ -62,20 +62,7 @@ void TerminalSidebarPage::terminalExited()
|
||||||
{
|
{
|
||||||
emit hideTerminalSidebarPage();
|
emit hideTerminalSidebarPage();
|
||||||
|
|
||||||
KPluginFactory* factory = KPluginLoader("libkonsolepart").factory();
|
m_terminal = 0;
|
||||||
KParts::ReadOnlyPart* part = factory ? (factory->create<KParts::ReadOnlyPart>(this)) : 0;
|
|
||||||
if (part != 0) {
|
|
||||||
connect(part, SIGNAL(destroyed(QObject*)), this, SLOT(terminalExited()));
|
|
||||||
m_terminalWidget = part->widget();
|
|
||||||
m_layout->addWidget(m_terminalWidget);
|
|
||||||
m_terminal = qobject_cast<TerminalInterface *>(part);
|
|
||||||
m_terminal->showShellInDir(url().path());
|
|
||||||
}
|
|
||||||
if (m_terminal != 0) {
|
|
||||||
m_terminal->sendInput("cd " + KShell::quoteArg(url().path()) + '\n');
|
|
||||||
m_terminal->sendInput("clear\n");
|
|
||||||
m_terminalWidget->setFocus();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TerminalSidebarPage::showEvent(QShowEvent* event)
|
void TerminalSidebarPage::showEvent(QShowEvent* event)
|
||||||
|
|
Loading…
Reference in a new issue