diff --git a/src/collection/collectionbackend.cpp b/src/collection/collectionbackend.cpp index a994f330..dbde5c5d 100644 --- a/src/collection/collectionbackend.cpp +++ b/src/collection/collectionbackend.cpp @@ -1167,7 +1167,7 @@ CollectionBackend::AlbumList CollectionBackend::GetAlbums(const QString &artist, } - return albums.values(); // clazy:exclude=qt6-deprecated-api-fixes + return albums.values(); } diff --git a/src/core/mpris2.cpp b/src/core/mpris2.cpp index df699d80..daa1f399 100644 --- a/src/core/mpris2.cpp +++ b/src/core/mpris2.cpp @@ -208,17 +208,17 @@ void Mpris2::EmitNotification(const QString &name, const QVariant &val, const QS void Mpris2::EmitNotification(const QString &name) { QVariant value; - if (name == "PlaybackStatus") value = PlaybackStatus(); // clazy:exclude=qt6-deprecated-api-fixes - else if (name == "LoopStatus") value = LoopStatus(); // clazy:exclude=qt6-deprecated-api-fixes - else if (name == "Shuffle") value = Shuffle(); // clazy:exclude=qt6-deprecated-api-fixes - else if (name == "Metadata") value = Metadata(); // clazy:exclude=qt6-deprecated-api-fixes - else if (name == "Volume") value = Volume(); // clazy:exclude=qt6-deprecated-api-fixes - else if (name == "Position") value = Position(); // clazy:exclude=qt6-deprecated-api-fixes - else if (name == "CanPlay") value = CanPlay(); // clazy:exclude=qt6-deprecated-api-fixes - else if (name == "CanPause") value = CanPause(); // clazy:exclude=qt6-deprecated-api-fixes - else if (name == "CanSeek") value = CanSeek(); // clazy:exclude=qt6-deprecated-api-fixes - else if (name == "CanGoNext") value = CanGoNext(); // clazy:exclude=qt6-deprecated-api-fixes - else if (name == "CanGoPrevious") value = CanGoPrevious(); // clazy:exclude=qt6-deprecated-api-fixes + if (name == "PlaybackStatus") value = PlaybackStatus(); + else if (name == "LoopStatus") value = LoopStatus(); + else if (name == "Shuffle") value = Shuffle(); + else if (name == "Metadata") value = Metadata(); + else if (name == "Volume") value = Volume(); + else if (name == "Position") value = Position(); + else if (name == "CanPlay") value = CanPlay(); + else if (name == "CanPause") value = CanPause(); + else if (name == "CanSeek") value = CanSeek(); + else if (name == "CanGoNext") value = CanGoNext(); + else if (name == "CanGoPrevious") value = CanGoPrevious(); if (value.isValid()) EmitNotification(name, value); diff --git a/src/core/mpris_common.h b/src/core/mpris_common.h index 585d95c8..2832452a 100644 --- a/src/core/mpris_common.h +++ b/src/core/mpris_common.h @@ -32,27 +32,27 @@ namespace mpris { inline void AddMetadata(const QString &key, const QString &metadata, QVariantMap *map) { - if (!metadata.isEmpty()) (*map)[key] = metadata; // clazy:exclude=qt6-deprecated-api-fixes + if (!metadata.isEmpty()) (*map)[key] = metadata; } inline void AddMetadataAsList(const QString &key, const QString &metadata, QVariantMap *map) { - if (!metadata.isEmpty()) (*map)[key] = QStringList() << metadata; // clazy:exclude=qt6-deprecated-api-fixes + if (!metadata.isEmpty()) (*map)[key] = QStringList() << metadata; } inline void AddMetadata(const QString &key, int metadata, QVariantMap *map) { - if (metadata > 0) (*map)[key] = metadata; // clazy:exclude=qt6-deprecated-api-fixes + if (metadata > 0) (*map)[key] = metadata; } inline void AddMetadata(const QString &key, qint64 metadata, QVariantMap *map) { - if (metadata > 0) (*map)[key] = metadata; // clazy:exclude=qt6-deprecated-api-fixes + if (metadata > 0) (*map)[key] = metadata; } inline void AddMetadata(const QString &key, double metadata, QVariantMap *map) { - if (metadata != 0.0) (*map)[key] = metadata; // clazy:exclude=qt6-deprecated-api-fixes + if (metadata != 0.0) (*map)[key] = metadata; } inline void AddMetadata(const QString &key, const QDateTime &metadata, QVariantMap *map) { - if (metadata.isValid()) (*map)[key] = metadata; // clazy:exclude=qt6-deprecated-api-fixes + if (metadata.isValid()) (*map)[key] = metadata; } inline QString AsMPRISDateTimeType(const qint64 time) { diff --git a/src/core/utilities.cpp b/src/core/utilities.cpp index e9ee66a9..4c3e49e9 100644 --- a/src/core/utilities.cpp +++ b/src/core/utilities.cpp @@ -384,25 +384,23 @@ void OpenInFileManager(const QString &path, const QUrl &url) { command = command.split("/").last(); } - // Three is no QProcess::startDetachedCommand function in Qt 6, so ignore the Clazy Qt 6 deprecated API fixes for QProcess::startDetached(). - if (command.isEmpty() || command == "exo-open") { QDesktopServices::openUrl(QUrl::fromLocalFile(path)); } else if (command.startsWith("nautilus")) { - proc.startDetached(command, QStringList() << command_params << "--select" << url.toLocalFile()); // clazy:exclude=qt6-deprecated-api-fixes + proc.startDetached(command, QStringList() << command_params << "--select" << url.toLocalFile()); } else if (command.startsWith("dolphin") || command.startsWith("konqueror") || command.startsWith("kfmclient")) { - proc.startDetached(command, QStringList() << command_params << "--select" << "--new-window" << url.toLocalFile()); // clazy:exclude=qt6-deprecated-api-fixes + proc.startDetached(command, QStringList() << command_params << "--select" << "--new-window" << url.toLocalFile()); } else if (command.startsWith("caja")) { - proc.startDetached(command, QStringList() << command_params << "--no-desktop" << path); // clazy:exclude=qt6-deprecated-api-fixes + proc.startDetached(command, QStringList() << command_params << "--no-desktop" << path); } else if (command.startsWith("pcmanfm") || command.startsWith("thunar")) { - proc.startDetached(command, QStringList() << command_params << path); // clazy:exclude=qt6-deprecated-api-fixes + proc.startDetached(command, QStringList() << command_params << path); } else { - proc.startDetached(command, QStringList() << command_params << url.toLocalFile()); // clazy:exclude=qt6-deprecated-api-fixes + proc.startDetached(command, QStringList() << command_params << url.toLocalFile()); } } diff --git a/src/covermanager/coverproviders.cpp b/src/covermanager/coverproviders.cpp index 4a046c45..6c33d8b6 100644 --- a/src/covermanager/coverproviders.cpp +++ b/src/covermanager/coverproviders.cpp @@ -61,7 +61,7 @@ void CoverProviders::ReloadSettings() { QSettings s; s.beginGroup(CoversSettingsPage::kSettingsGroup); - QStringList providers_enabled = s.value("providers", QStringList() << all_providers.values()).toStringList(); // clazy:exclude=qt6-deprecated-api-fixes + QStringList providers_enabled = s.value("providers", all_providers.values()).toStringList(); s.endGroup(); int i = 0; diff --git a/src/covermanager/deezercoverprovider.cpp b/src/covermanager/deezercoverprovider.cpp index adc99b97..45f3ef5d 100644 --- a/src/covermanager/deezercoverprovider.cpp +++ b/src/covermanager/deezercoverprovider.cpp @@ -310,7 +310,7 @@ void DeezerCoverProvider::HandleSearchReply(QNetworkReply *reply, const int id) emit SearchFinished(id, CoverProviderSearchResults()); } else { - CoverProviderSearchResults cover_results = results.values(); // clazy:exclude=qt6-deprecated-api-fixes + CoverProviderSearchResults cover_results = results.values(); std::stable_sort(cover_results.begin(), cover_results.end(), AlbumCoverFetcherSearch::CoverProviderSearchResultCompareNumber); emit SearchFinished(id, cover_results); } diff --git a/src/device/giolister.cpp b/src/device/giolister.cpp index 77870c17..67e747d5 100644 --- a/src/device/giolister.cpp +++ b/src/device/giolister.cpp @@ -182,9 +182,9 @@ QVariantMap GioLister::DeviceHardwareInfo(const QString &id) { if (!devices_.contains(id)) return ret; const DeviceInfo &info = devices_[id]; - ret[QT_TR_NOOP("Mount point")] = info.mount_path; // clazy:exclude=qt6-deprecated-api-fixes - ret[QT_TR_NOOP("Device")] = info.volume_unix_device; // clazy:exclude=qt6-deprecated-api-fixes - ret[QT_TR_NOOP("URI")] = info.mount_uri; // clazy:exclude=qt6-deprecated-api-fixes + ret[QT_TR_NOOP("Mount point")] = info.mount_path; + ret[QT_TR_NOOP("Device")] = info.volume_unix_device; + ret[QT_TR_NOOP("URI")] = info.mount_uri; return ret; } diff --git a/src/device/udisks2lister.cpp b/src/device/udisks2lister.cpp index 31e1155a..113e4753 100644 --- a/src/device/udisks2lister.cpp +++ b/src/device/udisks2lister.cpp @@ -113,11 +113,11 @@ QVariantMap Udisks2Lister::DeviceHardwareInfo(const QString &id) { QVariantMap result; const auto &data = device_data_[id]; - result[QT_TR_NOOP("D-Bus path")] = data.dbus_path; // clazy:exclude=qt6-deprecated-api-fixes - result[QT_TR_NOOP("Serial number")] = data.serial; // clazy:exclude=qt6-deprecated-api-fixes - result[QT_TR_NOOP("Mount points")] = data.mount_paths.join(", "); // clazy:exclude=qt6-deprecated-api-fixes - result[QT_TR_NOOP("Partition label")] = data.label; // clazy:exclude=qt6-deprecated-api-fixes - result[QT_TR_NOOP("UUID")] = data.uuid; // clazy:exclude=qt6-deprecated-api-fixes + result[QT_TR_NOOP("D-Bus path")] = data.dbus_path; + result[QT_TR_NOOP("Serial number")] = data.serial; + result[QT_TR_NOOP("Mount points")] = data.mount_paths.join(", "); + result[QT_TR_NOOP("Partition label")] = data.label; + result[QT_TR_NOOP("UUID")] = data.uuid; return result; diff --git a/src/dialogs/edittagdialog.cpp b/src/dialogs/edittagdialog.cpp index ba1ce53c..dc641cea 100644 --- a/src/dialogs/edittagdialog.cpp +++ b/src/dialogs/edittagdialog.cpp @@ -548,7 +548,7 @@ void EditTagDialog::UpdateFieldValue(const FieldData &field, const QModelIndexLi QVariant value; if (ExtendedEditor *editor = dynamic_cast(field.editor_)) { - value = editor->value(); // clazy:exclude=qt6-deprecated-api-fixes + value = editor->value(); } else if (field.editor_) { qLog(Error) << "Missing editor for" << field.editor_->objectName(); diff --git a/src/engine/alsadevicefinder.cpp b/src/engine/alsadevicefinder.cpp index d67402e3..c68b7370 100644 --- a/src/engine/alsadevicefinder.cpp +++ b/src/engine/alsadevicefinder.cpp @@ -101,9 +101,9 @@ QList AlsaDeviceFinder::ListDevices() { device.card = card; device.device = dev; - device.value = QString("hw:%1,%2").arg(card).arg(dev); // clazy:exclude=qt6-deprecated-api-fixes + device.value = QString("hw:%1,%2").arg(card).arg(dev); ret.append(device); - device.value = QString("plughw:%1,%2").arg(card).arg(dev); // clazy:exclude=qt6-deprecated-api-fixes + device.value = QString("plughw:%1,%2").arg(card).arg(dev); ret.append(device); } diff --git a/src/engine/alsapcmdevicefinder.cpp b/src/engine/alsapcmdevicefinder.cpp index 833dfd41..70c19e0e 100644 --- a/src/engine/alsapcmdevicefinder.cpp +++ b/src/engine/alsapcmdevicefinder.cpp @@ -68,7 +68,7 @@ QList AlsaPCMDeviceFinder::ListDevices() { } Device device; - device.value = name; // clazy:exclude=qt6-deprecated-api-fixes + device.value = name; device.description = description; device.iconname = GuessIconName(device.description); ret << device; // clazy:exclude=reserve-candidates diff --git a/src/engine/pulsedevicefinder.cpp b/src/engine/pulsedevicefinder.cpp index 200c7e66..241ec0be 100644 --- a/src/engine/pulsedevicefinder.cpp +++ b/src/engine/pulsedevicefinder.cpp @@ -124,7 +124,7 @@ void PulseDeviceFinder::GetSinkInfoCallback(pa_context *c, const pa_sink_info *i if (info) { Device dev; dev.description = QString::fromUtf8(info->description); - dev.value = QString::fromUtf8(info->name); // clazy:exclude=qt6-deprecated-api-fixes + dev.value = QString::fromUtf8(info->name); dev.iconname = GuessIconName(dev.description); state->devices.append(dev); diff --git a/src/lyrics/lyricsproviders.cpp b/src/lyrics/lyricsproviders.cpp index 2da936f6..eca1660c 100644 --- a/src/lyrics/lyricsproviders.cpp +++ b/src/lyrics/lyricsproviders.cpp @@ -59,7 +59,7 @@ void LyricsProviders::ReloadSettings() { QSettings s; s.beginGroup(LyricsSettingsPage::kSettingsGroup); - QStringList providers_enabled = s.value("providers", QStringList() << all_providers.values()).toStringList(); // clazy:exclude=qt6-deprecated-api-fixes + QStringList providers_enabled = s.value("providers", all_providers.values()).toStringList(); s.endGroup(); int i = 0; diff --git a/src/osd/osddbus.cpp b/src/osd/osddbus.cpp index 617f4121..6002c76e 100644 --- a/src/osd/osddbus.cpp +++ b/src/osd/osddbus.cpp @@ -147,17 +147,17 @@ void OSDDBus::ShowMessageNative(const QString &summary, const QString &message, if (!image.isNull()) { if (version_ >= QVersionNumber(1, 2)) { - hints["image-data"] = QVariant(image); // clazy:exclude=qt6-deprecated-api-fixes + hints["image-data"] = QVariant(image); } else if (version_ >= QVersionNumber(1, 1)) { - hints["image_data"] = QVariant(image); // clazy:exclude=qt6-deprecated-api-fixes + hints["image_data"] = QVariant(image); } else { - hints["icon_data"] = QVariant(image); // clazy:exclude=qt6-deprecated-api-fixes + hints["icon_data"] = QVariant(image); } } - hints["transient"] = QVariant(true); // clazy:exclude=qt6-deprecated-api-fixes + hints["transient"] = QVariant(true); int id = 0; if (last_notification_time_.secsTo(QDateTime::currentDateTime()) * 1000 < timeout_msec()) { diff --git a/src/playlistparsers/plsparser.cpp b/src/playlistparsers/plsparser.cpp index 614ee9fa..f5ef4622 100644 --- a/src/playlistparsers/plsparser.cpp +++ b/src/playlistparsers/plsparser.cpp @@ -81,7 +81,7 @@ SongList PLSParser::Load(QIODevice *device, const QString &playlist_path, const } } - return songs.values(); // clazy:exclude=qt6-deprecated-api-fixes + return songs.values(); } diff --git a/src/settings/backendsettingspage.cpp b/src/settings/backendsettingspage.cpp index 7ff19cbc..3984a226 100644 --- a/src/settings/backendsettingspage.cpp +++ b/src/settings/backendsettingspage.cpp @@ -217,9 +217,9 @@ void BackendSettingsPage::Load() { output_name = output.name; } QVariant device_value; - if (ui_->combobox_device->currentText().isEmpty()) device_value = QVariant(); // clazy:exclude=qt6-deprecated-api-fixes - else if (ui_->combobox_device->currentText() == kOutputCustom) device_value = ui_->lineedit_device->text(); // clazy:exclude=qt6-deprecated-api-fixes - else device_value = ui_->combobox_device->itemData(ui_->combobox_device->currentIndex()).value(); // clazy:exclude=qt6-deprecated-api-fixes + if (ui_->combobox_device->currentText().isEmpty()) device_value = QVariant(); + else if (ui_->combobox_device->currentText() == kOutputCustom) device_value = ui_->lineedit_device->text(); + else device_value = ui_->combobox_device->itemData(ui_->combobox_device->currentIndex()).value(); if (enginetype_current_ != enginetype || output_name != output_current_ || device_value != device_current_) { set_changed(); @@ -296,7 +296,7 @@ void BackendSettingsPage::Load_Output(QString output, QVariant device) { } if (!found) { // Output is invalid for this engine, reset to default output. output = engine()->DefaultOutput(); - device = (engine()->CustomDeviceSupport(output) ? QString() : QVariant()); // clazy:exclude=qt6-deprecated-api-fixes + device = (engine()->CustomDeviceSupport(output) ? QString() : QVariant()); for (int i = 0; i < ui_->combobox_output->count(); ++i) { EngineBase::OutputDetails o = ui_->combobox_output->itemData(i).value(); if (o.name == output) { @@ -445,9 +445,9 @@ void BackendSettingsPage::Save() { output_name = output.name; } - if (ui_->combobox_device->currentText().isEmpty()) device_value = QVariant(); // clazy:exclude=qt6-deprecated-api-fixes - else if (ui_->combobox_device->currentText() == kOutputCustom) device_value = ui_->lineedit_device->text(); // clazy:exclude=qt6-deprecated-api-fixes - else device_value = ui_->combobox_device->itemData(ui_->combobox_device->currentIndex()).value(); // clazy:exclude=qt6-deprecated-api-fixes + if (ui_->combobox_device->currentText().isEmpty()) device_value = QVariant(); + else if (ui_->combobox_device->currentText() == kOutputCustom) device_value = ui_->lineedit_device->text(); + else device_value = ui_->combobox_device->itemData(ui_->combobox_device->currentIndex()).value(); QSettings s; s.beginGroup(kSettingsGroup); diff --git a/src/smartplaylists/smartplaylistsearchtermwidget.cpp b/src/smartplaylists/smartplaylistsearchtermwidget.cpp index 8eb28ce7..616dbd77 100644 --- a/src/smartplaylists/smartplaylistsearchtermwidget.cpp +++ b/src/smartplaylists/smartplaylistsearchtermwidget.cpp @@ -377,31 +377,31 @@ SmartPlaylistSearchTerm SmartPlaylistSearchTermWidget::Term() const { // The value depends on the data type const QWidget *value_page = ui_->value_stack->currentWidget(); if (value_page == ui_->page_text) { - ret.value_ = ui_->value_text->text(); // clazy:exclude=qt6-deprecated-api-fixes + ret.value_ = ui_->value_text->text(); } else if (value_page == ui_->page_empty) { - ret.value_ = ""; // clazy:exclude=qt6-deprecated-api-fixes + ret.value_ = ""; } else if (value_page == ui_->page_number) { - ret.value_ = ui_->value_number->value(); // clazy:exclude=qt6-deprecated-api-fixes + ret.value_ = ui_->value_number->value(); } else if (value_page == ui_->page_date) { - ret.value_ = ui_->value_date->dateTime().toSecsSinceEpoch(); // clazy:exclude=qt6-deprecated-api-fixes + ret.value_ = ui_->value_date->dateTime().toSecsSinceEpoch(); } else if (value_page == ui_->page_time) { - ret.value_ = QTime(0, 0).secsTo(ui_->value_time->time()); // clazy:exclude=qt6-deprecated-api-fixes + ret.value_ = QTime(0, 0).secsTo(ui_->value_time->time()); } else if (value_page == ui_->page_date_numeric) { ret.date_ = SmartPlaylistSearchTerm::DateType(ui_->date_type->currentIndex()); - ret.value_ = ui_->value_date_numeric->value(); // clazy:exclude=qt6-deprecated-api-fixes + ret.value_ = ui_->value_date_numeric->value(); } else if (value_page == ui_->page_date_relative) { ret.date_ = SmartPlaylistSearchTerm::DateType(ui_->date_type_relative->currentIndex()); - ret.value_ = ui_->value_date_numeric1->value(); // clazy:exclude=qt6-deprecated-api-fixes - ret.second_value_ = ui_->value_date_numeric2->value(); // clazy:exclude=qt6-deprecated-api-fixes + ret.value_ = ui_->value_date_numeric1->value(); + ret.second_value_ = ui_->value_date_numeric2->value(); } else if (value_page == ui_->page_rating) { - ret.value_ = ui_->value_rating->rating(); // clazy:exclude=qt6-deprecated-api-fixes + ret.value_ = ui_->value_rating->rating(); } return ret; diff --git a/src/transcoder/transcodedialog.cpp b/src/transcoder/transcodedialog.cpp index d49890ee..e576eb3c 100644 --- a/src/transcoder/transcodedialog.cpp +++ b/src/transcoder/transcodedialog.cpp @@ -294,7 +294,7 @@ void TranscodeDialog::UpdateProgress() { int progress = (finished_success_ + finished_failed_) * 100; QMap current_jobs = transcoder_->GetProgress(); - QList values = current_jobs.values(); // clazy:exclude=qt6-deprecated-api-fixes + QList values = current_jobs.values(); for (const float value : values) { progress += qBound(0, int(value * 100), 99); }