Skip to content

Commit

Permalink
Merge pull request #4322 from uklotzde/compatibility-qmutex
Browse files Browse the repository at this point in the history
Finish migration to QMutex/QMutexLocker compatibility layer
  • Loading branch information
Be-ing authored Sep 23, 2021
2 parents 48617bf + 2e67b4c commit 006fc86
Show file tree
Hide file tree
Showing 30 changed files with 3 additions and 38 deletions.
1 change: 0 additions & 1 deletion src/control/controlobject.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "control/controlobject.h"

#include <QHash>
#include <QMutexLocker>
#include <QSet>
#include <QtDebug>

Expand Down
1 change: 0 additions & 1 deletion src/control/controlobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include <QObject>
#include <QEvent>
#include <QMutex>

#include "preferences/usersettings.h"
#include "controllers/midi/midimessage.h"
Expand Down
1 change: 1 addition & 0 deletions src/controllers/controllermanager.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include <QMutex>
#include <QSharedPointer>
#include <QTimer>

Expand Down
2 changes: 0 additions & 2 deletions src/engine/controls/cuecontrol.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include "engine/controls/cuecontrol.h"

#include <QMutexLocker>

#include "control/controlindicator.h"
#include "control/controlobject.h"
#include "control/controlpushbutton.h"
Expand Down
1 change: 0 additions & 1 deletion src/engine/controls/cuecontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <QAtomicInt>
#include <QAtomicPointer>
#include <QList>
#include <QMutex>

#include "control/controlproxy.h"
#include "engine/controls/enginecontrol.h"
Expand Down
1 change: 0 additions & 1 deletion src/engine/sidechain/enginesidechain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include "engine/sidechain/enginesidechain.h"

#include <QMutexLocker>
#include <QtDebug>

#include "engine/engine.h"
Expand Down
1 change: 0 additions & 1 deletion src/errordialoghandler.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "errordialoghandler.h"

#include <QCoreApplication>
#include <QMutexLocker>
#include <QScopedPointer>
#include <QThread>
#include <QtDebug>
Expand Down
1 change: 0 additions & 1 deletion src/library/export/engineprimeexportjob.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include <QAtomicInteger>
#include <QList>
#include <QMutex>
#include <QQueue>
#include <QSet>
#include <QSharedPointer>
Expand Down
1 change: 0 additions & 1 deletion src/library/scanner/scannerglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <QDir>
#include <QHash>
#include <QMutex>
#include <QMutexLocker>
#include <QRegularExpression>
#include <QSet>
#include <QSharedPointer>
Expand Down
2 changes: 0 additions & 2 deletions src/mixer/playerinfo.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Helper class to have easy access
#include "mixer/playerinfo.h"

#include <QMutexLocker>

#include "control/controlobject.h"
#include "engine/channels/enginechannel.h"
#include "engine/enginexfader.h"
Expand Down
2 changes: 0 additions & 2 deletions src/mixer/playermanager.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include "mixer/playermanager.h"

#include <QMutexLocker>

#include "control/controlobject.h"
#include "effects/effectrack.h"
#include "effects/effectsmanager.h"
Expand Down
1 change: 0 additions & 1 deletion src/mixer/playermanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include <QList>
#include <QMap>
#include <QMutex>
#include <QObject>

#include "analyzer/trackanalysisscheduler.h"
Expand Down
1 change: 0 additions & 1 deletion src/skin/legacy/legacyskinparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <QDir>
#include <QGridLayout>
#include <QLabel>
#include <QMutexLocker>
#include <QSplitter>
#include <QStackedWidget>
#include <QVBoxLayout>
Expand Down
1 change: 0 additions & 1 deletion src/skin/legacy/legacyskinparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include <QDomElement>
#include <QList>
#include <QMutex>
#include <QObject>
#include <QSet>
#include <QString>
Expand Down
1 change: 0 additions & 1 deletion src/soundio/soundmanagerutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include <QDomElement>
#include <QList>
#include <QMutex>
#include <QString>
#include <QtDebug>

Expand Down
1 change: 0 additions & 1 deletion src/track/cue.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "track/cue.h"

#include <QMutexLocker>
#include <QtDebug>

#include "audio/frame.h"
Expand Down
8 changes: 2 additions & 6 deletions src/track/globaltrackcache.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#pragma once


#include <map>
#include <unordered_map>

#include "track/track_decl.h"
#include "track/trackref.h"
#include "util/compatibility/qmutex.h"
#include "util/fileaccess.h"
#include "util/sandbox.h"

Expand Down Expand Up @@ -276,11 +276,7 @@ class GlobalTrackCache : public QObject {
void saveEvictedTrack(Track* pEvictedTrack) const;

// Managed by GlobalTrackCacheLocker
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
mutable QRecursiveMutex m_mutex;
#else
mutable QMutex m_mutex;
#endif
mutable QT_RECURSIVE_MUTEX m_mutex;

GlobalTrackCacheSaver* m_pSaver;

Expand Down
1 change: 0 additions & 1 deletion src/track/keys.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include <QMutexLocker>
#include <QtDebug>

#include "track/keys.h"
Expand Down
1 change: 0 additions & 1 deletion src/track/keyutils.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "track/keyutils.h"

#include <QMap>
#include <QMutexLocker>
#include <QPair>
#include <QRegularExpression>
#include <QtDebug>
Expand Down
1 change: 0 additions & 1 deletion src/util/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <QIODevice>
#include <QLoggingCategory>
#include <QMutex>
#include <QMutexLocker>
#include <QString>
#include <QTextStream>
#include <QThread>
Expand Down
1 change: 0 additions & 1 deletion src/util/mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// See: http://clang.llvm.org/docs/ThreadSafetyAnalysis.html

#include <QMutex>
#include <QMutexLocker>
#include <QReadWriteLock>

#include "util/compatibility/qmutex.h"
Expand Down
1 change: 0 additions & 1 deletion src/util/sandbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include <QFileDialog>
#include <QFileInfo>
#include <QMutexLocker>
#include <QObject>
#include <QtDebug>

Expand Down
1 change: 0 additions & 1 deletion src/util/sandbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <QFile>
#include <QFileInfo>
#include <QHash>
#include <QMutex>
#include <QSharedPointer>

#include "preferences/configobject.h"
Expand Down
1 change: 0 additions & 1 deletion src/util/statsmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include <QFile>
#include <QMetaType>
#include <QMutexLocker>
#include <QTextStream>
#include <QtDebug>

Expand Down
2 changes: 0 additions & 2 deletions src/vinylcontrol/vinylcontrolprocessor.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include "vinylcontrol/vinylcontrolprocessor.h"

#include <QMutexLocker>

#include "control/controlpushbutton.h"
#include "moc_vinylcontrolprocessor.cpp"
#include "util/defs.h"
Expand Down
1 change: 0 additions & 1 deletion src/waveform/visualplayposition.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#pragma once

#include <QMutex>
#include <QTime>
#include <QMap>
#include <QAtomicPointer>
Expand Down
1 change: 0 additions & 1 deletion src/waveform/waveform.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <QAtomicInt>
#include <QByteArray>
#include <QMutex>
#include <QMutexLocker>
#include <QSharedPointer>
#include <QString>
#include <vector>
Expand Down
1 change: 0 additions & 1 deletion src/widget/wlibrary.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "widget/wlibrary.h"

#include <QMutexLocker>
#include <QtDebug>

#include "controllers/keyboard/keyboardeventfilter.h"
Expand Down
1 change: 0 additions & 1 deletion src/widget/wlibrary.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include <QEvent>
#include <QMap>
#include <QMutex>
#include <QStackedWidget>
#include <QString>

Expand Down
1 change: 0 additions & 1 deletion src/widget/wwaveformviewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <QDropEvent>
#include <QEvent>
#include <QList>
#include <QMutex>

#include "skin/legacy/skincontext.h"
#include "track/track_decl.h"
Expand Down

0 comments on commit 006fc86

Please sign in to comment.