mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: Make local helpers and variables of static linkage
In core/imagedownloader.cpp the helpers cloudImageUrl() and loadPicture() are made of static linkage. The global variables queuedPictures and pictureQueueMutex were moved into the loadPicture() function, because they are used only there. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
218ea94831
commit
9986ce25d7
2 changed files with 5 additions and 8 deletions
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include <QtConcurrent>
|
||||
|
||||
QUrl cloudImageURL(const char *hash)
|
||||
static QUrl cloudImageURL(const char *hash)
|
||||
{
|
||||
return QUrl::fromUserInput(QString("https://cloud.subsurface-divelog.org/images/").append(hash));
|
||||
}
|
||||
|
@ -78,11 +78,11 @@ void ImageDownloader::saveImage(QNetworkReply *reply)
|
|||
|
||||
}
|
||||
|
||||
QSet<QString> queuedPictures;
|
||||
QMutex pictureQueueMutex;
|
||||
|
||||
void loadPicture(struct picture *picture, bool fromHash)
|
||||
static void loadPicture(struct picture *picture, bool fromHash)
|
||||
{
|
||||
static QSet<QString> queuedPictures;
|
||||
static QMutex pictureQueueMutex;
|
||||
|
||||
if (!picture)
|
||||
return;
|
||||
QMutexLocker locker(&pictureQueueMutex);
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
|
||||
typedef QPair<QString, QByteArray> SHashedFilename;
|
||||
|
||||
extern QUrl cloudImageURL(const char *hash);
|
||||
|
||||
|
||||
class ImageDownloader : public QObject {
|
||||
Q_OBJECT;
|
||||
public:
|
||||
|
|
Loading…
Add table
Reference in a new issue