mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] QUdpSocket does not work in qt5 - any tips?
Date: Wed, 18 Nov 2015 18:03:24 +0100	[thread overview]
Message-ID: <20151118170324.GD28802@pengutronix.de> (raw)
In-Reply-To: <em244c3584-c73f-4540-a0e9-6d514c6220cd@nb-mak>

Hi,

On Sun, Nov 15, 2015 at 11:35:12AM +0000, Matthias Klein wrote:
> I can not get QUdpSocket working to receive broadcast messages with Qt5 from
> ptxdist (non GUI build).
> I have attached a minimal code example. Such code was working fine when
> building against Qt 4.8.7.
> I have tested the code on Windows with Qt 5.5.1 and under Debian Linux with
> Qt 5.3.2.
> 
> I also tried to build different versions of Qt with ptxdist: 5.4.1 and 5.5.1
> (I adapted the patches accordingly).
> 
> When the test programm runs I see that the receive queue fills in netstat
> -a:
> Proto Recv-Q Send-Q Local Address           Foreign Address         State
> udp     1024      0 (null):5025             (null):*
> I think that the bind works, but the packets are not delivered with the Qt
> signal.
> I tried to receive broadcast messages using plain C code (bind(),
> recvfrom(), etc.) which works fine.
> 
> Therefore I think it is a Qt problem. But I tested three different versions
> (5.4.2 from ptxdist and 5.4.1 + 5.5.1), that I can not believe it really.
> Does anyone successfully used QUdpSocket from a ptxdist Qt 5 build?

Try it with QT5_GLIB enabled. All Desktop Distributions use Qt with the
glib mainloop. Maybe there is a Bug in the non-glib file descriptor
handling code.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  parent reply	other threads:[~2015-11-18 17:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-15 11:35 Matthias Klein
2015-11-18  9:39 ` Tim Sander
2015-11-18 10:02   ` Matthias Klein
2015-11-18 17:03 ` Michael Olbrich [this message]
2015-11-18 20:32   ` Matthias Klein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151118170324.GD28802@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox