mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-16 21:30:06 +00:00
Fix Clazy non-pod-global-static warnings
This commit is contained in:
@@ -55,7 +55,8 @@
|
||||
#define CURRENT_DEFAULT_VER 2
|
||||
|
||||
static StreamingPreferences* s_GlobalPrefs;
|
||||
static QReadWriteLock s_GlobalPrefsLock;
|
||||
|
||||
Q_GLOBAL_STATIC(QReadWriteLock, s_GlobalPrefsLock)
|
||||
|
||||
StreamingPreferences::StreamingPreferences(QQmlEngine *qmlEngine)
|
||||
: m_QmlEngine(qmlEngine)
|
||||
@@ -66,7 +67,7 @@ StreamingPreferences::StreamingPreferences(QQmlEngine *qmlEngine)
|
||||
StreamingPreferences* StreamingPreferences::get(QQmlEngine *qmlEngine)
|
||||
{
|
||||
{
|
||||
QReadLocker readGuard(&s_GlobalPrefsLock);
|
||||
QReadLocker readGuard(s_GlobalPrefsLock);
|
||||
|
||||
// If we have a preference object and it's associated with a QML engine or
|
||||
// if the caller didn't specify a QML engine, return the existing object.
|
||||
@@ -78,7 +79,7 @@ StreamingPreferences* StreamingPreferences::get(QQmlEngine *qmlEngine)
|
||||
}
|
||||
|
||||
{
|
||||
QWriteLocker writeGuard(&s_GlobalPrefsLock);
|
||||
QWriteLocker writeGuard(s_GlobalPrefsLock);
|
||||
|
||||
// If we already have an preference object but the QML engine is now available,
|
||||
// associate the QML engine with the preferences.
|
||||
|
||||
Reference in New Issue
Block a user