* @brief Handles protocol transfer completion. */
| 647 | * @brief Handles protocol transfer completion. |
| 648 | */ |
| 649 | void IO::FileTransmission::onProtocolFinished(bool success, const QString& errorMessage) |
| 650 | { |
| 651 | m_speedUpdateTimer.stop(); |
| 652 | |
| 653 | if (success) { |
| 654 | m_statusText = tr("Transfer complete"); |
| 655 | appendLog(tr("Transfer completed successfully (%1 bytes)").arg(m_bytesSent)); |
| 656 | } else { |
| 657 | m_statusText = tr("Transfer failed: %1").arg(errorMessage); |
| 658 | appendLog(tr("Transfer failed: %1").arg(errorMessage)); |
| 659 | } |
| 660 | |
| 661 | Q_EMIT statusTextChanged(); |
| 662 | Q_EMIT activeChanged(); |
| 663 | } |
| 664 | |
| 665 | /** |
| 666 | * @brief Updates progress from protocol handlers. |