[Qgis-developer] Use of autoconnect slots?

Martin Dobias wonder.sk at gmail.com
Tue Feb 28 17:30:31 PST 2017


Hi Nyall

On Wed, Mar 1, 2017 at 8:01 AM, Nyall Dawson <nyall.dawson at gmail.com> wrote:
> Just want to raise a discussion about this. What does everyone think
> about these and whether we should be using them in code?
>
> I'm currently leaning toward opening a QEP for blocking them in new
> code. Reasons are:
>
> - they are very fragile. Renaming a widget will break the connection
> without any compilation error.
> - they make searching for widget use harder. You can't use QtCreator's
> handy "find usages" option (or the equivalent in other IDEs). You have
> to resort to a plain text search.
>
> I'd much prefer to see explicit connections made using new style
> connects so we gain the compile time error if anything breaks the
> connection.

Agreed! Explicit connections are much better...

Cheers
Martin


More information about the Qgis-developer mailing list