Skip to content

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

Ahmad Samir requested to merge work/kio-hostinfo into master

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

Merge request reports