diff options
Diffstat (limited to 'src/panels/terminal/terminalpanel.cpp')
| -rw-r--r-- | src/panels/terminal/terminalpanel.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp index bfd3002f0..c8352f73a 100644 --- a/src/panels/terminal/terminalpanel.cpp +++ b/src/panels/terminal/terminalpanel.cpp @@ -24,11 +24,12 @@ #include <KPluginLoader> #include <KPluginFactory> #include <KService> -#include <kde_terminal_interface_v2.h> -#include <KParts/Part> +#include <kde_terminal_interface.h> +#include <KParts/ReadOnlyPart> #include <KShell> #include <KIO/Job> #include <KIO/JobUiDelegate> +#include <KJobWidgets> #include <QBoxLayout> #include <QDir> @@ -69,7 +70,7 @@ void TerminalPanel::dockVisibilityChanged() this, SLOT(slotKonsolePartCurrentDirectoryChanged(QString))); // Make sure this terminal does not prevent unmounting any removable drives - changeDir(KUrl::fromPath("/")); + changeDir(QUrl::fromLocalFile("/")); // Because we have disconnected from the part's currentDirectoryChanged() // signal, we have to update m_konsolePartCurrentDirectory manually. If this @@ -109,10 +110,10 @@ void TerminalPanel::showEvent(QShowEvent* event) } m_konsolePart = factory ? (factory->create<KParts::ReadOnlyPart>(this)) : 0; if (m_konsolePart) { - connect(m_konsolePart, SIGNAL(destroyed(QObject*)), this, SLOT(terminalExited())); + connect(m_konsolePart, &KParts::ReadOnlyPart::destroyed, this, &TerminalPanel::terminalExited); m_terminalWidget = m_konsolePart->widget(); m_layout->addWidget(m_terminalWidget); - m_terminal = qobject_cast<TerminalInterfaceV2 *>(m_konsolePart); + m_terminal = qobject_cast<TerminalInterface*>(m_konsolePart); } } if (m_terminal) { @@ -136,9 +137,9 @@ void TerminalPanel::changeDir(const KUrl& url) } else { m_mostLocalUrlJob = KIO::mostLocalUrl(url, KIO::HideProgressInfo); if (m_mostLocalUrlJob->ui()) { - m_mostLocalUrlJob->ui()->setWindow(this); + KJobWidgets::setWindow(m_mostLocalUrlJob, this); } - connect(m_mostLocalUrlJob, SIGNAL(result(KJob*)), this, SLOT(slotMostLocalUrlResult(KJob*))); + connect(m_mostLocalUrlJob, &KIO::StatJob::result, this, &TerminalPanel::slotMostLocalUrlResult); } } @@ -194,4 +195,3 @@ void TerminalPanel::slotKonsolePartCurrentDirectoryChanged(const QString& dir) } } -#include "terminalpanel.moc" |
