From fbda47f0ff523629d97a88661c2545a1ba47a2de Mon Sep 17 00:00:00 2001 From: Gemba Date: Sat, 10 Aug 2024 11:26:21 +0200 Subject: [PATCH] Followup to #82 fix build on qt5, use of stringbuilder --- src/cache.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cache.cpp b/src/cache.cpp index e1400bb6..2c3d6402 100644 --- a/src/cache.cpp +++ b/src/cache.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -84,7 +85,7 @@ bool Cache::createFolders(const QString &scraper) { } bool Cache::read() { - QFile quickIdFile(cacheDir.absolutePath() + "/quickid.xml"); + QFile quickIdFile(cacheDir.absolutePath() % "/quickid.xml"); if (quickIdFile.open(QIODevice::ReadOnly)) { printf("Reading and parsing quick id xml, please wait... "); fflush(stdout); @@ -111,8 +112,7 @@ bool Cache::read() { printf("\033[1;32mDone!\033[0m\n"); } - - QFile cacheFile(cacheDir.absolutePath() + "/db.xml"); + QFile cacheFile(cacheDir.absolutePath() % "/db.xml"); if (cacheFile.open(QIODevice::ReadOnly)) { printf("Building file lookup cache, please wait... "); fflush(stdout); @@ -179,7 +179,7 @@ bool Cache::read() { } resource.value = xml.readElementText(); if (binTypes().contains(resource.type) && - !fileEntries.contains(cacheDir.absolutePath() + "/" + + !fileEntries.contains(cacheDir.absolutePath() % "/" % resource.value)) { printf("Source file '%s' missing, skipping entry...\n", resource.value.toStdString().c_str()); @@ -1991,4 +1991,4 @@ bool Cache::removeMediaFile(Resource &res, const char *msg) { return false; } return true; -} \ No newline at end of file +}