Re: [Development] call for comments/review QSystemInfo::NetworkInfo API

2014-09-23 Thread Chris Adams
Hi Lorn,

In regards to the publish/subscribe and serviceframework bits, I wonder
what the plan is with those.  How much overlap between them and Replicant
is there?  Perhaps Brett could quickly sum up the differences between the
pub/sub module and the Replicant framework, and whether Replicant offers
serviceframework-like functionality also?

I would assume that if there was significant overlap, we would definitely
be better off removing QSystemInfo from that repo, as QSystemInfo is much
more widely used and obviously still relevant, while the other two perhaps
are less utilised in industry - but that's just my opinion.

With regards to the changes to the NetworkInfo API, I'm sure Aaron McCarthy
would be interested in those.  He's on holiday right now but hopefully
he'll get a chance to look at those soon.

Cheers,
Chris.


http://www.qinetic.com.au/  - Qt And QML User
Experience Specialists

On Wed, Sep 24, 2014 at 11:02 AM, Lorn Potter  wrote:

> Hi *,
>
> While looking into a bug
> https://bugreports.qt-project.org/browse/QTBUG-41283
>
> It reminded me that I am not happy with NetworkInfo since it got ported
> from QtMobility to Qt 5.
>
>
> *Note* QSystemInfo is not officially supported API.
>
> Since I am maintainer for it and it's not "released", I am going to change
> it.
>
> For one, I really wish the whole QtSystemInfo code were a separate module
> and not lumped in with two other completely unrelated modules - publish &
> subscribe and serviceframework.
>
>
> If anyone wants to help review/revise this API, take a look (or any other
> QtSystemInfo API's)
>
>
> https://qt.gitorious.org/qt/qtsystems/source/aa651c73bf7bc57c1b6b1bfcfa9afe901884a102:src/systeminfo/qnetworkinfo.h
>
> comments/suggestions welcome.
>
>
>
> ___
> Development mailing list
> Development@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] call for comments/review QSystemInfo::NetworkInfo API

2014-09-23 Thread Simon Hausmann
On Wednesday, September 24, 2014 11:02:26 AM Lorn Potter wrote:
> Hi *,
> 
> While looking into a bug
> https://bugreports.qt-project.org/browse/QTBUG-41283
> 
> It reminded me that I am not happy with NetworkInfo since it got ported from
> QtMobility to Qt 5.
> 
> 
> *Note* QSystemInfo is not officially supported API.
> 
> Since I am maintainer for it and it's not "released", I am going to change
> it.
> 
> For one, I really wish the whole QtSystemInfo code were a separate module
> and not lumped in with two other completely unrelated modules - publish &
> subscribe and serviceframework.
> 
> 
> If anyone wants to help review/revise this API, take a look (or any other
> QtSystemInfo API's)
> 
> https://qt.gitorious.org/qt/qtsystems/source/aa651c73bf7bc57c1b6b1bfcfa9afe9
> 01884a102:src/systeminfo/qnetworkinfo.h
> 
> comments/suggestions welcome.

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.

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 1 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.


Simon
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] call for comments/review QSystemInfo::NetworkInfo API

2014-09-24 Thread Blasche Alexander

> >From a 1 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.

That's a historical reason and Qt's inability to accept such a contribution at 
the time when such changes were needed. This doesn't mean those reasons weren't 
valid at the time. In some cases it is desirable to have QML interfaces for 
those classes and when you move those classes into qtbase the dependencies are 
not correct. I guess one could add them to qtdeclarative as well. After all the 
same has happened for other qtbase classes too.

On the positive side there are quite a few cases in more recent Qt history 
where such moves did happen. The QStorageInfo is an excellent example. The 
QtSystemInfo class with the same name is pretty much obsolete now. As more such 
moves happen I am sure that the content in QSystemInfo diminishes further. I 
would encourage Lorn to consider a merge the network related QNetworkInfo API's 
into QtNetwork. 


> In regards to the publish/subscribe and serviceframework bits, I wonder what
> the plan is with those.  How much overlap between them and Replicant is there?

Potentially there is a significant overlap. The principle is the same and no 
there are no immediate plans for them. It's no different than the jsondb repo 
except that the principle applications are probably somewhat more in demand 
than jsondb.

I wish a day had more than 24hrs 

--
Alex
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] call for comments/review QSystemInfo::NetworkInfo API

2014-09-24 Thread Lorn Potter

On 24 Sep 2014, at 3:57 pm, Simon Hausmann  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 1 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.


___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] call for comments/review QSystemInfo::NetworkInfo API

2014-09-24 Thread Thiago Macieira
On Wednesday 24 September 2014 20:08:28 Lorn Potter wrote:
> > 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.

Probably for the reason Alex brought up: QML. It's easier to deal with integer 
indexes in QML than a QNetworkInterface object.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] call for comments/review QSystemInfo::NetworkInfo API

2014-09-24 Thread Simon Hausmann
On Wednesday, September 24, 2014 08:15:45 AM Thiago Macieira wrote:
> On Wednesday 24 September 2014 20:08:28 Lorn Potter wrote:
> > > 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.
> 
> Probably for the reason Alex brought up: QML. It's easier to deal with
> integer indexes in QML than a QNetworkInterface object.

Why is that?

Besides that it's possible to make a QObject wrapper, I'd think 
QNetworkInterface would be a candidate for Olivier's Q_GADGET work :)


Simon
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development