[Development] Octal IP in Version 5,1 ?

Randolph D. rdohm321 at gmail.com
Sun Aug 18 20:27:48 CEST 2013


hi
nah, that´s not the best. All people I spoke tell me, that it is
misleading, breaking connections and it is breaking behaviour from 4.8 to
5.1 and it is not documented. Furthermore how should anyone compile the
whole QT new, in case no one knows, that and even does not know that this
app needs a non-octale ip ?
Maybe you can revert this, as user -added IP addresses will break every
manually entered IP address.
I wounder why not even more App Developers have this problem.

Instead I suggest a revert to the old behaviour, or, a defined layout
widget, which allows to enter only all 3 digits with IP as well with zero
as a default must,

That means, a widget, which is adding by an automatism  the zero :_34:
results in :034:  and :34_: results in :340:
while I even do not know, if .34 is the same as .340.
this really not good.

any suggestions how to make it better? If not, another idea would be to
have the  established style behaviour setable by a qt widget, which is
defined for that.

Thanks so much!


2013/8/18 Thiago Macieira <thiago.macieira at intel.com>

> On domingo, 18 de agosto de 2013 16:59:13, Randolph D. wrote:
> > I wounder who invented this nonsense, that with entering an IP Address
> and
>
> I did.
>
> >  if there is a leading 0, it is interpreted as octal, base 8
> >  010 octal is 8 decimal
> >
> > this means users have to enter this carefully?
> >
> > Any idea how to make it simple like in Qt 4,8
>
> The idea was to make the IP parsing do what inet_aton does.
>
> Testing with python:
> >>> import socket
> >>> socket.inet_aton("010.1.1.1")
> '\x08\x01\x01\x01'
> >>> socket.inet_aton("0.0.0.010")
> '\x00\x00\x00\x08'
> >>> socket.inet_aton("0.0.0.018")
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> socket.error: illegal IP address string passed to inet_aton
>
> If you don't like this behaviour, edit qipaddress.cpp and on line 97,
> change
>         quint64 ll = qstrtoull(ptr, &endptr, 0, &ok);
> to
>         quint64 ll = qstrtoull(ptr, &endptr, 10, &ok);
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130818/2a6a41b2/attachment.html>


More information about the Development mailing list