Use static_cast
This commit is contained in:
@@ -60,8 +60,6 @@ class QobuzRequest : public QobuzBaseRequest {
|
||||
void Search(const int search_id, const QString &search_text);
|
||||
|
||||
signals:
|
||||
void Login();
|
||||
void Login(QString username, QString password, QString token);
|
||||
void LoginSuccess();
|
||||
void LoginFailure(QString failure_reason);
|
||||
void Results(int id, SongList songs, QString error);
|
||||
|
||||
@@ -151,7 +151,7 @@ QobuzService::QobuzService(Application *app, QObject *parent)
|
||||
timer_login_attempt_->setSingleShot(true);
|
||||
QObject::connect(timer_login_attempt_, &QTimer::timeout, this, &QobuzService::ResetLoginAttempts);
|
||||
|
||||
QObject::connect(this, &QobuzService::Login, this, &QobuzService::SendLogin);
|
||||
QObject::connect(this, &QobuzService::RequestLogin, this, &QobuzService::SendLogin);
|
||||
QObject::connect(this, &QobuzService::LoginWithCredentials, this, &QobuzService::SendLoginWithCredentials);
|
||||
|
||||
QObject::connect(this, &QobuzService::AddArtists, favorite_request_, &QobuzFavoriteRequest::AddArtists);
|
||||
@@ -479,7 +479,7 @@ void QobuzService::TryLogin() {
|
||||
return;
|
||||
}
|
||||
|
||||
emit Login();
|
||||
emit RequestLogin();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -227,11 +227,11 @@ void QobuzStreamURLRequest::StreamURLReceived() {
|
||||
}
|
||||
int samplerate = -1;
|
||||
if (json_obj.contains("sampling_rate")) {
|
||||
samplerate = json_obj["sampling_rate"].toDouble() * 1000;
|
||||
samplerate = static_cast<int>(json_obj["sampling_rate"].toDouble()) * 1000;
|
||||
}
|
||||
int bit_depth = -1;
|
||||
if (json_obj.contains("bit_depth")) {
|
||||
bit_depth = json_obj["bit_depth"].toDouble();
|
||||
bit_depth = static_cast<int>(json_obj["bit_depth"].toDouble());
|
||||
}
|
||||
|
||||
emit StreamURLFinished(original_url_, url, filetype, samplerate, bit_depth, duration);
|
||||
|
||||
Reference in New Issue
Block a user