Fix typos
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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<NewSongFromQueryState> state_ptr = std::make_shared<NewSongFromQueryState>();
|
||||
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<NewSongFromQueryState> state_ptr = std::make_shared<NewSongFromQueryState>();
|
||||
while (q.next()) {
|
||||
songs << NewSongFromQuery(SqlRow(q), state_ptr);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -107,7 +107,7 @@ class PlaylistItem : public std::enable_shared_from_this<PlaylistItem> {
|
||||
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;
|
||||
|
||||
@@ -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<SongList> future = QtConcurrent::run(&PlaylistBackend::GetPlaylistSongs, playlist_backend_, id);
|
||||
#else
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user