diff --git a/kded/plugins/sftp/mounter.h b/kded/plugins/sftp/mounter.h index 9c4045aa8..5e0d0922c 100644 --- a/kded/plugins/sftp/mounter.h +++ b/kded/plugins/sftp/mounter.h @@ -37,7 +37,8 @@ public: virtual ~Mounter(); bool wait(); - + bool isMounted() const {return m_started;} + Q_SIGNALS: void mounted(); void unmounted(bool idleTimeout); diff --git a/kded/plugins/sftp/sftpplugin.cpp b/kded/plugins/sftp/sftpplugin.cpp index 8c39f806c..60ce0dcb6 100644 --- a/kded/plugins/sftp/sftpplugin.cpp +++ b/kded/plugins/sftp/sftpplugin.cpp @@ -127,7 +127,7 @@ bool SftpPlugin::mountAndWait() bool SftpPlugin::isMounted() { - return m_d->mounter; + return m_d->mounter && m_d->mounter->isMounted(); } bool SftpPlugin::startBrowsing() @@ -194,6 +194,8 @@ void SftpPlugin::onFailed(const QString& message) , message , KIconLoader::global()->loadIcon("dialog-error", KIconLoader::Desktop) ); + m_d->mounter->deleteLater(); + m_d->mounter = 0; } void SftpPlugin::knotify(int type, const QString& text, const QPixmap& icon) const