Works like a charm on my Debian Sid box. I have been putting off migrating to a dependency based boot system for no apparent reason, so I decided to take the plunge and test your app at the same time.
From log.log
DEBUG from main method - Hostname to resolve is "www.google.com"
DEBUG from HostnameResolver::Dns2ip - fromName result: "Unknown error"
DEBUG from HostnameResolver::Dns2ip - Number of IP addresses: "4"
"0" - "72.14.204.104"
"1" - "72.14.204.147"
"2" - "72.14.204.99"
"3" - "72.14.204.103"
www.google.com:72.14.204.104
DEBUG from main method - Hostname to resolve is "www.google.com"
DEBUG from HostnameResolver::Dns2ip - fromName result: "Unknown error"
DEBUG from HostnameResolver::Dns2ip - Number of IP addresses: "4"
"0" - "72.14.204.104"
"1" - "72.14.204.147"
"2" - "72.14.204.99"
"3" - "72.14.204.103"
www.google.com:72.14.204.104
To copy to clipboard, switch view to plain text mode
Regarding the "Unknown error", from the docs:
QString QHostInfo::errorString () const
If the lookup failed, this function returns a human readable description of the error; otherwise "Unknown error" is returned.
QHostInfo::error() returns 0 which is "QHostInfo::NoError".
Bookmarks