Formatting

This commit is contained in:
Jonas Kvinge
2025-12-09 01:16:41 +01:00
parent 15c2237d4a
commit 5fcb71d08f
164 changed files with 228 additions and 229 deletions

View File

@@ -101,8 +101,7 @@ void AnalyzerContainer::AddAnalyzerType() {
group_->addAction(action); group_->addAction(action);
action->setCheckable(true); action->setCheckable(true);
actions_ << action; actions_ << action;
QObject::connect(action, &QAction::triggered, [this, id]() { ChangeAnalyzer(id); } ); QObject::connect(action, &QAction::triggered, [this, id]() { ChangeAnalyzer(id); });
} }
#endif // ANALYZERCONTAINER_H #endif // ANALYZERCONTAINER_H

View File

@@ -107,7 +107,6 @@ void BlockAnalyzer::resizeEvent(QResizeEvent *e) {
} }
drawBackground(); drawBackground();
} }
void BlockAnalyzer::determineStep() { void BlockAnalyzer::determineStep() {
@@ -119,7 +118,6 @@ void BlockAnalyzer::determineStep() {
const double fallTime = static_cast<double>(timeout() < 20 ? 20 * rows_ : 30 * rows_); const double fallTime = static_cast<double>(timeout() < 20 ? 20 * rows_ : 30 * rows_);
step_ = static_cast<double>(rows_ * timeout()) / fallTime; step_ = static_cast<double>(rows_ * timeout()) / fallTime;
} }
void BlockAnalyzer::framerateChanged() { void BlockAnalyzer::framerateChanged() {
@@ -135,7 +133,6 @@ void BlockAnalyzer::transform(Scope &s) {
// the second half is pretty dull, so only show it if the user has a large analyzer by setting to scope_.size() if large we prevent interpolation of large analyzers, this is good! // the second half is pretty dull, so only show it if the user has a large analyzer by setting to scope_.size() if large we prevent interpolation of large analyzers, this is good!
s.resize(scope_.size() <= kMaxColumns / 2 ? kMaxColumns / 2 : scope_.size()); s.resize(scope_.size() <= kMaxColumns / 2 ? kMaxColumns / 2 : scope_.size());
} }
void BlockAnalyzer::analyze(QPainter &p, const Scope &s, const bool new_frame) { void BlockAnalyzer::analyze(QPainter &p, const Scope &s, const bool new_frame) {
@@ -203,7 +200,6 @@ void BlockAnalyzer::analyze(QPainter &p, const Scope &s, const bool new_frame) {
} }
p.drawPixmap(0, 0, canvas_); p.drawPixmap(0, 0, canvas_);
} }
static inline void adjustToLimits(const int b, int &f, int &amount) { static inline void adjustToLimits(const int b, int &f, int &amount) {
@@ -230,7 +226,6 @@ static inline void adjustToLimits(const int b, int &f, int &amount) {
f = 255; f = 255;
} }
} }
} }
/** /**
@@ -337,7 +332,6 @@ QColor ensureContrast(const QColor &bg, const QColor &fg, int amount) {
} }
return Qt::blue; return Qt::blue;
} }
void BlockAnalyzer::paletteChange(const QPalette &_palette) { void BlockAnalyzer::paletteChange(const QPalette &_palette) {
@@ -388,7 +382,6 @@ void BlockAnalyzer::paletteChange(const QPalette &_palette) {
} }
drawBackground(); drawBackground();
} }
void BlockAnalyzer::drawBackground() { void BlockAnalyzer::drawBackground() {
@@ -411,5 +404,4 @@ void BlockAnalyzer::drawBackground() {
p.fillRect(x * (kWidth + 1), y * (kHeight + 1) + y_, kWidth, kHeight, bgdark); p.fillRect(x * (kWidth + 1), y * (kHeight + 1) + y_, kWidth, kHeight, bgdark);
} }
} }
} }

View File

@@ -41,14 +41,14 @@ class BlockAnalyzer : public AnalyzerBase {
Q_OBJECT Q_OBJECT
public: public:
Q_INVOKABLE explicit BlockAnalyzer(QWidget*); Q_INVOKABLE explicit BlockAnalyzer(QWidget *parent);
static const char *kName; static const char *kName;
protected: protected:
void transform(Scope&) override; void transform(Scope &s) override;
void analyze(QPainter &p, const Scope &s, const bool new_frame) override; void analyze(QPainter &p, const Scope &s, const bool new_frame) override;
void resizeEvent(QResizeEvent*) override; void resizeEvent(QResizeEvent *e) override;
virtual void paletteChange(const QPalette &_palette); virtual void paletteChange(const QPalette &_palette);
void framerateChanged() override; void framerateChanged() override;

View File

@@ -40,7 +40,7 @@ class BoomAnalyzer : public AnalyzerBase {
Q_OBJECT Q_OBJECT
public: public:
Q_INVOKABLE explicit BoomAnalyzer(QWidget*); Q_INVOKABLE explicit BoomAnalyzer(QWidget *parent);
static const char *kName; static const char *kName;
@@ -70,7 +70,6 @@ class BoomAnalyzer : public AnalyzerBase {
QPixmap barPixmap_; QPixmap barPixmap_;
QPixmap canvas_; QPixmap canvas_;
}; };
#endif // BOOMANALYZER_H #endif // BOOMANALYZER_H

View File

@@ -55,7 +55,7 @@ class FHT {
/** /**
* Recursive in-place Hartley transform. For internal use only! * Recursive in-place Hartley transform. For internal use only!
*/ */
void _transform(float*, int, int); void _transform(float *p, int n, int k);
public: public:
/** /**
@@ -68,7 +68,7 @@ class FHT {
~FHT(); ~FHT();
int sizeExp() const; int sizeExp() const;
int size() const; int size() const;
void scale(float*, float) const; void scale(float *p, float d) const;
/** /**
* Exponentially Weighted Moving Average (EWMA) filter. * Exponentially Weighted Moving Average (EWMA) filter.
@@ -90,12 +90,12 @@ class FHT {
/** /**
* Semi-logarithmic audio spectrum. * Semi-logarithmic audio spectrum.
*/ */
void semiLogSpectrum(float*); void semiLogSpectrum(float *p);
/** /**
* Fourier spectrum. * Fourier spectrum.
*/ */
void spectrum(float*); void spectrum(float *p);
/** /**
* Calculates a mathematically correct FFT power spectrum. * Calculates a mathematically correct FFT power spectrum.
@@ -103,7 +103,7 @@ class FHT {
* and factor the 0.5 in the final scaling factor. * and factor the 0.5 in the final scaling factor.
* @see FHT::power2() * @see FHT::power2()
*/ */
void power(float*); void power(float *p);
/** /**
* Calculates an FFT power spectrum with doubled values as a * Calculates an FFT power spectrum with doubled values as a
@@ -112,14 +112,14 @@ class FHT {
* of @f$2^n@f$ input values. This is the fastest transform. * of @f$2^n@f$ input values. This is the fastest transform.
* @see FHT::power() * @see FHT::power()
*/ */
void power2(float*); void power2(float *p);
/** /**
* Discrete Hartley transform of data sets with 8 values. * Discrete Hartley transform of data sets with 8 values.
*/ */
static void transform8(float*); static void transform8(float *p);
void transform(float*); void transform(float *p);
}; };
#endif // FHT_H #endif // FHT_H

