summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt22
-rw-r--r--src/library/basetracktablemodel.cpp6
-rw-r--r--src/library/coverart.cpp6
-rw-r--r--src/library/coverartutils.cpp7
-rw-r--r--src/library/coverartutils.h3
-rw-r--r--src/library/dao/analysisdao.cpp25
-rw-r--r--src/library/dao/settingsdao.cpp2
-rw-r--r--src/library/dao/trackdao.cpp8
-rw-r--r--src/library/dlgcoverartfullsize.cpp14
-rw-r--r--src/library/export/trackexportdlg.cpp8
-rw-r--r--src/library/proxytrackmodel.cpp2
-rw-r--r--src/library/scanner/libraryscanner.cpp10
-rw-r--r--src/library/searchquery.cpp8
-rw-r--r--src/library/stardelegate.cpp2
-rw-r--r--src/library/stareditor.cpp7
-rw-r--r--src/preferences/broadcastprofile.cpp4
-rw-r--r--src/qml/qmlwaveformoverview.cpp5
-rw-r--r--src/util/db/sqlstringformatter.cpp4
-rw-r--r--src/util/dnd.cpp7
-rw-r--r--src/util/translations.h4
-rw-r--r--src/widget/wcoverart.cpp4
-rw-r--r--src/widget/wsearchlineedit.cpp2
-rw-r--r--src/widget/wspinny.cpp4
-rw-r--r--src/widget/wtrackproperty.cpp2
24 files changed, 117 insertions, 49 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index da6fc545dc..2927b28c10 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2137,30 +2137,30 @@ if(Qt_IS_STATIC)
target_link_libraries(mixxx-lib PRIVATE
# platform plugins
- Qt5::QOffscreenIntegrationPlugin
- Qt5::QMinimalIntegrationPlugin
+ Qt${QT_VERSION_MAJOR}::QOffscreenIntegrationPlugin
+ Qt${QT_VERSION_MAJOR}::QMinimalIntegrationPlugin
# imageformats plugins
- Qt5::QGifPlugin
- Qt5::QICOPlugin
- Qt5::QJpegPlugin
- Qt5::QSvgPlugin
+ Qt${QT_VERSION_MAJOR}::QGifPlugin
+ Qt${QT_VERSION_MAJOR}::QICOPlugin
+ Qt${QT_VERSION_MAJOR}::QJpegPlugin
+ Qt${QT_VERSION_MAJOR}::QSvgPlugin
# sqldrivers
- Qt5::QSQLiteDriverPlugin
+ Qt${QT_VERSION_MAJOR}::QSQLiteDriverPlugin
)
if(WIN32)
target_link_libraries(mixxx-lib PRIVATE
- Qt5::QWindowsIntegrationPlugin
- Qt5::QWindowsVistaStylePlugin
+ Qt${QT_VERSION_MAJOR}::QWindowsIntegrationPlugin
+ Qt${QT_VERSION_MAJOR}::QWindowsVistaStylePlugin
)
endif()
if(APPLE)
target_link_libraries(mixxx-lib PRIVATE
- Qt5::QCocoaIntegrationPlugin
- Qt5::QMacStylePlugin
+ Qt${QT_VERSION_MAJOR}::QCocoaIntegrationPlugin
+ Qt${QT_VERSION_MAJOR}::QMacStylePlugin
)
endif()
diff --git a/src/library/basetracktablemodel.cpp b/src/library/basetracktablemodel.cpp
index e9ac6597b1..1262856389 100644
--- a/src/library/basetracktablemodel.cpp
+++ b/src/library/basetracktablemodel.cpp
@@ -420,7 +420,7 @@ QVariant BaseTrackTableModel::data(
DEBUG_ASSERT(bgColor.isValid());
DEBUG_ASSERT(m_backgroundColorOpacity >= 0.0);
DEBUG_ASSERT(m_backgroundColorOpacity <= 1.0);
- bgColor.setAlphaF(m_backgroundColorOpacity);
+ bgColor.setAlphaF(static_cast<float>(m_backgroundColorOpacity));
return QBrush(bgColor);
}
@@ -646,7 +646,11 @@ QVariant BaseTrackTableModel::roleValue(
}
case ColumnCache::COLUMN_LIBRARYTABLE_LAST_PLAYED_AT: {
QDateTime lastPlayedAt;
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ if (rawValue.metaType().id() == QMetaType::QString) {
+#else
if (rawValue.type() == QVariant::String) {
+#endif
// column value
lastPlayedAt = mixxx::sqlite::readGeneratedTimestamp(rawValue);
} else {
diff --git a/src/library/coverart.cpp b/src/library/coverart.cpp
index e6447bf42b..4079dcaf42 100644
--- a/src/library/coverart.cpp
+++ b/src/library/coverart.cpp
@@ -37,9 +37,15 @@ QString typeToString(CoverInfo::Type type) {
quint16 calculateLegacyHash(
const QImage& image) {
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ auto legacyHash = qChecksum(QByteArrayView(
+ reinterpret_cast<const char*>(image.constBits()),
+ image.sizeInBytes()));
+#else
auto legacyHash = qChecksum(
reinterpret_cast<const char*>(image.constBits()),
image.sizeInBytes());
+#endif
// In rare cases the calculated checksum could be equal to the
// reserved value CoverInfo::defaultLegacyHash() which might cause
// unexpected behavior. In this case we simply invert all bits to
diff --git a/src/library/coverartutils.cpp b/src/library/coverartutils.cpp
index 067528007c..09764ae6c6 100644
--- a/src/library/coverartutils.cpp
+++ b/src/library/coverartutils.cpp
@@ -216,18 +216,19 @@ void CoverInfoGuesser::guessAndSetCoverInfoForTracks(
}
}
-void guessTrackCoverInfoConcurrently(
+QFuture<void> guessTrackCoverInfoConcurrently(
TrackPointer pTrack) {
VERIFY_OR_DEBUG_ASSERT(pTrack) {
- return;
+ return {};
}
if (s_enableConcurrentGuessingOfTrackCoverInfo) {
- QtConcurrent::run([pTrack] {
+ return QtConcurrent::run([pTrack] {
CoverInfoGuesser().guessAndSetCoverInfoForTrack(*pTrack);
});
} else {
// Disabled only during tests
CoverInfoGuesser().guessAndSetCoverInfoForTrack(*pTrack);
+ return {};
}
}
diff --git a/src/library/coverartutils.h b/src/library/coverartutils.h
index fb858f2b83..3019c2f45e 100644
--- a/src/library/coverartutils.h
+++ b/src/library/coverartutils.h
@@ -1,5 +1,6 @@
#pragma once
+#include <QFuture>
#include <QImage>
#include <QList>
#include <QSize>
@@ -93,7 +94,7 @@ class CoverInfoGuesser {
// Guesses the cover art for the provided tracks by searching the tracks'
// metadata and folders for image files. All I/O is done in a separate
// thread.
-void guessTrackCoverInfoConcurrently(TrackPointer pTrack);
+[[nodiscard]] QFuture<void> guessTrackCoverInfoConcurrently(TrackPointer pTrack);
// Concurrent guessing of track covers during short running
// tests may cause spurious test failures due to timing issues.
diff --git a/src/library/dao/analysisdao.cpp b/src/library/dao/analysisdao.cpp
index 67c1b6dd0a..2c5c42f62d 100644
--- a/src/library/dao/analysisdao.cpp
+++ b/src/library/dao/analysisdao.cpp
@@ -84,9 +84,15 @@ QList<AnalysisDao::AnalysisInfo> AnalysisDao::loadAnalysesFromQuery(TrackId trac
int checksum = query->value(dataChecksumColumn).toInt();
QString dataPath = analysisPath.absoluteFilePath(
QString::number(info.analysisId));
- QByteArray compressedData = loadDataFromFile(dataPath);
- int file_checksum = qChecksum(compressedData.constData(),
- compressedData.length());
+ const QByteArray compressedData = loadDataFromFile(dataPath);
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ const int file_checksum = qChecksum(
+ compressedData);
+#else
+ const int file_checksum = qChecksum(
+ compressedData.constData(),
+ compressedData.length());
+#endif
if (checksum != file_checksum) {
qDebug() << "WARNING: Corrupt analysis loaded from" << dataPath
<< "length" << compressedData.length();
@@ -114,10 +120,15 @@ bool AnalysisDao::saveAnalysis(AnalysisDao::AnalysisInfo* info) {
PerformanceTimer time;
time.start();
- QByteArray compressedData = qCompress(info->data, kCompressionLevel);
- int checksum = qChecksum(compressedData.constData(),
- compressedData.length());
-
+ const QByteArray compressedData = qCompress(info->data, kCompressionLevel);
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ const int checksum = qChecksum(
+ compressedData);
+#else
+ const int checksum = qChecksum(
+ compressedData.constData(),
+ compressedData.length());
+#endif
QSqlQuery query(m_database);
if (info->analysisId == -1) {
query.prepare(QString(
diff --git a/src/library/dao/settingsdao.cpp b/src/library/dao/settingsdao.cpp
index b7797c7bbf..138a40942c 100644
--- a/src/library/dao/settingsdao.cpp
+++ b/src/library/dao/settingsdao.cpp
@@ -51,7 +51,7 @@ QString SettingsDAO::getValue(const QString& name, QString defaultValue) const {
}
bool SettingsDAO::setValue(const QString& name, const QVariant& value) const {
- VERIFY_OR_DEBUG_ASSERT(value.canConvert(QMetaType::QString)) {
+ VERIFY_OR_DEBUG_ASSERT(value.canConvert<QString>()) {
return false;
}
diff --git a/src/library/dao/trackdao.cpp b/src/library/dao/trackdao.cpp
index de1b475388..30ae5d66bd 100644
--- a/src/library/dao/trackdao.cpp
+++ b/src/library/dao/trackdao.cpp
@@ -649,7 +649,11 @@ bool insertTrackLibrary(
pTrackLibraryInsert->bindValue(":mixxx_deleted", 0);
// We no longer store the wavesummary in the library table.
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ pTrackLibraryInsert->bindValue(":wavesummaryhex", QVariant(QMetaType(QMetaType::QByteArray)));
+#else
pTrackLibraryInsert->bindValue(":wavesummaryhex", QVariant(QVariant::ByteArray));
+#endif
VERIFY_OR_DEBUG_ASSERT(pTrackLibraryInsert->exec()) {
// We failed to insert the track. Maybe it is already in the library
@@ -2199,7 +2203,9 @@ TrackPointer TrackDAO::getOrAddTrack(
// If the track wasn't in the library already then it has not yet
// been checked for cover art.
- guessTrackCoverInfoConcurrently(pTrack);
+ const auto future = guessTrackCoverInfoConcurrently(pTrack);
+ // Don't wait for the result and keep running in the background
+ Q_UNUSED(future)
return pTrack;
}
diff --git a/src/library/dlgcoverartfullsize.cpp b/src/library/dlgcoverartfullsize.cpp
index 9723f3abb7..ac22b95904 100644
--- a/src/library/dlgcoverartfullsize.cpp
+++ b/src/library/dlgcoverartfullsize.cpp
@@ -223,7 +223,12 @@ void DlgCoverArtFullSize::mousePressEvent(QMouseEvent* event) {
m_clickTimer.setSingleShot(true);
m_clickTimer.start(500);
m_coverPressed = true;
- m_dragStartPosition = event->globalPos() - frameGeometry().topLeft();
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ QPoint eventPosition = event->globalPosition().toPoint();
+#else
+ QPoint eventPosition = event->globalPos();
+#endif
+ m_dragStartPosition = eventPosition - frameGeometry().topLeft();
}
}
@@ -247,7 +252,12 @@ void DlgCoverArtFullSize::mouseReleaseEvent(QMouseEvent* event) {
void DlgCoverArtFullSize::mouseMoveEvent(QMouseEvent* event) {
if (m_coverPressed) {
- move(event->globalPos() - m_dragStartPosition);
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ QPoint eventPosition = event->globalPosition().toPoint();
+#else
+ QPoint eventPosition = event->globalPos();
+#endif
+ move(eventPosition - m_dragStartPosition);
event->accept();
} else {
return;
diff --git a/src/library/export/trackexportdlg.cpp b/src/library/export/trackexportdlg.cpp
index d6c6c0335e..e364cb4597 100644
--- a/src/library/export/trackexportdlg.cpp
+++ b/src/library/export/trackexportdlg.cpp
@@ -73,10 +73,10 @@ void TrackExportDlg::slotAskOverwriteMode(
QMessageBox::Cancel | QMessageBox::No | QMessageBox::NoToAll
| QMessageBox::Yes | QMessageBox::YesToAll);
question_box.setDefaultButton(QMessageBox::No);
- question_box.setButtonText(QMessageBox::Yes, tr("&Overwrite"));
- question_box.setButtonText(QMessageBox::YesToAll, tr("Over&write All"));
- question_box.setButtonText(QMessageBox::No, tr("&Skip"));
- question_box.setButtonText(QMessageBox::NoToAll, tr("Skip &All"));
+ question_box.addButton(tr("&Overwrite"), QMessageBox::YesRole);
+ question_box.addButton(tr("Over&write All"), QMessageBox::YesRole);
+ question_box.addButton(tr("&Skip"), QMessageBox::NoRole);
+ question_box.addButton(tr("Skip &All"), QMessageBox::NoRole);
switch (question_box.exec()) {
case QMessageBox::No:
diff --git a/src/library/proxytrackmodel.cpp b/src/library/proxytrackmodel.cpp
index 8579b4eb9e..d8a2755c1c 100644
--- a/src/library/proxytrackmodel.cpp
+++ b/src/library/proxytrackmodel.cpp
@@ -148,7 +148,7 @@ bool ProxyTrackModel::filterAcceptsRow(int sourceRow,
int i = iter.next();
QModelIndex index = itemModel->index(sourceRow, i, sourceParent);
QVariant data = itemModel->data(index);
- if (data.canConvert(QMetaType::QString)) {
+ if (data.canConvert<QString>()) {
QString strData = data.toString();
if (strData.contains(filter)) {
rowMatches = true;
diff --git a/src/library/scanner/libraryscanner.cpp b/src/library/scanner/libraryscanner.cpp
index dbecc7595b..667cbc90f9 100644
--- a/src/library/scanner/libraryscanner.cpp
+++ b/src/library/scanner/libraryscanner.cpp
@@ -428,11 +428,11 @@ void LibraryScanner::slotFinishUnhashedScan() {
"%d changed/added directories. "
"%d tracks verified from changed/added directories. "
"%d new tracks.",
- m_scannerGlobal->timerElapsed().formatNanosWithUnit().toLocal8Bit().constData(),
- m_scannerGlobal->verifiedDirectories().size(),
- m_scannerGlobal->numScannedDirectories(),
- m_scannerGlobal->verifiedTracks().size(),
- m_scannerGlobal->addedTracks().size());
+ m_scannerGlobal->timerElapsed().formatNanosWithUnit().toLocal8Bit().constData(),
+ static_cast<int>(m_scannerGlobal->verifiedDirectories().size()),
+ m_scannerGlobal->numScannedDirectories(),
+ static_cast<int>(m_scannerGlobal->verifiedTracks().size()),
+ static_cast<int>(m_scannerGlobal->addedTracks().size()));
m_scannerGlobal.clear();
changeScannerState(FINISHED);
diff --git a/src/library/searchquery.cpp b/src/library/searchquery.cpp
index 027c011f9c..f914f2ca18 100644
--- a/src/library/searchquery.cpp
+++ b/src/library/searchquery.cpp
@@ -172,7 +172,7 @@ TextFilterNode::TextFilterNode(const QSqlDatabase& database,
bool TextFilterNode::match(const TrackPointer& pTrack) const {
for (const auto& sqlColumn : m_sqlColumns) {
QVariant value = getTrackValueForColumn(pTrack, sqlColumn);
- if (!value.isValid() || !value.canConvert(QMetaType::QString)) {
+ if (!value.isValid() || !value.canConvert<QString>()) {
continue;
}
@@ -208,7 +208,7 @@ bool NullOrEmptyTextFilterNode::match(const TrackPointer& pTrack) const {
if (!m_sqlColumns.isEmpty()) {
// only use the major column
QVariant value = getTrackValueForColumn(pTrack, m_sqlColumns.first());
- if (!value.isValid() || !value.canConvert(QMetaType::QString)) {
+ if (!value.isValid() || !value.canConvert<QString>()) {
return true;
}
return value.toString().isEmpty();
@@ -334,7 +334,7 @@ double NumericFilterNode::parse(const QString& arg, bool* ok) {
bool NumericFilterNode::match(const TrackPointer& pTrack) const {
for (const auto& sqlColumn : m_sqlColumns) {
QVariant value = getTrackValueForColumn(pTrack, sqlColumn);
- if (!value.isValid() || !value.canConvert(QMetaType::Double)) {
+ if (!value.isValid() || !value.canConvert<double>()) {
if (m_bNullQuery) {
return true;
}
@@ -401,7 +401,7 @@ bool NullNumericFilterNode::match(const TrackPointer& pTrack) const {
if (!m_sqlColumns.isEmpty()) {
// only use the major column
QVariant value = getTrackValueForColumn(pTrack, m_sqlColumns.first());
- if (!value.isValid() || !value.canConvert(QMetaType::Double)) {
+ if (!value.isValid() || !value.canConvert<double>()) {
return true;
}
}
diff --git a/src/library/stardelegate.cpp b/src/library/stardelegate.cpp
index 8d000e605a..6df2122ea7 100644
--- a/src/library/stardelegate.cpp
+++ b/src/library/stardelegate.cpp
@@ -75,7 +75,7 @@ void StarDelegate::cellEntered(const QModelIndex& index) {
// This slot is called if the mouse pointer enters ANY cell on the
// QTableView but the code should only be executed on a column with a
// StarRating.
- if (index.data().canConvert(qMetaTypeId<StarRating>())) {
+ if (index.data().canConvert<StarRating>()) {
if (m_isOneCellInEditMode) {
m_pTableView->closePersistentEditor(m_currentEditedCellIndex);
}
diff --git a/src/library/stareditor.cpp b/src/library/stareditor.cpp
index 4d5dc07960..8c38f9d8d5 100644
--- a/src/library/stareditor.cpp
+++ b/src/library/stareditor.cpp
@@ -82,7 +82,12 @@ void StarEditor::paintEvent(QPaintEvent*) {
}
void StarEditor::mouseMoveEvent(QMouseEvent *event) {
- int star = starAtPosition(event->x());
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ const int eventPosition = static_cast<int>(event->position().x());
+#else
+ const int eventPosition = event->x();
+#endif
+ int star = starAtPosition(eventPosition);
if (star != m_starRating.starCount() && star != -1) {
m_starRating.setStarCount(star);
diff --git a/src/preferences/broadcastprofile.cpp b/src/preferences/broadcastprofile.cpp
index f48c26ac19..a26ad5ac50 100644
--- a/src/preferences/broadcastprofile.cpp
+++ b/src/preferences/broadcastprofile.cpp
@@ -7,7 +7,11 @@
#include <QTextStream>
#ifdef __QTKEYCHAIN__
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+#include <qt6keychain/keychain.h>
+#else
#include <qt5keychain/keychain.h>
+#endif
using namespace QKeychain;
#endif // __QTKEYCHAIN__
diff --git a/src/qml/qmlwaveformoverview.cpp b/src/qml/qmlwaveformoverview.cpp
index 6d9e151a64..fada7aff48 100644
--- a/src/qml/qmlwaveformoverview.cpp
+++ b/src/qml/qmlwaveformoverview.cpp
@@ -255,7 +255,10 @@ QColor QmlWaveformOverview::getRgbPenColor(ConstWaveformPointer pWaveform, int c
qreal max = math_max3(red, green, blue);
if (max > 0.0) {
QColor color;
- color.setRgbF(red / max, green / max, blue / max);
+ color.setRgbF(
+ static_cast<float>(red / max),
+ static_cast<float>(green / max),
+ static_cast<float>(blue / max));
return color;
}
return QColor();
diff --git a/src/util/db/sqlstringformatter.cpp b/src/util/db/sqlstringformatter.cpp
index 2c351bf64d..2d55190d8a 100644
--- a/src/util/db/sqlstringformatter.cpp
+++ b/src/util/db/sqlstringformatter.cpp
@@ -13,7 +13,11 @@ QString SqlStringFormatter::format(
VERIFY_OR_DEBUG_ASSERT(pDriver != nullptr) {
return value; // unformatted
}
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ QSqlField stringField(QString(), QMetaType(QMetaType::QString));
+#else
QSqlField stringField(QString(), QVariant::String);
+#endif
stringField.setValue(value);
return pDriver->formatValue(stringField);
}
diff --git a/src/util/dnd.cpp b/src/util/dnd.cpp
index 1d1165f27f..e201d0e677 100644
--- a/src/util/dnd.cpp
+++ b/src/util/dnd.cpp
@@ -149,7 +149,12 @@ bool DragAndDropHelper::allowDeckCloneAttempt(
}
// forbid clone if shift is pressed
- if (event.keyboardModifiers().testFlag(Qt::ShiftModifier)) {
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ const auto modifiers = event.modifiers();
+#else
+ const auto modifiers = event.keyboardModifiers();
+#endif
+ if (modifiers.testFlag(Qt::ShiftModifier)) {
return false;
}
diff --git a/src/util/translations.h b/src/util/translations.h
index 17b9b28f2a..bac70d1d9b 100644
--- a/src/util/translations.h
+++ b/src/util/translations.h
@@ -73,7 +73,11 @@ class Translations {
installTranslations(pApp,
locale,
QStringLiteral("qt"),
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ QLibraryInfo::path(QLibraryInfo::TranslationsPath),
+#else
QLibraryInfo::location(QLibraryInfo::TranslationsPath),
+#endif
true);
// Load Qt translations for this locale from the Mixxx translations
diff --git a/src/widget/wcoverart.cpp b/src/widget/wcoverart.cpp
index a60adaf0c1..ee8f8904d8 100644
--- a/src/widget/wcoverart.cpp
+++ b/src/widget/wcoverart.cpp
@@ -99,7 +99,9 @@ void WCoverArt::slotReloadCoverArt() {
if (!m_loadedTrack) {
return;
}
- guessTrackCoverInfoConcurrently(m_loadedTrack);
+ const auto future = guessTrackCoverInfoConcurrently(m_loadedTrack);
+ // Don't wait for the result and keep running in the background
+ Q_UNUSED(future)
}
void WCoverArt::slotCoverInfoSelected(const CoverInfoRelative& coverInfo) {
diff --git a/src/widget/wsearchlineedit.cpp b/src/widget/wsearchlineedit.cpp
index 1fb28ce7b5..d00fdbfb4b 100644
--- a/src/widget/wsearchlineedit.cpp
+++ b/src/widget/wsearchlineedit.cpp
@@ -362,6 +362,7 @@ void WSearchLineEdit::slotDisableSearch() {
return;
}
setTextBlockSignals(kDisabledText);
+ updateClearButton(QString());
setEnabled(false);
}
@@ -487,7 +488,6 @@ void WSearchLineEdit::updateClearButton(const QString& text) {
<< "updateClearButton"
<< text;
#endif // ENABLE_TRACE_LOG
- DEBUG_ASSERT(isEnabled());
if (text.isEmpty()) {
// Disable while placeholder is shown
diff --git a/src/widget/wspinny.cpp b/src/widget/wspinny.cpp
index 7c1653bd91..d0c508f98a 100644
--- a/src/widget/wspinny.cpp
+++ b/src/widget/wspinny.cpp
@@ -304,7 +304,9 @@ void WSpinny::slotReloadCoverArt() {
if (!m_loadedTrack) {
return;
}
- guessTrackCoverInfoConcurrently(m_loadedTrack);
+ const auto future = guessTrackCoverInfoConcurrently(m_loadedTrack);
+ // Don't wait for the result and keep running in the background
+ Q_UNUSED(future)
}
void WSpinny::paintEvent(QPaintEvent *e) {
diff --git a/src/widget/wtrackproperty.cpp b/src/widget/wtrackproperty.cpp
index d3f497de26..dfc9f3db5f 100644
--- a/src/widget/wtrackproperty.cpp
+++ b/src/widget/wtrackproperty.cpp
@@ -81,7 +81,7 @@ void WTrackProperty::slotTrackChanged(TrackId trackId) {
void WTrackProperty::updateLabel() {
if (m_pCurrentTrack) {
QVariant property = m_pCurrentTrack->property(m_property.toUtf8().constData());
- if (property.isValid() && property.canConvert(QMetaType::QString)) {
+ if (property.isValid() && property.canConvert<QString>()) {
setText(property.toString());
return;
}