core: use std::string in error_callback

No naked free().

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-06-08 23:32:17 +02:00 committed by bstoeger
parent 71f3189a31
commit d05e289507
8 changed files with 40 additions and 74 deletions

View file

@ -15,11 +15,9 @@ QStringList inputFiles;
QString outputFile;
QString error_buf;
void getErrorFromC(char *buf)
void getErrorFromC(std::string buf)
{
QString error(buf);
free(buf);
error_buf = error;
error_buf = QString::fromStdString(std::move(buf));
}
Smrtk2ssrfcWindow::Smrtk2ssrfcWindow(QWidget *parent) :