fix: Redundant condition
If cacheSaveDevice is false, then if must be true; if cacheSaveDevice is true, then only need to judgewhether !cacheSaveDevice->isOpen() is true or not, sothe second judgment condition on cacheSaveDevice I thinkit is not necessary. eg: '!A || (A && B)' is equivalent to '!A || B' Change-Id: Ie8ff3424a1f859c1f5b7c0fd62e6896d464b522e Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
parent
1e57371695
commit
4cdc4c9242
@ -1048,7 +1048,7 @@ void QNetworkReplyHttpImplPrivate::initCacheSaveDevice()
|
||||
if (cacheSaveDevice)
|
||||
q->connect(cacheSaveDevice, SIGNAL(aboutToClose()), SLOT(_q_cacheSaveDeviceAboutToClose()));
|
||||
|
||||
if (!cacheSaveDevice || (cacheSaveDevice && !cacheSaveDevice->isOpen())) {
|
||||
if (!cacheSaveDevice || !cacheSaveDevice->isOpen()) {
|
||||
if (Q_UNLIKELY(cacheSaveDevice && !cacheSaveDevice->isOpen()))
|
||||
qCritical("QNetworkReplyImpl: network cache returned a device that is not open -- "
|
||||
"class %s probably needs to be fixed",
|
||||
|
Loading…
x
Reference in New Issue
Block a user