From 2f4f29517e1b4600b39b6d3bcb15b62ee1351ad9 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sun, 23 Aug 2020 18:52:30 +0200 Subject: [PATCH] Create new contructor for UrlHandler --- src/core/urlhandler.cpp | 10 ++++++++++ src/core/urlhandler.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/core/urlhandler.cpp b/src/core/urlhandler.cpp index f08cc00ff..5ed0fc509 100644 --- a/src/core/urlhandler.cpp +++ b/src/core/urlhandler.cpp @@ -39,4 +39,14 @@ UrlHandler::LoadResult::LoadResult(const QUrl &original_url, const Type type, co error_(error) {} +UrlHandler::LoadResult::LoadResult(const QUrl &original_url, const Type type, const QString error) : + original_url_(original_url), + type_(type), + filetype_(Song::FileType_Stream), + samplerate_(-1), + bit_depth_(-1), + length_nanosec_(-1), + error_(error) + {} + UrlHandler::UrlHandler(QObject *parent) : QObject(parent) {} diff --git a/src/core/urlhandler.h b/src/core/urlhandler.h index ff8d25ab5..10601ed6b 100644 --- a/src/core/urlhandler.h +++ b/src/core/urlhandler.h @@ -59,6 +59,8 @@ class UrlHandler : public QObject { explicit 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()); + explicit LoadResult(const QUrl &original_url, const Type type, const QString error); + // The url that the playlist item has in Url(). // Might be something unplayable like lastfm://... QUrl original_url_;