Bump minimum Qt version to 5.15 (#8129)
This commit is contained in:
@@ -226,11 +226,7 @@ private:
|
||||
|
||||
// Mutex to make methods involving automation clips thread safe
|
||||
// Mutable so we can lock it from const objects
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
|
||||
mutable QRecursiveMutex m_clipMutex;
|
||||
#else
|
||||
mutable QMutex m_clipMutex;
|
||||
#endif
|
||||
|
||||
AutomationTrack * m_autoTrack;
|
||||
std::vector<jo_id_t> m_idsToResolve;
|
||||
|
||||
@@ -38,37 +38,6 @@
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief horizontalAdvance is a backwards-compatible adapter for
|
||||
* QFontMetrics::horizontalAdvance and width functions.
|
||||
* @param metrics
|
||||
* @param text
|
||||
* @return text's horizontal advance based on metrics.
|
||||
*/
|
||||
inline int horizontalAdvance(const QFontMetrics& metrics, const QString& text)
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
|
||||
return metrics.horizontalAdvance(text);
|
||||
#else
|
||||
return metrics.width(text);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief position is a backwards-compatible adapter for
|
||||
* QWheelEvent::position and pos functions.
|
||||
* @param wheelEvent
|
||||
* @return the position of wheelEvent
|
||||
*/
|
||||
inline QPoint position(const QWheelEvent* wheelEvent)
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||
return wheelEvent->position().toPoint();
|
||||
#else
|
||||
return wheelEvent->pos();
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief position is a backwards-compatible adapter for
|
||||
* QDropEvent::position and pos functions.
|
||||
|
||||
@@ -63,18 +63,10 @@ protected:
|
||||
QString name = sourceModel()->data(nameIndex, Qt::DisplayRole).toString();
|
||||
QString type = sourceModel()->data(typeIndex, Qt::DisplayRole).toString();
|
||||
|
||||
// TODO: cleanup once we drop Qt5 support
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0))
|
||||
QRegularExpression nameRegularExpression(filterRegularExpression());
|
||||
nameRegularExpression.setPatternOptions(QRegularExpression::CaseInsensitiveOption);
|
||||
|
||||
bool nameFilterPassed = nameRegularExpression.match(name).capturedStart() != -1;
|
||||
#else
|
||||
QRegExp nameRegularExpression(filterRegExp());
|
||||
nameRegularExpression.setCaseSensitivity(Qt::CaseInsensitive);
|
||||
|
||||
bool nameFilterPassed = nameRegularExpression.indexIn(name) != -1;
|
||||
#endif
|
||||
|
||||
bool typeFilterPassed = type.contains(m_effectTypeFilter, Qt::CaseInsensitive);
|
||||
|
||||
|
||||
@@ -164,12 +164,8 @@ private:
|
||||
|
||||
//! This should only be accessed or modified when m_pphMutex is held
|
||||
PlayHandle* m_previewPlayHandle;
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
|
||||
|
||||
QRecursiveMutex m_pphMutex;
|
||||
#else
|
||||
QMutex m_pphMutex;
|
||||
#endif
|
||||
|
||||
QList<QAction*> getContextActions(FileItem* item, bool songEditor);
|
||||
|
||||
|
||||
@@ -27,9 +27,7 @@
|
||||
|
||||
#include <QThread>
|
||||
#include <QProcess>
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
|
||||
#include <QRecursiveMutex> // IWYU pragma: keep
|
||||
#endif
|
||||
#include <QRecursiveMutex>
|
||||
|
||||
#include "RemotePluginBase.h"
|
||||
#include "SharedMemory.h"
|
||||
@@ -166,11 +164,7 @@ private:
|
||||
QString m_exec;
|
||||
QStringList m_args;
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
|
||||
QRecursiveMutex m_commMutex;
|
||||
#else
|
||||
QMutex m_commMutex;
|
||||
#endif
|
||||
bool m_splitChannels;
|
||||
|
||||
SharedMemory<float[]> m_audioBuffer;
|
||||
|
||||
Reference in New Issue
Block a user