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)
2022-04-07 13:48:38 +02:00
committed by Jonathan Bagg
parent c48fc95cf1
commit 58e8f6ee1c
2 changed files with 2 additions and 2 deletions

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

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