core: use C++ constructs in save-html.cpp

Since this is the only caller, onvert the get_file_name() function
to return an std::string.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-03-10 16:41:56 +01:00 committed by bstoeger
parent 82ba236859
commit e65ba50c1a
3 changed files with 69 additions and 73 deletions

View file

@ -358,10 +358,10 @@ extern "C" char *move_away(const char *old_path)
return copy_qstring(newPath);
}
extern "C" char *get_file_name(const char *fileName)
std::string get_file_name(const char *fileName)
{
QFileInfo fileInfo(fileName);
return copy_qstring(fileInfo.fileName());
return fileInfo.fileName().toStdString();
}
extern "C" void copy_image_and_overwrite(const char *cfileName, const char *path, const char *cnewName)