View File

@@ -140,7 +140,6 @@ class CollectionBackend : public CollectionBackendInterface {
Q_OBJECT Q_OBJECT
public: public:
Q_INVOKABLE explicit CollectionBackend(QObject *parent = nullptr); Q_INVOKABLE explicit CollectionBackend(QObject *parent = nullptr);
~CollectionBackend(); ~CollectionBackend();

View File

@@ -26,7 +26,6 @@
class CollectionFilterOptions { class CollectionFilterOptions {
public: public:
explicit CollectionFilterOptions(); explicit CollectionFilterOptions();
// Filter mode: // Filter mode:

View File

@@ -686,8 +686,8 @@ void CollectionModel::RemoveSongsInternal(const SongList &songs) {
if (!divider_nodes_.contains(divider_key)) continue; if (!divider_nodes_.contains(divider_key)) continue;
// Look to see if there are any other items still under this divider // Look to see if there are any other items still under this divider
QList<CollectionItem*> container_nodes = container_nodes_[0].values(); QList<CollectionItem *> container_nodes = container_nodes_[0].values();
if (std::any_of(container_nodes.begin(), container_nodes.end(), [this, divider_key](CollectionItem *node){ return DividerKey(options_active_.group_by[0], node->metadata, node->sort_text) == divider_key; })) { if (std::any_of(container_nodes.begin(), container_nodes.end(), [this, divider_key](CollectionItem *node) { return DividerKey(options_active_.group_by[0], node->metadata, node->sort_text) == divider_key; })) {
continue; continue;
} }

View File

@@ -137,7 +137,7 @@ class CollectionWatcher : public QObject {
QStringList files_changed_path_; QStringList files_changed_path_;
private: private:
ScanTransaction &operator=(const ScanTransaction&) { return *this; } ScanTransaction &operator=(const ScanTransaction &transaction) { Q_UNUSED(transaction); return *this; }
int task_id_; int task_id_;
quint64 progress_; quint64 progress_;
@@ -261,7 +261,6 @@ class CollectionWatcher : public QObject {
static QStringList sValidImages; static QStringList sValidImages;
qint64 last_scan_time_; qint64 last_scan_time_;
}; };
inline QString CollectionWatcher::NoExtensionPart(const QString &fileName) { inline QString CollectionWatcher::NoExtensionPart(const QString &fileName) {

View File

@@ -70,6 +70,6 @@ enum class BackgroundImagePosition {
BottomRight = 5 BottomRight = 5
}; };
} // namespace } // namespace AppearanceSettings
#endif // APPEARANCESETTINGS_H #endif // APPEARANCESETTINGS_H

View File

@@ -63,6 +63,6 @@ constexpr qint64 kDefaultBufferDuration = 4000;
constexpr double kDefaultBufferLowWatermark = 0.33; constexpr double kDefaultBufferLowWatermark = 0.33;
constexpr double kDefaultBufferHighWatermark = 0.99; constexpr double kDefaultBufferHighWatermark = 0.99;
} // namespace } // namespace BackendSettings
#endif // BACKENDSETTINGS_H #endif // BACKENDSETTINGS_H

View File

@@ -71,6 +71,6 @@ constexpr char kDoubleClickPlaylistAddMode[] = "doubleclick_playlist_addmode";
constexpr char kSeekStepSec[] = "seek_step_sec"; constexpr char kSeekStepSec[] = "seek_step_sec";
constexpr char kVolumeIncrement[] = "volume_increment"; constexpr char kVolumeIncrement[] = "volume_increment";
} // namespace } // namespace BehaviourSettings
#endif // BEHAVIOURSETTINGS_H #endif // BEHAVIOURSETTINGS_H

View File

@@ -59,6 +59,6 @@ enum class CacheSizeUnit {
TB TB
}; };
} // namespace } // namespace CollectionSettings
#endif // COLLECTIONSETTINGS_H #endif // COLLECTIONSETTINGS_H

View File

@@ -43,6 +43,6 @@ constexpr char kSettingsSummaryFmt[] = "SummaryFmt";
constexpr char kDefaultFontFamily[] = "Noto Sans"; constexpr char kDefaultFontFamily[] = "Noto Sans";
constexpr qreal kDefaultFontSizeHeadline = 11; constexpr qreal kDefaultFontSizeHeadline = 11;
} // namespace } // namespace ContextSettings
#endif // CONTEXTSETTINGS_H #endif // CONTEXTSETTINGS_H

View File

@@ -32,6 +32,6 @@ constexpr char kSaveOverwrite[] = "save_overwrite";
constexpr char kSaveLowercase[] = "save_lowercase"; constexpr char kSaveLowercase[] = "save_lowercase";
constexpr char kSaveReplaceSpaces[] = "save_replace_spaces"; constexpr char kSaveReplaceSpaces[] = "save_replace_spaces";
} // namespace } // namespace CoversSettings
#endif // COVERSSETTINGS_H #endif // COVERSSETTINGS_H

View File

@@ -26,6 +26,6 @@ constexpr char kSettingsGroup[] = "GlobalShortcuts";
constexpr char kUseKGlobalAccel[] = "use_kglobalaccel"; constexpr char kUseKGlobalAccel[] = "use_kglobalaccel";
constexpr char kUseX11[] = "use_x11"; constexpr char kUseX11[] = "use_x11";
} // namespace } // namespace GlobalShortcutsSettings
#endif // GLOBALSHORTCUTSSETTINGS_H #endif // GLOBALSHORTCUTSSETTINGS_H

View File

@@ -25,6 +25,6 @@ namespace LyricsSettings {
constexpr char kSettingsGroup[] = "Lyrics"; constexpr char kSettingsGroup[] = "Lyrics";
constexpr char kProviders[] = "providers"; constexpr char kProviders[] = "providers";
} // namespace } // namespace LyricsSettings
#endif // LYRICSSETTINGS_H #endif // LYRICSSETTINGS_H

View File

@@ -32,6 +32,6 @@ constexpr char kGeometry[] = "geometry";
constexpr char kSplitterState[] = "splitter_state"; constexpr char kSplitterState[] = "splitter_state";
constexpr char kDoNotShowSponsorMessage[] = "do_not_show_sponsor_message"; constexpr char kDoNotShowSponsorMessage[] = "do_not_show_sponsor_message";
} // namespace } // namespace MainWindowSettings
#endif // MAINWINDOWSETTINGS_H #endif // MAINWINDOWSETTINGS_H

View File

@@ -38,6 +38,6 @@ constexpr char kShow[] = "show";
constexpr char kStyle[] = "style"; constexpr char kStyle[] = "style";
constexpr char kSave[] = "save"; constexpr char kSave[] = "save";
} // namespace } // namespace MoodbarSettings
#endif // MOODBARSETTINGS_H #endif // MOODBARSETTINGS_H

View File

@@ -32,6 +32,6 @@ constexpr char kUsername[] = "username";
constexpr char kPassword[] = "password"; constexpr char kPassword[] = "password";
constexpr char kEngine[] = "engine"; constexpr char kEngine[] = "engine";
} // namespace } // namespace NetworkProxySettings
#endif // NETWORKPROXYSETTINGS_H #endif // NETWORKPROXYSETTINGS_H

View File

