forked from jbagg/QtZeroConf
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:
committed by
Jonathan Bagg
parent
c48fc95cf1
commit
58e8f6ee1c
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user