skip QSaveFile temprary files

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2024-10-21 23:53:23 +03:00
parent b049e92697
commit 562c301326
13 changed files with 129 additions and 23 deletions
+23
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;
}