From d97b0478a70720c70fadec66fbc45a8a843a7db5 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sun, 28 Aug 2022 02:44:37 +0200 Subject: [PATCH] Fix typos --- src/core/database.cpp | 6 +++--- src/core/filesystemmusicstorage.cpp | 2 +- src/core/player.cpp | 6 +++--- src/dialogs/edittagdialog.cpp | 4 ++-- src/engine/gstbufferconsumer.h | 2 +- src/engine/gstengine.cpp | 2 +- src/engine/gstenginepipeline.h | 4 ++-- src/internet/internetsearchitemdelegate.cpp | 2 +- src/internet/internetsearchmodel.cpp | 2 +- src/lyrics/geniuslyricsprovider.cpp | 2 +- src/main.cpp | 6 +++--- src/moodbar/moodbarloader.h | 2 +- src/musicbrainz/musicbrainzclient.cpp | 2 +- src/playlist/playlist.h | 6 +++--- src/playlist/playlistbackend.cpp | 4 ++-- src/playlist/playlistcontainer.cpp | 8 ++++---- src/playlist/playlistfilterparser.cpp | 6 +++--- src/playlist/playlistitem.h | 2 +- src/playlist/playlistmanager.cpp | 2 +- src/playlist/playlistview.cpp | 4 ++-- src/playlist/songplaylistitem.h | 2 +- src/playlistparsers/asxparser.cpp | 2 +- src/playlistparsers/cueparser.cpp | 2 +- src/playlistparsers/cueparser.h | 2 +- src/playlistparsers/parserbase.h | 4 ++-- src/smartplaylists/smartplaylistsearchtermwidget.cpp | 2 +- src/subsonic/subsonicscrobblerequest.cpp | 2 +- src/tidal/tidalrequest.cpp | 2 +- src/transcoder/transcoder.cpp | 4 ++-- src/widgets/fileviewlist.cpp | 2 +- src/widgets/groupediconview.cpp | 2 +- src/widgets/trackslider.cpp | 2 +- 32 files changed, 51 insertions(+), 51 deletions(-) diff --git a/src/core/database.cpp b/src/core/database.cpp index a47f18ab..61659b84 100644 --- a/src/core/database.cpp +++ b/src/core/database.cpp @@ -391,9 +391,9 @@ void Database::ExecSchemaCommands(QSqlDatabase &db, const QString &schema, int s QStringList commands; commands = schema.split(QRegularExpression("; *\n\n")); - // We don't want this list to reflect possible DB schema changes so we initialize it before executing any statements. - // If no outer transaction is provided the song tables need to be queried before beginning an inner transaction! Otherwise - // DROP TABLE commands on song tables may fail due to database locks. + // We don't want this list to reflect possible DB schema changes, so we initialize it before executing any statements. + // If no outer transaction is provided the song tables need to be queried before beginning an inner transaction! + // Otherwise DROP TABLE commands on song tables may fail due to database locks. const QStringList song_tables(SongsTables(db, schema_version)); if (!in_transaction) { diff --git a/src/core/filesystemmusicstorage.cpp b/src/core/filesystemmusicstorage.cpp index e2d0d3e9..fb82926b 100644 --- a/src/core/filesystemmusicstorage.cpp +++ b/src/core/filesystemmusicstorage.cpp @@ -61,7 +61,7 @@ bool FilesystemMusicStorage::CopyToStorage(const CopyJob &job) { return false; } - // Remove the destination file if it exists and we want to overwrite + // Remove the destination file if it exists, and we want to overwrite if (job.overwrite_) { if (dest.exists()) QFile::remove(dest.absoluteFilePath()); if (!cover_dest.filePath().isEmpty() && cover_dest.exists()) QFile::remove(cover_dest.absoluteFilePath()); diff --git a/src/core/player.cpp b/src/core/player.cpp index 78eb177c..fedb9dd8 100644 --- a/src/core/player.cpp +++ b/src/core/player.cpp @@ -448,7 +448,7 @@ void Player::PlayPlaylistInternal(const Engine::TrackChangeFlags change, const P bool Player::HandleStopAfter(const Playlist::AutoScroll autoscroll) { if (app_->playlist_manager()->active()->stop_after_current()) { - // Find what the next track would've been, and mark that one as current so it plays next time the user presses Play. + // Find what the next track would've been, and mark that one as current, so it plays next time the user presses Play. const int next_row = app_->playlist_manager()->active()->next_row(); if (next_row != -1) { app_->playlist_manager()->active()->set_current_row(next_row, autoscroll, true); @@ -843,7 +843,7 @@ void Player::TrackAboutToEnd() { if (engine_->is_autocrossfade_enabled()) { // Crossfade is on, so just start playing the next track. The current one will fade out, and the new one will fade in - // But, if there's no next track and we don't want to fade out, then do nothing and just let the track finish to completion. + // But, if there's no next track, and we don't want to fade out, then do nothing and just let the track finish to completion. if (!engine_->is_fadeout_enabled() && !has_next_row) return; // If the next track is on the same album (or same cue file), @@ -854,7 +854,7 @@ void Player::TrackAboutToEnd() { } } - // Crossfade is off, so start preloading the next track so we don't get a gap between songs. + // Crossfade is off, so start preloading the next track, so we don't get a gap between songs. if (!has_next_row || !next_item) return; QUrl url = next_item->StreamUrl(); diff --git a/src/dialogs/edittagdialog.cpp b/src/dialogs/edittagdialog.cpp index 4c3b6e68..240586e7 100644 --- a/src/dialogs/edittagdialog.cpp +++ b/src/dialogs/edittagdialog.cpp @@ -1104,7 +1104,7 @@ void EditTagDialog::SaveData() { } QString embedded_cover_from_file; - // If embedded album cover is selected and it isn't saved to the tags, then save it even if no action was done. + // If embedded album cover is selected, and it isn't saved to the tags, then save it even if no action was done. if (ui_->checkbox_embedded_cover->isChecked() && ref.cover_action_ == UpdateCoverAction_None && !ref.original_.has_embedded_cover() && ref.original_.save_embedded_cover_supported()) { if (ref.original_.art_manual().isValid() && ref.original_.art_manual().isLocalFile() && QFile::exists(ref.original_.art_manual().toLocalFile())) { ref.cover_action_ = UpdateCoverAction_New; @@ -1328,7 +1328,7 @@ void EditTagDialog::FetchTagSongChosen(const Song &original_song, const Song &ne // Is it currently being displayed in the UI? if (ui_->song_list->currentRow() == std::distance(data_.begin(), data_it)) { - // Yes! Additionally update UI + // Yes! Additionally, update UI const QModelIndexList sel = ui_->song_list->selectionModel()->selectedIndexes(); UpdateUI(sel); } diff --git a/src/engine/gstbufferconsumer.h b/src/engine/gstbufferconsumer.h index 286817d3..e6823812 100644 --- a/src/engine/gstbufferconsumer.h +++ b/src/engine/gstbufferconsumer.h @@ -35,7 +35,7 @@ class GstBufferConsumer { virtual ~GstBufferConsumer() {} // This is called in some unspecified GStreamer thread. - // Ownership of the buffer is transferred to the BufferConsumer and it should gst_buffer_unref it. + // Ownership of the buffer is transferred to the BufferConsumer, and it should gst_buffer_unref it. virtual void ConsumeBuffer(GstBuffer *buffer, const int pipeline_id, const QString &format) = 0; private: diff --git a/src/engine/gstengine.cpp b/src/engine/gstengine.cpp index c765cfb4..667e562e 100644 --- a/src/engine/gstengine.cpp +++ b/src/engine/gstengine.cpp @@ -734,7 +734,7 @@ QByteArray GstEngine::FixupUrl(const QUrl &url) { } else { // Currently, Gstreamer can't handle input CD devices inside cdda URL. - // So we handle them ourselves: we extract the track number and re-create an URL with only cdda:// + the track number (which can be handled by Gstreamer). + // So we handle them ourselves: we extract the track number and re-create a URL with only cdda:// + the track number (which can be handled by Gstreamer). // We keep the device in mind, and we will set it later using SourceSetupCallback QStringList path = url.path().split('/'); str = QString("cdda://%1").arg(path.takeLast()); diff --git a/src/engine/gstenginepipeline.h b/src/engine/gstenginepipeline.h index b5b7a59f..62cc80b9 100644 --- a/src/engine/gstenginepipeline.h +++ b/src/engine/gstenginepipeline.h @@ -244,7 +244,7 @@ class GstEnginePipeline : public QObject { qint64 next_beginning_offset_nanosec_; qint64 next_end_offset_nanosec_; - // Set temporarily when moving to the next contiguous section in a multi-part file. + // Set temporarily when moving to the next contiguous section in a multipart file. bool ignore_next_seek_; // Set temporarily when switching out the decode bin, so metadata doesn't get sent while the Player still thinks it's playing the last song @@ -257,7 +257,7 @@ class GstEnginePipeline : public QObject { QString source_device_; // Seeking while the pipeline is in the READY state doesn't work, so we have to wait until it goes to PAUSED or PLAYING. - // Also we have to wait for the playbin to be connected. + // Also, we have to wait for the playbin to be connected. bool pipeline_is_initialized_; bool pipeline_is_connected_; qint64 pending_seek_nanosec_; diff --git a/src/internet/internetsearchitemdelegate.cpp b/src/internet/internetsearchitemdelegate.cpp index 7be10acb..c0d9a680 100644 --- a/src/internet/internetsearchitemdelegate.cpp +++ b/src/internet/internetsearchitemdelegate.cpp @@ -30,7 +30,7 @@ InternetSearchItemDelegate::InternetSearchItemDelegate(InternetSearchView *view) void InternetSearchItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &idx) const { - // Tell the view we painted this item so it can lazy load some art. + // Tell the view we painted this item, so it can lazy load some art. const_cast(view_)->LazyLoadAlbumCover(idx); CollectionItemDelegate::paint(painter, option, idx); diff --git a/src/internet/internetsearchmodel.cpp b/src/internet/internetsearchmodel.cpp index b0a2ec7f..28945c0e 100644 --- a/src/internet/internetsearchmodel.cpp +++ b/src/internet/internetsearchmodel.cpp @@ -329,7 +329,7 @@ void InternetSearchModel::GetChildResults(const QStandardItem *item, InternetSea if (item->rowCount() > 0) { const QModelIndex parent_proxy_index = proxy_->mapFromSource(item->index()); - // Yes - visit all the children, but do so through the proxy so we get them in the right order. + // Yes - visit all the children, but do so through the proxy, so we get them in the right order. for (int i = 0; i < item->rowCount(); ++i) { const QModelIndex proxy_index = parent_proxy_index.model()->index(i, 0, parent_proxy_index); const QModelIndex idx = proxy_->mapToSource(proxy_index); diff --git a/src/lyrics/geniuslyricsprovider.cpp b/src/lyrics/geniuslyricsprovider.cpp index a52a7094..082ab00f 100644 --- a/src/lyrics/geniuslyricsprovider.cpp +++ b/src/lyrics/geniuslyricsprovider.cpp @@ -56,7 +56,7 @@ const char *GeniusLyricsProvider::kSettingsGroup = "GeniusLyrics"; const char *GeniusLyricsProvider::kOAuthAuthorizeUrl = "https://api.genius.com/oauth/authorize"; const char *GeniusLyricsProvider::kOAuthAccessTokenUrl = "https://api.genius.com/oauth/token"; -const char *GeniusLyricsProvider::kOAuthRedirectUrl = "http://localhost:63111/"; // Genius does not accept a random port number. This port must match the the URL of the ClientID. +const char *GeniusLyricsProvider::kOAuthRedirectUrl = "http://localhost:63111/"; // Genius does not accept a random port number. This port must match the URL of the ClientID. const char *GeniusLyricsProvider::kUrlSearch = "https://api.genius.com/search/"; const char *GeniusLyricsProvider::kClientIDB64 = "RUNTNXU4U1VyMU1KUU5hdTZySEZteUxXY2hkanFiY3lfc2JjdXBpNG5WMU9SNUg4dTBZelEtZTZCdFg2dl91SQ=="; const char *GeniusLyricsProvider::kClientSecretB64 = "VE9pMU9vUjNtTXZ3eFR3YVN0QVRyUjVoUlhVWDI1Ylp5X240eEt1M0ZkYlNwRG5JUnd0LXFFbHdGZkZkRWY2VzJ1S011UnQzM3c2Y3hqY0tVZ3NGN2c="; diff --git a/src/main.cpp b/src/main.cpp index d0a70f70..9a563aa3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -142,10 +142,10 @@ int main(int argc, char *argv[]) { CommandlineOptions options(argc, argv); { - // Only start a core application now so we can check if there's another instance without requiring an X server. + // Only start a core application now, so we can check if there's another instance without requiring an X server. // This MUST be done before parsing the commandline options so QTextCodec gets the right system locale for filenames. SingleCoreApplication core_app(argc, argv, true, SingleCoreApplication::Mode::User | SingleCoreApplication::Mode::ExcludeAppVersion | SingleCoreApplication::Mode::ExcludeAppPath); - // Parse commandline options - need to do this before starting the full QApplication so it works without an X server + // Parse commandline options - need to do this before starting the full QApplication, so it works without an X server if (!options.Parse()) return 1; logging::SetLevels(options.log_levels()); if (core_app.isSecondary()) { @@ -213,7 +213,7 @@ int main(int argc, char *argv[]) { if (QApplication::style()) qLog(Debug) << "Style:" << QApplication::style()->objectName(); } - // Set the permissions on the config file on Unix - it can contain passwords for internet services so it's important that other users can't read it. + // Set the permissions on the config file on Unix - it can contain passwords for internet services, so it's important that other users can't read it. // On Windows these are stored in the registry instead. #ifdef Q_OS_UNIX { diff --git a/src/moodbar/moodbarloader.h b/src/moodbar/moodbarloader.h index 6d5ee2e1..fb13f185 100644 --- a/src/moodbar/moodbarloader.h +++ b/src/moodbar/moodbarloader.h @@ -47,7 +47,7 @@ class MoodbarLoader : public QObject { // Moodbar data was loaded and returned. Loaded, - // Moodbar data will be loaded in the background, a MoodbarPipeline* was + // Moodbar data will be loaded in the background, a MoodbarPipeline // was returned that you can connect to the Finished() signal on. WillLoadAsync }; diff --git a/src/musicbrainz/musicbrainzclient.cpp b/src/musicbrainz/musicbrainzclient.cpp index 5cc01fe2..81440124 100644 --- a/src/musicbrainz/musicbrainzclient.cpp +++ b/src/musicbrainz/musicbrainzclient.cpp @@ -504,7 +504,7 @@ MusicBrainzClient::ResultList MusicBrainzClient::UniqueResults(const ResultList std::sort(ret.begin(), ret.end()); } else { // KeepOriginalOrder - // Qt doesn't provide a ordered set (QSet "stores values in an unspecified order" according to Qt documentation). + // Qt doesn't provide an ordered set (QSet "stores values in an unspecified order" according to Qt documentation). // We might use std::set instead, but it's probably faster to use ResultList directly to avoid converting from one structure to another. for (const Result &res : results) { if (!ret.contains(res)) { diff --git a/src/playlist/playlist.h b/src/playlist/playlist.h index 4e1dee2a..59b7dc57 100644 --- a/src/playlist/playlist.h +++ b/src/playlist/playlist.h @@ -75,7 +75,7 @@ Q_DECLARE_METATYPE(ColumnAlignmentMap) // Objects that may prevent a song being added to the playlist. // When there is something about to be inserted into it, -// Playlist notifies all of it's listeners about the fact and every one of them picks 'invalid' songs. +// Playlist notifies all of its listeners about the fact and every one of them picks 'invalid' songs. class SongInsertVetoListener : public QObject { Q_OBJECT @@ -240,8 +240,8 @@ class Playlist : public QAbstractListModel { void ReshuffleIndices(); // If this playlist contains the current item, this method will apply the "valid" flag on it. - // If the "valid" flag is false, the song will be greyed out. Otherwise the grey color will be undone. - // If the song is a local file and it's valid but non existent or invalid but exists, the + // If the "valid" flag is false, the song will be greyed out. Otherwise, the grey color will be undone. + // If the song is a local file, and it's valid but non-existent or invalid but exists, the // song will be reloaded to even out the situation because obviously something has changed. // This returns true if this playlist had current item when the method was invoked. bool ApplyValidityOnCurrentSong(const QUrl &url, bool valid); diff --git a/src/playlist/playlistbackend.cpp b/src/playlist/playlistbackend.cpp index ddfd72ed..3fe6a88f 100644 --- a/src/playlist/playlistbackend.cpp +++ b/src/playlist/playlistbackend.cpp @@ -197,7 +197,7 @@ PlaylistItemList PlaylistBackend::GetPlaylistItems(const int playlist) { return PlaylistItemList(); } - // it's probable that we'll have a few songs associated with the same CUE so we're caching results of parsing CUEs + // it's probable that we'll have a few songs associated with the same CUE, so we're caching results of parsing CUEs std::shared_ptr state_ptr = std::make_shared(); while (q.next()) { playlistitems << NewPlaylistItemFromQuery(SqlRow(q), state_ptr); @@ -232,7 +232,7 @@ SongList PlaylistBackend::GetPlaylistSongs(const int playlist) { return SongList(); } - // it's probable that we'll have a few songs associated with the same CUE so we're caching results of parsing CUEs + // it's probable that we'll have a few songs associated with the same CUE, so we're caching results of parsing CUEs std::shared_ptr state_ptr = std::make_shared(); while (q.next()) { songs << NewSongFromQuery(SqlRow(q), state_ptr); diff --git a/src/playlist/playlistcontainer.cpp b/src/playlist/playlistcontainer.cpp index b219e9e3..1d787682 100644 --- a/src/playlist/playlistcontainer.cpp +++ b/src/playlist/playlistcontainer.cpp @@ -301,7 +301,7 @@ void PlaylistContainer::PlaylistAdded(const int id, const QString &name, const b const int index = ui_->tab_bar->count(); ui_->tab_bar->InsertTab(id, index, name, favorite); - // Are we startup up, should we select this tab? + // Are we start up, should we select this tab? if (starting_up_ && settings_.value("current_playlist", 1).toInt() == id) { starting_up_ = false; ui_->tab_bar->set_current_id(id); @@ -312,7 +312,7 @@ void PlaylistContainer::PlaylistAdded(const int id, const QString &name, const b tab_bar_animation_->setFrameRange(0, ui_->tab_bar->sizeHint().height()); if (!isVisible()) { - // Skip the animation since the window is hidden (eg. if we're still loading the UI). + // Skip the animation since the window is hidden (e.g. if we're still loading the UI). tab_bar_visible_ = true; ui_->tab_bar->setMaximumHeight(tab_bar_animation_->endFrame()); } @@ -365,7 +365,7 @@ void PlaylistContainer::ClearPlaylist() {} void PlaylistContainer::GoToNextPlaylistTab() { - // Get the next tab' id + // Get the next tab's id int id_next = ui_->tab_bar->id_of((ui_->tab_bar->currentIndex() + 1) % ui_->tab_bar->count()); // Switch to next tab manager_->SetCurrentPlaylist(id_next); @@ -374,7 +374,7 @@ void PlaylistContainer::GoToNextPlaylistTab() { void PlaylistContainer::GoToPreviousPlaylistTab() { - // Get the next tab' id + // Get the next tab's id int id_previous = ui_->tab_bar->id_of((ui_->tab_bar->currentIndex() + ui_->tab_bar->count() - 1) % ui_->tab_bar->count()); // Switch to next tab manager_->SetCurrentPlaylist(id_previous); diff --git a/src/playlist/playlistfilterparser.cpp b/src/playlist/playlistfilterparser.cpp index e858c067..e124855a 100644 --- a/src/playlist/playlistfilterparser.cpp +++ b/src/playlist/playlistfilterparser.cpp @@ -158,8 +158,8 @@ class LeComparator : public SearchTermComparator { int search_term_; }; -// The length field of the playlist (entries) contains a song's running time in nano seconds. -// However, We don't really care about nano seconds, just seconds. +// The length field of the playlist (entries) contains a song's running time in nanoseconds. +// However, We don't really care about nanoseconds, just seconds. // Thus, with this decorator we drop the last 9 digits, if that many are present. class DropTailComparatorDecorator : public SearchTermComparator { public: @@ -459,7 +459,7 @@ FilterTree *FilterParser::createSearchTermTreeNode(const QString &col, const QSt cmp = new NeComparator(search); } else if (!col.isEmpty() && columns_.contains(col) && numerical_columns_.contains(columns_[col])) { - // the length column contains the time in seconds (nano seconds, actually - the "nano" part is handled by the DropTailComparatorDecorator, though). + // the length column contains the time in seconds (nanoseconds, actually - the "nano" part is handled by the DropTailComparatorDecorator, though). int search_value = 0; if (columns_[col] == Playlist::Column_Length) { search_value = parseTime(search); diff --git a/src/playlist/playlistitem.h b/src/playlist/playlistitem.h index 22f7be68..94d8d013 100644 --- a/src/playlist/playlistitem.h +++ b/src/playlist/playlistitem.h @@ -107,7 +107,7 @@ class PlaylistItem : public std::enable_shared_from_this { bool HasCurrentForegroundColor() const; // Convenience function to find out whether this item is from the local collection, as opposed to a device, a file on disk, or a stream. - // Remember that even if this returns true, the collection item might be invalid so you might want to check that its id is not equal to -1 before actually using it. + // Remember that even if this returns true, the collection item might be invalid, so you might want to check that its id is not equal to -1 before actually using it. virtual bool IsLocalCollectionItem() const { return false; } void SetShouldSkip(const bool val); bool GetShouldSkip() const; diff --git a/src/playlist/playlistmanager.cpp b/src/playlist/playlistmanager.cpp index 313750fb..fae137c8 100644 --- a/src/playlist/playlistmanager.cpp +++ b/src/playlist/playlistmanager.cpp @@ -224,7 +224,7 @@ void PlaylistManager::Save(const int id, const QString &filename, const Playlist parser_->Save(playlist(id)->GetAllSongs(), filename, path_type); } else { - // Playlist is not in the playlist manager: probably save action was triggered from the left side bar and the playlist isn't loaded. + // Playlist is not in the playlist manager: probably save action was triggered from the left sidebar and the playlist isn't loaded. #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) QFuture future = QtConcurrent::run(&PlaylistBackend::GetPlaylistSongs, playlist_backend_, id); #else diff --git a/src/playlist/playlistview.cpp b/src/playlist/playlistview.cpp index f2e19b5c..123fb51d 100644 --- a/src/playlist/playlistview.cpp +++ b/src/playlist/playlistview.cpp @@ -737,7 +737,7 @@ void PlaylistView::RemoveSelected() { // Store the last selected row, which is the last in the list int last_row = selection.last().top(); - // Sort the selection so we remove the items at the *bottom* first, ensuring we don't have to mess around with changing row numbers + // Sort the selection, so we remove the items at the *bottom* first, ensuring we don't have to mess around with changing row numbers std::sort(selection.begin(), selection.end(), CompareSelectionRanges); for (const QItemSelectionRange &range : selection) { @@ -1299,7 +1299,7 @@ void PlaylistView::ReloadSettings() { } else { // User changed background image type to something that will not be painted through paintEvent: reset all background images. - // This avoid to use old (deprecated) images for fading when selecting Album or Custom background image type later. + // This avoids to use old (deprecated) images for fading when selecting Album or Custom background image type later. set_background_image(QImage()); cached_scaled_background_image_ = QPixmap(); previous_background_image_ = QPixmap(); diff --git a/src/playlist/songplaylistitem.h b/src/playlist/songplaylistitem.h index 9af81bf0..7eddaa0f 100644 --- a/src/playlist/songplaylistitem.h +++ b/src/playlist/songplaylistitem.h @@ -36,7 +36,7 @@ class SongPlaylistItem : public PlaylistItem { explicit SongPlaylistItem(const Song &song); // Restores a stream- or file-related playlist item using query row. - // If it's a file related playlist item, this will restore it's CUE attributes (if any) but won't parse the CUE! + // If it's a file related playlist item, this will restore its CUE attributes (if any) but won't parse the CUE! bool InitFromQuery(const SqlRow &query) override; void Reload() override; diff --git a/src/playlistparsers/asxparser.cpp b/src/playlistparsers/asxparser.cpp index a4d3b014..dd481245 100644 --- a/src/playlistparsers/asxparser.cpp +++ b/src/playlistparsers/asxparser.cpp @@ -46,7 +46,7 @@ SongList ASXParser::Load(QIODevice *device, const QString &playlist_path, const Q_UNUSED(playlist_path); - // We have to load everything first so we can munge the "XML". + // We have to load everything first, so we can munge the "XML". QByteArray data = device->readAll(); // Some playlists have unescaped & characters in URLs :( diff --git a/src/playlistparsers/cueparser.cpp b/src/playlistparsers/cueparser.cpp index e49ef46c..ffdbc18f 100644 --- a/src/playlistparsers/cueparser.cpp +++ b/src/playlistparsers/cueparser.cpp @@ -137,7 +137,7 @@ SongList CueParser::Load(QIODevice *device, const QString &playlist_path, const return ret; } - // if this is a data file, all of it's tracks will be ignored + // if this is a data file, all of its tracks will be ignored bool valid_file = file_type.compare("BINARY", Qt::CaseInsensitive) != 0 && file_type.compare("MOTOROLA", Qt::CaseInsensitive) != 0; QString track_type; diff --git a/src/playlistparsers/cueparser.h b/src/playlistparsers/cueparser.h index 4824a502..7cab1c72 100644 --- a/src/playlistparsers/cueparser.h +++ b/src/playlistparsers/cueparser.h @@ -39,7 +39,7 @@ class QIODevice; class CollectionBackendInterface; // This parser will try to detect the real encoding of a .cue file -// but there's a great chance it will fail so it's probably best to assume that the parser is UTF compatible only. +// but there's a great chance it will fail, so it's probably best to assume that the parser is UTF compatible only. class CueParser : public ParserBase { Q_OBJECT diff --git a/src/playlistparsers/parserbase.h b/src/playlistparsers/parserbase.h index bbebb505..75f42687 100644 --- a/src/playlistparsers/parserbase.h +++ b/src/playlistparsers/parserbase.h @@ -53,7 +53,7 @@ class ParserBase : public QObject { // Loads all songs from playlist found at path 'playlist_path' in directory 'dir'. // The 'device' argument is an opened and ready to read from representation of this playlist. - // This method might not return all of the songs found in the playlist. + // This method might not return all the songs found in the playlist. // Any playlist parser may decide to leave out some entries if it finds them incomplete or invalid. // This means that the final resulting SongList should be considered valid (at least from the parser's point of view). virtual SongList Load(QIODevice *device, const QString &playlist_path = "", const QDir &dir = QDir(), const bool collection_lookup = true) const = 0; @@ -68,7 +68,7 @@ class ParserBase : public QObject { void LoadSong(const QString &filename_or_url, const qint64 beginning, const QDir &dir, Song *song, const bool collection_search) const; // If the URL is a file:// URL then returns its path, absolute or relative to the directory depending on the path_type option. - // Otherwise returns the URL as is. This function should always be used when saving a playlist. + // Otherwise, returns the URL as is. This function should always be used when saving a playlist. static QString URLOrFilename(const QUrl &url, const QDir &dir, const PlaylistSettingsPage::PathType path_type); private: diff --git a/src/smartplaylists/smartplaylistsearchtermwidget.cpp b/src/smartplaylists/smartplaylistsearchtermwidget.cpp index aa6674f7..f843b5fa 100644 --- a/src/smartplaylists/smartplaylistsearchtermwidget.cpp +++ b/src/smartplaylists/smartplaylistsearchtermwidget.cpp @@ -209,7 +209,7 @@ void SmartPlaylistSearchTermWidget::OpChanged(int idx) { // Determine the currently selected operator SmartPlaylistSearchTerm::Operator op = static_cast( - // This uses the operators’s index in the combobox to get its enum value + // This uses the operatorss index in the combobox to get its enum value ui_->op->itemData(ui_->op->currentIndex()).toInt()); // We need to change the page only in the following case diff --git a/src/subsonic/subsonicscrobblerequest.cpp b/src/subsonic/subsonicscrobblerequest.cpp index 132d5107..3379cc70 100644 --- a/src/subsonic/subsonicscrobblerequest.cpp +++ b/src/subsonic/subsonicscrobblerequest.cpp @@ -97,7 +97,7 @@ void SubsonicScrobbleRequest::ScrobbleReplyReceived(QNetworkReply *reply) { --scrobble_requests_active_; // "subsonic-response" is empty on success, but some keys like status, version, or type might be present. - // Therefore we can only check for errors. + // Therefore, we can only check for errors. QByteArray data = GetReplyData(reply); if (data.isEmpty()) { diff --git a/src/tidal/tidalrequest.cpp b/src/tidal/tidalrequest.cpp index 34cef886..af2dbbef 100644 --- a/src/tidal/tidalrequest.cpp +++ b/src/tidal/tidalrequest.cpp @@ -596,7 +596,7 @@ void TidalRequest::AlbumsReceived(QNetworkReply *reply, const QString &artist_id QString album_id; QString album; bool album_explicit = false; - if (obj_item.contains("type")) { // This was a albums request or search + if (obj_item.contains("type")) { // This was an albums request or search if (!obj_item.contains("id") || !obj_item.contains("title")) { Error("Invalid Json reply, item is missing ID or title.", obj_item); continue; diff --git a/src/transcoder/transcoder.cpp b/src/transcoder/transcoder.cpp index 6a1e890b..c6d6773a 100644 --- a/src/transcoder/transcoder.cpp +++ b/src/transcoder/transcoder.cpp @@ -502,7 +502,7 @@ bool Transcoder::event(QEvent *e) { QString input = (*it)->job_.input; QString output = (*it)->job_.output; - // Remove event handlers from the gstreamer pipeline so they don't get called after the pipeline is shutting down + // Remove event handlers from the gstreamer pipeline, so they don't get called after the pipeline is shutting down gst_bus_set_sync_handler(gst_pipeline_get_bus(GST_PIPELINE(finished_event->state_->pipeline_)), nullptr, nullptr, nullptr); // Remove it from the list - this will also destroy the GStreamer pipeline @@ -531,7 +531,7 @@ void Transcoder::Cancel() { while (it != current_jobs_.end()) { std::shared_ptr state(*it); - // Remove event handlers from the gstreamer pipeline so they don't get called after the pipeline is shutting down + // Remove event handlers from the gstreamer pipeline, so they don't get called after the pipeline is shutting down gst_bus_set_sync_handler(gst_pipeline_get_bus(GST_PIPELINE(state->pipeline_)), nullptr, nullptr, nullptr); // Stop the pipeline diff --git a/src/widgets/fileviewlist.cpp b/src/widgets/fileviewlist.cpp index 171b70a7..5f4d4952 100644 --- a/src/widgets/fileviewlist.cpp +++ b/src/widgets/fileviewlist.cpp @@ -97,7 +97,7 @@ MimeData *FileViewList::MimeDataFromSelection() const { QList filenames = FilenamesFromSelection(); - // if just one folder selected - use it's path as the new playlist's name + // if just one folder selected - use its path as the new playlist's name if (filenames.size() == 1 && QFileInfo(filenames.first()).isDir()) { if (filenames.first().length() > 20) { mimedata->name_for_new_playlist_ = QDir(filenames.first()).dirName(); diff --git a/src/widgets/groupediconview.cpp b/src/widgets/groupediconview.cpp index 9e679e99..9b9612ef 100644 --- a/src/widgets/groupediconview.cpp +++ b/src/widgets/groupediconview.cpp @@ -174,7 +174,7 @@ void GroupedIconView::LayoutItems() { headers_ << header; - // Remember this group so we don't add it again. + // Remember this group, so we don't add it again. last_group = group; // Move the next item immediately below the header. diff --git a/src/widgets/trackslider.cpp b/src/widgets/trackslider.cpp index bf6c0db6..e17f7533 100644 --- a/src/widgets/trackslider.cpp +++ b/src/widgets/trackslider.cpp @@ -94,7 +94,7 @@ void TrackSlider::SetApplication(Application *app) { void TrackSlider::UpdateLabelWidth() { - // We set the label's minimum size so it won't resize itself when the user is dragging the slider. + // We set the label's minimum size, so it won't resize itself when the user is dragging the slider. UpdateLabelWidth(ui_->elapsed, "0:00:00"); UpdateLabelWidth(ui_->remaining, "-0:00:00");