1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2025-02-08 15:58:47 +01:00

Formatting

This commit is contained in:
Jonas Kvinge 2021-02-02 21:08:58 +01:00
parent 59b48ceb4a
commit 03959a68d5
68 changed files with 50 additions and 99 deletions

View File

@ -171,4 +171,3 @@ void BoomAnalyzer::analyze(QPainter& p, const Scope& scope, bool new_frame) {
p.drawPixmap(0, 0, canvas_);
}

View File

@ -1458,4 +1458,3 @@ void CollectionBackend::UpdateSongRatingAsync(const int id, const float rating)
void CollectionBackend::UpdateSongsRatingAsync(const QList<int>& ids, const float rating) {
metaObject()->invokeMethod(this, "UpdateSongsRating", Qt::QueuedConnection, Q_ARG(QList<int>, ids), Q_ARG(float, rating));
}

View File

@ -164,4 +164,3 @@ bool CollectionItemDelegate::helpEvent(QHelpEvent *event, QAbstractItemView *vie
return false;
}

View File

@ -130,4 +130,3 @@ void GroupByDialog::CollectionGroupingChanged(const CollectionModel::Grouping &g
ui_->combobox_second->setCurrentIndex(p_->mapping_.get<tag_group_by>().find(g[1])->combo_box_index);
ui_->combobox_third->setCurrentIndex(p_->mapping_.get<tag_group_by>().find(g[2])->combo_box_index);
}

View File

@ -209,4 +209,3 @@ void SavedGroupingManager::UpdateButtonState() {
}
}

View File

@ -49,5 +49,4 @@ class SqlRow {
typedef QList<SqlRow> SqlRowList;
#endif
#endif // SQLROW_H

View File

@ -135,4 +135,3 @@ class ContextAlbumsView : public AutoExpandingTreeView {
};
#endif // CONTEXTALBUMSVIEW_H

View File

@ -91,4 +91,3 @@ void Appearance::ChangeBackgroundColor(const QColor &color) {
background_color_ = color;
}

View File

@ -44,4 +44,3 @@ class Appearance : public QObject {
};
#endif // APPEARANCE_H

View File

@ -398,4 +398,3 @@ QDataStream& operator>>(QDataStream &s, CommandlineOptions &a) {
return s;
}

View File

@ -123,4 +123,3 @@ void DeleteFiles::ProcessSomeFiles() {
QTimer::singleShot(0, this, &DeleteFiles::ProcessSomeFiles);
}

View File

@ -44,4 +44,3 @@ class FileSystemWatcherInterface : public QObject {
};
#endif

View File

@ -61,5 +61,4 @@ class MacFSListener : public FileSystemWatcherInterface {
QTimer *update_timer_;
};
#endif
#endif // MACFSLISTENER_H

View File

@ -393,4 +393,3 @@ class MainWindow : public QMainWindow, public PlatformInterface {
};
#endif // MAINWINDOW_H

View File

@ -114,4 +114,3 @@ class MergedProxyModel : public QAbstractProxyModel {
};
#endif // MERGEDPROXYMODEL_H

View File

@ -3,4 +3,4 @@
void RegisterMetaTypes();
#endif
#endif // METATYPES_H

View File

@ -75,4 +75,3 @@ class MimeData : public QMimeData {
};
#endif // MIMEDATA_H

View File

@ -243,4 +243,4 @@ class Mpris2 : public QObject {
} // namespace mpris
#endif
#endif // MPRIS2_H

View File

@ -106,4 +106,3 @@ int MultiSortFilterProxy::Compare(const QVariant &left, const QVariant &right) c
return 0;
}

View File

@ -142,4 +142,3 @@ QList<QNetworkProxy> NetworkProxyFactory::queryProxy(const QNetworkProxyQuery &q
return QList<QNetworkProxy>() << ret;
}

View File

