commit clementine for openSUSE:Factory
Hello community, here is the log from the commit of package clementine for openSUSE:Factory checked in at 2019-05-24 11:32:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/clementine (Old) and /work/SRC/openSUSE:Factory/.clementine.new.5148 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "clementine" Fri May 24 11:32:53 2019 rev:49 rq:705015 version:1.3.1+git20190423 Changes: -------- --- /work/SRC/openSUSE:Factory/clementine/clementine.changes 2019-03-28 22:48:41.135054753 +0100 +++ /work/SRC/openSUSE:Factory/.clementine.new.5148/clementine.changes 2019-05-24 11:33:00.673375368 +0200 @@ -1,0 +2,14 @@ +Wed May 22 10:03:04 UTC 2019 - plater <davejplater@gmail.com> + +- Update to qt5 branch snapshot 1.3.1+git20190423. +- Added cherrypicked patches to bring qt5 branch to master's state: + 0001-Fix-gst_buffer_unref-assertion-in-chromaprinter.patch + 0001-Add-error-handling-path-for-async-song-loading.patch + 0001-Fixes-for-APE-filetype.patch + 0001-Simplify-some-statements.patch and + 0001-Set-non-zero-minimum-for-fade-times.patch. +- Upstream changes: + *Revert "Blacklist all NVidia drivers" + *setFirstSectionMovable() in playlistview.cpp + +------------------------------------------------------------------- Old: ---- clementine-1.3.1+git20190213.tar.gz New: ---- 0001-Add-error-handling-path-for-async-song-loading.patch 0001-Fix-gst_buffer_unref-assertion-in-chromaprinter.patch 0001-Fixes-for-APE-filetype.patch 0001-Set-non-zero-minimum-for-fade-times.patch 0001-Simplify-some-statements.patch clementine-1.3.1+git20190423.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ clementine.spec ++++++ --- /var/tmp/diff_new_pack.gJYtYC/_old 2019-05-24 11:33:01.789374942 +0200 +++ /var/tmp/diff_new_pack.gJYtYC/_new 2019-05-24 11:33:01.797374938 +0200 @@ -12,11 +12,11 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # -%define rev 36cc5b82f4daf5c2d4e93dc8072665e5a3ca622b +%define rev 3b76fa62752f25b445ee2a71f02c0c9d7581735a %bcond_without git @@ -28,7 +28,7 @@ %bcond_without qt5 Name: clementine -Version: 1.3.1+git20190213 +Version: 1.3.1+git20190423 Release: 0 Summary: A music player inspired by Amarok 1.4 License: GPL-3.0-or-later @@ -56,7 +56,12 @@ Patch12: 0001-Fix-potential-use-of-streamer-element-after-deletion.patch Patch13: 0001-Free-decoder-bin-if-error-occurs-during-setup.patch Patch14: 0001-Fix-several-gstreamer-object-leaks.patch - +#PATCH-FIX-GIT to 2019-04-27 +Patch15: 0001-Fix-gst_buffer_unref-assertion-in-chromaprinter.patch +Patch16: 0001-Add-error-handling-path-for-async-song-loading.patch +Patch17: 0001-Fixes-for-APE-filetype.patch +Patch18: 0001-Simplify-some-statements.patch +Patch19: 0001-Set-non-zero-minimum-for-fade-times.patch %if 0%{?suse_version} > 1325 BuildRequires: libboost_headers-devel %else ++++++ 0001-Add-error-handling-path-for-async-song-loading.patch ++++++
From babff78025cba7e2f82cf905f14eb0db8090cb2a Mon Sep 17 00:00:00 2001 From: Jim Broadus <jbroadus@gmail.com> Date: Sun, 7 Apr 2019 14:18:11 -0700 Subject: [PATCH] Add error handling path for async song loading.
Async song loading can fail without user feedback. This change adds return codes to these async load functions. It will now produce an error dialog in simple scenarios (test case is user selecting a file that is not readable). Other cases, such as directories and playlists, aren't yet covered. --- src/core/songloader.cpp | 28 +++++++++++++++++++--------- src/core/songloader.h | 8 ++++---- src/playlist/songloaderinserter.cpp | 12 ++++++++++-- 3 files changed, 33 insertions(+), 15 deletions(-) diff --git a/src/core/songloader.cpp b/src/core/songloader.cpp index 677fc26b5..0a28149c9 100644 --- a/src/core/songloader.cpp +++ b/src/core/songloader.cpp @@ -130,9 +130,12 @@ SongLoader::Result SongLoader::Load(const QUrl& url) { return BlockingLoadRequired; } -void SongLoader::LoadFilenamesBlocking() { +SongLoader::Result SongLoader::LoadFilenamesBlocking() { if (preload_func_) { - preload_func_(); + return preload_func_(); + } else { + qLog(Error) << "Preload function was not set for blocking operation"; + return Error; } } @@ -207,18 +210,21 @@ SongLoader::Result SongLoader::LoadLocal(const QString& filename) { return BlockingLoadRequired; } -void SongLoader::LoadLocalAsync(const QString& filename) { +SongLoader::Result SongLoader::LoadLocalAsync(const QString& filename) { // First check to see if it's a directory - if so we will load all the songs // inside right away. if (QFileInfo(filename).isDir()) { LoadLocalDirectory(filename); - return; + return Success; } // It's a local file, so check if it looks like a playlist. // Read the first few bytes. QFile file(filename); - if (!file.open(QIODevice::ReadOnly)) return; + if (!file.open(QIODevice::ReadOnly)) { + qLog(Error) << "Could not open file " << filename; + return Error; + } QByteArray data(file.read(PlaylistParser::kMagicSize)); ParserBase* parser = playlist_parser_->ParserForMagic(data); @@ -234,7 +240,7 @@ void SongLoader::LoadLocalAsync(const QString& filename) { // It's a playlist! LoadPlaylist(parser, filename); - return; + return Success; } // Check if it's a cue file @@ -249,7 +255,7 @@ void SongLoader::LoadLocalAsync(const QString& filename) { for (Song song : song_list) { if (song.is_valid()) songs_ << song; } - return; + return Success; } // Assume it's just a normal file @@ -257,6 +263,9 @@ void SongLoader::LoadLocalAsync(const QString& filename) { song.InitFromFilePartial(filename); if (song.is_valid()) { songs_ << song; + return Success; + } else { + return Error; } } @@ -374,7 +383,7 @@ void SongLoader::StopTypefind() { emit LoadRemoteFinished(); } -void SongLoader::LoadRemote() { +SongLoader::Result SongLoader::LoadRemote() { qLog(Debug) << "Loading remote file" << url_; // It's not a local file so we have to fetch it to see what it is. We use @@ -399,7 +408,7 @@ void SongLoader::LoadRemote() { if (!source) { qLog(Warning) << "Couldn't create gstreamer source element for" << url_.toString(); - return; + return Error; } // Create the other elements and link them up @@ -430,6 +439,7 @@ void SongLoader::LoadRemote() { // Wait until loading is finished loop.exec(); + return Success; } void SongLoader::TypeFound(GstElement*, uint, GstCaps* caps, void* self) { diff --git a/src/core/songloader.h b/src/core/songloader.h index 494a4fc9d..0f32378e4 100644 --- a/src/core/songloader.h +++ b/src/core/songloader.h @@ -72,7 +72,7 @@ class SongLoader : public QObject { // Loads the files with only filenames. When finished, songs() contains a // complete list of all Song objects, but without metadata. This method is // blocking, do not call it from the UI thread. - void LoadFilenamesBlocking(); + Result LoadFilenamesBlocking(); // Completely load songs previously loaded with LoadFilenamesBlocking(). When // finished, the Song objects in songs() contain metadata now. This method is // blocking, do not call it from the UI thread. @@ -101,7 +101,7 @@ signals: }; Result LoadLocal(const QString& filename); - void LoadLocalAsync(const QString& filename); + Result LoadLocalAsync(const QString& filename); void EffectiveSongLoad(Song* song); Result LoadLocalPartial(const QString& filename); void LoadLocalDirectory(const QString& filename); @@ -109,7 +109,7 @@ signals: void AddAsRawStream(); - void LoadRemote(); + Result LoadRemote(); bool LoadRemotePlaylist(const QUrl& url); // GStreamer callbacks @@ -138,7 +138,7 @@ signals: CueParser* cue_parser_; // For async loads - std::function<void()> preload_func_; + std::function<Result()> preload_func_; int timeout_; State state_; bool success_; diff --git a/src/playlist/songloaderinserter.cpp b/src/playlist/songloaderinserter.cpp index d6ebca740..ffa83e59a 100644 --- a/src/playlist/songloaderinserter.cpp +++ b/src/playlist/songloaderinserter.cpp @@ -134,15 +134,23 @@ void SongLoaderInserter::AsyncLoad() { int async_load_id = task_manager_->StartTask(tr("Loading tracks")); task_manager_->SetTaskProgress(async_load_id, async_progress, pending_.count()); + bool first_loaded = false; for (int i = 0; i < pending_.count(); ++i) { SongLoader* loader = pending_[i]; - loader->LoadFilenamesBlocking(); + SongLoader::Result res = loader->LoadFilenamesBlocking(); + task_manager_->SetTaskProgress(async_load_id, ++async_progress); - if (i == 0) { + + if (res == SongLoader::Error) { + emit Error(tr("Error loading %1").arg(loader->url().toString())); + continue; + } + if (!first_loaded) { // Load everything from the first song. It'll start playing as soon as // we emit PreloadFinished, so it needs to have the duration set to show // properly in the UI. loader->LoadMetadataBlocking(); + first_loaded = true; } songs_ << loader->songs(); } -- 2.16.4 ++++++ 0001-Fix-gst_buffer_unref-assertion-in-chromaprinter.patch ++++++
From 8094957e09a43e0dcbaebf36d01b48922119b2c4 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge <jonas@jkvinge.net> Date: Fri, 26 Apr 2019 20:40:42 +0200 Subject: [PATCH] Fix gst_buffer_unref assertion in chromaprinter
--- src/musicbrainz/chromaprinter.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) Index: Clementine-3b76fa62752f25b445ee2a71f02c0c9d7581735a/src/musicbrainz/chromaprinter.cpp =================================================================== --- Clementine-3b76fa62752f25b445ee2a71f02c0c9d7581735a.orig/src/musicbrainz/chromaprinter.cpp 2019-05-22 12:25:58.153436956 +0200 +++ Clementine-3b76fa62752f25b445ee2a71f02c0c9d7581735a/src/musicbrainz/chromaprinter.cpp 2019-05-22 12:26:34.126826663 +0200 @@ -208,12 +208,16 @@ GstFlowReturn Chromaprinter::NewBufferCa Chromaprinter* me = reinterpret_cast<Chromaprinter*>(self); GstSample* sample = gst_app_sink_pull_sample(app_sink); + if (!sample) return GST_FLOW_ERROR; GstBuffer* buffer = gst_sample_get_buffer(sample); - GstMapInfo map; - gst_buffer_map(buffer, &map, GST_MAP_READ); - me->buffer_.write(reinterpret_cast<const char*>(map.data), map.size); - gst_buffer_unmap(buffer, &map); - gst_buffer_unref(buffer); + if (buffer) { + GstMapInfo map; + if (gst_buffer_map(buffer, &map, GST_MAP_READ)) { + me->buffer_.write(reinterpret_cast<const char*>(map.data), map.size); + gst_buffer_unmap(buffer, &map); + } + } + gst_sample_unref(sample); return GST_FLOW_OK; } ++++++ 0001-Fix-several-gstreamer-object-leaks.patch ++++++ --- /var/tmp/diff_new_pack.gJYtYC/_old 2019-05-24 11:33:01.837374923 +0200 +++ /var/tmp/diff_new_pack.gJYtYC/_new 2019-05-24 11:33:01.841374922 +0200 @@ -17,11 +17,11 @@ src/engines/gstenginepipeline.cpp | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) -diff --git a/src/engines/gstenginepipeline.cpp b/src/engines/gstenginepipeline.cpp -index 7f12c2628..17ddd6089 100644 ---- a/src/engines/gstenginepipeline.cpp -+++ b/src/engines/gstenginepipeline.cpp -@@ -417,10 +417,13 @@ bool GstEnginePipeline::Init() { +Index: Clementine-3b76fa62752f25b445ee2a71f02c0c9d7581735a/src/engines/gstenginepipeline.cpp +=================================================================== +--- Clementine-3b76fa62752f25b445ee2a71f02c0c9d7581735a.orig/src/engines/gstenginepipeline.cpp 2019-05-22 12:26:00.917543757 +0200 ++++ Clementine-3b76fa62752f25b445ee2a71f02c0c9d7581735a/src/engines/gstenginepipeline.cpp 2019-05-22 12:26:10.025895666 +0200 +@@ -424,10 +424,13 @@ bool GstEnginePipeline::Init() { gst_element_link(probe_converter, probe_sink); // Link the outputs of tee to the queues on each path. @@ -39,7 +39,7 @@ // Link replaygain elements if enabled. if (rg_enabled_) { -@@ -454,12 +457,14 @@ bool GstEnginePipeline::Init() { +@@ -461,12 +464,14 @@ bool GstEnginePipeline::Init() { gst_caps_unref(caps); // Add probes and handlers. @@ -60,7 +60,7 @@ MaybeLinkDecodeToAudio(); -@@ -519,8 +524,10 @@ bool GstEnginePipeline::InitFromUrl(const QUrl& url, qint64 end_nanosec) { +@@ -526,8 +531,10 @@ bool GstEnginePipeline::InitFromUrl(cons GstEnginePipeline::~GstEnginePipeline() { if (pipeline_) { @@ -73,7 +73,7 @@ g_source_remove(bus_cb_id_); gst_element_set_state(pipeline_, GST_STATE_NULL); gst_object_unref(GST_OBJECT(pipeline_)); -@@ -1011,6 +1018,7 @@ void GstEnginePipeline::SourceSetupCallback(GstURIDecodeBin* bin, +@@ -1018,6 +1025,7 @@ void GstEnginePipeline::SourceSetupCallb g_object_set(element, "ssl-strict", TRUE, nullptr); #endif } @@ -81,6 +81,3 @@ } void GstEnginePipeline::TransitionToNext() { --- -2.16.4 - ++++++ 0001-Fixes-for-APE-filetype.patch ++++++
From bd89a1d2ded7177888779b9bc55f32e85b271ef5 Mon Sep 17 00:00:00 2001 From: "James D. Smith" <smithjd15@gmail.com> Date: Thu, 14 Feb 2019 17:33:33 -0700 Subject: [PATCH] Fixes for APE filetype.
--- ext/libclementine-remote/remotecontrolmessages.proto | 1 + src/core/mpris2.cpp | 1 + src/core/song.cpp | 3 +++ src/library/libraryquery.cpp | 1 + 4 files changed, 6 insertions(+) diff --git a/ext/libclementine-remote/remotecontrolmessages.proto b/ext/libclementine-remote/remotecontrolmessages.proto index 141b78f5d..2389a5a26 100644 --- a/ext/libclementine-remote/remotecontrolmessages.proto +++ b/ext/libclementine-remote/remotecontrolmessages.proto @@ -109,6 +109,7 @@ message SongMetadata { WAVPACK = 14; SPC = 15; VGM = 16; + APE = 17; STREAM = 99; } diff --git a/src/core/mpris2.cpp b/src/core/mpris2.cpp index 9f9d4737f..7056d5bcb 100644 --- a/src/core/mpris2.cpp +++ b/src/core/mpris2.cpp @@ -238,6 +238,7 @@ QStringList Mpris2::SupportedMimeTypes() const { << "audio/ogg" << "audio/vnd.rn-realaudio" << "audio/vorbis" + << "audio/x-ape" << "audio/x-flac" << "audio/x-mp3" << "audio/x-mpeg" diff --git a/src/core/song.cpp b/src/core/song.cpp index df68a8cc4..01b320fe9 100644 --- a/src/core/song.cpp +++ b/src/core/song.cpp @@ -456,6 +456,8 @@ QString Song::TextForFiletype(FileType type) { return QObject::tr("SNES SPC700"); case Song::Type_VGM: return QObject::tr("VGM"); + case Song::Type_APE: + return QObject::tr("Monkey's Audio"); case Song::Type_Stream: return QObject::tr("Stream"); @@ -469,6 +471,7 @@ QString Song::TextForFiletype(FileType type) { bool Song::IsFileLossless() const { switch (filetype()) { case Song::Type_Aiff: + case Song::Type_APE: case Song::Type_Flac: case Song::Type_OggFlac: case Song::Type_Wav: diff --git a/src/library/libraryquery.cpp b/src/library/libraryquery.cpp index 4a44689b0..0ebc3ddb0 100644 --- a/src/library/libraryquery.cpp +++ b/src/library/libraryquery.cpp @@ -46,6 +46,7 @@ const QMap<QString, Song::FileType> kFiletypeId = QMap<QString, Song::FileType>( {"cdda", Song::Type_Cdda}, {"spc700", Song::Type_Spc}, {"vgm", Song::Type_VGM}, + {"ape", Song::Type_APE}, {"stream", Song::Type_Stream}, {"unknown", Song::Type_Unknown}}); -- 2.16.4 ++++++ 0001-Set-non-zero-minimum-for-fade-times.patch ++++++
From cc295a4c4c4a5e53b8e734cb495b19ae60687022 Mon Sep 17 00:00:00 2001 From: Jim Broadus <jbroadus@gmail.com> Date: Sun, 7 Apr 2019 21:07:54 -0700 Subject: [PATCH] Set non-zero minimum for fade times.
QTimeLine duration must be greater than 0. If set to 0, a default of 1000ms will be used. To avoid this, enforce a minimum of 1ms for pause and cross fade values if those fades are enabled. --- src/ui/playbacksettingspage.ui | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ui/playbacksettingspage.ui b/src/ui/playbacksettingspage.ui index d2b405b66..f43a2cd55 100644 --- a/src/ui/playbacksettingspage.ui +++ b/src/ui/playbacksettingspage.ui @@ -88,6 +88,9 @@ <property name="suffix"> <string> ms</string> </property> + <property name="minimum"> + <number>1</number> + </property> <property name="maximum"> <number>10000</number> </property> @@ -139,6 +142,9 @@ <property name="suffix"> <string> ms</string> </property> + <property name="minimum"> + <number>1</number> + </property> <property name="maximum"> <number>10000</number> </property> -- 2.16.4 ++++++ 0001-Simplify-some-statements.patch ++++++
From be827f4f7fe01da4b791d4a88f43870e8850940b Mon Sep 17 00:00:00 2001 From: Filip Gawin <filip.gawin@zoho.com> Date: Fri, 22 Feb 2019 18:44:39 +0100 Subject: [PATCH] Simplify some statements
--- src/core/commandlineoptions.cpp | 5 ++--- src/core/mergedproxymodel.cpp | 6 ++---- src/core/utilities.cpp | 4 +--- src/devices/cddasongloader.cpp | 2 +- src/internet/core/internetmodel.cpp | 8 +++----- src/internet/core/internetshowsettingspage.cpp | 2 +- src/internet/podcasts/gpoddertoptagsmodel.cpp | 2 +- src/internet/podcasts/podcastdiscoverymodel.cpp | 3 +-- src/internet/subsonic/subsonicservice.cpp | 2 +- src/networkremote/incomingdataparser.cpp | 4 ++-- src/playlist/playlistlistcontainer.cpp | 6 +----- src/playlist/playlistview.cpp | 2 +- src/ripper/ripper.cpp | 5 +---- src/ui/albumcoverchoicecontroller.cpp | 5 +---- src/widgets/nowplayingwidget.cpp | 3 +-- 15 files changed, 20 insertions(+), 39 deletions(-) diff --git a/src/core/commandlineoptions.cpp b/src/core/commandlineoptions.cpp index b47c1c717..00089ac71 100644 --- a/src/core/commandlineoptions.cpp +++ b/src/core/commandlineoptions.cpp @@ -310,9 +310,8 @@ bool CommandlineOptions::Parse() { bool CommandlineOptions::is_empty() const { return player_action_ == Player_None && set_volume_ == -1 && volume_modifier_ == 0 && seek_to_ == -1 && seek_by_ == 0 && - play_track_at_ == -1 && show_osd_ == false && - toggle_pretty_osd_ == false && urls_.isEmpty() && - delete_current_track_ == false; + play_track_at_ == -1 && !show_osd_ && !toggle_pretty_osd_ && + urls_.isEmpty() && !delete_current_track_; } bool CommandlineOptions::contains_play_options() const { diff --git a/src/core/mergedproxymodel.cpp b/src/core/mergedproxymodel.cpp index 8c210d391..97a151cc9 100644 --- a/src/core/mergedproxymodel.cpp +++ b/src/core/mergedproxymodel.cpp @@ -505,10 +505,8 @@ void MergedProxyModel::LayoutChanged() { } bool MergedProxyModel::IsKnownModel(const QAbstractItemModel* model) const { - if (model == this || model == sourceModel() || - merge_points_.contains(const_cast<QAbstractItemModel*>(model))) - return true; - return false; + return model == this || model == sourceModel() || + merge_points_.contains(const_cast<QAbstractItemModel*>(model)); } QModelIndexList MergedProxyModel::mapFromSource( diff --git a/src/core/utilities.cpp b/src/core/utilities.cpp index fc300a005..b78008b2b 100644 --- a/src/core/utilities.cpp +++ b/src/core/utilities.cpp @@ -270,9 +270,7 @@ bool RemoveRecursive(const QString& path) { if (!QFile::remove(path + "/" + child)) return false; } - if (!dir.rmdir(path)) return false; - - return true; + return dir.rmdir(path); } bool CopyRecursive(const QString& source, const QString& destination) { diff --git a/src/devices/cddasongloader.cpp b/src/devices/cddasongloader.cpp index 19b669bd8..54f204f4e 100644 --- a/src/devices/cddasongloader.cpp +++ b/src/devices/cddasongloader.cpp @@ -193,7 +193,7 @@ void CddaSongLoader::AudioCDTagsLoaded( qobject_cast<MusicBrainzClient*>(sender()); musicbrainz_client->deleteLater(); SongList songs; - if (results.size() == 0) return; + if (results.empty()) return; int track_number = 1; for (const MusicBrainzClient::Result& ret : results) { Song song; diff --git a/src/internet/core/internetmodel.cpp b/src/internet/core/internetmodel.cpp index 756d48073..f49c9683f 100644 --- a/src/internet/core/internetmodel.cpp +++ b/src/internet/core/internetmodel.cpp @@ -351,11 +351,9 @@ void InternetModel::UpdateServices() { bool setting_val = s.value(service_name).toBool(); // Only update if values are different - if (setting_val == true && - shown_services_[internet_service].shown == false) { + if (setting_val && !shown_services_[internet_service].shown) { ShowService(internet_service); - } else if (setting_val == false && - shown_services_[internet_service].shown == true) { + } else if (!setting_val && shown_services_[internet_service].shown) { HideService(internet_service); } } @@ -378,7 +376,7 @@ int InternetModel::FindItemPosition(const QString& text) { } void InternetModel::ShowService(InternetService* service) { - if (shown_services_[service].shown != true) { + if (!shown_services_[service].shown) { QStandardItem* item = shown_services_[service].item; int pos = FindItemPosition(item->text()); invisibleRootItem()->insertRow(pos, item); diff --git a/src/internet/core/internetshowsettingspage.cpp b/src/internet/core/internetshowsettingspage.cpp index 4c271b170..5a4b67629 100644 --- a/src/internet/core/internetshowsettingspage.cpp +++ b/src/internet/core/internetshowsettingspage.cpp @@ -50,7 +50,7 @@ void InternetShowSettingsPage::Load() { item->setIcon(0, service_it.value().item->icon()); Qt::CheckState check_state = - service_it.value().shown == true ? Qt::Checked : Qt::Unchecked; + service_it.value().shown ? Qt::Checked : Qt::Unchecked; item->setData(0, Qt::CheckStateRole, check_state); /* We have to store the constant name of the service */ item->setData(1, Qt::UserRole, service_it.key()->name()); diff --git a/src/internet/podcasts/gpoddertoptagsmodel.cpp b/src/internet/podcasts/gpoddertoptagsmodel.cpp index b1926b09d..6fc4b7139 100644 --- a/src/internet/podcasts/gpoddertoptagsmodel.cpp +++ b/src/internet/podcasts/gpoddertoptagsmodel.cpp @@ -40,7 +40,7 @@ bool GPodderTopTagsModel::hasChildren(const QModelIndex& parent) const { bool GPodderTopTagsModel::canFetchMore(const QModelIndex& parent) const { if (parent.isValid() && parent.data(Role_Type).toInt() == Type_Folder && - parent.data(Role_HasLazyLoaded).toBool() == false) { + !parent.data(Role_HasLazyLoaded).toBool()) { return true; } diff --git a/src/internet/podcasts/podcastdiscoverymodel.cpp b/src/internet/podcasts/podcastdiscoverymodel.cpp index 076562d90..eb911fd21 100644 --- a/src/internet/podcasts/podcastdiscoverymodel.cpp +++ b/src/internet/podcasts/podcastdiscoverymodel.cpp @@ -38,8 +38,7 @@ PodcastDiscoveryModel::PodcastDiscoveryModel(Application* app, QObject* parent) QVariant PodcastDiscoveryModel::data(const QModelIndex& index, int role) const { if (index.isValid() && role == Qt::DecorationRole && - QStandardItemModel::data(index, Role_StartedLoadingImage).toBool() == - false) { + !QStandardItemModel::data(index, Role_StartedLoadingImage).toBool()) { const QUrl image_url = QStandardItemModel::data(index, Role_ImageUrl).toUrl(); if (image_url.isValid()) { diff --git a/src/internet/subsonic/subsonicservice.cpp b/src/internet/subsonic/subsonicservice.cpp index 1970d5931..9243fd587 100644 --- a/src/internet/subsonic/subsonicservice.cpp +++ b/src/internet/subsonic/subsonicservice.cpp @@ -481,7 +481,7 @@ void SubsonicLibraryScanner::OnGetAlbumListFinished(QNetworkReply* reply, if (albums_added > 0) { // Non-empty reply means potentially more albums to fetch GetAlbumList(offset + kAlbumChunkSize); - } else if (album_queue_.size() == 0) { + } else if (album_queue_.empty()) { // Empty reply and no albums means an empty Subsonic server scanning_ = false; emit ScanFinished(); diff --git a/src/networkremote/incomingdataparser.cpp b/src/networkremote/incomingdataparser.cpp index a4c8ebc12..c8dcb8a11 100644 --- a/src/networkremote/incomingdataparser.cpp +++ b/src/networkremote/incomingdataparser.cpp @@ -268,7 +268,7 @@ void IncomingDataParser::InsertUrls(const pb::remote::Message& msg) { const pb::remote::RequestInsertUrls& request = msg.request_insert_urls(); // Insert plain urls without metadata - if (request.urls().size() > 0) { + if (!request.urls().empty()) { QList<QUrl> urls; for (auto it = request.urls().begin(); it != request.urls().end(); ++it) { std::string s = *it; @@ -281,7 +281,7 @@ void IncomingDataParser::InsertUrls(const pb::remote::Message& msg) { } // Add songs with metadata if present - if (request.songs().size() > 0) { + if (!request.songs().empty()) { SongList songs; for (int i = 0; i < request.songs().size(); i++) { songs << CreateSongFromProtobuf(request.songs(i)); diff --git a/src/playlist/playlistlistcontainer.cpp b/src/playlist/playlistlistcontainer.cpp index c5d6c1298..322a9ced6 100644 --- a/src/playlist/playlistlistcontainer.cpp +++ b/src/playlist/playlistlistcontainer.cpp @@ -128,11 +128,7 @@ class PlaylistListFilterProxyModel : public QSortFilterProxyModel { } //accept if any of the children is accepted on it's own merits - if (hasAcceptedChildren(source_row, source_parent)) { - return true; - } - - return false; + return hasAcceptedChildren(source_row, source_parent); } }; diff --git a/src/playlist/playlistview.cpp b/src/playlist/playlistview.cpp index 062ba4e2d..1686b55ca 100644 --- a/src/playlist/playlistview.cpp +++ b/src/playlist/playlistview.cpp @@ -1133,7 +1133,7 @@ void PlaylistView::ReloadSettings() { // set_background_image when it is not needed, as this will cause the fading // animation to start again. This also avoid to do useless // "force_background_redraw". - if (background_initialized_ == false || + if (!background_initialized_ || background_image_filename != background_image_filename_ || background_type != background_image_type_ || blur_radius_ != blur_radius || opacity_level_ != opacity_level) { diff --git a/src/ripper/ripper.cpp b/src/ripper/ripper.cpp index b67350a2c..240e452a8 100644 --- a/src/ripper/ripper.cpp +++ b/src/ripper/ripper.cpp @@ -104,10 +104,7 @@ bool Ripper::CheckCDIOIsValid() { } bool Ripper::MediaChanged() const { - if (cdio_ && cdio_get_media_changed(cdio_)) - return true; - else - return false; + return cdio_ && cdio_get_media_changed(cdio_); } void Ripper::Start() { diff --git a/src/ui/albumcoverchoicecontroller.cpp b/src/ui/albumcoverchoicecontroller.cpp index c00cd5919..8bb9cf317 100644 --- a/src/ui/albumcoverchoicecontroller.cpp +++ b/src/ui/albumcoverchoicecontroller.cpp @@ -347,10 +347,7 @@ bool AlbumCoverChoiceController::CanAcceptDrag(const QDragEnterEvent* e) { const QString suffix = QFileInfo(url.toLocalFile()).suffix().toLower(); if (IsKnownImageExtension(suffix)) return true; } - if (e->mimeData()->hasImage()) { - return true; - } - return false; + return e->mimeData()->hasImage(); } QString AlbumCoverChoiceController::SaveCover(Song* song, const QDropEvent* e) { diff --git a/src/widgets/nowplayingwidget.cpp b/src/widgets/nowplayingwidget.cpp index 502a7801d..c508626c9 100644 --- a/src/widgets/nowplayingwidget.cpp +++ b/src/widgets/nowplayingwidget.cpp @@ -110,8 +110,7 @@ NowPlayingWidget::NowPlayingWidget(QWidget* parent) fit_cover_width_action_ = menu_->addAction(tr("Fit cover to width")); fit_cover_width_action_->setCheckable(true); - fit_cover_width_action_->setEnabled((mode_ != SmallSongDetails) ? true - : false); + fit_cover_width_action_->setEnabled(mode_ != SmallSongDetails); connect(fit_cover_width_action_, SIGNAL(toggled(bool)), SLOT(FitCoverWidth(bool))); fit_cover_width_action_->setChecked(fit_width_); -- 2.16.4 ++++++ clementine-1.3.1+git20190213.tar.gz -> clementine-1.3.1+git20190423.tar.gz ++++++ /work/SRC/openSUSE:Factory/clementine/clementine-1.3.1+git20190213.tar.gz /work/SRC/openSUSE:Factory/.clementine.new.5148/clementine-1.3.1+git20190423.tar.gz differ: char 13, line 1
participants (1)
-
root