mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-31 09:44:50 +01:00
Fix typos
This commit is contained in:
parent
d15d64eb67
commit
d97b0478a7
@ -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) {
|
||||
|
@ -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());
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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:
|
||||
|
@ -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());
|
||||
|
@ -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_;
|
||||
|
@ -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<InternetSearchView*>(view_)->LazyLoadAlbumCover(idx);
|
||||
|
||||
CollectionItemDelegate::paint(painter, option, idx);
|
||||
|
@ -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);
|
||||
|
@ -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=";
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
};
|
||||
|
@ -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)) {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 :(
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
||||
|
@ -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:
|
||||
|
@ -209,7 +209,7 @@ void SmartPlaylistSearchTermWidget::OpChanged(int idx) {
|
||||
|
||||
// Determine the currently selected operator
|
||||
SmartPlaylistSearchTerm::Operator op = static_cast<SmartPlaylistSearchTerm::Operator>(
|
||||
// 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
|
||||
|
@ -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()) {
|
||||
|
@ -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;
|
||||
|
@ -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<JobState> 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
|
||||
|
@ -97,7 +97,7 @@ MimeData *FileViewList::MimeDataFromSelection() const {
|
||||
|
||||
QList<QString> 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();
|
||||
|
@ -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.
|
||||
|
@ -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");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user