@ -46,4 +46,3 @@ void ScopedTransaction::Commit() {
db_->commit();
pending_ = false;
}

View File

@ -53,4 +53,3 @@ void DefaultSettingsProvider::setArrayIndex(int i) {
}
void DefaultSettingsProvider::endArray() { backend_.endArray(); }

View File

@ -50,4 +50,3 @@ gulong CheckedGConnect(gpointer source, const char *signal, GCallback callback,
return g_signal_connect(source, signal, G_CALLBACK(callback), data);
}

View File

@ -176,4 +176,3 @@ QImage TagReaderClient::LoadEmbeddedArtBlocking(const QString &filename) {
return ret;
}

View File

@ -140,4 +140,3 @@ int TaskManager::GetTaskProgress(int id) {
}
}

View File

@ -100,4 +100,3 @@ void AlbumCoverExport::ForceSizeToggled(int state) {
ui_->width->setEnabled(state == Qt::Checked);
ui_->height->setEnabled(state == Qt::Checked);
}

View File

@ -154,4 +154,3 @@ void AlbumCoverFetcher::SingleCoverFetched(const quint64 request_id, const QUrl
emit AlbumCoverFetched(request_id, cover_url, image, search->statistics());
}

View File

@ -144,4 +144,3 @@ class AlbumCoverLoader : public QObject {
};
#endif // ALBUMCOVERLOADER_H

View File

