1
0
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:
Elias Steurer 2020-06-21 16:49:08 +02:00
parent 6d4afb5b62
commit f63284e915

View File

@ -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);
}
/*!