RipCDDialog: References to pointers in function args.
This commit is contained in:
parent
794c1b8c92
commit
a504c1d391
|
@ -217,16 +217,16 @@ void RipCDDialog::ClickedRipButton() {
|
||||||
connect(cancel_button_, SIGNAL(clicked()), ripper, SLOT(Cancel()));
|
connect(cancel_button_, SIGNAL(clicked()), ripper, SLOT(Cancel()));
|
||||||
|
|
||||||
connect(ripper, &Ripper::Finished, this, [this, ripper]() {
|
connect(ripper, &Ripper::Finished, this, [this, ripper]() {
|
||||||
this->Finished(*ripper, /*progress_to_display = */ 1.0f);
|
this->Finished(ripper, /*progress_to_display = */ 1.0f);
|
||||||
});
|
});
|
||||||
connect(ripper, &Ripper::Cancelled, this, [this, ripper]() {
|
connect(ripper, &Ripper::Cancelled, this, [this, ripper]() {
|
||||||
this->Finished(*ripper, /*progress_to_display = */ 0.0f);
|
this->Finished(ripper, /*progress_to_display = */ 0.0f);
|
||||||
});
|
});
|
||||||
|
|
||||||
ui_->progress_bar->setRange(0, 100);
|
ui_->progress_bar->setRange(0, 100);
|
||||||
transcoding_progress_timer_connection_ =
|
transcoding_progress_timer_connection_ =
|
||||||
connect(&transcoding_progress_timer_, &QTimer::timeout, this,
|
connect(&transcoding_progress_timer_, &QTimer::timeout, this,
|
||||||
[this, ripper]() { this->TranscodingProgressTimeout(*ripper); });
|
[this, ripper]() { this->TranscodingProgressTimeout(ripper); });
|
||||||
|
|
||||||
// Add tracks and album information to the ripper.
|
// Add tracks and album information to the ripper.
|
||||||
ripper->ClearTracks();
|
ripper->ClearTracks();
|
||||||
|
@ -351,9 +351,9 @@ void RipCDDialog::DeviceSelected(int device_index) {
|
||||||
SLOT(SongsLoaded(SongList)));
|
SLOT(SongsLoaded(SongList)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void RipCDDialog::Finished(Ripper& ripper, float progress_to_display) {
|
void RipCDDialog::Finished(Ripper* ripper, float progress_to_display) {
|
||||||
SetWorking(false);
|
SetWorking(false);
|
||||||
ripper.deleteLater();
|
ripper->deleteLater();
|
||||||
transcoding_progress_timer_.stop();
|
transcoding_progress_timer_.stop();
|
||||||
disconnect(transcoding_progress_timer_connection_);
|
disconnect(transcoding_progress_timer_connection_);
|
||||||
|
|
||||||
|
@ -531,10 +531,10 @@ void RipCDDialog::UpdateMetadataFromGUI() {
|
||||||
UpdateFileNamePreviews();
|
UpdateFileNamePreviews();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RipCDDialog::TranscodingProgressTimeout(Ripper& ripper) {
|
void RipCDDialog::TranscodingProgressTimeout(Ripper* ripper) {
|
||||||
if (working_) {
|
if (working_) {
|
||||||
int progress =
|
int progress =
|
||||||
qBound(0, static_cast<int>(ripper.GetProgress() * 100.0f), 100);
|
qBound(0, static_cast<int>(ripper->GetProgress() * 100.0f), 100);
|
||||||
ui_->progress_bar->setValue(progress);
|
ui_->progress_bar->setValue(progress);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ class RipCDDialog : public QDialog {
|
||||||
void SelectNone();
|
void SelectNone();
|
||||||
void InvertSelection();
|
void InvertSelection();
|
||||||
void DeviceSelected(int device_index);
|
void DeviceSelected(int device_index);
|
||||||
void Finished(Ripper& ripper, float progress_to_display);
|
void Finished(Ripper* ripper, float progress_to_display);
|
||||||
void SongsLoaded(const SongList& songs);
|
void SongsLoaded(const SongList& songs);
|
||||||
void DiscChanged();
|
void DiscChanged();
|
||||||
void FormatStringUpdated();
|
void FormatStringUpdated();
|
||||||
|
@ -65,7 +65,7 @@ class RipCDDialog : public QDialog {
|
||||||
void YearEditChanged(const QString& year_string);
|
void YearEditChanged(const QString& year_string);
|
||||||
void UpdateMetadataEdits();
|
void UpdateMetadataEdits();
|
||||||
void UpdateMetadataFromGUI();
|
void UpdateMetadataFromGUI();
|
||||||
void TranscodingProgressTimeout(Ripper& ripper);
|
void TranscodingProgressTimeout(Ripper* ripper);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const char* kSettingsGroup;
|
static const char* kSettingsGroup;
|
||||||
|
|
Loading…
Reference in New Issue