From a6c05df362b5ae4702977b65cfb4468db4cfe180 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Tue, 22 Mar 2022 21:19:59 +0100 Subject: [PATCH] Formatting --- ext/libstrawberry-common/core/logging.cpp | 1 + ext/libstrawberry-common/core/workerpool.h | 8 ++++++++ src/core/simpletreeitem.h | 2 +- src/core/simpletreemodel.h | 1 + src/core/windows7thumbbar.cpp | 1 + src/device/giolister.cpp | 1 + src/engine/enginebase.cpp | 2 ++ src/globalshortcuts/globalshortcutsmanager.cpp | 4 ++++ src/playlist/playlist.cpp | 1 + src/qobuz/qobuzservice.cpp | 2 ++ src/smartplaylists/smartplaylistsviewcontainer.cpp | 2 ++ src/widgets/fancytabwidget.cpp | 1 + src/widgets/lineedit.cpp | 4 ++++ src/widgets/ratingwidget.cpp | 1 + 14 files changed, 30 insertions(+), 1 deletion(-) diff --git a/ext/libstrawberry-common/core/logging.cpp b/ext/libstrawberry-common/core/logging.cpp index a8f4440b..a6c91d85 100644 --- a/ext/libstrawberry-common/core/logging.cpp +++ b/ext/libstrawberry-common/core/logging.cpp @@ -85,6 +85,7 @@ void GLog(const char *domain, int level, const char *message, void*) { qLogCat(Debug, domain) << message; break; } + } template diff --git a/ext/libstrawberry-common/core/workerpool.h b/ext/libstrawberry-common/core/workerpool.h index c2b5488b..44726df9 100644 --- a/ext/libstrawberry-common/core/workerpool.h +++ b/ext/libstrawberry-common/core/workerpool.h @@ -174,6 +174,7 @@ WorkerPool::WorkerPool(QObject *parent) if (local_server_name_.isEmpty()) { local_server_name_ = "workerpool"; } + } template @@ -204,6 +205,7 @@ WorkerPool::~WorkerPool() { for (ReplyType *reply : message_queue_) { reply->Abort(); } + } template @@ -265,6 +267,7 @@ void WorkerPool::DoStart() { workers_ << worker; } + } template @@ -335,6 +338,7 @@ void WorkerPool::NewConnection() { worker->handler_ = new HandlerType(worker->local_socket_, this); SendQueuedMessages(); + } template @@ -362,6 +366,7 @@ void WorkerPool::ProcessError(QProcess::ProcessError error) { StartOneWorker(worker); break; } + } template @@ -374,6 +379,7 @@ void WorkerPool::ProcessReadyReadStandardOutput() { fprintf(stdout, "%s", data.data()); fflush(stdout); + } template @@ -416,6 +422,7 @@ WorkerPool::SendMessageWithReply(MessageType *message) { QMetaObject::invokeMethod(this, "SendQueuedMessages", Qt::QueuedConnection); return reply; + } template @@ -437,6 +444,7 @@ void WorkerPool::SendQueuedMessages() { handler->SendRequest(reply); } + } template diff --git a/src/core/simpletreeitem.h b/src/core/simpletreeitem.h index 3173476c..34ff1347 100644 --- a/src/core/simpletreeitem.h +++ b/src/core/simpletreeitem.h @@ -58,7 +58,7 @@ class SimpleTreeItem { bool lazy_loaded; T *parent; - QList children; + QList children; QAbstractItemModel *child_model; SimpleTreeModel *model; diff --git a/src/core/simpletreemodel.h b/src/core/simpletreemodel.h index 2a56c033..773962b6 100644 --- a/src/core/simpletreemodel.h +++ b/src/core/simpletreemodel.h @@ -88,6 +88,7 @@ QModelIndex SimpleTreeModel::index(int row, int, const QModelIndex &parent) c return QModelIndex(); return ItemToIndex(parent_item->children[row]); + } template diff --git a/src/core/windows7thumbbar.cpp b/src/core/windows7thumbbar.cpp index 26b6a4d8..127cd67c 100644 --- a/src/core/windows7thumbbar.cpp +++ b/src/core/windows7thumbbar.cpp @@ -94,6 +94,7 @@ ITaskbarList3 *Windows7ThumbBar::CreateTaskbarList() { } return taskbar_list; + } void Windows7ThumbBar::SetupButton(const QAction *action, THUMBBUTTON *button) { diff --git a/src/device/giolister.cpp b/src/device/giolister.cpp index ab742c8d..c469ce2d 100644 --- a/src/device/giolister.cpp +++ b/src/device/giolister.cpp @@ -70,6 +70,7 @@ bool GioLister::DeviceInfo::is_suitable() const { if (filesystem_type.isEmpty()) return true; return filesystem_type != "udf" && filesystem_type != "smb" && filesystem_type != "cifs" && filesystem_type != "ssh" && filesystem_type != "isofs"; + } template diff --git a/src/engine/enginebase.cpp b/src/engine/enginebase.cpp index a06a957b..d37cb9f9 100644 --- a/src/engine/enginebase.cpp +++ b/src/engine/enginebase.cpp @@ -94,12 +94,14 @@ bool Engine::Base::Play(const QUrl &stream_url, const QUrl &original_url, const } return Play(offset_nanosec); + } void Engine::Base::SetVolume(const uint value) { volume_ = value; SetVolumeSW(MakeVolumeLogarithmic(value)); + } uint Engine::Base::MakeVolumeLogarithmic(const uint volume) { diff --git a/src/globalshortcuts/globalshortcutsmanager.cpp b/src/globalshortcuts/globalshortcutsmanager.cpp index 6fe9491e..ecb2a90d 100644 --- a/src/globalshortcuts/globalshortcutsmanager.cpp +++ b/src/globalshortcuts/globalshortcutsmanager.cpp @@ -170,16 +170,19 @@ GlobalShortcutsManager::Shortcut GlobalShortcutsManager::AddShortcut(const QStri bool GlobalShortcutsManager::IsKdeAvailable() { return GlobalShortcutsBackendKDE::IsKDEAvailable(); + } bool GlobalShortcutsManager::IsGnomeAvailable() { return GlobalShortcutsBackendGnome::IsGnomeAvailable(); + } bool GlobalShortcutsManager::IsMateAvailable() { return GlobalShortcutsBackendMate::IsMateAvailable(); + } #endif // defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) && defined(HAVE_DBUS) @@ -189,6 +192,7 @@ bool GlobalShortcutsManager::IsMateAvailable() { bool GlobalShortcutsManager::IsX11Available() { return GlobalShortcutsBackendX11::IsX11Available(); + } #endif // HAVE_X11_GLOBALSHORTCUTS diff --git a/src/playlist/playlist.cpp b/src/playlist/playlist.cpp index 0c6bc9ea..e8cebc27 100644 --- a/src/playlist/playlist.cpp +++ b/src/playlist/playlist.cpp @@ -2168,6 +2168,7 @@ void Playlist::RemoveDeletedSongs() { } removeRows(rows_to_remove); + } namespace { diff --git a/src/qobuz/qobuzservice.cpp b/src/qobuz/qobuzservice.cpp index f469e91b..dbd1099b 100644 --- a/src/qobuz/qobuzservice.cpp +++ b/src/qobuz/qobuzservice.cpp @@ -716,12 +716,14 @@ void QobuzService::SendSearch() { search_request_->Search(search_id_, search_text_); search_request_->Process(); + } void QobuzService::SearchResultsReceived(const int id, const SongMap &songs, const QString &error) { search_request_.reset(); emit SearchResults(id, songs, error); + } uint QobuzService::GetStreamURL(const QUrl &url, QString &error) { diff --git a/src/smartplaylists/smartplaylistsviewcontainer.cpp b/src/smartplaylists/smartplaylistsviewcontainer.cpp index b0d41519..04e843e5 100644 --- a/src/smartplaylists/smartplaylistsviewcontainer.cpp +++ b/src/smartplaylists/smartplaylistsviewcontainer.cpp @@ -247,6 +247,7 @@ void SmartPlaylistsViewContainer::DeleteSmartPlaylistFromButton() { if (ui_->view->selectionModel()->selectedIndexes().count() == 0) return; DeleteSmartPlaylist(ui_->view->selectionModel()->selectedIndexes().first()); + } void SmartPlaylistsViewContainer::NewSmartPlaylistFinished() { @@ -255,6 +256,7 @@ void SmartPlaylistsViewContainer::NewSmartPlaylistFinished() { if (!wizard) return; QObject::disconnect(wizard, &SmartPlaylistWizard::accepted, this, &SmartPlaylistsViewContainer::NewSmartPlaylistFinished); model_->AddGenerator(wizard->CreateGenerator()); + } void SmartPlaylistsViewContainer::EditSmartPlaylistFinished() { diff --git a/src/widgets/fancytabwidget.cpp b/src/widgets/fancytabwidget.cpp index a4cdf3d5..91f48281 100644 --- a/src/widgets/fancytabwidget.cpp +++ b/src/widgets/fancytabwidget.cpp @@ -346,6 +346,7 @@ class FancyTabBar : public QTabBar { // clazy:exclude=missing-qobject-macro } } } + }; class TabData : public QObject { // clazy:exclude=missing-qobject-macro diff --git a/src/widgets/lineedit.cpp b/src/widgets/lineedit.cpp index 6682bd2a..39c65840 100644 --- a/src/widgets/lineedit.cpp +++ b/src/widgets/lineedit.cpp @@ -203,6 +203,7 @@ TextEdit::TextEdit(QWidget *parent) QObject::connect(reset_button_, &QToolButton::clicked, this, &TextEdit::Reset); QObject::connect(this, &TextEdit::textChanged, [this]() { viewport()->update(); }); // To clear the hint + } void TextEdit::paintEvent(QPaintEvent *e) { @@ -237,6 +238,7 @@ CheckBox::CheckBox(QWidget *parent) : QCheckBox(parent), ExtendedEditor(this, 14, false) { QObject::connect(reset_button_, &QToolButton::clicked, this, &CheckBox::Reset); + } void CheckBox::paintEvent(QPaintEvent *e) { @@ -255,6 +257,7 @@ QString SpinBox::textFromValue(int val) const { return "-"; } return QSpinBox::textFromValue(val); + } RatingBox::RatingBox(QWidget *parent) @@ -263,4 +266,5 @@ RatingBox::RatingBox(QWidget *parent) clear_button_->hide(); reset_button_->hide(); + } diff --git a/src/widgets/ratingwidget.cpp b/src/widgets/ratingwidget.cpp index 14ac86d2..ac26fc2f 100644 --- a/src/widgets/ratingwidget.cpp +++ b/src/widgets/ratingwidget.cpp @@ -80,6 +80,7 @@ QRect RatingPainter::Contents(const QRect rect) { const int x = rect.x() + (rect.width() - width) / 2; return QRect(x, rect.y(), width, rect.height()); + } float RatingPainter::RatingForPos(const QPoint pos, const QRect rect) {