Use QRecursiveMutex

QMutex with QMutex::Recursive is deprecated
This commit is contained in:
Lars Toenning
2022-04-30 16:21:17 +02:00
parent 6ada735774
commit 8b5d02c62b
7 changed files with 14 additions and 14 deletions

View File

@@ -169,7 +169,7 @@ namespace BlackMisc
void sessionValue(const QString &key);
private:
mutable QMutex m_mutex { QMutex::Recursive };
mutable QRecursiveMutex m_mutex;
bool m_updateInProgress = false;
bool m_found = false;
bool m_pendingRead = false;

View File

@@ -90,7 +90,7 @@ namespace BlackMisc
CIdentifier m_identifier = CIdentifier::anonymous();
QMap<QString, Channel> m_channels;
mutable QMutex m_channelsMutex { QMutex::Recursive };
mutable QRecursiveMutex m_channelsMutex;
};
}
}

View File

@@ -54,7 +54,7 @@ namespace BlackMisc::SharedState
Channel &getChannel(const QObject *object);
QMap<QString, Channel> m_channels;
mutable QMutex m_channelsMutex { QMutex::Recursive };
mutable QRecursiveMutex m_channelsMutex;
};
}

View File

@@ -299,7 +299,7 @@ namespace BlackMisc
void markAllAsSaved(const QStringList &keys);
//! Mutex protecting operations which are critical on m_elements.
mutable QMutex m_mutex { QMutex::Recursive };
mutable QRecursiveMutex m_mutex;
protected:
//! Synchronously return a current value.

View File

@@ -184,7 +184,7 @@ namespace BlackMisc
bool m_started = false;
bool m_finished = false;
mutable QMutex m_finishedMutex { QMutex::Recursive };
mutable QRecursiveMutex m_finishedMutex;
static QSet<CWorkerBase *> s_allWorkers;
};