skip QSaveFile temprary files

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
(cherry picked from commit 562c301326)
This commit is contained in:
Trial97 2024-10-21 23:53:23 +03:00 committed by github-actions[bot]
parent 25eaa4eba6
commit 51a71d0471
13 changed files with 129 additions and 23 deletions

View file

@ -1883,3 +1883,26 @@ const QString Application::javaPath()
{
return m_settings->get("JavaDir").toString();
}
void Application::addQSavePath(QString path)
{
QMutexLocker locker(&m_qsaveResourcesMutex);
m_qsaveResources.insert(path);
}
void Application::removeQSavePath(QString path)
{
QMutexLocker locker(&m_qsaveResourcesMutex);
m_qsaveResources.remove(path);
}
bool Application::checkQSavePath(QString path)
{
QMutexLocker locker(&m_qsaveResourcesMutex);
for (auto r : m_qsaveResources) {
if (path.contains(r)) {
return true;
}
}
return false;
}