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

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