Use one instance of NetworkAccessManager
This commit is contained in:
@@ -28,7 +28,6 @@
|
||||
#include <QSettings>
|
||||
|
||||
#include "core/logging.h"
|
||||
#include "core/networkaccessmanager.h"
|
||||
|
||||
#include "lyricsprovider.h"
|
||||
#include "lyricsproviders.h"
|
||||
@@ -37,7 +36,7 @@
|
||||
|
||||
int LyricsProviders::NextOrderId = 0;
|
||||
|
||||
LyricsProviders::LyricsProviders(QObject *parent) : QObject(parent), network_(new NetworkAccessManager(this)) {}
|
||||
LyricsProviders::LyricsProviders(QObject *parent) : QObject(parent) {}
|
||||
|
||||
LyricsProviders::~LyricsProviders() {
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include <QString>
|
||||
#include <QAtomicInt>
|
||||
|
||||
class NetworkAccessManager;
|
||||
class LyricsProvider;
|
||||
|
||||
class LyricsProviders : public QObject {
|
||||
@@ -49,8 +48,6 @@ class LyricsProviders : public QObject {
|
||||
bool HasAnyProviders() const { return !lyrics_providers_.isEmpty(); }
|
||||
int NextId();
|
||||
|
||||
NetworkAccessManager *network() const { return network_; }
|
||||
|
||||
private slots:
|
||||
void ProviderDestroyed();
|
||||
|
||||
@@ -59,8 +56,6 @@ class LyricsProviders : public QObject {
|
||||
|
||||
static int NextOrderId;
|
||||
|
||||
NetworkAccessManager *network_;
|
||||
|
||||
QMap<LyricsProvider*, QString> lyrics_providers_;
|
||||
QList<LyricsProvider*> ordered_providers_;
|
||||
QMutex mutex_;
|
||||
|
||||
Reference in New Issue
Block a user