summaryrefslogtreecommitdiffstats
path: root/qthelper.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-21 10:29:02 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-21 12:49:05 -0700
commitc9d48c9a72eec39b614d1d59e3c9fdd66e5a3ab0 (patch)
tree2b8c8fd9da79ed7e35e088f795e0a92b5d077ecd /qthelper.cpp
parent97386a6f3d1667f293ab621fd8ae8a3ec2bf2ef2 (diff)
downloadsubsurface-c9d48c9a72eec39b614d1d59e3c9fdd66e5a3ab0.tar.gz
Add helper function to return local filename of picture as C string
This way we can actually find the picture that we are showing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qthelper.cpp')
-rw-r--r--qthelper.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qthelper.cpp b/qthelper.cpp
index aab06d8b1..3f904d6f1 100644
--- a/qthelper.cpp
+++ b/qthelper.cpp
@@ -881,6 +881,12 @@ void learnImages(const QDir dir, int max_recursions, bool recursed)
QtConcurrent::blockingMap(files, hashFile);
}
+extern "C" const char *local_file_path(struct picture *picture)
+{
+ QString localFileName = fileFromHash(picture->hash);
+ return strdup(qPrintable(localFileName));
+}
+
extern "C" void picture_load_exif_data(struct picture *p)
{
EXIFInfo exif;