mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-03 12:47:31 +01:00
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(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]() {
|
||||
this->Finished(*ripper, /*progress_to_display = */ 0.0f);
|
||||
this->Finished(ripper, /*progress_to_display = */ 0.0f);
|
||||
});
|
||||
|
||||
ui_->progress_bar->setRange(0, 100);
|
||||
transcoding_progress_timer_connection_ =
|
||||
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.
|
||||
ripper->ClearTracks();
|
||||
@ -351,9 +351,9 @@ void RipCDDialog::DeviceSelected(int device_index) {
|
||||
SLOT(SongsLoaded(SongList)));
|
||||
}
|
||||
|
||||
void RipCDDialog::Finished(Ripper& ripper, float progress_to_display) {
|
||||
void RipCDDialog::Finished(Ripper* ripper, float progress_to_display) {
|
||||
SetWorking(false);
|
||||
ripper.deleteLater();
|
||||
ripper->deleteLater();
|
||||
transcoding_progress_timer_.stop();
|
||||
disconnect(transcoding_progress_timer_connection_);
|
||||
|
||||
@ -531,10 +531,10 @@ void RipCDDialog::UpdateMetadataFromGUI() {
|
||||
UpdateFileNamePreviews();
|
||||
}
|
||||
|
||||
void RipCDDialog::TranscodingProgressTimeout(Ripper& ripper) {
|
||||
void RipCDDialog::TranscodingProgressTimeout(Ripper* ripper) {
|
||||
if (working_) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ class RipCDDialog : public QDialog {
|
||||
void SelectNone();
|
||||
void InvertSelection();
|
||||
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 DiscChanged();
|
||||
void FormatStringUpdated();
|
||||
@ -65,7 +65,7 @@ class RipCDDialog : public QDialog {
|
||||
void YearEditChanged(const QString& year_string);
|
||||
void UpdateMetadataEdits();
|
||||
void UpdateMetadataFromGUI();
|
||||
void TranscodingProgressTimeout(Ripper& ripper);
|
||||
void TranscodingProgressTimeout(Ripper* ripper);
|
||||
|
||||
private:
|
||||
static const char* kSettingsGroup;
|
||||
|
Loading…
x
Reference in New Issue
Block a user