[Development] call for comments/review QSystemInfo::NetworkInfo API
Lorn Potter
lorn.potter at gmail.com
Wed Sep 24 12:08:28 CEST 2014
On 24 Sep 2014, at 3:57 pm, Simon Hausmann <simon.hausmann at digia.com> wrote:
>
> I wonder if the"int interface" indexed API is tedious to use. Say you do
> manage to get a QNetworkInterface object from QtNetwork, then before you can
> call for example
>
> QString imsi(int interface) const;
>
> you have to retrieve the index() from the network interface first. It feels
> like a very procedural API.
Yes, it is tedious and a bit odd to me, and is one thing I do not like about it.
A lot of those don't have anything to do with any particular network interface.
It wasn't this way in QtMobility, I wasn't on the team that ported this to Qt 5, so I am not sure of the reasoning of it.
> Half of the "getters" would IMO be a nicer fit if they were part of the
> QNetworkInterface API. Then they would make for a really nice property based
> API - and we just may have to delegate some functionality into plugins
> implementation wise?
>
> When it comes to the notification signals I also wonder if it would be better
> to have a QNetworkInterfaceMonitor alike class in QtNetwork that supplies the
> notifications (for an interface mask perhaps).
>
>
> From a 10000 feet Qt as a product point of view, it's not evident why this API
> belongs into a separate module instead of simply into the Qt network module.
I agree.
More information about the Development
mailing list