Fix ResourceManager not properly shutting down thread

This commit is contained in:
Ryan Huffman 2018-05-23 10:51:12 -07:00
parent 384851c289
commit 59ca2f9977
2 changed files with 6 additions and 0 deletions

View file

@ -38,6 +38,11 @@ ResourceManager::ResourceManager(bool atpSupportEnabled) : _atpSupportEnabled(at
_thread.start();
}
ResourceManager::~ResourceManager() {
_thread.terminate();
_thread.wait();
}
void ResourceManager::setUrlPrefixOverride(const QString& prefix, const QString& replacement) {
QMutexLocker locker(&_prefixMapLock);
if (replacement.isEmpty()) {

View file

@ -28,6 +28,7 @@ class ResourceManager: public QObject, public Dependency {
public:
ResourceManager(bool atpSupportEnabled = true);
~ResourceManager();
void setUrlPrefixOverride(const QString& prefix, const QString& replacement);
QString normalizeURL(const QString& urlString);