Replace typedef with using
This commit is contained in:
@@ -49,8 +49,8 @@ class SubsonicBaseRequest : public QObject {
|
||||
explicit SubsonicBaseRequest(SubsonicService *service, QObject *parent = nullptr);
|
||||
|
||||
protected:
|
||||
typedef QPair<QString, QString> Param;
|
||||
typedef QList<Param> ParamList;
|
||||
using Param = QPair<QString, QString>;
|
||||
using ParamList = QList<Param>;
|
||||
|
||||
public:
|
||||
static QUrl CreateUrl(const QUrl &server_url, const SubsonicSettingsPage::AuthMethod auth_method, const QString &username, const QString &password, const QString &ressource_name, const ParamList ¶ms_provided);
|
||||
|
||||
@@ -155,6 +155,9 @@ void SubsonicService::SendPingWithCredentials(QUrl url, const QString &username,
|
||||
ping_redirects_ = 0;
|
||||
}
|
||||
|
||||
using Param = QPair<QString, QString>;
|
||||
using ParamList = QList<Param>;
|
||||
|
||||
ParamList params = ParamList() << Param("c", kClientName)
|
||||
<< Param("v", kApiVersion)
|
||||
<< Param("f", "json")
|
||||
|
||||
@@ -101,9 +101,6 @@ class SubsonicService : public InternetService {
|
||||
void SongsResultsReceived(const SongMap &songs, const QString &error);
|
||||
|
||||
private:
|
||||
typedef QPair<QString, QString> Param;
|
||||
typedef QList<Param> ParamList;
|
||||
|
||||
void PingError(const QString &error = QString(), const QVariant &debug = QVariant());
|
||||
|
||||
static const char *kSongsTable;
|
||||
|
||||
@@ -43,6 +43,8 @@ UrlHandler::LoadResult SubsonicUrlHandler::StartLoading(const QUrl &url) {
|
||||
return LoadResult(url, LoadResult::Error, tr("Missing Subsonic username or password."));
|
||||
}
|
||||
|
||||
using Param = QPair<QString, QString>;
|
||||
using ParamList = QList<Param>;
|
||||
const QUrl stream_url = SubsonicBaseRequest::CreateUrl(server_url(), auth_method(), username(), password(), "stream", ParamList() << Param("id", url.path()));
|
||||
|
||||
return LoadResult(url, LoadResult::TrackAvailable, stream_url);
|
||||
|
||||
@@ -48,9 +48,6 @@ class SubsonicUrlHandler : public UrlHandler {
|
||||
LoadResult StartLoading(const QUrl &url) override;
|
||||
|
||||
private:
|
||||
typedef QPair<QString, QString> Param;
|
||||
typedef QList<Param> ParamList;
|
||||
|
||||
SubsonicService *service_;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user