[Development] Use of std::function in Qt API
Lisandro Damián Nicanor Pérez Meyer
perezmeyer at gmail.com
Mon Mar 20 19:53:50 CET 2017
On martes, 14 de marzo de 2017 11:32:39 -03 Olivier Goffart wrote:
[snip]
> So here are the choice:
>
> 1- Re-implement QFunction, with similar semantic as std::function.
>
> 2- Lift the constraint that we can't use the stdlib in our ABI
>
> 3- Do nothing and keep using awkward interface when we need callback.
>
>
> #3 is, as usual, the easier (status quo) and will probably happen. #1 is a
> somewhat difficult task, but not that hard. We will just end up with a poor
> copy of std::function. #2 was always dismissed in the past, but I think it
> should be seriously considered.
(quick reply after skimming trough the thread, will read it fully tomorrow
hopefully)
In the (2) case it will mean that we distro packagers will be forced to change
Qt's SONAME. Yeah, the whole of it.
There is a way to get (2) implemented: if Qt exposes an std:: function then it
can add some of it's SONAME to Qt's own (ugly, but...)
So libQt5Core5 would become something like libQt5StdFooCore5 and such. In that
way we can [not so easily] do mass rebuilds of all Qt-using stuff. And if this
happens it would be *much* better if it's somehow coordinated by Qt upstreams
so we can all keep the same SONAME between distros.
[not so easily] there is a *huge* amount of code using Qt and every single
change would mean weeks of work (at very very *very* least 2 or 3 of them). We
need to recompile everything on each arch after all.
Oh, and if some non-other Qt api is exposed it should also become part of the
SONAME.
Not coordinating this at Qt level means that we distros maintainers will be on
our own and each of us will do what we can and there will be mayheam between
distros' solutions and we will start hating each other and... not a nice
situation, really.
So if we are going to only expose libstdc++'s API weshould really consider
making it part of the SONAME. After all we discussed some time ago that the
libstdc++ lib doesn't breaks BC so frequently.
Now what exactly we should expose in the SONAME is another issue.
--
<perrito666> SlackDeb: velo como un entrenamiento shaolin para geeks,
en vez de meditación y tortura física, abstinencia de internet y sexo
Horacio Francisco Sebastián "Perrito" Durán Barrionuevo, sobre un
viaje que Federico "SlackDeb" Peretti estaba planeando con su novia.
Lisandro Damián Nicanor Pérez Meyer
http://perezmeyer.com.ar/
http://perezmeyer.blogspot.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20170320/dd95044e/attachment.sig>
More information about the Development
mailing list