Add internet_service to SpotifySearchProvider so custom context menu is correctly shown on playlist items created from the global search
This commit is contained in:
parent
20e626a9ab
commit
05d43e27a9
|
@ -32,11 +32,11 @@ class GroovesharkSearchProvider : public SearchProvider {
|
||||||
void Init(GroovesharkService* service);
|
void Init(GroovesharkService* service);
|
||||||
|
|
||||||
// SearchProvider
|
// SearchProvider
|
||||||
void SearchAsync(int id, const QString& query);
|
void SearchAsync(int id, const QString& query) override;
|
||||||
void LoadArtAsync(int id, const Result& result);
|
void LoadArtAsync(int id, const Result& result) override;
|
||||||
bool IsLoggedIn();
|
bool IsLoggedIn() override;
|
||||||
void ShowConfig();
|
void ShowConfig() override;
|
||||||
InternetService* internet_service() { return service_; }
|
InternetService* internet_service() override { return service_; }
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void SearchDone(int id, const SongList& songs);
|
void SearchDone(int id, const SongList& songs);
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#include "core/logging.h"
|
#include "core/logging.h"
|
||||||
#include "internet/internetmodel.h"
|
#include "internet/internetmodel.h"
|
||||||
#include "internet/spotifyserver.h"
|
#include "internet/spotifyserver.h"
|
||||||
#include "internet/spotifyservice.h"
|
|
||||||
#include "playlist/songmimedata.h"
|
#include "playlist/songmimedata.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
|
|
||||||
#include "searchprovider.h"
|
#include "searchprovider.h"
|
||||||
#include "spotifymessages.pb.h"
|
#include "spotifymessages.pb.h"
|
||||||
|
#include "internet/spotifyservice.h"
|
||||||
|
|
||||||
class SpotifyServer;
|
class SpotifyServer;
|
||||||
class SpotifyService;
|
|
||||||
|
|
||||||
class SpotifySearchProvider : public SearchProvider {
|
class SpotifySearchProvider : public SearchProvider {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -34,8 +34,10 @@ class SpotifySearchProvider : public SearchProvider {
|
||||||
void LoadArtAsync(int id, const Result& result);
|
void LoadArtAsync(int id, const Result& result);
|
||||||
QStringList GetSuggestions(int count);
|
QStringList GetSuggestions(int count);
|
||||||
|
|
||||||
bool IsLoggedIn();
|
// SearchProvider
|
||||||
void ShowConfig();
|
bool IsLoggedIn() override;
|
||||||
|
void ShowConfig() override;
|
||||||
|
InternetService* internet_service() override { return service_; }
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void ServerDestroyed();
|
void ServerDestroyed();
|
||||||
|
|
|
@ -49,13 +49,13 @@ class SpotifyService : public InternetService {
|
||||||
static const char* kBlobDownloadUrl;
|
static const char* kBlobDownloadUrl;
|
||||||
static const int kSearchDelayMsec;
|
static const int kSearchDelayMsec;
|
||||||
|
|
||||||
void ReloadSettings();
|
void ReloadSettings() override;
|
||||||
|
|
||||||
QStandardItem* CreateRootItem();
|
QStandardItem* CreateRootItem() override;
|
||||||
void LazyPopulate(QStandardItem* parent);
|
void LazyPopulate(QStandardItem* parent) override;
|
||||||
void ShowContextMenu(const QPoint& global_pos);
|
void ShowContextMenu(const QPoint& global_pos) override;
|
||||||
void ItemDoubleClicked(QStandardItem* item);
|
void ItemDoubleClicked(QStandardItem* item) override;
|
||||||
void DropMimeData(const QMimeData* data, const QModelIndex& index);
|
void DropMimeData(const QMimeData* data, const QModelIndex& index) override;
|
||||||
QList<QAction*> playlistitem_actions(const Song& song) override;
|
QList<QAction*> playlistitem_actions(const Song& song) override;
|
||||||
PlaylistItem::Options playlistitem_options() const;
|
PlaylistItem::Options playlistitem_options() const;
|
||||||
QWidget* HeaderWidget() const;
|
QWidget* HeaderWidget() const;
|
||||||
|
|
Loading…
Reference in New Issue