summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qhostinfo_unix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/kernel/qhostinfo_unix.cpp')
-rw-r--r--src/network/kernel/qhostinfo_unix.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp
index 80d386a13d9..3b0e2d333aa 100644
--- a/src/network/kernel/qhostinfo_unix.cpp
+++ b/src/network/kernel/qhostinfo_unix.cpp
@@ -123,8 +123,8 @@ QString QHostInfo::localDomainName()
return QString(); // failure
QString domainName;
- while (!resolvconf.atEnd()) {
- const QByteArray lineArray = resolvconf.readLine();
+ QByteArray lineArray;
+ while (resolvconf.readLineInto(&lineArray)) {
QByteArrayView line = QByteArrayView(lineArray).trimmed();
constexpr QByteArrayView domainWithSpace = "domain ";
if (line.startsWith(domainWithSpace))