Expose Mark-of-the-Web setting in Options

This commit is contained in:
Chocobo1 2023-10-29 22:54:05 +08:00
parent 794cce38f3
commit 6cfbc02d8f
9 changed files with 59 additions and 5 deletions

View file

@ -43,6 +43,7 @@
#endif
#if defined(Q_OS_MACOS) || defined(Q_OS_WIN)
#include "base/preferences.h"
#include "base/utils/os.h"
#endif // Q_OS_MACOS || Q_OS_WIN
@ -155,7 +156,8 @@ void Net::DownloadHandlerImpl::processFinishedDownload()
m_result.filePath = result.value();
#if defined(Q_OS_MACOS) || defined(Q_OS_WIN)
Utils::OS::applyMarkOfTheWeb(m_result.filePath, m_result.url);
if (Preferences::instance()->isMarkOfTheWebEnabled())
Utils::OS::applyMarkOfTheWeb(m_result.filePath, m_result.url);
#endif // Q_OS_MACOS || Q_OS_WIN
}
else
@ -171,7 +173,8 @@ void Net::DownloadHandlerImpl::processFinishedDownload()
m_result.filePath = destinationPath;
#if defined(Q_OS_MACOS) || defined(Q_OS_WIN)
Utils::OS::applyMarkOfTheWeb(m_result.filePath, m_result.url);
if (Preferences::instance()->isMarkOfTheWebEnabled())
Utils::OS::applyMarkOfTheWeb(m_result.filePath, m_result.url);
#endif // Q_OS_MACOS || Q_OS_WIN
}
else