#include <KActionCollection>
#include <KIO/DesktopExecParser>
-#include <KIO/Job>
+#include <KIO/StatJob>
#include <KJobWidgets>
#include <KLocalizedString>
#include <KMessageWidget>
void TerminalPanel::terminalExited()
{
m_terminal = nullptr;
+ m_konsolePart = nullptr;
Q_EMIT hideTerminalPanel();
}
"Terminal cannot be shown because Konsole is not installed. "
"Please install it and then reopen the panel.");
m_konsolePartMissingMessage = new KMessageWidget(konsoleNotInstalledText, this);
+ m_konsolePartMissingMessage->setPosition(KMessageWidget::Footer);
m_konsolePartMissingMessage->setCloseButtonVisible(false);
m_konsolePartMissingMessage->hide();
if (KIO::DesktopExecParser::hasSchemeHandler(konsoleInstallUrl)) {
delete m_mostLocalUrlJob;
m_mostLocalUrlJob = nullptr;
+ if (url.isEmpty()) {
+ return;
+ }
+
if (url.isLocalFile()) {
sendCdToTerminal(url.toLocalFile());
return;
// If we can't do that for any reason, silently fail.
auto reply = m_kiofuseInterface.mountUrl(url.toString());
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this);
- QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this, [=](QDBusPendingCallWatcher *watcher) {
+ QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this, [=, this](QDBusPendingCallWatcher *watcher) {
watcher->deleteLater();
if (!reply.isError()) {
// Successfully mounted, point to the KIOFuse equivalent path.
auto reply = m_kiofuseInterface.remoteUrl(m_konsolePartCurrentDirectory);
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this);
- QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this, [=](QDBusPendingCallWatcher *watcher) {
+ QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this, [=, this](QDBusPendingCallWatcher *watcher) {
watcher->deleteLater();
if (reply.isError()) {
// KIOFuse errored out... just show the normal URL