Skip to content

Commit ac06ed6

Browse files
committed
Show correct error message on failure, references #1614
1 parent ec085de commit ac06ed6

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/ui/DataExchangerDialog.cpp

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**************************************************************************
22
* Otter Browser: Web browser controlled by the user, not vice-versa.
33
* Copyright (C) 2014 - 2016 Piotr Wójcik <[email protected]>
4-
* Copyright (C) 2015 - 2021 Michal Dutkiewicz aka Emdek <[email protected]>
4+
* Copyright (C) 2015 - 2022 Michal Dutkiewicz aka Emdek <[email protected]>
55
*
66
* This program is free software: you can redistribute it and/or modify
77
* it under the terms of the GNU General Public License as published by
@@ -277,10 +277,18 @@ void DataExchangerDialog::setupResults(DataExchanger *exchanger)
277277
m_ui->buttonBox->addButton(QDialogButtonBox::Abort)->setEnabled(exchanger->canCancel());
278278
m_ui->stackedWidget->setCurrentWidget(m_ui->resultsPage);
279279

280+
if (exchanger->getExchangeDirection() == DataExchanger::ImportDirection)
281+
{
282+
connect(exchanger, &DataExchanger::exchangeFinished, this, &DataExchangerDialog::handleImportFinished);
283+
}
284+
else
285+
{
286+
connect(exchanger, &DataExchanger::exchangeFinished, this, &DataExchangerDialog::handleExportFinished);
287+
}
288+
280289
connect(m_ui->buttonBox, &QDialogButtonBox::rejected, exchanger, &DataExchanger::cancel);
281290
connect(exchanger, &DataExchanger::exchangeStarted, this, &DataExchangerDialog::handleExchangeStarted);
282291
connect(exchanger, &DataExchanger::exchangeProgress, this, &DataExchangerDialog::handleExchangeProgress);
283-
connect(exchanger, &DataExchanger::exchangeFinished, this, &DataExchangerDialog::handleExportFinished);
284292
disconnect(m_ui->buttonBox, &QDialogButtonBox::rejected, this, &DataExchangerDialog::reject);
285293
}
286294

src/ui/DataExchangerDialog.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**************************************************************************
22
* Otter Browser: Web browser controlled by the user, not vice-versa.
33
* Copyright (C) 2014 - 2015 Piotr Wójcik <[email protected]>
4-
* Copyright (C) 2015 - 2021 Michal Dutkiewicz aka Emdek <[email protected]>
4+
* Copyright (C) 2015 - 2022 Michal Dutkiewicz aka Emdek <[email protected]>
55
*
66
* This program is free software: you can redistribute it and/or modify
77
* it under the terms of the GNU General Public License as published by

0 commit comments

Comments
 (0)