Diffusion KIO 0cd60ea7ee94

[HostInfo] Return a no-op QHostInfo when a host isn't found in the KIO DNS cache

Authored by ahmadsamir on May 26 2020, 9:37 AM.

Description

[HostInfo] Return a no-op QHostInfo when a host isn't found in the KIO DNS cache

Here is the chain, AFAIU, in order:
LocalDomainUriFilter::exists()
KUriFilterPlugin::resolveName()
KIO::HostInfo::lookupHost()
HostInfo::lookupCachedHostInfoFor()

the latter would return a default constructed QHostInfo object, calling
error() on it would return QHostInfo::NoError, which is wrong since we
didn't find that host in the KIO DNS cache.

This made the KUriFilterTest::executables unit test fail when there's
something with the connection and both the DNS lookup times out and the
host can't be found the KIO cache.

Thanks to Ben Gruber in the bug report for figuring it out. I've
verified the whole sequence by following the code via gdb.

BUG: 421878

FIXED-IN: 5.71.0

Details

Committed
ahmadsamirMay 26 2020, 9:37 AM
Parents
R241:9d68a216a6d8: KFileItem: localize timeString
Branches
Unknown
Tags
Unknown
References
refs/backups/branch-work/kio-hostinfo-1590563671