Fix some includes

This commit is contained in:
Jonas Kvinge 2018-09-20 22:48:52 +02:00
parent 7dcdb7c673
commit a77dde7d3b
4 changed files with 11 additions and 13 deletions

View File

@ -23,12 +23,10 @@
#include <QtGlobal> #include <QtGlobal>
#include <QObject> #include <QObject>
#include <QUrl> #include <QUrl>
#include <QIcon>
#include "song.h"
#include "urlhandler.h" #include "urlhandler.h"
UrlHandler::LoadResult::LoadResult(const QUrl &original_url, Type type, const QUrl &media_url, const Song::FileType &filetype, qint64 length_nanosec) : original_url_(original_url), type_(type), media_url_(media_url), filetype_(filetype), length_nanosec_(length_nanosec) {} UrlHandler::LoadResult::LoadResult(const QUrl &original_url, Type type, const QUrl &media_url, const Song::FileType &filetype, qint64 length_nanosec) : original_url_(original_url), type_(type), media_url_(media_url), filetype_(filetype), length_nanosec_(length_nanosec) {}
UrlHandler::UrlHandler(QObject *parent) : QObject(parent) {} UrlHandler::UrlHandler(QObject *parent) : QObject(parent) {}
QIcon UrlHandler::icon() const { return QIcon(); }

View File

@ -27,7 +27,6 @@
#include <QObject> #include <QObject>
#include <QString> #include <QString>
#include <QUrl> #include <QUrl>
#include <QIcon>
#include "song.h" #include "song.h"
@ -39,7 +38,6 @@ class UrlHandler : public QObject {
// The URL scheme that this handler handles. // The URL scheme that this handler handles.
virtual QString scheme() const = 0; virtual QString scheme() const = 0;
virtual QIcon icon() const;
// Returned by StartLoading() and LoadNext(), indicates what the player should do when it wants to load a URL. // Returned by StartLoading() and LoadNext(), indicates what the player should do when it wants to load a URL.
struct LoadResult { struct LoadResult {

View File

@ -17,16 +17,17 @@
* *
*/ */
#include "tidalurlhandler.h" #include <QObject>
#include <QString>
#include <QUrl>
#include "core/application.h" #include "core/application.h"
#include "core/taskmanager.h" #include "core/taskmanager.h"
#include "core/iconloader.h" #include "core/iconloader.h"
#include "core/logging.h" #include "core/logging.h"
#include "core/song.h" #include "core/song.h"
#include "playlistparsers/playlistparser.h"
#include "tidal/tidalservice.h" #include "tidal/tidalservice.h"
#include "internet/internetmodel.h" #include "tidalurlhandler.h"
TidalUrlHandler::TidalUrlHandler( TidalUrlHandler::TidalUrlHandler(
Application *app, TidalService *service) Application *app, TidalService *service)
@ -36,9 +37,6 @@ TidalUrlHandler::TidalUrlHandler(
} }
QString TidalUrlHandler::scheme() const { return service_->url_scheme(); }
QIcon TidalUrlHandler::icon() const { return IconLoader::Load("tidal"); }
UrlHandler::LoadResult TidalUrlHandler::StartLoading(const QUrl &url) { UrlHandler::LoadResult TidalUrlHandler::StartLoading(const QUrl &url) {
LoadResult ret(url); LoadResult ret(url);

View File

@ -20,8 +20,13 @@
#ifndef TIDALURLHANDLER_H #ifndef TIDALURLHANDLER_H
#define TIDALURLHANDLER_H #define TIDALURLHANDLER_H
#include <QObject>
#include <QString>
#include <QUrl>
#include "core/urlhandler.h" #include "core/urlhandler.h"
#include "core/song.h" #include "core/song.h"
#include "tidal/tidalservice.h"
class Application; class Application;
class TidalService; class TidalService;
@ -32,8 +37,7 @@ class TidalUrlHandler : public UrlHandler {
public: public:
TidalUrlHandler(Application *app, TidalService *service); TidalUrlHandler(Application *app, TidalService *service);
QString scheme() const; QString scheme() const { return service_->url_scheme(); }
QIcon icon() const;
LoadResult StartLoading(const QUrl &url); LoadResult StartLoading(const QUrl &url);
void CancelTask(); void CancelTask();