@ -285,4 +285,3 @@ void AlbumCoverSearcher::keyPressEvent(QKeyEvent *e) {
void AlbumCoverSearcher::CoverDoubleClicked(const QModelIndex &idx) {
if (idx.isValid()) accept();
}

View File

@ -199,4 +199,3 @@ void CoverExportRunnable::ExportCover() {
void CoverExportRunnable::EmitCoverExported() { emit CoverExported(); }
void CoverExportRunnable::EmitCoverSkipped() { emit CoverSkipped(); }

View File

@ -101,4 +101,3 @@ void CoverFromURLDialog::LoadCoverFromURLFinished() {
}
}

View File

@ -64,4 +64,3 @@ QString CoverSearchStatistics::AverageDimensions() const {
return QString::number(chosen_width_ / chosen_images_) + "x" + QString::number(chosen_height_ / chosen_images_);
}

View File

@ -477,4 +477,3 @@ void PlaylistBackend::SetPlaylistUiPath(int id, const QString &path) {
transaction.Commit();
}

View File

@ -177,4 +177,3 @@ void PlaylistHeader::ResetColumns() {
void PlaylistHeader::ToggleRatingEditStatus() {
emit SectionRatingLockStatusChanged(action_rating_lock_->isChecked());
}

View File

@ -154,4 +154,3 @@ bool PlaylistItem::HasCurrentForegroundColor() const {
}
void PlaylistItem::SetShouldSkip(bool val) { should_skip_ = val; }
bool PlaylistItem::GetShouldSkip() const { return should_skip_; }

View File

@ -641,4 +641,3 @@ void PlaylistManager::RateCurrentSong(const double rating) {
void PlaylistManager::RateCurrentSong(const int rating) {
RateCurrentSong(rating / 5.0);
}

View File

@ -59,4 +59,3 @@ void PlaylistSaveOptionsDialog::accept() {
Playlist::Path PlaylistSaveOptionsDialog::path_type() const {
return static_cast<Playlist::Path>(ui->filePaths->itemData(ui->filePaths->currentIndex()).toInt());
}

View File

@ -39,8 +39,7 @@ SongLoaderInserter::SongLoaderInserter(TaskManager *task_manager, CollectionBack
enqueue_(false),
enqueue_next_(false),
collection_(collection),
player_(player) {
}
player_(player) {}
SongLoaderInserter::~SongLoaderInserter() { qDeleteAll(pending_); }
@ -214,4 +213,3 @@ void SongLoaderInserter::AsyncLoad() {
deleteLater();
}

View File

@ -1343,4 +1343,3 @@ void QobuzRequest::Warn(const QString &error, const QVariant &debug) {
if (debug.isValid()) qLog(Debug) << debug;
}

View File

@ -246,4 +246,3 @@ void QobuzStreamURLRequest::Error(const QString &error, const QVariant &debug) {
if (debug.isValid()) qLog(Debug) << debug;
}

View File

@ -192,4 +192,3 @@ void QueueView::PlaylistDestroyed() {
current_playlist_ = nullptr;
// We'll get another CurrentPlaylistChanged() soon
}

View File

@ -109,6 +109,7 @@ void MoodbarSettingsPage::InitMoodbarPreviews() {
return;
}
QByteArray file_data = file.readAll();
file.close();
// Render and set each preview
for (int i = 0; i < MoodbarRenderer::StyleCount; ++i) {

View File

@ -101,8 +101,6 @@ void PlaylistSettingsPage::Load() {
void PlaylistSettingsPage::Save() {
QSettings s;
Playlist::Path path = Playlist::Path_Automatic;
if (ui_->radiobutton_automaticpath->isChecked()) {
path = Playlist::Path_Automatic;
@ -117,6 +115,7 @@ void PlaylistSettingsPage::Save() {
path = Playlist::Path_Ask_User;
}
QSettings s;
s.beginGroup(kSettingsGroup);
s.setValue("glow_effect", ui_->checkbox_glowcurrenttrack->isChecked());
s.setValue("warn_close_playlist", ui_->checkbox_warncloseplaylist->isChecked());

View File

@ -277,5 +277,3 @@ void ScrobblerSettingsPage::ListenBrainz_AuthenticationComplete(const bool succe
void ScrobblerSettingsPage::ListenBrainz_RefreshControls(bool authenticated) {
ui_->widget_listenbrainz_login_state->SetLoggedIn(authenticated ? LoginStateWidget::LoggedIn : LoginStateWidget::LoggedOut);
}

View File

@ -370,4 +370,3 @@ void SettingsDialog::CurrentItemChanged(QTreeWidgetItem *item) {
}
}

View File

@ -146,4 +146,3 @@ void SettingsPage::ComboBoxLoadFromSettings(const QSettings &s, QComboBox *combo
combobox->setCurrentIndex(i);
}

View File

@ -71,4 +71,3 @@ UrlHandler::LoadResult SubsonicUrlHandler::StartLoading(const QUrl &url) {
return LoadResult(url, LoadResult::TrackAvailable, stream_url);
}

View File

@ -458,4 +458,3 @@ QString TranscodeDialog::GetOutputFileName(const QString &input, const Transcode
}
}

View File

@ -192,4 +192,3 @@ void AutoExpandingTreeView::DownAndFocus() {
setCurrentIndex(moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier));
setFocus();
}

View File

@ -84,4 +84,3 @@ void BusyIndicator::set_text(const QString &text) {
QString BusyIndicator::text() const {
return label_->text();
}

View File

@ -52,4 +52,3 @@ void RenameTabLineEdit::focusOutEvent(QFocusEvent *e) {
//we don't call the default event since it will trigger editingFished()
}

View File

@ -168,9 +168,9 @@ void StretchHeaderView::SetSectionHidden(const int logical, const bool hidden) {
}
void StretchHeaderView::resizeEvent(QResizeEvent *event) {
void StretchHeaderView::resizeEvent(QResizeEvent *e) {
QHeaderView::resizeEvent(event);
QHeaderView::resizeEvent(e);
if (!stretch_enabled_) return;

View File

@ -82,7 +82,7 @@ class StretchHeaderView : public QHeaderView {
protected:
// QWidget
void mouseMoveEvent(QMouseEvent *e) override;
void resizeEvent(QResizeEvent *event) override;
void resizeEvent(QResizeEvent *e) override;
private:
// Scales column_widths_ values so the total is 1.0.