aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/folderlistmodel/fileinfothread.cpp
diff options
context:
space:
mode:
authorIlya Kotov <i.kotov@rusbitech.ru>2018-01-10 16:32:27 +0300
committerShawn Rutledge <shawn.rutledge@qt.io>2018-01-28 09:43:02 +0000
commite29047555be764d59c52801553e23767ed367cec (patch)
treed98647b57e29d28c7250b9d7ea581854a167b985 /src/imports/folderlistmodel/fileinfothread.cpp
parente8f3f37bc2d05190c4f16c372a487901e0d2e03d (diff)
FolderListModel: add status property
This allows to track directory loading Task-number: QTBUG-48708 Change-Id: If79a325ef1bfc831d3bc2a205e3127a571fcb0c1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/imports/folderlistmodel/fileinfothread.cpp')
-rw-r--r--src/imports/folderlistmodel/fileinfothread.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/imports/folderlistmodel/fileinfothread.cpp b/src/imports/folderlistmodel/fileinfothread.cpp
index d3e256bb7e..4ef8d02810 100644
--- a/src/imports/folderlistmodel/fileinfothread.cpp
+++ b/src/imports/folderlistmodel/fileinfothread.cpp
@@ -222,8 +222,10 @@ void FileInfoThread::run()
if (abort) {
return;
}
- if (currentPath.isEmpty() || !needUpdate)
+ if (currentPath.isEmpty() || !needUpdate) {
+ emit statusChanged(currentPath.isEmpty() ? QQuickFolderListModel::Null : QQuickFolderListModel::Ready);
condition.wait(&mutex);
+ }
if (abort) {
return;
@@ -231,6 +233,7 @@ void FileInfoThread::run()
if (!currentPath.isEmpty()) {
updateFiles = true;
+ emit statusChanged(QQuickFolderListModel::Loading);
}
if (updateFiles)
getFileInfos(currentPath);