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);
action->setCheckable(true);
actions_ << action;
QObject::connect(action, &QAction::triggered, [this, id]() { ChangeAnalyzer(id); } );
QObject::connect(action, &QAction::triggered, [this, id]() { ChangeAnalyzer(id); });
}
#endif // ANALYZERCONTAINER_H

View File

@@ -107,7 +107,6 @@ void BlockAnalyzer::resizeEvent(QResizeEvent *e) {
}
drawBackground();
}
void BlockAnalyzer::determineStep() {
@@ -119,7 +118,6 @@ void BlockAnalyzer::determineStep() {
const double fallTime = static_cast<double>(timeout() < 20 ? 20 * rows_ : 30 * rows_);
step_ = static_cast<double>(rows_ * timeout()) / fallTime;
}
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!
s.resize(scope_.size() <= kMaxColumns / 2 ? kMaxColumns / 2 : scope_.size());
}
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_);
}
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;
}
}
}
/**
@@ -337,7 +332,6 @@ QColor ensureContrast(const QColor &bg, const QColor &fg, int amount) {
}
return Qt::blue;
}
void BlockAnalyzer::paletteChange(const QPalette &_palette) {
@@ -388,7 +382,6 @@ void BlockAnalyzer::paletteChange(const QPalette &_palette) {
}
drawBackground();
}
void BlockAnalyzer::drawBackground() {
@@ -411,5 +404,4 @@ void BlockAnalyzer::drawBackground() {
p.fillRect(x * (kWidth + 1), y * (kHeight + 1) + y_, kWidth, kHeight, bgdark);
}
}
}

View File

@@ -41,14 +41,14 @@ class BlockAnalyzer : public AnalyzerBase {
Q_OBJECT
public:
Q_INVOKABLE explicit BlockAnalyzer(QWidget*);
Q_INVOKABLE explicit BlockAnalyzer(QWidget *parent);
static const char *kName;
protected:
void transform(Scope&) override;
void transform(Scope &s) 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);
void framerateChanged() override;

View File

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

View File

@@ -55,7 +55,7 @@ class FHT {
/**
* Recursive in-place Hartley transform. For internal use only!
*/
void _transform(float*, int, int);
void _transform(float *p, int n, int k);
public:
/**
@@ -68,7 +68,7 @@ class FHT {
~FHT();
int sizeExp() const;
int size() const;
void scale(float*, float) const;
void scale(float *p, float d) const;
/**
* Exponentially Weighted Moving Average (EWMA) filter.
@@ -90,12 +90,12 @@ class FHT {
/**
* Semi-logarithmic audio spectrum.
*/
void semiLogSpectrum(float*);
void semiLogSpectrum(float *p);
/**
* Fourier spectrum.
*/
void spectrum(float*);
void spectrum(float *p);
/**
* Calculates a mathematically correct FFT power spectrum.
@@ -103,7 +103,7 @@ class FHT {
* and factor the 0.5 in the final scaling factor.
* @see FHT::power2()
*/
void power(float*);
void power(float *p);
/**
* 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.
* @see FHT::power()
*/
void power2(float*);
void power2(float *p);
/**
* 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

View File

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

View File

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

View File

@@ -686,8 +686,8 @@ void CollectionModel::RemoveSongsInternal(const SongList &songs) {
if (!divider_nodes_.contains(divider_key)) continue;
// Look to see if there are any other items still under this divider
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; })) {
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; })) {
continue;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -503,7 +503,9 @@ bool Database::IntegrityCheck(const QSqlDatabase &db) {
break;
}
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);
error_reported = true;
}

View File

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

View File

@@ -27,6 +27,7 @@ class IconLoader {
public:
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);
private:
explicit IconLoader() {}
static bool system_icons_;

View File

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

View File

@@ -285,7 +285,6 @@ class MainWindow : public QMainWindow, public PlatformInterface {
void Raise();
private:
void SaveSettings();
static void ApplyAddBehaviour(const BehaviourSettings::AddBehaviour b, MimeData *mimedata);
@@ -415,7 +414,6 @@ class MainWindow : public QMainWindow, public PlatformInterface {
bool playlists_loaded_;
bool delete_files_;
std::optional<CommandlineOptions> options_;
};
#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 FatalError();
void ValidSongRequested(const QUrl&);
void InvalidSongRequested(const QUrl&);
void ValidSongRequested(const QUrl &url);
void InvalidSongRequested(const QUrl &url);
void HandleLoadResult(const UrlHandler::LoadResult &result);

View File

@@ -40,7 +40,6 @@ class QtFSListener : public FileSystemWatcherInterface {
private:
QFileSystemWatcher watcher_;
};
#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
// no longer needed.
void Recycle();
private:
NSAutoreleasePool *autorelease_pool_;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -23,8 +23,8 @@
#define FILESYSTEMDEVICE_H
#ifdef _MSC_VER // FIXME
#pragma warning(push)
#pragma warning(disable : 4250)
# pragma warning(push)
# pragma warning(disable : 4250)
#endif
#include "config.h"
@@ -84,7 +84,7 @@ class FilesystemDevice : public ConnectedDevice, public virtual FilesystemMusicS
};
#ifdef _MSC_VER
#pragma warning(pop)
# pragma warning(pop)
#endif
#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) {
@@ -484,21 +487,21 @@ void GioLister::DeviceInfo::ReadMountInfo(GMount *mount) {
}
#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);
#else
# else
GUnixMountEntry *unix_mount = g_unix_mount_for(g_file_get_path(root), nullptr);
#endif
# endif
if (unix_mount) {
// 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.
#ifdef GLIB_VERSION_2_84
# ifdef GLIB_VERSION_2_84
is_system_internal = g_unix_mount_entry_is_system_internal(unix_mount);
g_unix_mount_entry_free(unix_mount);
#else
# else
is_system_internal = g_unix_mount_is_system_internal(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.
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 VolumeRemovedCallback(GVolumeMonitor *volume_monitor, GVolume *volume, gpointer instance);
static void MountAddedCallback(GVolumeMonitor *volume_monitor, GMount*, gpointer instance);
static void MountChangedCallback(GVolumeMonitor *volume_monitor, GMount*, gpointer instance);
static void MountAddedCallback(GVolumeMonitor *volume_monitor, GMount *mount, gpointer instance);
static void MountChangedCallback(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);

View File

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

View File

@@ -49,19 +49,19 @@ enum {
} // namespace
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast"
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wold-style-cast"
#endif
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4514)
# pragma warning(push)
# pragma warning(disable : 4514)
#endif
G_DEFINE_TYPE(GstStrawberryFastSpectrum, gst_strawberry_fastspectrum, GST_TYPE_AUDIO_FILTER)
#ifdef __GNUC__
#pragma GCC diagnostic pop
# pragma GCC diagnostic pop
#endif
#ifdef _MSC_VER
#pragma warning(pop)
# pragma warning(pop)
#endif
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) {
(void) max_value;
(void)max_value;
const gfloat *in = reinterpret_cast<const gfloat*>(_in);
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) {
(void) max_value;
(void)max_value;
const gdouble *in = reinterpret_cast<const gdouble*>(_in);
guint ip = 0;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -281,16 +281,16 @@ int main(int argc, char *argv[]) {
// Use system UI languages
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);
#else
# else
const QStringList system_languages = QLocale::system().uiLanguages();
for (const QString &language : system_languages) {
QString language_underscore = language;
language_underscore = language_underscore.replace(u'-', u'_');
languages << language_underscore;
}
#endif
# endif
}
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)) {
if (qtsparkle::LoadTranslations(language)) {
break;
}
}
#endif // HAVE_QTSPARKLE
# endif // HAVE_QTSPARKLE
#endif // HAVE_TRANSLATIONS

View File

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

View File

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

View File

@@ -78,7 +78,7 @@ class Organize : public QObject {
void Start();
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 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 {
constexpr char kSettingsGroup[] = "OrganizeDialog";
constexpr char kDefaultFormat[] = "%albumartist/%album{ (Disc %disc)}/{%track - }{%albumartist - }%album{ (Disc %disc)} - %title.%extension";
}
} // namespace
OrganizeDialog::OrganizeDialog(const SharedPtr<TaskManager> task_manager,
const SharedPtr<TagReaderClient> tagreader_client,

View File

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

View File

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

View File

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

View File

@@ -53,7 +53,7 @@ class PlaylistListView : public AutoExpandingTreeView {
protected:
// QWidget
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 dragMoveEvent(QDragMoveEvent *e) override;

View File

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

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