QNetworkReplyHttpImpl: fix misuse of QDateTime::addSecs()
QDateTime::addSecs() is a const function and returns a new QDateTime with the given seconds added, thus the current statement had no effect. Found by applying Q_REQUIRED_RESULT in dev branch. Change-Id: Id712334f91e0adb40bafc23470bf46479334c81a Reviewed-by: Richard J. Moore <rich@kde.org>bb10
parent
fbeb43135f
commit
6ea574d446
|
|
@ -560,8 +560,7 @@ bool QNetworkReplyHttpImplPrivate::loadFromCacheIfAllowed(QHttpNetworkRequest &h
|
|||
if (!expirationDate.isValid()) {
|
||||
if (lastModified.isValid()) {
|
||||
int diff = currentDateTime.secsTo(lastModified);
|
||||
expirationDate = lastModified;
|
||||
expirationDate.addSecs(diff / 10);
|
||||
expirationDate = lastModified.addSecs(diff / 10);
|
||||
if (httpRequest.headerField("Warning").isEmpty()) {
|
||||
QDateTime dt;
|
||||
dt.setTime_t(current_age);
|
||||
|
|
|
|||
Loading…
Reference in New Issue