Skip to content

Commit e6ca112

Browse files
committed
Fix backward-compatibility down to Qt 5.12.5
1 parent fe1534e commit e6ca112

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

3rdparty/http/src/cachedhttp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class CachedHttp : public Http {
1212
void setMaxSize(uint maxSize);
1313
void setCachePostRequests(bool value) { cachePostRequests = value; }
1414
void setIgnoreHostname(bool value) { ignoreHostname = value; }
15-
auto &getValidators() { return validators; };
15+
QMap<QByteArray, std::function<bool(const HttpReply &)>> &getValidators() { return validators; };
1616
HttpReply *request(const HttpRequest &req);
1717

1818
private:

3rdparty/http/src/localcache.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,11 @@ QByteArray LocalCache::hash(const QByteArray &s) {
4141
}
4242

4343
bool LocalCache::isCached(const QString &path) {
44-
bool cached = QFile::exists(path) &&
44+
/*bool cached = QFile::exists(path) &&
4545
(maxSeconds == 0 || QFileInfo(path).birthTime().secsTo(
46-
QDateTime::currentDateTimeUtc()) < maxSeconds);
47-
#ifndef QT_NO_DEBUG_OUTPUT
48-
if (!cached) misses++;
49-
#endif
50-
return cached;
46+
QDateTime::currentDateTimeUtc()) < maxSeconds);*/
47+
48+
return false; //TODO remove this lib
5149
}
5250

5351
QByteArray LocalCache::value(const QByteArray &key) {
@@ -132,7 +130,6 @@ void LocalCache::expire() {
132130
while (it.hasNext()) {
133131
QString path = it.next();
134132
QFileInfo info = it.fileInfo();
135-
cacheItems.insert(info.birthTime(), path);
136133
totalSize += info.size();
137134
qApp->processEvents();
138135
}

src/subprojects/AutoEqIntegration/GzipDownloader.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ bool GzipDownloader::start(QNetworkReply *reply, QDir _extractionPath)
2121
extractionPath = _extractionPath;
2222
networkReply = reply;
2323
connect(networkReply, &QIODevice::readyRead, this, &GzipDownloader::onDataAvailable);
24-
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
25-
connect(networkReply, &QNetworkReply::error, this, &GzipDownloader::onErrorOccurred);
26-
#else
24+
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
2725
connect(networkReply, &QNetworkReply::errorOccurred, this, &GzipDownloader::onErrorOccurred);
2826
#endif
2927
connect(networkReply, &QNetworkReply::downloadProgress, this, &GzipDownloader::downloadProgressUpdated);

0 commit comments

Comments
 (0)