diff options
author | Robert C. Helling <helling@atdotde.de> | 2017-02-21 10:00:16 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-02-21 13:14:56 -0800 |
commit | dbd99f706ecb6074d5f80573a881b98a3e30ce25 (patch) | |
tree | 8acf5a2ce48e6a148cd9ebd6761faa97f3df1869 /core/qthelper.cpp | |
parent | 508387b1e194d4d723b2bd8cb2c48d49e2c95ba9 (diff) | |
download | subsurface-dbd99f706ecb6074d5f80573a881b98a3e30ce25.tar.gz |
Many filenames are const strings
So we can use string constants for those
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'core/qthelper.cpp')
-rw-r--r-- | core/qthelper.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/qthelper.cpp b/core/qthelper.cpp index 39461c7eb..eb68fe206 100644 --- a/core/qthelper.cpp +++ b/core/qthelper.cpp @@ -352,7 +352,7 @@ extern "C" xsltStylesheetPtr get_stylesheet(const char *name) } -extern "C" timestamp_t picture_get_timestamp(char *filename) +extern "C" timestamp_t picture_get_timestamp(const char *filename) { easyexif::EXIFInfo exif; memblock mem; @@ -999,7 +999,7 @@ QMutex hashOfMutex; QHash<QByteArray, QString> localFilenameOf; QHash <QString, QImage > thumbnailCache; -extern "C" char * hashstring(char * filename) +extern "C" char * hashstring(const char *filename) { QMutexLocker locker(&hashOfMutex); return hashOf[QString(filename)].toHex().data(); @@ -1084,7 +1084,7 @@ void learnHash(struct picture *picture, QByteArray hash) picture->hash = strdup(hash.toHex()); } -bool haveHash(QString &filename) +bool haveHash(const QString &filename) { QMutexLocker locker(&hashOfMutex); return hashOf.contains(filename); @@ -1100,7 +1100,7 @@ QString localFilePath(const QString originalFilename) return originalFilename; } -QString fileFromHash(char *hash) +QString fileFromHash(const char *hash) { if (!hash || !*hash) return ""; |