mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-25 04:02:50 +01:00
Fixed to fast reloading if folder content has changed
This commit is contained in:
parent
6d4afb5b62
commit
f63284e915
@ -36,8 +36,14 @@ void InstalledListModel::init()
|
||||
|
||||
loadInstalledContent();
|
||||
|
||||
QObject::connect(&m_fileSystemWatcher, &QFileSystemWatcher::directoryChanged, this, &InstalledListModel::reset);
|
||||
QObject::connect(&m_fileSystemWatcher, &QFileSystemWatcher::fileChanged, this, &InstalledListModel::reset);
|
||||
auto reloadLambda = [this](){
|
||||
QTimer::singleShot(500,[this](){
|
||||
reset();
|
||||
});
|
||||
};
|
||||
|
||||
QObject::connect(&m_fileSystemWatcher, &QFileSystemWatcher::directoryChanged, this, reloadLambda);
|
||||
QObject::connect(&m_fileSystemWatcher, &QFileSystemWatcher::fileChanged, this, reloadLambda);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
Loading…
Reference in New Issue
Block a user