aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/qthelper.cpp8
-rw-r--r--core/qthelper.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/core/qthelper.cpp b/core/qthelper.cpp
index e03f86739..cacee776b 100644
--- a/core/qthelper.cpp
+++ b/core/qthelper.cpp
@@ -1127,7 +1127,7 @@ void write_hashes()
}
}
-void add_hash(const QString filename, QByteArray hash)
+void add_hash(const QString &filename, const QByteArray &hash)
{
if (hash.isEmpty())
return;
@@ -1136,7 +1136,7 @@ void add_hash(const QString filename, QByteArray hash)
localFilenameOf[hash] = filename;
}
-QByteArray hashFile(const QString filename)
+QByteArray hashFile(const QString &filename)
{
QCryptographicHash hash(QCryptographicHash::Sha1);
QFile imagefile(filename);
@@ -1164,7 +1164,7 @@ static bool haveHash(const QString &filename)
return hashOf.contains(filename);
}
-QString localFilePath(const QString originalFilename)
+QString localFilePath(const QString &originalFilename)
{
QMutexLocker locker(&hashOfMutex);
@@ -1486,7 +1486,7 @@ QByteArray getCurrentAppState()
return currentApplicationState;
}
-void setCurrentAppState(QByteArray state)
+void setCurrentAppState(const QByteArray &state)
{
currentApplicationState = state;
}
diff --git a/core/qthelper.h b/core/qthelper.h
index 948ca234d..516990005 100644
--- a/core/qthelper.h
+++ b/core/qthelper.h
@@ -33,12 +33,12 @@ QString get_divepoint_gas_string(struct dive *d, const divedatapoint& dp);
void read_hashes();
void write_hashes();
void updateHash(struct picture *picture);
-QByteArray hashFile(const QString filename);
+QByteArray hashFile(const QString &filename);
void learnImages(const QDir dir, int max_recursions);
-void add_hash(const QString filename, QByteArray hash);
+void add_hash(const QString &filename, const QByteArray &hash);
void hashPicture(struct picture *picture);
extern "C" char *hashstring(const char *filename);
-QString localFilePath(const QString originalFilename);
+QString localFilePath(const QString &originalFilename);
QString fileFromHash(const char *hash);
void learnHash(const QString &originalName, const QString &localName, const QByteArray &hash);
weight_t string_to_weight(const char *str);
@@ -49,7 +49,7 @@ fraction_t string_to_fraction(const char *str);
int getCloudURL(QString &filename);
bool parseGpsText(const QString &gps_text, double *latitude, double *longitude);
QByteArray getCurrentAppState();
-void setCurrentAppState(QByteArray state);
+void setCurrentAppState(const QByteArray &state);
void init_proxy();
QString getUUID();
QStringList imageExtensionFilters();