mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-16 19:31:02 +01:00
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);
|
||||
|
||||
// SearchProvider
|
||||
void SearchAsync(int id, const QString& query);
|
||||
void LoadArtAsync(int id, const Result& result);
|
||||
bool IsLoggedIn();
|
||||
void ShowConfig();
|
||||
InternetService* internet_service() { return service_; }
|
||||
void SearchAsync(int id, const QString& query) override;
|
||||
void LoadArtAsync(int id, const Result& result) override;
|
||||
bool IsLoggedIn() override;
|
||||
void ShowConfig() override;
|
||||
InternetService* internet_service() override { return service_; }
|
||||
|
||||
private slots:
|
||||
void SearchDone(int id, const SongList& songs);
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include "core/logging.h"
|
||||
#include "internet/internetmodel.h"
|
||||
#include "internet/spotifyserver.h"
|
||||
#include "internet/spotifyservice.h"
|
||||
#include "playlist/songmimedata.h"
|
||||
|
||||
namespace {
|
||||
|
@ -20,9 +20,9 @@
|
||||
|
||||
#include "searchprovider.h"
|
||||
#include "spotifymessages.pb.h"
|
||||
#include "internet/spotifyservice.h"
|
||||
|
||||
class SpotifyServer;
|
||||
class SpotifyService;
|
||||
|
||||
class SpotifySearchProvider : public SearchProvider {
|
||||
Q_OBJECT
|
||||
@ -34,8 +34,10 @@ class SpotifySearchProvider : public SearchProvider {
|
||||
void LoadArtAsync(int id, const Result& result);
|
||||
QStringList GetSuggestions(int count);
|
||||
|
||||
bool IsLoggedIn();
|
||||
void ShowConfig();
|
||||
// SearchProvider
|
||||
bool IsLoggedIn() override;
|
||||
void ShowConfig() override;
|
||||
InternetService* internet_service() override { return service_; }
|
||||
|
||||
private slots:
|
||||
void ServerDestroyed();
|
||||
|
@ -49,13 +49,13 @@ class SpotifyService : public InternetService {
|
||||
static const char* kBlobDownloadUrl;
|
||||
static const int kSearchDelayMsec;
|
||||
|
||||
void ReloadSettings();
|
||||
void ReloadSettings() override;
|
||||
|
||||
QStandardItem* CreateRootItem();
|
||||
void LazyPopulate(QStandardItem* parent);
|
||||
void ShowContextMenu(const QPoint& global_pos);
|
||||
void ItemDoubleClicked(QStandardItem* item);
|
||||
void DropMimeData(const QMimeData* data, const QModelIndex& index);
|
||||
QStandardItem* CreateRootItem() override;
|
||||
void LazyPopulate(QStandardItem* parent) override;
|
||||
void ShowContextMenu(const QPoint& global_pos) override;
|
||||
void ItemDoubleClicked(QStandardItem* item) override;
|
||||
void DropMimeData(const QMimeData* data, const QModelIndex& index) override;
|
||||
QList<QAction*> playlistitem_actions(const Song& song) override;
|
||||
PlaylistItem::Options playlistitem_options() const;
|
||||
QWidget* HeaderWidget() const;
|
||||
|
Loading…
Reference in New Issue
Block a user