Commit f347ff48 authored by Patrick José Pereira's avatar Patrick José Pereira

LogDownloadControlle: Remove QString constructor with tr

Signed-off-by: 's avatarPatrick José Pereira <patrickelectric@gmail.com>
parent f6bd5c0d
......@@ -177,7 +177,7 @@ LogDownloadController::_logEntry(UASInterface* uas, uint32_t time_utc, uint32_t
entry->setSize(size);
entry->setTime(QDateTime::fromTime_t(time_utc));
entry->setReceived(true);
entry->setStatus(QString(tr("Available")));
entry->setStatus(tr("Available"));
} else {
qWarning() << "Received log entry for out-of-bound index:" << id;
}
......@@ -224,7 +224,7 @@ LogDownloadController::_resetSelection(bool canceled)
if(entry) {
if(entry->selected()) {
if(canceled) {
entry->setStatus(QString(tr("Canceled")));
entry->setStatus(tr("Canceled"));
}
entry->setSelected(false);
}
......@@ -271,7 +271,7 @@ LogDownloadController::_findMissingEntries()
for(int i = 0; i < num_logs; i++) {
QGCLogEntry* entry = _logEntriesModel[i];
if(entry && !entry->received()) {
entry->setStatus(QString(tr("Error")));
entry->setStatus(tr("Error"));
}
}
//-- Give up
......@@ -357,7 +357,7 @@ LogDownloadController::_logData(UASInterface* uas, uint32_t ofs, uint16_t id, ui
_timer.start(timeout_time);
//-- Do we have it all?
if(_logComplete()) {
_downloadData->entry->setStatus(QString(tr("Downloaded")));
_downloadData->entry->setStatus(tr("Downloaded"));
//-- Check for more
_receivedAllData();
} else if (_chunkComplete()) {
......@@ -376,7 +376,7 @@ LogDownloadController::_logData(UASInterface* uas, uint32_t ofs, uint16_t id, ui
qWarning() << "Received log offset greater than expected";
}
if(!result) {
_downloadData->entry->setStatus(QString(tr("Error")));
_downloadData->entry->setStatus(tr("Error"));
}
}
......@@ -423,7 +423,7 @@ LogDownloadController::_findMissingData()
}
if(_retries++ > 2) {
_downloadData->entry->setStatus(QString(tr("Timed Out")));
_downloadData->entry->setStatus(tr("Timed Out"));
//-- Give up
qWarning() << "Too many errors retreiving log data. Giving up.";
_receivedAllData();
......@@ -541,7 +541,7 @@ void LogDownloadController::downloadToDirectory(const QString& dir)
QGCLogEntry* entry = _logEntriesModel[i];
if(entry) {
if(entry->selected()) {
entry->setStatus(QString(tr("Waiting")));
entry->setStatus(tr("Waiting"));
}
}
}
......@@ -632,7 +632,7 @@ LogDownloadController::_prepareLogDownload()
if (_downloadData->file.exists()) {
_downloadData->file.remove();
}
_downloadData->entry->setStatus(QString(tr("Error")));
_downloadData->entry->setStatus(tr("Error"));
delete _downloadData;
_downloadData = NULL;
}
......@@ -686,7 +686,7 @@ LogDownloadController::cancel(void)
_receivedAllEntries();
}
if(_downloadData) {
_downloadData->entry->setStatus(QString(tr("Canceled")));
_downloadData->entry->setStatus(tr("Canceled"));
if (_downloadData->file.exists()) {
_downloadData->file.remove();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment