* @brief Appends a timestamped entry to the activity log. */
| 756 | * @brief Appends a timestamped entry to the activity log. |
| 757 | */ |
| 758 | void IO::FileTransmission::appendLog(const QString& message) |
| 759 | { |
| 760 | auto timestamp = QTime::currentTime().toString("HH:mm:ss"); |
| 761 | m_logEntries.append(QStringLiteral("[%1] %2").arg(timestamp, message)); |
| 762 | |
| 763 | while (m_logEntries.size() > kMaxLogEntries) |
| 764 | m_logEntries.removeFirst(); |
| 765 | |
| 766 | Q_EMIT logChanged(); |
| 767 | } |
| 768 | |
| 769 | /** |
| 770 | * @brief Connects a protocol's signals to the FileTransmission controller slots. |