UrlHandler: Formatting

This commit is contained in:
Jonas Kvinge
2025-03-08 21:23:02 +01:00
parent 3716e8c3ef
commit d317c9158b
2 changed files with 25 additions and 18 deletions

View File

@@ -28,21 +28,29 @@
UrlHandler::UrlHandler(QObject *parent) : QObject(parent) {} UrlHandler::UrlHandler(QObject *parent) : QObject(parent) {}
UrlHandler::LoadResult::LoadResult(const QUrl &media_url, const Type type, const QUrl &stream_url, const Song::FileType filetype, const int samplerate, const int bit_depth, const qint64 length_nanosec, const QString &error) : media_url_(media_url), UrlHandler::LoadResult::LoadResult(const QUrl &media_url,
type_(type), const Type type,
stream_url_(stream_url), const QUrl &stream_url,
filetype_(filetype), const Song::FileType filetype,
samplerate_(samplerate), const int samplerate,
bit_depth_(bit_depth), const int bit_depth,
length_nanosec_(length_nanosec), const qint64 length_nanosec,
error_(error) const QString &error)
{} : media_url_(media_url),
type_(type),
stream_url_(stream_url),
filetype_(filetype),
samplerate_(samplerate),
bit_depth_(bit_depth),
length_nanosec_(length_nanosec),
error_(error) {}
UrlHandler::LoadResult::LoadResult(const QUrl &media_url, const Type type, const QString &error)
: media_url_(media_url),
type_(type),
filetype_(Song::FileType::Stream),
samplerate_(-1),
bit_depth_(-1),
length_nanosec_(-1),
error_(error) {}
UrlHandler::LoadResult::LoadResult(const QUrl &media_url, const Type type, const QString &error) : media_url_(media_url),
type_(type),
filetype_(Song::FileType::Stream),
samplerate_(-1),
bit_depth_(-1),
length_nanosec_(-1),
error_(error)
{}

View File

@@ -56,7 +56,6 @@ class UrlHandler : public QObject {
}; };
explicit LoadResult(const QUrl &media_url = QUrl(), const Type 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()); explicit LoadResult(const QUrl &media_url = QUrl(), const Type 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());
explicit LoadResult(const QUrl &media_url, const Type type, const QString &error); explicit LoadResult(const QUrl &media_url, const Type type, const QString &error);
// The url that the playlist item has in Url(). // The url that the playlist item has in Url().