mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-19 16:31:21 +00:00
Fix Bug 153984 - Clicking cancel on the authentication dialog for fish/sftp/ftp kioslave gets dolphin stuck on "Loading folder"
BUG: 153984 REVIEW: 107116
This commit is contained in:
parent
726cd768c9
commit
c503452d56
|
@ -111,6 +111,7 @@ DolphinViewContainer::DolphinViewContainer(const KUrl& url, QWidget* parent) :
|
|||
connect(m_view, SIGNAL(redirection(KUrl,KUrl)), this, SLOT(redirect(KUrl,KUrl)));
|
||||
connect(m_view, SIGNAL(directoryLoadingStarted()), this, SLOT(slotDirectoryLoadingStarted()));
|
||||
connect(m_view, SIGNAL(directoryLoadingCompleted()), this, SLOT(slotDirectoryLoadingCompleted()));
|
||||
connect(m_view, SIGNAL(directoryLoadingCanceled()), this, SLOT(slotDirectoryLoadingCanceled()));
|
||||
connect(m_view, SIGNAL(itemCountChanged()), this, SLOT(delayedStatusBarUpdate()));
|
||||
connect(m_view, SIGNAL(directoryLoadingProgress(int)), this, SLOT(updateDirectoryLoadingProgress(int)));
|
||||
connect(m_view, SIGNAL(directorySortingProgress(int)), this, SLOT(updateDirectorySortingProgress(int)));
|
||||
|
@ -451,6 +452,16 @@ void DolphinViewContainer::slotDirectoryLoadingCompleted()
|
|||
}
|
||||
}
|
||||
|
||||
void DolphinViewContainer::slotDirectoryLoadingCanceled()
|
||||
{
|
||||
if (!m_statusBar->progressText().isEmpty()) {
|
||||
m_statusBar->setProgressText(QString());
|
||||
m_statusBar->setProgress(100);
|
||||
}
|
||||
|
||||
showErrorMessage("Directory loading has been canceled.");
|
||||
}
|
||||
|
||||
void DolphinViewContainer::slotUrlIsFileError(const KUrl& url)
|
||||
{
|
||||
const KFileItem item(KFileItem::Unknown, KFileItem::Unknown, url);
|
||||
|
|
|
@ -195,6 +195,12 @@ private slots:
|
|||
*/
|
||||
void slotDirectoryLoadingCompleted();
|
||||
|
||||
/**
|
||||
* Updates the statusbar to show, that the directory loading has
|
||||
* been canceled.
|
||||
*/
|
||||
void slotDirectoryLoadingCanceled();
|
||||
|
||||
/**
|
||||
* Is called if the URL set by DolphinView::setUrl() represents
|
||||
* a file and not a directory. Takes care to activate the file.
|
||||
|
|
|
@ -716,6 +716,8 @@ void KFileItemModel::slotCanceled()
|
|||
{
|
||||
m_maximumUpdateIntervalTimer->stop();
|
||||
dispatchPendingItemsToInsert();
|
||||
|
||||
emit directoryLoadingCanceled();
|
||||
}
|
||||
|
||||
void KFileItemModel::slotNewItems(const KFileItemList& items)
|
||||
|
|
|
@ -216,6 +216,11 @@ signals:
|
|||
*/
|
||||
void directoryLoadingCompleted();
|
||||
|
||||
/**
|
||||
* Is emitted after the loading of a directory has been canceled.
|
||||
*/
|
||||
void directoryLoadingCanceled();
|
||||
|
||||
/**
|
||||
* Informs about the progress in percent when loading a directory. It is assured
|
||||
* that the signal directoryLoadingStarted() has been emitted before.
|
||||
|
|
|
@ -154,6 +154,7 @@ DolphinView::DolphinView(const KUrl& url, QWidget* parent) :
|
|||
|
||||
connect(m_model, SIGNAL(directoryLoadingStarted()), this, SLOT(slotDirectoryLoadingStarted()));
|
||||
connect(m_model, SIGNAL(directoryLoadingCompleted()), this, SLOT(slotDirectoryLoadingCompleted()));
|
||||
connect(m_model, SIGNAL(directoryLoadingCanceled()), this, SIGNAL(directoryLoadingCanceled()));
|
||||
connect(m_model, SIGNAL(directoryLoadingProgress(int)), this, SIGNAL(directoryLoadingProgress(int)));
|
||||
connect(m_model, SIGNAL(directorySortingProgress(int)), this, SIGNAL(directorySortingProgress(int)));
|
||||
connect(m_model, SIGNAL(itemsChanged(KItemRangeList,QSet<QByteArray>)),
|
||||
|
|
|
@ -483,6 +483,12 @@ signals:
|
|||
*/
|
||||
void directoryLoadingCompleted();
|
||||
|
||||
/**
|
||||
* Is emitted after the directory loading triggered by DolphinView::setUrl()
|
||||
* has been canceled.
|
||||
*/
|
||||
void directoryLoadingCanceled();
|
||||
|
||||
/**
|
||||
* Is emitted after DolphinView::setUrl() has been invoked and provides
|
||||
* the information how much percent of the current directory have been loaded.
|
||||
|
|
Loading…
Reference in a new issue