Fix parameter name mispatches

This commit is contained in:
Jonas Kvinge 2020-06-14 18:58:24 +02:00
parent 2fbdb29ebc
commit 082c9097e4
76 changed files with 145 additions and 147 deletions

View File

@ -100,8 +100,8 @@ bool APE::Item::isReadOnly() const {
return d->readOnly;
}
void APE::Item::setType(APE::Item::ItemTypes val) {
d->type = val;
void APE::Item::setType(APE::Item::ItemTypes type) {
d->type = type;
}
APE::Item::ItemTypes APE::Item::type() const {

View File

@ -104,7 +104,7 @@ class TAGLIB_EXPORT Attribute {
/*!
* Construct an attribute as a copy of \a other.
*/
Attribute(const Attribute &item);
Attribute(const Attribute &other);
/*!
* Copies the contents of \a other into this item.

View File

@ -97,47 +97,47 @@ class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag {
/*!
* Sets the title to \a s.
*/
virtual void setTitle(const String &s);
virtual void setTitle(const String &value);
/*!
* Sets the artist to \a s.
*/
virtual void setArtist(const String &s);
virtual void setArtist(const String &value);
/*!
* Sets the album to \a s. If \a s is String::null then this value will be cleared.
*/
virtual void setAlbum(const String &s);
virtual void setAlbum(const String &value);
/*!
* Sets the comment to \a s.
*/
virtual void setComment(const String &s);
virtual void setComment(const String &value);
/*!
* Sets the rating to \a s.
*/
virtual void setRating(const String &s);
virtual void setRating(const String &value);
/*!
* Sets the copyright to \a s.
*/
virtual void setCopyright(const String &s);
virtual void setCopyright(const String &value);
/*!
* Sets the genre to \a s.
*/
virtual void setGenre(const String &s);
virtual void setGenre(const String &value);
/*!
* Sets the year to \a i. If \a s is 0 then this value will be cleared.
*/
virtual void setYear(unsigned int i);
virtual void setYear(unsigned int value);
/*!
* Sets the track to \a i. If \a s is 0 then this value will be cleared.
*/
virtual void setTrack(unsigned int i);
virtual void setTrack(unsigned int value);
/*!
* Returns true if the tag does not contain any data.
@ -153,12 +153,12 @@ class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag {
/*!
* \return True if a value for \a attribute is currently set.
*/
bool contains(const String &name) const;
bool contains(const String &key) const;
/*!
* Removes the \a key attribute from the tag
*/
void removeItem(const String &name);
void removeItem(const String &key);
/*!
* \return The list of values for the key \a name, or an empty list if no values have been set.
@ -182,8 +182,8 @@ class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag {
void addAttribute(const String &name, const Attribute &attribute);
PropertyMap properties() const;
void removeUnsupportedProperties(const StringList &properties);
PropertyMap setProperties(const PropertyMap &properties);
void removeUnsupportedProperties(const StringList &props);
PropertyMap setProperties(const PropertyMap &props);
private:
class TagPrivate;

View File

@ -196,13 +196,13 @@ PropertyMap DSDIFF::File::properties() const {
}
void DSDIFF::File::removeUnsupportedProperties(const StringList &unsupported) {
void DSDIFF::File::removeUnsupportedProperties(const StringList &properties) {
if (d->hasID3v2)
d->tag.access<ID3v2::Tag>(ID3v2Index, false)->removeUnsupportedProperties(unsupported);
d->tag.access<ID3v2::Tag>(ID3v2Index, false)->removeUnsupportedProperties(properties);
if (d->hasDiin)
d->tag.access<DSDIFF::DIIN::Tag>(DIINIndex, false)->removeUnsupportedProperties(unsupported);
d->tag.access<DSDIFF::DIIN::Tag>(DIINIndex, false)->removeUnsupportedProperties(properties);
}

View File

@ -141,7 +141,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File {
* Implements the unified property interface -- import function.
* This method forwards to ID3v2::Tag::setProperties().
*/
PropertyMap setProperties(const PropertyMap &);
PropertyMap setProperties(const PropertyMap &properties);
/*!
* Returns the AIFF::Properties for this file.
@ -214,8 +214,8 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File {
File &operator=(const File &);
void removeRootChunk(const ByteVector &id);
void removeRootChunk(unsigned int chunk);
void removeChildChunk(unsigned int i, unsigned int chunk);
void removeRootChunk(unsigned int i);
void removeChildChunk(unsigned int i, unsigned int childChunkNum);
/*!
* Sets the data for the the specified chunk at root level to \a data.

View File

@ -37,7 +37,7 @@ namespace FLAC {
class TAGLIB_EXPORT UnknownMetadataBlock : public MetadataBlock {
public:
UnknownMetadataBlock(int blockType, const ByteVector &data);
UnknownMetadataBlock(int code, const ByteVector &data);
~UnknownMetadataBlock();
/*!

View File

@ -50,7 +50,7 @@ class TAGLIB_EXPORT Properties : public AudioProperties {
void setChannels(int channels);
void setInstrumentCount(unsigned int sampleCount);
void setInstrumentCount(unsigned int instrumentCount);
void setLengthInPatterns(unsigned char lengthInPatterns);
private:

View File

@ -93,9 +93,9 @@ MP4::Item::Item(long long value) : d(new ItemPrivate()) {
d->m_longlong = value;
}
MP4::Item::Item(int value1, int value2) : d(new ItemPrivate()) {
d->m_intPair.first = value1;
d->m_intPair.second = value2;
MP4::Item::Item(int first, int second) : d(new ItemPrivate()) {
d->m_intPair.first = first;
d->m_intPair.second = second;
}
MP4::Item::Item(const ByteVectorList &value) : d(new ItemPrivate()) {

View File

@ -91,8 +91,8 @@ class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag {
bool contains(const String &key) const;
PropertyMap properties() const;
void removeUnsupportedProperties(const StringList &properties);
PropertyMap setProperties(const PropertyMap &properties);
void removeUnsupportedProperties(const StringList &props);
PropertyMap setProperties(const PropertyMap &props);
private:
AtomDataList parseData2(const Atom *atom, int expectedFlags = -1, bool freeForm = false);

View File

@ -98,7 +98,7 @@ class TAGLIB_EXPORT CommentsFrame : public Frame {
*
* \see language()
*/
void setLanguage(const ByteVector &languageCode);
void setLanguage(const ByteVector &languageEncoding);
/*!
* Sets the description of the comment to \a s.

View File

@ -157,7 +157,7 @@ class TAGLIB_EXPORT GeneralEncapsulatedObjectFrame : public Frame {
* \see mimeType()
* \see setMimeType()
*/
void setObject(const ByteVector &object);
void setObject(const ByteVector &data);
protected:
virtual void parseFields(const ByteVector &data);

View File

@ -64,16 +64,16 @@ String OwnershipFrame::pricePaid() const {
return d->pricePaid;
}
void OwnershipFrame::setPricePaid(const String &s) {
d->pricePaid = s;
void OwnershipFrame::setPricePaid(const String &pricePaid) {
d->pricePaid = pricePaid;
}
String OwnershipFrame::datePurchased() const {
return d->datePurchased;
}
void OwnershipFrame::setDatePurchased(const String &s) {
d->datePurchased = s;
void OwnershipFrame::setDatePurchased(const String &datePurchased) {
d->datePurchased = datePurchased;
}
String OwnershipFrame::seller() const {

View File

@ -60,24 +60,24 @@ String PopularimeterFrame::email() const {
return d->email;
}
void PopularimeterFrame::setEmail(const String &s) {
d->email = s;
void PopularimeterFrame::setEmail(const String &email) {
d->email = email;
}
int PopularimeterFrame::rating() const {
return d->rating;
}
void PopularimeterFrame::setRating(int s) {
d->rating = s;
void PopularimeterFrame::setRating(int rating) {
d->rating = rating;
}
unsigned int PopularimeterFrame::counter() const {
return d->counter;
}
void PopularimeterFrame::setCounter(unsigned int s) {
d->counter = s;
void PopularimeterFrame::setCounter(unsigned int counter) {
d->counter = counter;
}
////////////////////////////////////////////////////////////////////////////////

View File

@ -84,7 +84,7 @@ class TAGLIB_EXPORT PrivateFrame : public Frame {
/*!
*
*/
void setData(const ByteVector &v);
void setData(const ByteVector &data);
protected:
// Reimplementations.

View File

@ -172,7 +172,7 @@ class TAGLIB_EXPORT SynchronizedLyricsFrame : public Frame {
*
* \see language()
*/
void setLanguage(const ByteVector &languageCode);
void setLanguage(const ByteVector &languageEncoding);
/*!
* Set the timestamp format.

View File

@ -97,7 +97,7 @@ class TAGLIB_EXPORT UnsynchronizedLyricsFrame : public Frame {
*
* \see language()
*/
void setLanguage(const ByteVector &languageCode);
void setLanguage(const ByteVector &languageEncoding);
/*!
* Sets the description of the unsynchronized lyrics frame to \a s.

View File

@ -398,7 +398,7 @@ class TAGLIB_EXPORT Frame::Header {
*
* \see tagAlterPreservation()
*/
void setTagAlterPreservation(bool discard);
void setTagAlterPreservation(bool preserve);
/*!
* Returns true if the flag for file alter preservation is set.

View File

@ -57,7 +57,7 @@ TAGLIB_EXPORT ByteVector fromUInt(unsigned int value);
/*!
* Convert the data from unsynchronized data to its original format.
*/
TAGLIB_EXPORT ByteVector decode(const ByteVector &input);
TAGLIB_EXPORT ByteVector decode(const ByteVector &data);
} // namespace SynchData
} // namespace ID3v2

View File

@ -90,8 +90,8 @@ PropertyMap RIFF::AIFF::File::properties() const {
return d->tag->properties();
}
void RIFF::AIFF::File::removeUnsupportedProperties(const StringList &unsupported) {
d->tag->removeUnsupportedProperties(unsupported);
void RIFF::AIFF::File::removeUnsupportedProperties(const StringList &properties) {
d->tag->removeUnsupportedProperties(properties);
}
PropertyMap RIFF::AIFF::File::setProperties(const PropertyMap &properties) {

View File

@ -121,8 +121,8 @@ PropertyMap RIFF::WAV::File::properties() const {
return d->tag.properties();
}
void RIFF::WAV::File::removeUnsupportedProperties(const StringList &unsupported) {
d->tag.removeUnsupportedProperties(unsupported);
void RIFF::WAV::File::removeUnsupportedProperties(const StringList &properties) {
d->tag.removeUnsupportedProperties(properties);
}
PropertyMap RIFF::WAV::File::setProperties(const PropertyMap &properties) {

View File

@ -68,7 +68,7 @@ class TAGLIB_EXPORT Tag {
* This default implementation sets only the tags for which setter methods exist in this class
* (artist, album, ...), and only one value per key; the rest will be contained in the returned PropertyMap.
*/
PropertyMap setProperties(const PropertyMap &properties);
PropertyMap setProperties(const PropertyMap &origProps);
/*!
* Returns the track name; if no track name is present in the tag String::null will be returned.

View File

@ -349,8 +349,8 @@ ByteVector::~ByteVector() {
delete d;
}
ByteVector &ByteVector::setData(const char *s, unsigned int length) {
ByteVector(s, length).swap(*this);
ByteVector &ByteVector::setData(const char *data, unsigned int length) {
ByteVector(data, length).swap(*this);
return *this;
}

View File

@ -66,7 +66,7 @@ class TAGLIB_EXPORT StringList : public List<String> {
* \note This should only be used with the 8-bit codecs Latin1 and UTF8,
* when used with other codecs it will simply print a warning and exit.
*/
StringList(const ByteVectorList &vl, String::Type t = String::Latin1);
StringList(const ByteVectorList &bl, String::Type t = String::Latin1);
/*!
* Destroys this StringList instance.

View File

@ -129,8 +129,8 @@ PropertyMap TrueAudio::File::properties() const {
return d->tag.properties();
}
void TrueAudio::File::removeUnsupportedProperties(const StringList &unsupported) {
d->tag.removeUnsupportedProperties(unsupported);
void TrueAudio::File::removeUnsupportedProperties(const StringList &properties) {
d->tag.removeUnsupportedProperties(properties);
}
PropertyMap TrueAudio::File::setProperties(const PropertyMap &properties) {

View File

@ -113,8 +113,8 @@ PropertyMap WavPack::File::properties() const {
return d->tag.properties();
}
void WavPack::File::removeUnsupportedProperties(const StringList &unsupported) {
d->tag.removeUnsupportedProperties(unsupported);
void WavPack::File::removeUnsupportedProperties(const StringList &properties) {
d->tag.removeUnsupportedProperties(properties);
}
PropertyMap WavPack::File::setProperties(const PropertyMap &properties) {

View File

@ -65,7 +65,7 @@ static void gst_fastspectrum_set_property (GObject * object, guint prop_id, cons
static void gst_fastspectrum_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec);
static gboolean gst_fastspectrum_start (GstBaseTransform * trans);
static gboolean gst_fastspectrum_stop (GstBaseTransform * trans);
static GstFlowReturn gst_fastspectrum_transform_ip (GstBaseTransform * trans, GstBuffer * in);
static GstFlowReturn gst_fastspectrum_transform_ip (GstBaseTransform *trans, GstBuffer *buffer);
static gboolean gst_fastspectrum_setup (GstAudioFilter * base, const GstAudioInfo * info);
static void gst_fastspectrum_class_init (GstFastSpectrumClass * klass) {
@ -390,7 +390,7 @@ static void gst_fastspectrum_run_fft (GstFastSpectrum * spectrum, guint input_po
}
static GstFlowReturn gst_fastspectrum_transform_ip (GstBaseTransform * trans, GstBuffer * buffer) {
static GstFlowReturn gst_fastspectrum_transform_ip (GstBaseTransform *trans, GstBuffer *buffer) {
GstFastSpectrum *spectrum = GST_FASTSPECTRUM (trans);
guint rate = GST_AUDIO_FILTER_RATE (spectrum);

View File

@ -29,9 +29,7 @@
namespace _detail {
ClosureBase::ClosureBase(ObjectHelper *helper)
: helper_(helper) {
}
ClosureBase::ClosureBase(ObjectHelper *helper) : helper_(helper) {}
ClosureBase::~ClosureBase() {}

View File

@ -64,7 +64,7 @@ class ClosureBase {
class ObjectHelper : public QObject {
Q_OBJECT
public:
ObjectHelper(QObject *parent, const char *signal, ClosureBase *closure);
ObjectHelper(QObject *sender, const char *signal, ClosureBase *closure);
~ObjectHelper();
private slots:

View File

@ -82,6 +82,6 @@ extern const char *kDefaultLogLevels;
} // namespace logging
QDebug operator<<(QDebug debug, std::chrono::seconds secs);
QDebug operator<<(QDebug dbg, std::chrono::seconds secs);
#endif // LOGGING_H

View File

@ -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:

View File

@ -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

View File

@ -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();

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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://...

View File

@ -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);

View File

@ -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);

View File

@ -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:

View File

@ -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);

View File

@ -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_;

View File

@ -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();

View File

@ -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;

View File

@ -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:

View File

@ -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();
}

View File

@ -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);
}

View File

@ -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:

View File

@ -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);

View File

@ -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);

View File

@ -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) {

View File

@ -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*);

View File

@ -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);

View File

@ -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)

View File

@ -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;

View File

@ -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_;

View File

@ -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);

View File

@ -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:

View File

@ -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());

View File

@ -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:

View File

@ -132,7 +132,7 @@ void MoodbarPipeline::Start() {
}
void MoodbarPipeline::ReportError(GstMessage* msg) {
void MoodbarPipeline::ReportError(GstMessage *msg) {
GError* error;
gchar* debugs;

View File

@ -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();

View File

@ -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:

View File

@ -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();

View File

@ -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);

View File

@ -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_;
};

View File

@ -36,7 +36,7 @@ class ScrobblerSettingsPage : public SettingsPage {
Q_OBJECT
public:
explicit ScrobblerSettingsPage(SettingsDialog *dialog);
explicit ScrobblerSettingsPage(SettingsDialog *parent);
~ScrobblerSettingsPage();
static const char *kSettingsGroup;

View File

@ -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();

View File

@ -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; }

View File

@ -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);

View File

@ -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);
}

View File

@ -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)); }

View File

@ -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),

View File

@ -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);