@@ -45,7 +45,7 @@ constexpr char kCustomTextEnabled[] = "CustomTextEnabled";
constexpr char kCustomText1[] = "CustomText1"; constexpr char kCustomText1[] = "CustomText1";
constexpr char kCustomText2[] = "CustomText2"; constexpr char kCustomText2[] = "CustomText2";
} // namespace } // namespace OSDSettings
namespace OSDPrettySettings { namespace OSDPrettySettings {
@@ -63,7 +63,7 @@ constexpr char kFading[] = "fading";
constexpr QRgb kPresetBlue = qRgb(102, 150, 227); constexpr QRgb kPresetBlue = qRgb(102, 150, 227);
constexpr QRgb kPresetRed = qRgb(202, 22, 16); constexpr QRgb kPresetRed = qRgb(202, 22, 16);
} // namespace } // namespace OSDPrettySettings
namespace DiscordRPCSettings { namespace DiscordRPCSettings {
@@ -79,6 +79,6 @@ enum class StatusDisplayType {
Song Song
}; };
} // namespace } // namespace DiscordRPCSettings
#endif // NOTIFICATIONSSETTINGS_H #endif // NOTIFICATIONSSETTINGS_H

View File

@@ -63,7 +63,7 @@ constexpr char kLastSaveExtension[] = "last_save_extension";
constexpr char kLastSaveAllPath[] = "last_save_all_path"; constexpr char kLastSaveAllPath[] = "last_save_all_path";
constexpr char kLastSaveAllExtension[] = "last_save_all_extension"; constexpr char kLastSaveAllExtension[] = "last_save_all_extension";
} // namespace } // namespace PlaylistSettings
Q_DECLARE_METATYPE(PlaylistSettings::PathType) Q_DECLARE_METATYPE(PlaylistSettings::PathType)

View File

@@ -43,6 +43,6 @@ constexpr char kCredentialsId[] = "credentials_id";
constexpr char kDeviceId[] = "device_id"; constexpr char kDeviceId[] = "device_id";
constexpr char kUserAuthToken[] = "user_auth_token"; constexpr char kUserAuthToken[] = "user_auth_token";
} // namespace } // namespace QobuzSettings
#endif // QOBUZSETTINGS_H #endif // QOBUZSETTINGS_H

View File

@@ -35,6 +35,6 @@ constexpr char kStripRemastered[] = "strip_remastered";
constexpr char kSources[] = "sources"; constexpr char kSources[] = "sources";
constexpr char kUserToken[] = "user_token"; constexpr char kUserToken[] = "user_token";
} // namespace } // namespace ScrobblerSettings
#endif // SCROBBLERSETTINGS_H #endif // SCROBBLERSETTINGS_H

View File

@@ -38,6 +38,6 @@ constexpr char kRefreshToken[] = "refresh_token";
constexpr char kExpiresIn[] = "expires_in"; constexpr char kExpiresIn[] = "expires_in";
constexpr char kLoginTime[] = "login_time"; constexpr char kLoginTime[] = "login_time";
} // namespace } // namespace SpotifySettings
#endif // SPOTIFYSETTINGS_H #endif // SPOTIFYSETTINGS_H

View File

@@ -41,6 +41,6 @@ constexpr char kUseAlbumIdForAlbumCovers[] = "usealbumidforalbumcovers";
constexpr char kServerSideScrobbling[] = "serversidescrobbling"; constexpr char kServerSideScrobbling[] = "serversidescrobbling";
constexpr char kAuthMethod[] = "authmethod"; constexpr char kAuthMethod[] = "authmethod";
} // namespace } // namespace SubsonicSettings
#endif // SUBSONICETTINGS_H #endif // SUBSONICETTINGS_H

View File

@@ -48,6 +48,6 @@ enum class StreamUrlMethod {
PlaybackInfoPostPaywall PlaybackInfoPostPaywall
}; };
} } // namespace TidalSettings
#endif // TIDALSETTINGS_H #endif // TIDALSETTINGS_H

View File

