AvahiCode + Bonjour: use correct datatype for pos

ssize_t is not available on windows (at least not with msvc2019). Use
int as QByteArray::indexOf is defined with int return type.
This commit is contained in:
David Kahles (KDV) authored and Jonathan Bagg committed 2022-04-08 21:16:16 -04:00
1 parent c48fc95cf1
commit 58e8f6ee1c
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -183,7 +183,7 @@ public:
while (txt) // get txt records
{
QByteArray avahiText((const char *)txt->text, txt->size);
const ssize_t pos = avahiText.indexOf('=');
const int pos = avahiText.indexOf('=');
if (pos < 0)
zcs->m_txt[avahiText] = "";
else
+1 -1
View File
@@ -167,7 +167,7 @@ void DNSSD_API QZeroConfPrivate::resolverCallback(DNSServiceRef, DNSServiceFlags
recLen = txtRecord[0];
txtRecord++;
QByteArray avahiText(reinterpret_cast<const char *>(txtRecord), recLen);
const ssize_t pos = avahiText.indexOf('=');
const int pos = avahiText.indexOf('=');
if (pos < 0)
resolver->zcs->m_txt[avahiText] = "";
else