Review Request 124331: New proxy: KExtraColumnsProxyModel, allows to add columns to an existing model.

Nicolás Alvarez nicolas.alvarez at gmail.com
Fri Jul 17 08:08:18 UTC 2015



> On Jul. 15, 2015, 6:36 a.m., Milian Wolff wrote:
> > src/kextracolumnsproxymodel.cpp, line 85
> > <https://git.reviewboard.kde.org/r/124331/diff/3/?file=385295#file385295line85>
> >
> >     ah, a pity. Btw, in KDevelop where I can use lambdas (can you here?), I stopped using private signals and instead do something like
> >     
> >         connect(foo, &Foo::bar,
> >                 this, [this] (...) { d->onBar(...); });
> >     
> >     I quite like that, as it does not leak anything to the public header at all.
> 
> Mark Gaiser wrote:
>     Yes you can use them unconditionally in frameworks. https://community.kde.org/Frameworks/Policies#Frameworks_compiler_requirements_and_C.2B.2B11
> 
> David Faure wrote:
>     Good idea. One downside though: you can't disconnect that specific connection (e.g. at the beginning of setSourceModel).
>     The only thing I can think of is disconnect(foo, &Foo:bar, this, 0), which disconnects other slots too, if any.

You can disconnect lambdas if you save the return value of connect(). But imo that starts getting unnecessarily complicated, if the current code with a private slot already works...


- Nicolás


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124331/#review82536
-----------------------------------------------------------


On Jul. 15, 2015, 5:59 a.m., David Faure wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124331/
> -----------------------------------------------------------
> 
> (Updated Jul. 15, 2015, 5:59 a.m.)
> 
> 
> Review request for KDE Frameworks, Jesper Pedersen and Stephen Kelly.
> 
> 
> Repository: kitemmodels
> 
> 
> Description
> -------
> 
> REVIEW: 124331
> 
> 
> Diffs
> -----
> 
>   autotests/CMakeLists.txt f98e87d49b965998f31c5ede1fefb03b159a150f 
>   autotests/kextracolumnsproxymodeltest.cpp PRE-CREATION 
>   autotests/test_model_helpers.h a44db8a9cb985f69b52be96f0ffe389ebd903d6f 
>   src/CMakeLists.txt 82d776f1fcc2f7b15e74f0ed47702ed570ce9892 
>   src/kextracolumnsproxymodel.h PRE-CREATION 
>   src/kextracolumnsproxymodel.cpp PRE-CREATION 
> 
> Diff: https://git.reviewboard.kde.org/r/124331/diff/
> 
> 
> Testing
> -------
> 
> Wrote autotests (as extensive as possible); used this in one real project, AFAIK Jesper (blackie) did as well.
> 
> 
> Thanks,
> 
> David Faure
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150717/b9d77b7b/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list