Avoid using QAtomicInteger functions deprecated in Qt 5.14.0

This commit is contained in:
Martchus 2019-12-15 19:31:34 +01:00
parent a1b126f18a
commit 865e461032
2 changed files with 12 additions and 0 deletions

View File

@ -145,7 +145,11 @@ void RenamingEngine::processChangingsApplied()
void RenamingEngine::resetStatus()
{
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
m_aborted.storeRelaxed(false);
#else
m_aborted.store(false);
#endif
m_itemsProcessed = 0;
m_errorsOccured = 0;
}

View File

@ -162,12 +162,20 @@ inline bool RenamingEngine::isBusy()
inline void RenamingEngine::abort()
{
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
m_aborted.storeRelaxed(1);
#else
m_aborted.store(1);
#endif
}
inline bool RenamingEngine::isAborted()
{
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
return m_aborted.loadRelaxed();
#else
return m_aborted.load();
#endif
}
} // namespace RenamingUtility