|
1 | 1 | /************************************************************************** |
2 | 2 | * Otter Browser: Web browser controlled by the user, not vice-versa. |
3 | 3 | * 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]> |
5 | 5 | * |
6 | 6 | * This program is free software: you can redistribute it and/or modify |
7 | 7 | * it under the terms of the GNU General Public License as published by |
@@ -277,10 +277,18 @@ void DataExchangerDialog::setupResults(DataExchanger *exchanger) |
277 | 277 | m_ui->buttonBox->addButton(QDialogButtonBox::Abort)->setEnabled(exchanger->canCancel()); |
278 | 278 | m_ui->stackedWidget->setCurrentWidget(m_ui->resultsPage); |
279 | 279 |
|
| 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 | + |
280 | 289 | connect(m_ui->buttonBox, &QDialogButtonBox::rejected, exchanger, &DataExchanger::cancel); |
281 | 290 | connect(exchanger, &DataExchanger::exchangeStarted, this, &DataExchangerDialog::handleExchangeStarted); |
282 | 291 | connect(exchanger, &DataExchanger::exchangeProgress, this, &DataExchangerDialog::handleExchangeProgress); |
283 | | - connect(exchanger, &DataExchanger::exchangeFinished, this, &DataExchangerDialog::handleExportFinished); |
284 | 292 | disconnect(m_ui->buttonBox, &QDialogButtonBox::rejected, this, &DataExchangerDialog::reject); |
285 | 293 | } |
286 | 294 |
|
|
0 commit comments