mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-16 19:31:02 +01:00
Make the code clearer.
This commit is contained in:
parent
de0f9a4213
commit
7f4d467c27
@ -76,7 +76,8 @@ TranscodeDialog::TranscodeDialog(QWidget* parent)
|
|||||||
last_add_dir_ = s.value("last_add_dir", QDir::homePath()).toString();
|
last_add_dir_ = s.value("last_add_dir", QDir::homePath()).toString();
|
||||||
last_import_dir_ = s.value("last_import_dir", QDir::homePath()).toString();
|
last_import_dir_ = s.value("last_import_dir", QDir::homePath()).toString();
|
||||||
|
|
||||||
QString last_output_format = s.value("last_output_format", "audio/x-vorbis").toString();
|
QString last_output_format =
|
||||||
|
s.value("last_output_format", "audio/x-vorbis").toString();
|
||||||
for (int i = 0; i < ui_->format->count(); ++i) {
|
for (int i = 0; i < ui_->format->count(); ++i) {
|
||||||
if (last_output_format ==
|
if (last_output_format ==
|
||||||
ui_->format->itemData(i).value<TranscoderPreset>().codec_mimetype_) {
|
ui_->format->itemData(i).value<TranscoderPreset>().codec_mimetype_) {
|
||||||
@ -171,8 +172,12 @@ void TranscodeDialog::Cancel() {
|
|||||||
SetWorking(false);
|
SetWorking(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TranscodeDialog::JobComplete(const QString& input, const QString& output, bool success) {
|
void TranscodeDialog::JobComplete(const QString& input, const QString& output,
|
||||||
(*(success ? &finished_success_ : &finished_failed_))++;
|
bool success) {
|
||||||
|
if (success)
|
||||||
|
finished_success_++;
|
||||||
|
else
|
||||||
|
finished_failed_++;
|
||||||
queued_--;
|
queued_--;
|
||||||
|
|
||||||
UpdateStatusText();
|
UpdateStatusText();
|
||||||
|
Loading…
Reference in New Issue
Block a user