Fix parameter name mispatches
This commit is contained in:
@@ -80,7 +80,7 @@ class CollectionFilterWidget : public QWidget {
|
||||
QString group_by(const int number);
|
||||
|
||||
public slots:
|
||||
void SetQueryMode(QueryOptions::QueryMode view);
|
||||
void SetQueryMode(QueryOptions::QueryMode query_mode);
|
||||
void FocusOnFilter(QKeyEvent *e);
|
||||
|
||||
signals:
|
||||
|
||||
@@ -171,7 +171,7 @@ class CollectionModel : public SimpleTreeModel<CollectionItem> {
|
||||
static QString PrettyAlbumDisc(const QString &album, const int disc);
|
||||
static QString PrettyYearAlbumDisc(const int year, const QString &album, const int disc);
|
||||
static QString SortText(QString text);
|
||||
static QString SortTextForNumber(const int year);
|
||||
static QString SortTextForNumber(const int number);
|
||||
static QString SortTextForArtist(QString artist);
|
||||
static QString SortTextForSong(const Song &song);
|
||||
static QString SortTextForYear(const int year);
|
||||
@@ -200,7 +200,7 @@ class CollectionModel : public SimpleTreeModel<CollectionItem> {
|
||||
|
||||
protected:
|
||||
void LazyPopulate(CollectionItem *item) { LazyPopulate(item, true); }
|
||||
void LazyPopulate(CollectionItem *item, const bool signal);
|
||||
void LazyPopulate(CollectionItem *parent, const bool signal);
|
||||
|
||||
private slots:
|
||||
// From CollectionBackend
|
||||
|
||||
@@ -150,7 +150,7 @@ class CollectionWatcher : public QObject {
|
||||
|
||||
private slots:
|
||||
void Exit();
|
||||
void DirectoryChanged(const QString &path);
|
||||
void DirectoryChanged(const QString &subdir);
|
||||
void IncrementalScanNow();
|
||||
void FullScanNow();
|
||||
void RescanTracksNow();
|
||||
|
||||
@@ -304,7 +304,7 @@ void ContextAlbumsModel::PostQuery(CollectionItem *parent, const ContextAlbumsMo
|
||||
|
||||
}
|
||||
|
||||
void ContextAlbumsModel::LazyPopulate(CollectionItem *parent, bool signal) {
|
||||
void ContextAlbumsModel::LazyPopulate(CollectionItem *parent, const bool signal) {
|
||||
|
||||
if (parent->lazy_loaded) return;
|
||||
parent->lazy_loaded = true;
|
||||
|
||||
@@ -97,7 +97,7 @@ class ContextAlbumsModel : public SimpleTreeModel<CollectionItem> {
|
||||
|
||||
protected:
|
||||
void LazyPopulate(CollectionItem *item) { LazyPopulate(item, true); }
|
||||
void LazyPopulate(CollectionItem *item, bool signal);
|
||||
void LazyPopulate(CollectionItem *parent, const bool signal);
|
||||
|
||||
private slots:
|
||||
void AlbumCoverLoaded(const quint64 id, const AlbumCoverLoaderResult &result);
|
||||
|
||||
@@ -370,9 +370,9 @@ bool MergedProxyModel::hasChildren(const QModelIndex &parent) const {
|
||||
|
||||
}
|
||||
|
||||
QVariant MergedProxyModel::data(const QModelIndex &proxyIndex, int role) const {
|
||||
QVariant MergedProxyModel::data(const QModelIndex &proxy_index, int role) const {
|
||||
|
||||
QModelIndex source_index = mapToSource(proxyIndex);
|
||||
QModelIndex source_index = mapToSource(proxy_index);
|
||||
if (!IsKnownModel(source_index.model())) return QVariant();
|
||||
|
||||
return source_index.model()->data(source_index, role);
|
||||
|
||||
@@ -60,9 +60,9 @@ class MergedProxyModel : public QAbstractProxyModel {
|
||||
QModelIndex parent(const QModelIndex &child) const;
|
||||
int rowCount(const QModelIndex &parent) const;
|
||||
int columnCount(const QModelIndex &parent) const;
|
||||
QVariant data(const QModelIndex &proxyIndex, int role = Qt::DisplayRole) const;
|
||||
QVariant data(const QModelIndex &proxy_index, int role = Qt::DisplayRole) const;
|
||||
bool hasChildren(const QModelIndex &parent) const;
|
||||
QMap<int, QVariant> itemData(const QModelIndex &proxyIndex) const;
|
||||
QMap<int, QVariant> itemData(const QModelIndex &proxy_index) const;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role);
|
||||
QStringList mimeTypes() const;
|
||||
@@ -74,9 +74,9 @@ class MergedProxyModel : public QAbstractProxyModel {
|
||||
// QAbstractProxyModel
|
||||
// Note that these implementations of map{To,From}Source will not always give you an index in sourceModel(),
|
||||
// you might get an index in one of the child models instead.
|
||||
QModelIndex mapFromSource(const QModelIndex &sourceIndex) const;
|
||||
QModelIndex mapToSource(const QModelIndex &proxyIndex) const;
|
||||
void setSourceModel(QAbstractItemModel *sourceModel);
|
||||
QModelIndex mapFromSource(const QModelIndex &source_index) const;
|
||||
QModelIndex mapToSource(const QModelIndex &proxy_index) const;
|
||||
void setSourceModel(QAbstractItemModel *source_model);
|
||||
|
||||
// Convenience functions that call map{To,From}Source multiple times.
|
||||
QModelIndexList mapFromSource(const QModelIndexList &source_indexes) const;
|
||||
|
||||
@@ -143,9 +143,9 @@ class Mpris2 : public QObject {
|
||||
QString LoopStatus() const;
|
||||
void SetLoopStatus(const QString &value);
|
||||
double Rate() const;
|
||||
void SetRate(double value);
|
||||
void SetRate(double rate);
|
||||
bool Shuffle() const;
|
||||
void SetShuffle(bool value);
|
||||
void SetShuffle(bool enable);
|
||||
QVariantMap Metadata() const;
|
||||
double Volume() const;
|
||||
void SetVolume(double value);
|
||||
|
||||
@@ -116,7 +116,7 @@ class SongLoader : public QObject {
|
||||
|
||||
// GStreamer callbacks
|
||||
static void TypeFound(GstElement *typefind, uint probability, GstCaps *caps, void *self);
|
||||
static GstPadProbeReturn DataReady(GstPad*, GstPadProbeInfo *buf, gpointer self);
|
||||
static GstPadProbeReturn DataReady(GstPad*, GstPadProbeInfo *info, gpointer self);
|
||||
static GstBusSyncReply BusCallbackSync(GstBus*, GstMessage*, gpointer);
|
||||
static gboolean BusCallback(GstBus*, GstMessage*, gpointer);
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class UrlHandler : public QObject {
|
||||
Error,
|
||||
};
|
||||
|
||||
LoadResult(const QUrl &original_url = QUrl(), const Type type = NoMoreTracks, const QUrl &stream_url = QUrl(), const Song::FileType filetype = Song::FileType_Stream, const int samplerate = -1, const int bitdepth = -1, const qint64 length_nanosec_ = -1, const QString error = QString());
|
||||
LoadResult(const QUrl &original_url = QUrl(), const Type type = NoMoreTracks, const QUrl &stream_url = QUrl(), const Song::FileType filetype = Song::FileType_Stream, const int samplerate = -1, const int bit_depth = -1, const qint64 length_nanosec = -1, const QString error = QString());
|
||||
|
||||
// The url that the playlist item has in Url().
|
||||
// Might be something unplayable like lastfm://...
|
||||
|
||||
@@ -461,7 +461,7 @@ void OpenInFileBrowser(const QList<QUrl> &urls) {
|
||||
|
||||
}
|
||||
|
||||
QByteArray Hmac(const QByteArray &key, const QByteArray &data, HashFunction method) {
|
||||
QByteArray Hmac(const QByteArray &key, const QByteArray &data, const HashFunction method) {
|
||||
|
||||
const int kBlockSize = 64; // bytes
|
||||
Q_ASSERT(key.length() <= kBlockSize);
|
||||
|
||||
@@ -68,14 +68,14 @@ bool RemoveRecursive(const QString &path);
|
||||
bool CopyRecursive(const QString &source, const QString &destination);
|
||||
bool Copy(QIODevice *source, QIODevice *destination);
|
||||
|
||||
void OpenInFileBrowser(const QList<QUrl> &filenames);
|
||||
void OpenInFileBrowser(const QList<QUrl> &urls);
|
||||
|
||||
enum HashFunction {
|
||||
Md5_Algo,
|
||||
Sha256_Algo,
|
||||
Sha1_Algo,
|
||||
};
|
||||
QByteArray Hmac(const QByteArray &key, const QByteArray &data, HashFunction algo);
|
||||
QByteArray Hmac(const QByteArray &key, const QByteArray &data, const HashFunction method);
|
||||
QByteArray HmacMd5(const QByteArray &key, const QByteArray &data);
|
||||
QByteArray HmacSha256(const QByteArray &key, const QByteArray &data);
|
||||
QByteArray HmacSha1(const QByteArray &key, const QByteArray &data);
|
||||
|
||||
@@ -104,7 +104,7 @@ class AlbumCoverFetcher : public QObject {
|
||||
|
||||
private slots:
|
||||
void SingleSearchFinished(const quint64, const CoverSearchResults results);
|
||||
void SingleCoverFetched(const quint64, const QUrl &cover_url, const QImage &cover);
|
||||
void SingleCoverFetched(const quint64, const QUrl &cover_url, const QImage &image);
|
||||
void StartRequests();
|
||||
|
||||
private:
|
||||
|
||||
@@ -892,7 +892,7 @@ void AlbumCoverManager::ExportCovers() {
|
||||
|
||||
}
|
||||
|
||||
void AlbumCoverManager::UpdateExportStatus(int exported, int skipped, int max) {
|
||||
void AlbumCoverManager::UpdateExportStatus(const int exported, const int skipped, const int max) {
|
||||
|
||||
progress_bar_->setValue(exported);
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ class AlbumCoverManager : public QMainWindow {
|
||||
void LoadSelectedToPlaylist();
|
||||
|
||||
void UpdateCoverInList(QListWidgetItem *item, const QUrl &cover);
|
||||
void UpdateExportStatus(int exported, int bad, int count);
|
||||
void UpdateExportStatus(const int exported, const int skipped, const int max);
|
||||
|
||||
private:
|
||||
Ui_CoverManager *ui_;
|
||||
|
||||
@@ -74,7 +74,7 @@ class DeviceLister : public QObject {
|
||||
public slots:
|
||||
virtual void UpdateDeviceFreeSpace(const QString &id) = 0;
|
||||
virtual void ShutDown() {}
|
||||
virtual void MountDevice(const QString &id, const int ret);
|
||||
virtual void MountDevice(const QString &id, const int request_id);
|
||||
virtual void UnmountDevice(const QString &id) { Q_UNUSED(id); }
|
||||
virtual void Exit();
|
||||
|
||||
|
||||
@@ -920,7 +920,7 @@ void DeviceManager::DeviceSongCountUpdated(int count) {
|
||||
|
||||
}
|
||||
|
||||
void DeviceManager::LazyPopulate(DeviceInfo *parent, bool signal) {
|
||||
void DeviceManager::LazyPopulate(DeviceInfo *parent, const bool signal) {
|
||||
|
||||
Q_UNUSED(signal);
|
||||
if (parent->lazy_loaded) return;
|
||||
|
||||
@@ -113,7 +113,7 @@ class DeviceManager : public SimpleTreeModel<DeviceInfo> {
|
||||
void SetDeviceOptions(QModelIndex idx, const QString &friendly_name, const QString &icon_name, MusicStorage::TranscodeMode mode, Song::FileType format);
|
||||
|
||||
// QAbstractItemModel
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||
QVariant data(const QModelIndex &idx, int role = Qt::DisplayRole) const;
|
||||
|
||||
public slots:
|
||||
void Unmount(QModelIndex idx);
|
||||
@@ -141,7 +141,7 @@ class DeviceManager : public SimpleTreeModel<DeviceInfo> {
|
||||
|
||||
protected:
|
||||
void LazyPopulate(DeviceInfo *item) { LazyPopulate(item, true); }
|
||||
void LazyPopulate(DeviceInfo *item, bool signal);
|
||||
void LazyPopulate(DeviceInfo *parent, const bool signal);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@ void DeviceView::DeleteFinished(const SongList &songs_with_errors) {
|
||||
|
||||
}
|
||||
|
||||
bool DeviceView::CanRecursivelyExpand(const QModelIndex &index) const {
|
||||
bool DeviceView::CanRecursivelyExpand(const QModelIndex &idx) const {
|
||||
// Never expand devices
|
||||
return index.parent().isValid();
|
||||
return idx.parent().isValid();
|
||||
}
|
||||
|
||||
@@ -245,8 +245,8 @@ void Udisks2Lister::DBusInterfaceAdded(const QDBusObjectPath &path, const Interf
|
||||
}
|
||||
}
|
||||
|
||||
void Udisks2Lister::DBusInterfaceRemoved(const QDBusObjectPath &path, const QStringList &ifaces) {
|
||||
Q_UNUSED(ifaces);
|
||||
void Udisks2Lister::DBusInterfaceRemoved(const QDBusObjectPath &path, const QStringList &interfaces) {
|
||||
Q_UNUSED(interfaces);
|
||||
if (!isPendingJob(path)) RemoveDevice(path);
|
||||
}
|
||||
|
||||
|
||||
@@ -71,8 +71,8 @@ class Udisks2Lister : public DeviceLister {
|
||||
bool Init() override;
|
||||
|
||||
private slots:
|
||||
void DBusInterfaceAdded(const QDBusObjectPath &path, const InterfacesAndProperties &ifaces);
|
||||
void DBusInterfaceRemoved(const QDBusObjectPath &path, const QStringList &ifaces);
|
||||
void DBusInterfaceAdded(const QDBusObjectPath &path, const InterfacesAndProperties &interfaces);
|
||||
void DBusInterfaceRemoved(const QDBusObjectPath &path, const QStringList &interfaces);
|
||||
void JobCompleted(bool success, const QString &message);
|
||||
|
||||
private:
|
||||
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
|
||||
// Plays a media stream represented with the URL 'u' from the given 'beginning' to the given 'end' (usually from 0 to a song's length).
|
||||
// Both markers should be passed in nanoseconds. 'end' can be negative, indicating that the real length of 'u' stream is unknown.
|
||||
bool Play(const QUrl &stream_url, const QUrl &original_url, const TrackChangeFlags c, const bool force_stop_at_end, const quint64 beginning_nanosec, const qint64 end_nanosec);
|
||||
bool Play(const QUrl &stream_url, const QUrl &original_url, const TrackChangeFlags flags, const bool force_stop_at_end, const quint64 beginning_nanosec, const qint64 end_nanosec);
|
||||
void SetVolume(const uint value);
|
||||
static uint MakeVolumeLogarithmic(const uint volume);
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ class GstEngine : public Engine::Base, public GstBufferConsumer {
|
||||
void SetEqualizerEnabled(const bool);
|
||||
|
||||
// Set equalizer preamp and gains, range -100..100. Gains are 10 values.
|
||||
void SetEqualizerParameters(const int preamp, const QList<int> &bandGains);
|
||||
void SetEqualizerParameters(const int preamp, const QList<int> &band_gains);
|
||||
|
||||
void AddBufferConsumer(GstBufferConsumer *consumer);
|
||||
void RemoveBufferConsumer(GstBufferConsumer *consumer);
|
||||
|
||||
@@ -1221,7 +1221,7 @@ void GstEnginePipeline::StreamDiscovered(GstDiscoverer*, GstDiscovererInfo *info
|
||||
|
||||
}
|
||||
|
||||
void GstEnginePipeline::StreamDiscoveryFinished(GstDiscoverer *, gpointer) {}
|
||||
void GstEnginePipeline::StreamDiscoveryFinished(GstDiscoverer*, gpointer) {}
|
||||
|
||||
QString GstEnginePipeline::GSTdiscovererErrorMessage(GstDiscovererResult result) {
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class GstEnginePipeline : public QObject {
|
||||
int id() const { return id_; }
|
||||
|
||||
// Call these setters before Init
|
||||
void set_output_device(const QString &sink, const QVariant &device);
|
||||
void set_output_device(const QString &output, const QVariant &device);
|
||||
void set_volume_enabled(const bool enabled);
|
||||
void set_stereo_balancer_enabled(const bool enabled);
|
||||
void set_equalizer_enabled(const bool enabled);
|
||||
@@ -147,8 +147,8 @@ class GstEnginePipeline : public QObject {
|
||||
static GstBusSyncReply BusCallbackSync(GstBus*, GstMessage*, gpointer);
|
||||
static gboolean BusCallback(GstBus*, GstMessage*, gpointer);
|
||||
static void TaskEnterCallback(GstTask*, GThread*, gpointer);
|
||||
static void StreamDiscovered(GstDiscoverer *discoverer, GstDiscovererInfo *info, GError *err, gpointer instance);
|
||||
static void StreamDiscoveryFinished(GstDiscoverer *discoverer, gpointer instance);
|
||||
static void StreamDiscovered(GstDiscoverer*, GstDiscovererInfo *info, GError*, gpointer self);
|
||||
static void StreamDiscoveryFinished(GstDiscoverer*, gpointer);
|
||||
static QString GSTdiscovererErrorMessage(GstDiscovererResult result);
|
||||
|
||||
void TagMessageReceived(GstMessage*);
|
||||
|
||||
@@ -49,16 +49,16 @@ quint32 GlobalShortcut::nativeModifiers(Qt::KeyboardModifiers qt_mods) {
|
||||
|
||||
}
|
||||
|
||||
quint32 GlobalShortcut::nativeKeycode(Qt::Key key) {
|
||||
quint32 GlobalShortcut::nativeKeycode(Qt::Key qt_key) {
|
||||
|
||||
if (!QX11Info::display()) return 0;
|
||||
|
||||
quint32 keysym = 0;
|
||||
if (KeyMapperX11::keymapper_x11_.contains(key)) {
|
||||
keysym = KeyMapperX11::keymapper_x11_.value(key);
|
||||
if (KeyMapperX11::keymapper_x11_.contains(qt_key)) {
|
||||
keysym = KeyMapperX11::keymapper_x11_.value(qt_key);
|
||||
}
|
||||
else {
|
||||
keysym = XStringToKeysym(QKeySequence(key).toString().toLatin1().data());
|
||||
keysym = XStringToKeysym(QKeySequence(qt_key).toString().toLatin1().data());
|
||||
if (keysym == NoSymbol) return 0;
|
||||
}
|
||||
return XKeysymToKeycode(QX11Info::display(), keysym);
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "collection/sqlrow.h"
|
||||
#include "playlist/playlistbackend.h"
|
||||
|
||||
InternetPlaylistItem::InternetPlaylistItem(const Song::Source &source)
|
||||
InternetPlaylistItem::InternetPlaylistItem(const Song::Source source)
|
||||
: PlaylistItem(source) {}
|
||||
|
||||
InternetPlaylistItem::InternetPlaylistItem(InternetService *service, const Song &metadata)
|
||||
|
||||
@@ -35,7 +35,7 @@ class InternetService;
|
||||
class InternetPlaylistItem : public PlaylistItem {
|
||||
|
||||
public:
|
||||
explicit InternetPlaylistItem(const Song::Source &type);
|
||||
explicit InternetPlaylistItem(const Song::Source source);
|
||||
explicit InternetPlaylistItem(InternetService *service, const Song &metadata);
|
||||
bool InitFromQuery(const SqlRow &query);
|
||||
Song Metadata() const;
|
||||
|
||||
@@ -34,7 +34,7 @@ class InternetSearchItemDelegate : public CollectionItemDelegate {
|
||||
public:
|
||||
explicit InternetSearchItemDelegate(InternetSearchView *view);
|
||||
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &idx) const;
|
||||
|
||||
private:
|
||||
InternetSearchView *view_;
|
||||
|
||||
@@ -149,10 +149,10 @@ class InternetSearchView : public QWidget {
|
||||
void StartSearch(const QString &query);
|
||||
void SearchDone(const int service_id, const SongList &songs, const QString &error);
|
||||
|
||||
void UpdateStatus(const int id, const QString &text);
|
||||
void ProgressSetMaximum(const int id, const int progress);
|
||||
void UpdateProgress(const int id, const int max);
|
||||
void AddResults(const int id, const ResultList &results);
|
||||
void UpdateStatus(const int service_id, const QString &text);
|
||||
void ProgressSetMaximum(const int service_id, const int max);
|
||||
void UpdateProgress(const int service_id, const int progress);
|
||||
void AddResults(const int service_id, const ResultList &results);
|
||||
|
||||
void FocusOnFilter(QKeyEvent *e);
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ class LyricsFetcherSearch : public QObject {
|
||||
public:
|
||||
explicit LyricsFetcherSearch(const LyricsSearchRequest &request, QObject *parent);
|
||||
|
||||
void Start(LyricsProviders *cover_providers);
|
||||
void Start(LyricsProviders *lyrics_providers);
|
||||
void Cancel();
|
||||
|
||||
signals:
|
||||
|
||||
@@ -160,7 +160,7 @@ void MoodbarLoader::MaybeTakeNextRequest() {
|
||||
|
||||
}
|
||||
|
||||
void MoodbarLoader::RequestFinished(MoodbarPipeline* request, const QUrl& url) {
|
||||
void MoodbarLoader::RequestFinished(MoodbarPipeline *request, const QUrl &url) {
|
||||
|
||||
Q_ASSERT(QThread::currentThread() == qApp->thread());
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class MoodbarLoader : public QObject {
|
||||
private slots:
|
||||
void ReloadSettings();
|
||||
|
||||
void RequestFinished(MoodbarPipeline* request, const QUrl& filename);
|
||||
void RequestFinished(MoodbarPipeline *request, const QUrl &url);
|
||||
void MaybeTakeNextRequest();
|
||||
|
||||
private:
|
||||
|
||||
@@ -132,7 +132,7 @@ void MoodbarPipeline::Start() {
|
||||
|
||||
}
|
||||
|
||||
void MoodbarPipeline::ReportError(GstMessage* msg) {
|
||||
void MoodbarPipeline::ReportError(GstMessage *msg) {
|
||||
|
||||
GError* error;
|
||||
gchar* debugs;
|
||||
|
||||
@@ -53,7 +53,7 @@ class MoodbarPipeline : public QObject {
|
||||
private:
|
||||
GstElement* CreateElement(const QString& factory_name);
|
||||
|
||||
void ReportError(GstMessage* message);
|
||||
void ReportError(GstMessage *msg);
|
||||
void Stop(bool success);
|
||||
void Cleanup();
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ class OrganiseFormat {
|
||||
class Validator : public QValidator {
|
||||
public:
|
||||
explicit Validator(QObject *parent = nullptr);
|
||||
QValidator::State validate(QString &format, int &pos) const;
|
||||
QValidator::State validate(QString &input, int&) const;
|
||||
};
|
||||
|
||||
class SyntaxHighlighter : public QSyntaxHighlighter {
|
||||
@@ -85,7 +85,7 @@ class OrganiseFormat {
|
||||
explicit SyntaxHighlighter(QObject *parent = nullptr);
|
||||
explicit SyntaxHighlighter(QTextEdit *parent);
|
||||
explicit SyntaxHighlighter(QTextDocument *parent);
|
||||
void highlightBlock(const QString &format);
|
||||
void highlightBlock(const QString &text);
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
@@ -987,15 +987,15 @@ void Playlist::InsertItemsWithoutUndo(const PlaylistItemList &items, int pos, bo
|
||||
|
||||
}
|
||||
|
||||
void Playlist::InsertCollectionItems(const SongList &songs, int pos, bool play_now, bool enqueue, bool enqueue_next) {
|
||||
void Playlist::InsertCollectionItems(const SongList &songs, const int pos, const bool play_now, const bool enqueue, const bool enqueue_next) {
|
||||
InsertSongItems<CollectionPlaylistItem>(songs, pos, play_now, enqueue, enqueue_next);
|
||||
}
|
||||
|
||||
void Playlist::InsertSongs(const SongList &songs, int pos, bool play_now, bool enqueue, bool enqueue_next) {
|
||||
void Playlist::InsertSongs(const SongList &songs, const int pos, const bool play_now, const bool enqueue, const bool enqueue_next) {
|
||||
InsertSongItems<SongPlaylistItem>(songs, pos, play_now, enqueue, enqueue_next);
|
||||
}
|
||||
|
||||
void Playlist::InsertSongsOrCollectionItems(const SongList &songs, int pos, bool play_now, bool enqueue, bool enqueue_next) {
|
||||
void Playlist::InsertSongsOrCollectionItems(const SongList &songs, const int pos, const bool play_now, const bool enqueue, const bool enqueue_next) {
|
||||
|
||||
PlaylistItemList items;
|
||||
for (const Song &song : songs) {
|
||||
@@ -1010,7 +1010,7 @@ void Playlist::InsertSongsOrCollectionItems(const SongList &songs, int pos, bool
|
||||
|
||||
}
|
||||
|
||||
void Playlist::InsertInternetItems(InternetService *service, const SongList &songs, int pos, bool play_now, bool enqueue, bool enqueue_next) {
|
||||
void Playlist::InsertInternetItems(InternetService *service, const SongList &songs, const int pos, const bool play_now, const bool enqueue, const bool enqueue_next) {
|
||||
|
||||
PlaylistItemList playlist_items;
|
||||
for (const Song &song : songs) {
|
||||
@@ -1433,7 +1433,7 @@ bool Playlist::removeRows(QList<int> &rows) {
|
||||
|
||||
}
|
||||
|
||||
PlaylistItemList Playlist::RemoveItemsWithoutUndo(int row, int count) {
|
||||
PlaylistItemList Playlist::RemoveItemsWithoutUndo(const int row, const int count) {
|
||||
|
||||
if (row < 0 || row >= items_.size() || row + count > items_.size()) {
|
||||
return PlaylistItemList();
|
||||
|
||||
@@ -229,11 +229,11 @@ class Playlist : public QAbstractListModel {
|
||||
void UpdateScrobblePoint(const qint64 seek_point_nanosec = 0);
|
||||
|
||||
// Changing the playlist
|
||||
void InsertItems (const PlaylistItemList &items, int pos = -1, bool play_now = false, bool enqueue = false, bool enqueue_next = false);
|
||||
void InsertCollectionItems (const SongList &items, int pos = -1, bool play_now = false, bool enqueue = false, bool enqueue_next = false);
|
||||
void InsertSongs (const SongList &items, int pos = -1, bool play_now = false, bool enqueue = false, bool enqueue_next = false);
|
||||
void InsertSongsOrCollectionItems (const SongList &items, int pos = -1, bool play_now = false, bool enqueue = false, bool enqueue_next = false);
|
||||
void InsertInternetItems(InternetService* service, const SongList& songs, int pos = -1, bool play_now = false, bool enqueue = false, bool enqueue_next = false);
|
||||
void InsertItems(const PlaylistItemList &itemsIn, const int pos = -1, const bool play_now = false, const bool enqueue = false, const bool enqueue_next = false);
|
||||
void InsertCollectionItems(const SongList &songs, const int pos = -1, const bool play_now = false, const bool enqueue = false, const bool enqueue_next = false);
|
||||
void InsertSongs(const SongList &songs, const int pos = -1, const bool play_now = false, const bool enqueue = false, const bool enqueue_next = false);
|
||||
void InsertSongsOrCollectionItems(const SongList &songs, const int pos = -1, const bool play_now = false, const bool enqueue = false, const bool enqueue_next = false);
|
||||
void InsertInternetItems(InternetService* service, const SongList& songs, const int pos = -1, const bool play_now = false, const bool enqueue = false, const bool enqueue_next = false);
|
||||
|
||||
void ReshuffleIndices();
|
||||
|
||||
@@ -265,7 +265,7 @@ class Playlist : public QAbstractListModel {
|
||||
// QAbstractListModel
|
||||
int rowCount(const QModelIndex& = QModelIndex()) const { return items_.count(); }
|
||||
int columnCount(const QModelIndex& = QModelIndex()) const { return ColumnCount; }
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||
QVariant data(const QModelIndex &idx, int role = Qt::DisplayRole) const;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role);
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
@@ -301,7 +301,7 @@ class Playlist : public QAbstractListModel {
|
||||
|
||||
void InsertUrls(const QList<QUrl> &urls, int pos = -1, bool play_now = false, bool enqueue = false, bool enqueue_next = false);
|
||||
// Removes items with given indices from the playlist. This operation is not undoable.
|
||||
void RemoveItemsWithoutUndo(const QList<int> &indices);
|
||||
void RemoveItemsWithoutUndo(const QList<int> &indicesIn);
|
||||
|
||||
signals:
|
||||
void RestoreFinished();
|
||||
@@ -331,7 +331,7 @@ class Playlist : public QAbstractListModel {
|
||||
|
||||
// Modify the playlist without changing the undo stack. These are used by our friends in PlaylistUndoCommands
|
||||
void InsertItemsWithoutUndo(const PlaylistItemList &items, int pos, bool enqueue = false, bool enqueue_next = false);
|
||||
PlaylistItemList RemoveItemsWithoutUndo(int pos, int count);
|
||||
PlaylistItemList RemoveItemsWithoutUndo(const int row, const int count);
|
||||
void MoveItemsWithoutUndo(const QList<int> &source_rows, int pos);
|
||||
void MoveItemWithoutUndo(int source, int dest);
|
||||
void MoveItemsWithoutUndo(int start, const QList<int> &dest_rows);
|
||||
|
||||
@@ -128,7 +128,7 @@ class FileTypeItemDelegate : public PlaylistDelegateBase {
|
||||
class TextItemDelegate : public PlaylistDelegateBase {
|
||||
public:
|
||||
explicit TextItemDelegate(QObject *parent) : PlaylistDelegateBase(parent) {}
|
||||
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &idx) const;
|
||||
};
|
||||
|
||||
class TagCompletionModel : public QStringListModel {
|
||||
@@ -177,7 +177,7 @@ class SongSourceDelegate : public PlaylistDelegateBase {
|
||||
void paint(QPainter *paint, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
|
||||
private:
|
||||
QPixmap LookupPixmap(const Song::Source &type, const QSize &size) const;
|
||||
QPixmap LookupPixmap(const Song::Source &source, const QSize &size) const;
|
||||
|
||||
mutable QPixmapCache cache_;
|
||||
};
|
||||
|
||||
@@ -36,7 +36,7 @@ class ScrobblerSettingsPage : public SettingsPage {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ScrobblerSettingsPage(SettingsDialog *dialog);
|
||||
explicit ScrobblerSettingsPage(SettingsDialog *parent);
|
||||
~ScrobblerSettingsPage();
|
||||
|
||||
static const char *kSettingsGroup;
|
||||
|
||||
@@ -58,7 +58,7 @@ class TidalRequest : public TidalBaseRequest {
|
||||
|
||||
void Process();
|
||||
void NeedLogin() { need_login_ = true; }
|
||||
void Search(const int search_id, const QString &search_text);
|
||||
void Search(const int query_id, const QString &search_text);
|
||||
|
||||
signals:
|
||||
void Login();
|
||||
|
||||
@@ -68,7 +68,7 @@ class TidalService : public InternetService {
|
||||
void ReloadSettings();
|
||||
|
||||
void Logout();
|
||||
int Search(const QString &query, InternetSearchView::SearchType type);
|
||||
int Search(const QString &text, InternetSearchView::SearchType type);
|
||||
void CancelSearch();
|
||||
|
||||
int max_login_attempts() { return kLoginAttempts; }
|
||||
|
||||
@@ -130,7 +130,7 @@ class Transcoder : public QObject {
|
||||
|
||||
GstElement *CreateElement(const QString &factory_name, GstElement *bin = nullptr, const QString &name = QString());
|
||||
GstElement *CreateElementForMimeType(const QString &element_type, const QString &mime_type, GstElement *bin = nullptr);
|
||||
void SetElementProperties(const QString &name, GObject *element);
|
||||
void SetElementProperties(const QString &name, GObject *object);
|
||||
|
||||
static void NewPadCallback(GstElement*, GstPad *pad, gpointer data);
|
||||
static GstBusSyncReply BusCallbackSync(GstBus*, GstMessage *msg, gpointer data);
|
||||
|
||||
@@ -361,7 +361,7 @@ void FancyTabWidget::setCurrentIndex(int idx) {
|
||||
|
||||
}
|
||||
|
||||
void FancyTabWidget::currentTabChanged(int idx) {
|
||||
void FancyTabWidget::currentTabChanged(const int idx) {
|
||||
|
||||
QWidget *currentPage = currentWidget();
|
||||
QLayout *layout = currentPage->layout();
|
||||
@@ -406,7 +406,7 @@ void FancyTabWidget::Load(const QString &kSettingsGroup) {
|
||||
|
||||
}
|
||||
|
||||
int FancyTabWidget::insertTab(int idx, QWidget *page, const QIcon &icon, const QString &label) {
|
||||
int FancyTabWidget::insertTab(const int idx, QWidget *page, const QIcon &icon, const QString &label) {
|
||||
return QTabWidget::insertTab(idx, page, icon, label);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class FancyTabWidget : public QTabWidget {
|
||||
void AddTab(QWidget *widget_view, const QString &name, const QIcon &icon, const QString &label);
|
||||
bool EnableTab(QWidget *widget_view);
|
||||
bool DisableTab(QWidget *widget_view);
|
||||
int insertTab(int index, QWidget *page, const QIcon &icon, const QString &label);
|
||||
int insertTab(const int idx, QWidget *page, const QIcon &icon, const QString &label);
|
||||
void addBottomWidget(QWidget* widget_view);
|
||||
|
||||
void setBackgroundPixmap(const QPixmap& pixmap);
|
||||
@@ -84,7 +84,7 @@ class FancyTabWidget : public QTabWidget {
|
||||
void CurrentChanged(int);
|
||||
|
||||
public slots:
|
||||
void setCurrentIndex(int index);
|
||||
void setCurrentIndex(int idx);
|
||||
void SetMode(Mode mode);
|
||||
// Mapper mapped signal needs this convenience function
|
||||
void SetMode(int mode) { SetMode(Mode(mode)); }
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
const int FavoriteWidget::kStarSize = 15;
|
||||
|
||||
FavoriteWidget::FavoriteWidget(int tab_index, bool favorite, QWidget *parent)
|
||||
FavoriteWidget::FavoriteWidget(const int tab_index, const bool favorite, QWidget *parent)
|
||||
: QWidget(parent),
|
||||
tab_index_(tab_index),
|
||||
favorite_(favorite),
|
||||
|
||||
@@ -34,7 +34,7 @@ class FavoriteWidget : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FavoriteWidget(int tab_id, bool favorite = false, QWidget *parent = nullptr);
|
||||
explicit FavoriteWidget(const int tab_index, const bool favorite = false, QWidget *parent = nullptr);
|
||||
|
||||
// Change the value if different from the current one and then update display and emit FavoriteStateChanged signal
|
||||
void SetFavorite(bool favorite);
|
||||
|
||||
Reference in New Issue
Block a user