From dfa6a299075a21a0e3a30e5b934ffc115f76cca3 Mon Sep 17 00:00:00 2001 From: cutefishd Date: Sat, 24 Apr 2021 01:46:27 +0800 Subject: [PATCH] DirModel multithread loading --- model/foldermodel.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/model/foldermodel.cpp b/model/foldermodel.cpp index 9fca36c..7e9285f 100644 --- a/model/foldermodel.cpp +++ b/model/foldermodel.cpp @@ -85,6 +85,7 @@ FolderModel::FolderModel(QObject *parent) m_dirModel = new KDirModel(this); m_dirModel->setDirLister(dirLister); m_dirModel->setDropsAllowed(KDirModel::DropOnDirectory | KDirModel::DropOnLocalExecutable); + m_dirModel->moveToThread(qApp->thread()); m_selectionModel = new QItemSelectionModel(this, this); connect(m_selectionModel, &QItemSelectionModel::selectionChanged, this, &FolderModel::selectionChanged);