summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Uwe Broulik <[email protected]>2017-03-06 13:20:59 +0100
committerKai Uwe Broulik <[email protected]>2017-03-06 13:20:59 +0100
commit5a2e6620f75a3d994ce05866d701ecd56e2b47be (patch)
treef04fef5bba8834c5c4afae5ee355d54fad3b0ba1
parent8f3c819bbfe63d768aba1745db36c27a5b7c22ea (diff)
[Folder View] Set plasmoid.busy to false when listing canceled
When trying to access a folder that no longer exists or a KIO slave crashes or any other kind of error, instead of listingCompleted the listingCanceled signal is emitted at which point Folder View would spin indefinitely whilst showing an error at the same time. Differential Revision: https://phabricator.kde.org/D4922
-rw-r--r--containments/desktop/package/contents/ui/FolderView.qml2
-rw-r--r--containments/desktop/plugins/folder/foldermodel.cpp2
-rw-r--r--containments/desktop/plugins/folder/foldermodel.h1
3 files changed, 5 insertions, 0 deletions
diff --git a/containments/desktop/package/contents/ui/FolderView.qml b/containments/desktop/package/contents/ui/FolderView.qml
index d40d24f..fd7fa6f 100644
--- a/containments/desktop/package/contents/ui/FolderView.qml
+++ b/containments/desktop/package/contents/ui/FolderView.qml
@@ -981,6 +981,8 @@ Item {
}
}
+ onListingCanceled: plasmoid.busy = false;
+
onMove: {
var rows = (gridView.flow == GridView.FlowLeftToRight);
var axis = rows ? gridView.width : gridView.height;
diff --git a/containments/desktop/plugins/folder/foldermodel.cpp b/containments/desktop/plugins/folder/foldermodel.cpp
index 30dca61..3be923d 100644
--- a/containments/desktop/plugins/folder/foldermodel.cpp
+++ b/containments/desktop/plugins/folder/foldermodel.cpp
@@ -122,6 +122,8 @@ FolderModel::FolderModel(QObject *parent) : QSortFilterProxyModel(parent),
connect(dirLister, &KCoreDirLister::started, this, &FolderModel::listingStarted);
void (KCoreDirLister::*myCompletedSignal)() = &KCoreDirLister::completed;
QObject::connect(dirLister, myCompletedSignal, this, &FolderModel::listingCompleted);
+ void (KCoreDirLister::*myCanceledSignal)() = &KCoreDirLister::canceled;
+ QObject::connect(dirLister, myCanceledSignal, this, &FolderModel::listingCanceled);
m_dirModel = new KDirModel(this);
m_dirModel->setDirLister(dirLister);
diff --git a/containments/desktop/plugins/folder/foldermodel.h b/containments/desktop/plugins/folder/foldermodel.h
index d063b76..0aa3d72 100644
--- a/containments/desktop/plugins/folder/foldermodel.h
+++ b/containments/desktop/plugins/folder/foldermodel.h
@@ -219,6 +219,7 @@ class FolderModel : public QSortFilterProxyModel
void urlChanged() const;
void listingStarted() const;
void listingCompleted() const;
+ void listingCanceled() const;
void iconNameChanged() const;
void resolvedUrlChanged() const;
void errorStringChanged() const;