@@ -61,7 +61,6 @@ class ContextAlbum : public QWidget {
void contextMenuEvent(QContextMenuEvent *e) override; void contextMenuEvent(QContextMenuEvent *e) override;
private: private:
struct PreviousCover { struct PreviousCover {
explicit PreviousCover() : opacity(0.0) {} explicit PreviousCover() : opacity(0.0) {}
QImage image; QImage image;

View File

@@ -65,9 +65,9 @@ class ContextView : public QWidget {
protected: protected:
void resizeEvent(QResizeEvent *e) override; void resizeEvent(QResizeEvent *e) override;
void contextMenuEvent(QContextMenuEvent*) override; void contextMenuEvent(QContextMenuEvent *e) override;
void dragEnterEvent(QDragEnterEvent*) override; void dragEnterEvent(QDragEnterEvent *e) override;
void dropEvent(QDropEvent*) override; void dropEvent(QDropEvent *e) override;
private: private:
void AddActions(); void AddActions();

View File

@@ -118,7 +118,7 @@ using namespace std::chrono_literals;
class ApplicationImpl { class ApplicationImpl {
public: public:
explicit ApplicationImpl(Application *app) explicit ApplicationImpl(Application *app)
: tagreader_client_([app](){ : tagreader_client_([app]() {
TagReaderClient *client = new TagReaderClient(); TagReaderClient *client = new TagReaderClient();
app->MoveToNewThread(client); app->MoveToNewThread(client);
return client; return client;

View File

@@ -204,7 +204,7 @@ bool CommandlineOptions::Parse() {
{ "version", no_argument, nullptr, LongOptions::Version }, { "version", no_argument, nullptr, LongOptions::Version },
{ nullptr, 0, nullptr, 0 } { nullptr, 0, nullptr, 0 }
#endif #endif
}; };
// Parse the arguments // Parse the arguments
bool ok = false; bool ok = false;

View File

@@ -503,7 +503,9 @@ bool Database::IntegrityCheck(const QSqlDatabase &db) {
break; break;
} }
else { else {
if (!error_reported) { Q_EMIT Error(tr("Database corruption detected.")); } if (!error_reported) {
Q_EMIT Error(tr("Database corruption detected."));
}
Q_EMIT Error(u"Database: "_s + message); Q_EMIT Error(u"Database: "_s + message);
error_reported = true; error_reported = true;
} }

View File

@@ -128,7 +128,6 @@ class Database : public QObject {
int startup_schema_version_; int startup_schema_version_;
QThread *original_thread_; QThread *original_thread_;
}; };
#endif // DATABASE_H #endif // DATABASE_H

View File

@@ -27,6 +27,7 @@ class IconLoader {
public: public:
static void Init(); static void Init();
static QIcon Load(const QString &name, const bool system_icon = true, const int fixed_size = 0, const int min_size = 0, const int max_size = 0); static QIcon Load(const QString &name, const bool system_icon = true, const int fixed_size = 0, const int min_size = 0, const int max_size = 0);
private: private:
explicit IconLoader() {} explicit IconLoader() {}
static bool system_icons_; static bool system_icons_;

View File

@@ -220,7 +220,7 @@
#endif #endif
#ifdef HAVE_SPARKLE #ifdef HAVE_SPARKLE
#include "core/sparkleupdater.h" # include "core/sparkleupdater.h"
#endif #endif
#ifdef HAVE_QTSPARKLE #ifdef HAVE_QTSPARKLE
@@ -228,7 +228,7 @@
#endif // HAVE_QTSPARKLE #endif // HAVE_QTSPARKLE
#ifdef HAVE_DISCORD_RPC #ifdef HAVE_DISCORD_RPC
#include "discord/richpresence.h" # include "discord/richpresence.h"
#endif #endif
using std::make_unique; using std::make_unique;

View File

@@ -285,7 +285,6 @@ class MainWindow : public QMainWindow, public PlatformInterface {
void Raise(); void Raise();
private: private:
void SaveSettings(); void SaveSettings();
static void ApplyAddBehaviour(const BehaviourSettings::AddBehaviour b, MimeData *mimedata); static void ApplyAddBehaviour(const BehaviourSettings::AddBehaviour b, MimeData *mimedata);
@@ -415,7 +414,6 @@ class MainWindow : public QMainWindow, public PlatformInterface {
bool playlists_loaded_; bool playlists_loaded_;
bool delete_files_; bool delete_files_;
std::optional<CommandlineOptions> options_; std::optional<CommandlineOptions> options_;
}; };
#endif // MAINWINDOW_H #endif // MAINWINDOW_H

View File

@@ -121,8 +121,8 @@ class Player : public PlayerInterface {
void PlayPlaylistInternal(const EngineBase::TrackChangeFlags, const Playlist::AutoScroll autoscroll, const QString &playlist_name); void PlayPlaylistInternal(const EngineBase::TrackChangeFlags, const Playlist::AutoScroll autoscroll, const QString &playlist_name);
void FatalError(); void FatalError();
void ValidSongRequested(const QUrl&); void ValidSongRequested(const QUrl &url);
void InvalidSongRequested(const QUrl&); void InvalidSongRequested(const QUrl &url);
void HandleLoadResult(const UrlHandler::LoadResult &result); void HandleLoadResult(const UrlHandler::LoadResult &result);

View File

@@ -40,7 +40,6 @@ class QtFSListener : public FileSystemWatcherInterface {
private: private:
QFileSystemWatcher watcher_; QFileSystemWatcher watcher_;
}; };
#endif // QTFSLISTENER_H #endif // QTFSLISTENER_H

View File

@@ -28,6 +28,7 @@ class ScopedNSAutoreleasePool {
// Only use then when you're certain the items currently in the pool are // Only use then when you're certain the items currently in the pool are
// no longer needed. // no longer needed.
void Recycle(); void Recycle();
private: private:
NSAutoreleasePool *autorelease_pool_; NSAutoreleasePool *autorelease_pool_;

View File

@@ -171,7 +171,6 @@ class SongLoader : public QObject {
QStringList errors_; QStringList errors_;
bool success_; bool success_;
}; };
#endif // SONGLOADER_H #endif // SONGLOADER_H

View File

@@ -89,7 +89,6 @@ class UrlHandler : public QObject {
Q_SIGNALS: Q_SIGNALS:
void AsyncLoadComplete(const UrlHandler::LoadResult &result); void AsyncLoadComplete(const UrlHandler::LoadResult &result);
}; };
#endif // URLHANDLER_H #endif // URLHANDLER_H

View File

@@ -113,7 +113,6 @@ class AlbumCoverFetcherSearch : public QObject {
SharedPtr<NetworkAccessManager> network_; SharedPtr<NetworkAccessManager> network_;
bool cancel_requested_; bool cancel_requested_;
}; };
#endif // ALBUMCOVERFETCHERSEARCH_H #endif // ALBUMCOVERFETCHERSEARCH_H

View File

@@ -58,5 +58,4 @@ AlbumCoverLoaderOptions::Types AlbumCoverLoaderOptions::LoadTypes() {
s.endGroup(); s.endGroup();
return cover_types; return cover_types;
} }

View File

@@ -102,7 +102,7 @@ using std::make_shared;
namespace { namespace {
constexpr char kSettingsGroup[] = "CoverManager"; constexpr char kSettingsGroup[] = "CoverManager";
constexpr int kThumbnailSize = 120; constexpr int kThumbnailSize = 120;
} } // namespace
AlbumCoverManager::AlbumCoverManager(const SharedPtr<NetworkAccessManager> network, AlbumCoverManager::AlbumCoverManager(const SharedPtr<NetworkAccessManager> network,
const SharedPtr<CollectionBackend> collection_backend, const SharedPtr<CollectionBackend> collection_backend,

View File

@@ -83,7 +83,7 @@ class AlbumCoverSearcher : public QDialog {
AlbumCoverImageResult Exec(const QString &artist, const QString &album); AlbumCoverImageResult Exec(const QString &artist, const QString &album);
protected: protected:
void keyPressEvent(QKeyEvent*) override; void keyPressEvent(QKeyEvent *e) override;
private Q_SLOTS: private Q_SLOTS:
void Search(); void Search();

View File

@@ -47,11 +47,11 @@ class CDDALister : public DeviceLister {
quint64 DeviceCapacity(const QString &id) override; quint64 DeviceCapacity(const QString &id) override;
quint64 DeviceFreeSpace(const QString &id) override; quint64 DeviceFreeSpace(const QString &id) override;
QVariantMap DeviceHardwareInfo(const QString &id) override; QVariantMap DeviceHardwareInfo(const QString &id) override;
bool AskForScan(const QString&) const override { return false; } bool AskForScan(const QString &id) const override { return false; }
QString MakeFriendlyName(const QString&) override; QString MakeFriendlyName(const QString &id) override;
QList<QUrl> MakeDeviceUrls(const QString&) override; QList<QUrl> MakeDeviceUrls(const QString &id) override;
void UnmountDevice(const QString&) override; void UnmountDevice(const QString &id) override;
void UpdateDeviceFreeSpace(const QString&) override; void UpdateDeviceFreeSpace(const QString &id) override;
bool Init() override; bool Init() override;
bool CopyMusic() override { return false; } bool CopyMusic() override { return false; }

View File

@@ -77,7 +77,6 @@ class DeviceDatabaseBackend : public QObject {
private: private:
SharedPtr<Database> db_; SharedPtr<Database> db_;
QThread *original_thread_; QThread *original_thread_;
}; };
#endif // DEVICEDATABASEBACKEND_H #endif // DEVICEDATABASEBACKEND_H

View File

@@ -61,7 +61,6 @@ class DeviceItemDelegate : public CollectionItemDelegate {
static const int kIconPadding; static const int kIconPadding;
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &idx) const override; void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &idx) const override;
}; };
class DeviceView : public AutoExpandingTreeView { class DeviceView : public AutoExpandingTreeView {
@@ -80,7 +79,7 @@ class DeviceView : public AutoExpandingTreeView {
bool CanRecursivelyExpand(const QModelIndex &idx) const override; bool CanRecursivelyExpand(const QModelIndex &idx) const override;
protected: protected:
void contextMenuEvent(QContextMenuEvent*) override; void contextMenuEvent(QContextMenuEvent *e) override;
void mouseDoubleClickEvent(QMouseEvent *e) override; void mouseDoubleClickEvent(QMouseEvent *e) override;
private Q_SLOTS: private Q_SLOTS:

View File

@@ -23,8 +23,8 @@
#define FILESYSTEMDEVICE_H #define FILESYSTEMDEVICE_H
#ifdef _MSC_VER // FIXME #ifdef _MSC_VER // FIXME
#pragma warning(push) # pragma warning(push)
#pragma warning(disable : 4250) # pragma warning(disable : 4250)
#endif #endif
#include "config.h" #include "config.h"
@@ -84,7 +84,7 @@ class FilesystemDevice : public ConnectedDevice, public virtual FilesystemMusicS
}; };
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(pop) # pragma warning(pop)
#endif #endif
#endif // FILESYSTEMDEVICE_H #endif // FILESYSTEMDEVICE_H

View File

@@ -160,7 +160,10 @@ QVariantList GioLister::DeviceIcons(const QString &id) {
} }
QString GioLister::DeviceManufacturer(const QString &id) { Q_UNUSED(id); return QString(); } QString GioLister::DeviceManufacturer(const QString &id) {
Q_UNUSED(id);
return QString();
}
QString GioLister::DeviceModel(const QString &id) { QString GioLister::DeviceModel(const QString &id) {
@@ -484,21 +487,21 @@ void GioLister::DeviceInfo::ReadMountInfo(GMount *mount) {
} }
#ifdef HAVE_GIO_UNIX #ifdef HAVE_GIO_UNIX
#ifdef GLIB_VERSION_2_84 # ifdef GLIB_VERSION_2_84
GUnixMountEntry *unix_mount = g_unix_mount_entry_for(g_file_get_path(root), nullptr); GUnixMountEntry *unix_mount = g_unix_mount_entry_for(g_file_get_path(root), nullptr);
#else # else
GUnixMountEntry *unix_mount = g_unix_mount_for(g_file_get_path(root), nullptr); GUnixMountEntry *unix_mount = g_unix_mount_for(g_file_get_path(root), nullptr);
#endif # endif
if (unix_mount) { if (unix_mount) {
// The GIO's definition of system internal mounts include filesystems like autofs, tmpfs, sysfs, etc, // The GIO's definition of system internal mounts include filesystems like autofs, tmpfs, sysfs, etc,
// and various system directories, including the root, /boot, /var, /home, etc. // and various system directories, including the root, /boot, /var, /home, etc.
#ifdef GLIB_VERSION_2_84 # ifdef GLIB_VERSION_2_84
is_system_internal = g_unix_mount_entry_is_system_internal(unix_mount); is_system_internal = g_unix_mount_entry_is_system_internal(unix_mount);
g_unix_mount_entry_free(unix_mount); g_unix_mount_entry_free(unix_mount);
#else # else
is_system_internal = g_unix_mount_is_system_internal(unix_mount); is_system_internal = g_unix_mount_is_system_internal(unix_mount);
g_unix_mount_free(unix_mount); g_unix_mount_free(unix_mount);
#endif # endif
// Although checking most of the internal mounts is safe, we really don't want to touch autofs filesystems, as that would trigger automounting. // Although checking most of the internal mounts is safe, we really don't want to touch autofs filesystems, as that would trigger automounting.
if (is_system_internal) return; if (is_system_internal) return;
} }

View File

@@ -119,8 +119,8 @@ class GioLister : public DeviceLister {
static void VolumeAddedCallback(GVolumeMonitor *volume_monitor, GVolume *volume, gpointer instance); static void VolumeAddedCallback(GVolumeMonitor *volume_monitor, GVolume *volume, gpointer instance);
static void VolumeRemovedCallback(GVolumeMonitor *volume_monitor, GVolume *volume, gpointer instance); static void VolumeRemovedCallback(GVolumeMonitor *volume_monitor, GVolume *volume, gpointer instance);
static void MountAddedCallback(GVolumeMonitor *volume_monitor, GMount*, gpointer instance); static void MountAddedCallback(GVolumeMonitor *volume_monitor, GMount *mount, gpointer instance);
static void MountChangedCallback(GVolumeMonitor *volume_monitor, GMount*, gpointer instance); static void MountChangedCallback(GVolumeMonitor *volume_monitor, GMount *mount, gpointer instance);
static void MountRemovedCallback(GVolumeMonitor *volume_monitor, GMount *mount, gpointer instance); static void MountRemovedCallback(GVolumeMonitor *volume_monitor, GMount *mount, gpointer instance);
static void VolumeMountFinished(GObject *object, GAsyncResult *result, gpointer instance); static void VolumeMountFinished(GObject *object, GAsyncResult *result, gpointer instance);

View File

@@ -64,7 +64,6 @@ class MtpLoader : public QObject {
ScopedPtr<MtpConnection> connection_; ScopedPtr<MtpConnection> connection_;
QThread *original_thread_; QThread *original_thread_;
bool abort_; bool abort_;
}; };
#endif // MTPLOADER_H #endif // MTPLOADER_H

View File

@@ -49,19 +49,19 @@ enum {
} // namespace } // namespace
#ifdef __GNUC__ #ifdef __GNUC__
#pragma GCC diagnostic push # pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast" # pragma GCC diagnostic ignored "-Wold-style-cast"
#endif #endif
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(push) # pragma warning(push)
#pragma warning(disable : 4514) # pragma warning(disable : 4514)
#endif #endif
G_DEFINE_TYPE(GstStrawberryFastSpectrum, gst_strawberry_fastspectrum, GST_TYPE_AUDIO_FILTER) G_DEFINE_TYPE(GstStrawberryFastSpectrum, gst_strawberry_fastspectrum, GST_TYPE_AUDIO_FILTER)
#ifdef __GNUC__ #ifdef __GNUC__
#pragma GCC diagnostic pop # pragma GCC diagnostic pop
#endif #endif
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(pop) # pragma warning(pop)
#endif #endif
static void gst_strawberry_fastspectrum_finalize(GObject *object); static void gst_strawberry_fastspectrum_finalize(GObject *object);
@@ -272,7 +272,7 @@ static gboolean gst_strawberry_fastspectrum_stop(GstBaseTransform *transform) {
static void gst_strawberry_fastspectrum_input_data_mixed_float(const guint8 *_in, double *out, const guint64 len, const double max_value, guint op, const guint nfft) { static void gst_strawberry_fastspectrum_input_data_mixed_float(const guint8 *_in, double *out, const guint64 len, const double max_value, guint op, const guint nfft) {
(void) max_value; (void)max_value;
const gfloat *in = reinterpret_cast<const gfloat*>(_in); const gfloat *in = reinterpret_cast<const gfloat*>(_in);
guint ip = 0; guint ip = 0;
@@ -286,7 +286,7 @@ static void gst_strawberry_fastspectrum_input_data_mixed_float(const guint8 *_in
static void gst_strawberry_fastspectrum_input_data_mixed_double(const guint8 *_in, double *out, const guint64 len, const double max_value, guint op, const guint nfft) { static void gst_strawberry_fastspectrum_input_data_mixed_double(const guint8 *_in, double *out, const guint64 len, const double max_value, guint op, const guint nfft) {
(void) max_value; (void)max_value;
const gdouble *in = reinterpret_cast<const gdouble*>(_in); const gdouble *in = reinterpret_cast<const gdouble*>(_in);
guint ip = 0; guint ip = 0;

View File

@@ -23,6 +23,6 @@
namespace GstStartup { namespace GstStartup {
void Initialize(); void Initialize();
void SetEnvironment(); void SetEnvironment();
} // namespace } // namespace GstStartup
#endif // GSTSTARTUP_H #endif // GSTSTARTUP_H

View File

@@ -110,12 +110,12 @@ void Equalizer::ReloadSettings() {
for (int i = 0; i < count; ++i) { for (int i = 0; i < count; ++i) {
s.setArrayIndex(i); s.setArrayIndex(i);
#ifdef __GNUC__ #ifdef __GNUC__
#pragma GCC diagnostic push # pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds" # pragma GCC diagnostic ignored "-Warray-bounds"
#endif #endif
AddPreset(s.value("name").toString(), s.value("params").value<Equalizer::Params>()); AddPreset(s.value("name").toString(), s.value("params").value<Equalizer::Params>());
#ifdef __GNUC__ #ifdef __GNUC__
#pragma GCC diagnostic pop # pragma GCC diagnostic pop
#endif #endif
} }
s.endArray(); s.endArray();

View File

@@ -58,7 +58,7 @@ class FileView : public QWidget {
void SetTaskManager(SharedPtr<TaskManager> task_manager); void SetTaskManager(SharedPtr<TaskManager> task_manager);
protected: protected:
void showEvent(QShowEvent*) override; void showEvent(QShowEvent *e) override;
void keyPressEvent(QKeyEvent *e) override; void keyPressEvent(QKeyEvent *e) override;
Q_SIGNALS: Q_SIGNALS:

View File

@@ -28,6 +28,7 @@ class FilterParserFloatEqComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserFloatEqComparator(const float search_term); explicit FilterParserFloatEqComparator(const float search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
float search_term_; float search_term_;
Q_DISABLE_COPY(FilterParserFloatEqComparator) Q_DISABLE_COPY(FilterParserFloatEqComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserFloatGeComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserFloatGeComparator(const float search_term); explicit FilterParserFloatGeComparator(const float search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
float search_term_; float search_term_;
Q_DISABLE_COPY(FilterParserFloatGeComparator) Q_DISABLE_COPY(FilterParserFloatGeComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserFloatGtComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserFloatGtComparator(const float search_term); explicit FilterParserFloatGtComparator(const float search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
float search_term_; float search_term_;
Q_DISABLE_COPY(FilterParserFloatGtComparator) Q_DISABLE_COPY(FilterParserFloatGtComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserFloatLeComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserFloatLeComparator(const float search_term); explicit FilterParserFloatLeComparator(const float search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
float search_term_; float search_term_;
Q_DISABLE_COPY(FilterParserFloatLeComparator) Q_DISABLE_COPY(FilterParserFloatLeComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserFloatLtComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserFloatLtComparator(const float search_term); explicit FilterParserFloatLtComparator(const float search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
float search_term_; float search_term_;
Q_DISABLE_COPY(FilterParserFloatLtComparator) Q_DISABLE_COPY(FilterParserFloatLtComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserFloatNeComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserFloatNeComparator(const float value); explicit FilterParserFloatNeComparator(const float value);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
float search_term_; float search_term_;
Q_DISABLE_COPY(FilterParserFloatNeComparator) Q_DISABLE_COPY(FilterParserFloatNeComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserInt64EqComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserInt64EqComparator(const qint64 search_term); explicit FilterParserInt64EqComparator(const qint64 search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
qint64 search_term_; qint64 search_term_;
Q_DISABLE_COPY(FilterParserInt64EqComparator) Q_DISABLE_COPY(FilterParserInt64EqComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserInt64GeComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserInt64GeComparator(const qint64 search_term); explicit FilterParserInt64GeComparator(const qint64 search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
qint64 search_term_; qint64 search_term_;
Q_DISABLE_COPY(FilterParserInt64GeComparator) Q_DISABLE_COPY(FilterParserInt64GeComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserInt64GtComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserInt64GtComparator(const qint64 search_term); explicit FilterParserInt64GtComparator(const qint64 search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
qint64 search_term_; qint64 search_term_;
Q_DISABLE_COPY(FilterParserInt64GtComparator) Q_DISABLE_COPY(FilterParserInt64GtComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserInt64LeComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserInt64LeComparator(const qint64 search_term); explicit FilterParserInt64LeComparator(const qint64 search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
qint64 search_term_; qint64 search_term_;
Q_DISABLE_COPY(FilterParserInt64LeComparator) Q_DISABLE_COPY(FilterParserInt64LeComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserInt64LtComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserInt64LtComparator(const qint64 search_term); explicit FilterParserInt64LtComparator(const qint64 search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
qint64 search_term_; qint64 search_term_;
Q_DISABLE_COPY(FilterParserInt64LtComparator) Q_DISABLE_COPY(FilterParserInt64LtComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserInt64NeComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserInt64NeComparator(const qint64 search_term); explicit FilterParserInt64NeComparator(const qint64 search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
qint64 search_term_; qint64 search_term_;
Q_DISABLE_COPY(FilterParserInt64NeComparator) Q_DISABLE_COPY(FilterParserInt64NeComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserIntEqComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserIntEqComparator(const int search_term); explicit FilterParserIntEqComparator(const int search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
int search_term_; int search_term_;
Q_DISABLE_COPY(FilterParserIntEqComparator) Q_DISABLE_COPY(FilterParserIntEqComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserIntGeComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserIntGeComparator(const int search_term); explicit FilterParserIntGeComparator(const int search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
int search_term_; int search_term_;
Q_DISABLE_COPY(FilterParserIntGeComparator) Q_DISABLE_COPY(FilterParserIntGeComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserIntGtComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserIntGtComparator(const int search_term); explicit FilterParserIntGtComparator(const int search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
int search_term_; int search_term_;
Q_DISABLE_COPY(FilterParserIntGtComparator) Q_DISABLE_COPY(FilterParserIntGtComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserIntLeComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserIntLeComparator(const int search_term); explicit FilterParserIntLeComparator(const int search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
int search_term_; int search_term_;
Q_DISABLE_COPY(FilterParserIntLeComparator) Q_DISABLE_COPY(FilterParserIntLeComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserIntLtComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserIntLtComparator(const int search_term); explicit FilterParserIntLtComparator(const int search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
int search_term_; int search_term_;
Q_DISABLE_COPY(FilterParserIntLtComparator) Q_DISABLE_COPY(FilterParserIntLtComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserIntNeComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserIntNeComparator(const int search_term); explicit FilterParserIntNeComparator(const int search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
int search_term_; int search_term_;
Q_DISABLE_COPY(FilterParserIntNeComparator) Q_DISABLE_COPY(FilterParserIntNeComparator)

View File

@@ -27,6 +27,7 @@ class FilterParserSearchTermComparator {
explicit FilterParserSearchTermComparator(); explicit FilterParserSearchTermComparator();
virtual ~FilterParserSearchTermComparator(); virtual ~FilterParserSearchTermComparator();
virtual bool Matches(const QVariant &value) const = 0; virtual bool Matches(const QVariant &value) const = 0;
private: private:
Q_DISABLE_COPY(FilterParserSearchTermComparator) Q_DISABLE_COPY(FilterParserSearchTermComparator)
}; };

View File

@@ -28,6 +28,7 @@ class FilterParserTextContainsComparator : public FilterParserSearchTermComparat
public: public:
explicit FilterParserTextContainsComparator(const QString &search_term); explicit FilterParserTextContainsComparator(const QString &search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
QString search_term_; QString search_term_;
Q_DISABLE_COPY(FilterParserTextContainsComparator) Q_DISABLE_COPY(FilterParserTextContainsComparator)

View File

@@ -29,6 +29,7 @@ class FilterParserTextEqComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserTextEqComparator(const QString &search_term); explicit FilterParserTextEqComparator(const QString &search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
QString search_term_; QString search_term_;
Q_DISABLE_COPY(FilterParserTextEqComparator) Q_DISABLE_COPY(FilterParserTextEqComparator)

View File

@@ -29,6 +29,7 @@ class FilterParserTextNeComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserTextNeComparator(const QString &search_term); explicit FilterParserTextNeComparator(const QString &search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
QString search_term_; QString search_term_;
Q_DISABLE_COPY(FilterParserTextNeComparator) Q_DISABLE_COPY(FilterParserTextNeComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserUIntEqComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserUIntEqComparator(const uint search_term); explicit FilterParserUIntEqComparator(const uint search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
uint search_term_; uint search_term_;
Q_DISABLE_COPY(FilterParserUIntEqComparator) Q_DISABLE_COPY(FilterParserUIntEqComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserUIntGeComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserUIntGeComparator(const uint search_term); explicit FilterParserUIntGeComparator(const uint search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
uint search_term_; uint search_term_;
Q_DISABLE_COPY(FilterParserUIntGeComparator) Q_DISABLE_COPY(FilterParserUIntGeComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserUIntGtComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserUIntGtComparator(const uint search_term); explicit FilterParserUIntGtComparator(const uint search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
uint search_term_; uint search_term_;
Q_DISABLE_COPY(FilterParserUIntGtComparator) Q_DISABLE_COPY(FilterParserUIntGtComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserUIntLeComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserUIntLeComparator(const uint search_term); explicit FilterParserUIntLeComparator(const uint search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
uint search_term_; uint search_term_;
Q_DISABLE_COPY(FilterParserUIntLeComparator) Q_DISABLE_COPY(FilterParserUIntLeComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserUIntLtComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserUIntLtComparator(const uint search_term); explicit FilterParserUIntLtComparator(const uint search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
uint search_term_; uint search_term_;
Q_DISABLE_COPY(FilterParserUIntLtComparator) Q_DISABLE_COPY(FilterParserUIntLtComparator)

View File

@@ -28,6 +28,7 @@ class FilterParserUIntNeComparator : public FilterParserSearchTermComparator {
public: public:
explicit FilterParserUIntNeComparator(const uint search_term); explicit FilterParserUIntNeComparator(const uint search_term);
bool Matches(const QVariant &value) const override; bool Matches(const QVariant &value) const override;
private: private:
uint search_term_; uint search_term_;
Q_DISABLE_COPY(FilterParserUIntNeComparator) Q_DISABLE_COPY(FilterParserUIntNeComparator)

View File

@@ -54,7 +54,6 @@ class GlobalShortcut : public QObject, QAbstractNativeEventFilter {
void activated(); void activated();
private: private:
static void activateShortcut(const quint32 native_key, const quint32 native_mods); static void activateShortcut(const quint32 native_key, const quint32 native_mods);
static int nativeModifiers(const Qt::KeyboardModifiers qt_mods); static int nativeModifiers(const Qt::KeyboardModifiers qt_mods);

View File

@@ -43,7 +43,7 @@ using namespace Qt::Literals::StringLiterals;
namespace { namespace {
constexpr char kKGlobalAccelService[] = "org.kde.kglobalaccel"; constexpr char kKGlobalAccelService[] = "org.kde.kglobalaccel";
constexpr char kKGlobalAccelPath[] = "/kglobalaccel"; constexpr char kKGlobalAccelPath[] = "/kglobalaccel";
} } // namespace
GlobalShortcutsBackendKGlobalAccel::GlobalShortcutsBackendKGlobalAccel(GlobalShortcutsManager *manager, QObject *parent) GlobalShortcutsBackendKGlobalAccel::GlobalShortcutsBackendKGlobalAccel(GlobalShortcutsManager *manager, QObject *parent)
: GlobalShortcutsBackend(manager, GlobalShortcutsBackend::Type::KGlobalAccel, parent), : GlobalShortcutsBackend(manager, GlobalShortcutsBackend::Type::KGlobalAccel, parent),

View File

@@ -37,7 +37,7 @@
#include "globalshortcutsbackend.h" #include "globalshortcutsbackend.h"
#ifdef HAVE_KGLOBALACCEL_GLOBALSHORTCUTS #ifdef HAVE_KGLOBALACCEL_GLOBALSHORTCUTS
#include "globalshortcutsbackend-kglobalaccel.h" # include "globalshortcutsbackend-kglobalaccel.h"
#endif #endif
#ifdef HAVE_X11_GLOBALSHORTCUTS #ifdef HAVE_X11_GLOBALSHORTCUTS

View File

@@ -52,7 +52,7 @@ class Lazy {
return *ptr_; return *ptr_;
} }
T* operator->() const { return get(); } T *operator->() const { return get(); }
// Returns true if the object is initialized. // Returns true if the object is initialized.
explicit operator bool() const { return ptr_ != nullptr; } explicit operator bool() const { return ptr_ != nullptr; }

View File

@@ -53,7 +53,7 @@ class ScopedGObject {
} }
T *get() const { return object_; } T *get() const { return object_; }
operator T*() const { return get(); } operator T *() const { return get(); }
T *operator*() const { return get(); } T *operator*() const { return get(); }
operator bool() const { return get(); } operator bool() const { return get(); }

View File

@@ -54,7 +54,6 @@ class JsonLyricsProvider : public LyricsProvider {
virtual JsonObjectResult GetJsonObject(QNetworkReply *reply); virtual JsonObjectResult GetJsonObject(QNetworkReply *reply);
virtual QJsonValue GetJsonValue(const QJsonObject &json_object, const QString &name); virtual QJsonValue GetJsonValue(const QJsonObject &json_object, const QString &name);
virtual QJsonArray GetJsonArray(const QJsonObject &json_object, const QString &name); virtual QJsonArray GetJsonArray(const QJsonObject &json_object, const QString &name);
}; };
#endif // JSONLYRICSPROVIDER_H #endif // JSONLYRICSPROVIDER_H

View File

@@ -281,16 +281,16 @@ int main(int argc, char *argv[]) {
// Use system UI languages // Use system UI languages
if (languages.isEmpty()) { if (languages.isEmpty()) {
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) # if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
languages = QLocale::system().uiLanguages(QLocale::TagSeparator::Underscore); languages = QLocale::system().uiLanguages(QLocale::TagSeparator::Underscore);
#else # else
const QStringList system_languages = QLocale::system().uiLanguages(); const QStringList system_languages = QLocale::system().uiLanguages();
for (const QString &language : system_languages) { for (const QString &language : system_languages) {
QString language_underscore = language; QString language_underscore = language;
language_underscore = language_underscore.replace(u'-', u'_'); language_underscore = language_underscore.replace(u'-', u'_');
languages << language_underscore; languages << language_underscore;
} }
#endif # endif
} }
if (languages.isEmpty()) { if (languages.isEmpty()) {
@@ -323,13 +323,13 @@ int main(int argc, char *argv[]) {
} }
} }
#ifdef HAVE_QTSPARKLE # ifdef HAVE_QTSPARKLE
for (const QString &language : std::as_const(languages)) { for (const QString &language : std::as_const(languages)) {
if (qtsparkle::LoadTranslations(language)) { if (qtsparkle::LoadTranslations(language)) {
break; break;
} }
} }
#endif // HAVE_QTSPARKLE # endif // HAVE_QTSPARKLE
#endif // HAVE_TRANSLATIONS #endif // HAVE_TRANSLATIONS

View File

@@ -58,8 +58,8 @@
#include "covermanager/albumcoverloaderresult.h" #include "covermanager/albumcoverloaderresult.h"
#ifdef __GNUC__ #ifdef __GNUC__
#pragma GCC diagnostic push # pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds" # pragma GCC diagnostic ignored "-Warray-bounds"
#endif #endif
#include "mpris2_player.h" #include "mpris2_player.h"
@@ -68,7 +68,7 @@
#include "mpris2_tracklist.h" #include "mpris2_tracklist.h"
#ifdef __GNUC__ #ifdef __GNUC__
#pragma GCC diagnostic pop # pragma GCC diagnostic pop
#endif #endif
using namespace Qt::Literals::StringLiterals; using namespace Qt::Literals::StringLiterals;

View File

@@ -61,8 +61,8 @@ Q_DECLARE_METATYPE(MprisPlaylist)
Q_DECLARE_METATYPE(MprisPlaylistList) Q_DECLARE_METATYPE(MprisPlaylistList)
#ifdef __GNUC__ #ifdef __GNUC__
#pragma GCC diagnostic push # pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds" # pragma GCC diagnostic ignored "-Warray-bounds"
#endif #endif
struct MaybePlaylist { struct MaybePlaylist {
@@ -72,7 +72,7 @@ struct MaybePlaylist {
Q_DECLARE_METATYPE(MaybePlaylist) Q_DECLARE_METATYPE(MaybePlaylist)
#ifdef __GNUC__ #ifdef __GNUC__
#pragma GCC diagnostic pop # pragma GCC diagnostic pop
#endif #endif
QDBusArgument &operator<<(QDBusArgument &arg, const MprisPlaylist &playlist); QDBusArgument &operator<<(QDBusArgument &arg, const MprisPlaylist &playlist);
@@ -254,7 +254,6 @@ class Mpris2 : public QObject {
QString desktopfilepath_; QString desktopfilepath_;
QVariantMap last_metadata_; QVariantMap last_metadata_;
}; };
} // namespace mpris } // namespace mpris

View File

@@ -78,7 +78,7 @@ class Organize : public QObject {
void Start(); void Start();
Q_SIGNALS: Q_SIGNALS:
void Finished(const QStringList &files_with_errors, const QStringList&); void Finished(const QStringList &files_with_errors, const QStringList &log);
void FileCopied(const int database_id); void FileCopied(const int database_id);
void SongPathChanged(const Song &song, const QFileInfo &new_file, const std::optional<int> new_collection_directory_id); void SongPathChanged(const Song &song, const QFileInfo &new_file, const std::optional<int> new_collection_directory_id);

View File

@@ -80,7 +80,7 @@ using namespace Qt::Literals::StringLiterals;
namespace { namespace {
constexpr char kSettingsGroup[] = "OrganizeDialog"; constexpr char kSettingsGroup[] = "OrganizeDialog";
constexpr char kDefaultFormat[] = "%albumartist/%album{ (Disc %disc)}/{%track - }{%albumartist - }%album{ (Disc %disc)} - %title.%extension"; constexpr char kDefaultFormat[] = "%albumartist/%album{ (Disc %disc)}/{%track - }{%albumartist - }%album{ (Disc %disc)} - %title.%extension";
} } // namespace
OrganizeDialog::OrganizeDialog(const SharedPtr<TaskManager> task_manager, OrganizeDialog::OrganizeDialog(const SharedPtr<TaskManager> task_manager,
const SharedPtr<TagReaderClient> tagreader_client, const SharedPtr<TagReaderClient> tagreader_client,

View File

@@ -103,8 +103,8 @@ class OSDPretty : public QWidget {
protected: protected:
void paintEvent(QPaintEvent *e) override; void paintEvent(QPaintEvent *e) override;
void enterEvent(QEnterEvent*) override; void enterEvent(QEnterEvent *e) override;
void leaveEvent(QEvent*) override; void leaveEvent(QEvent *e) override;
void mousePressEvent(QMouseEvent *e) override; void mousePressEvent(QMouseEvent *e) override;
void showEvent(QShowEvent *e) override; void showEvent(QShowEvent *e) override;
void mouseMoveEvent(QMouseEvent *e) override; void mouseMoveEvent(QMouseEvent *e) override;

View File

@@ -71,7 +71,7 @@ class PlaylistContainer : public QWidget {
protected: protected:
// QWidget // QWidget
void resizeEvent(QResizeEvent*) override; void resizeEvent(QResizeEvent *e) override;
private Q_SLOTS: private Q_SLOTS:
void NewPlaylist(); void NewPlaylist();

View File

@@ -45,7 +45,7 @@ class PlaylistHeader : public StretchHeaderView {
// QWidget // QWidget
void contextMenuEvent(QContextMenuEvent *e) override; void contextMenuEvent(QContextMenuEvent *e) override;
void enterEvent(QEnterEvent*) override; void enterEvent(QEnterEvent *e) override;
Q_SIGNALS: Q_SIGNALS:
void SectionVisibilityChanged(const int logical_index, const bool visible); void SectionVisibilityChanged(const int logical_index, const bool visible);
@@ -75,7 +75,6 @@ class PlaylistHeader : public StretchHeaderView {
QAction *action_align_center_; QAction *action_align_center_;
QAction *action_align_right_; QAction *action_align_right_;
QList<QAction*> show_actions_; QList<QAction*> show_actions_;
}; };
#endif // PLAYLISTHEADER_H #endif // PLAYLISTHEADER_H

View File

@@ -53,7 +53,7 @@ class PlaylistListView : public AutoExpandingTreeView {
protected: protected:
// QWidget // QWidget
void paintEvent(QPaintEvent *event) override; void paintEvent(QPaintEvent *event) override;
void selectionChanged(const QItemSelection&, const QItemSelection&) override; void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) override;
void dragEnterEvent(QDragEnterEvent *e) override; void dragEnterEvent(QDragEnterEvent *e) override;
void dragMoveEvent(QDragMoveEvent *e) override; void dragMoveEvent(QDragMoveEvent *e) override;

View File

@@ -136,7 +136,7 @@ class PlaylistView : public QTreeView {
void timerEvent(QTimerEvent *event) override; void timerEvent(QTimerEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override; void mouseMoveEvent(QMouseEvent *event) override;
void mousePressEvent(QMouseEvent *event) override; void mousePressEvent(QMouseEvent *event) override;
void leaveEvent(QEvent*) override; void leaveEvent(QEvent *e) override;
void paintEvent(QPaintEvent *event) override; void paintEvent(QPaintEvent *event) override;
void dragMoveEvent(QDragMoveEvent *event) override; void dragMoveEvent(QDragMoveEvent *event) override;
void dragEnterEvent(QDragEnterEvent *event) override; void dragEnterEvent(QDragEnterEvent *event) override;

Some files were not shown because too many files have changed in this diff Show More