summaryrefslogtreecommitdiffstats
path: root/qthelper.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-21 11:55:40 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-21 12:49:05 -0700
commit174cb1ffb10d846834fdfd1538d128744dffd65c (patch)
tree420b55fd9e47210a46c874e08e6ea2faa2ae0edb /qthelper.cpp
parent31fbc167850572f034c7fbb8551e10e0cfd7ca29 (diff)
downloadsubsurface-174cb1ffb10d846834fdfd1538d128744dffd65c.tar.gz
HTML export: need to work harder to find the pictures
Simply looking at the filename in the picture structure isn't enough (now, arguably one might say that it should be and that that data structure should be updated, but that's not how other parts of Subsurface have implemented things so I don't want to break that assumption here). So instead we look up where the pictures actually was loaded from and then copy that file into the right location. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qthelper.cpp')
-rw-r--r--qthelper.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/qthelper.cpp b/qthelper.cpp
index abf8641ae..09d383bc8 100644
--- a/qthelper.cpp
+++ b/qthelper.cpp
@@ -369,11 +369,11 @@ extern "C" char *get_file_name(const char *fileName)
return strdup(fileInfo.fileName().toUtf8());
}
-extern "C" void copy_image_and_overwrite(const char *cfileName, const char *cnewName)
+extern "C" void copy_image_and_overwrite(const char *cfileName, const char *path, const char *cnewName)
{
- QString fileName = QString::fromUtf8(cfileName);
- QString newName = QString::fromUtf8(cnewName);
- newName += QFileInfo(cfileName).fileName();
+ QString fileName(cfileName);
+ QString newName(path);
+ newName += cnewName;
QFile file(newName);
if (file.exists())
file.remove();