mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
uemis: replace C-strings by std::string and std::string_view
The string code of uemis-downloader.cpp was broken in more ways than can be listed here. Notably, it brazenly refused to free any memory allocated for the parameters buffer. Using std::string and std::string_view should plug all those memory holes. That made it necessary to do some major refactoring. This was done blind and therefore will break. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
16e19b550b
commit
58b3583b3b
9 changed files with 384 additions and 403 deletions
|
@ -330,7 +330,8 @@ void DownloadFromDCWidget::updateState(states state)
|
|||
else if (state == ERRORED) {
|
||||
timer->stop();
|
||||
|
||||
QMessageBox::critical(this, TITLE_OR_TEXT(tr("Error"), diveImportedModel->thread.error), QMessageBox::Ok);
|
||||
QMessageBox::critical(this, TITLE_OR_TEXT(tr("Error"),
|
||||
QString::fromStdString(diveImportedModel->thread.error)), QMessageBox::Ok);
|
||||
markChildrenAsEnabled();
|
||||
progress_bar_text = "";
|
||||
ui.progressBar->hide();
|
||||
|
@ -543,7 +544,7 @@ void DownloadFromDCWidget::onDownloadThreadFinished()
|
|||
showRememberedDCs();
|
||||
|
||||
if (currentState == DOWNLOADING) {
|
||||
if (diveImportedModel->thread.error.isEmpty())
|
||||
if (diveImportedModel->thread.error.empty())
|
||||
updateState(DONE);
|
||||
else
|
||||
updateState(ERRORED);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue