[KPhotoAlbum] Tiny patch: Some missing includes

Tuomas Suutari tuomas.suutari at gmail.com
Mon Dec 8 22:22:09 GMT 2014


Hi,

On Sat, Nov 29, 2014 at 1:23 PM, Tobias Leupold <tobias.leupold at web.de> wrote:
> I just had a look at it (not that I ever touched the respective code ...).
> std::tuple is actually used in
> AnnotationDialog::Dialog::selectionForMultiSelect, as well as std::tie. Both
> seem to be part of the Boost package (at least here on current stable Gentoo).
> std::tuple looks like a QPair counterpart (not sure about the std::tie thing,
> as I'm not really a C++ guru ;-)

Actually std::tuple and std::tie are part of the C++11 standard, so if
you have new enough compiler, Boost isn't needed. (Though C++11
support may have to be activated with a compiler flag.)

> Why don't we use Qt here (instead of using "external" libraries)? I didn't see
> some std::* stuff elsewhere, I'm just wondering if we could e. g. use
>
>         QPair<QStringList, QStringList>(itemsOnAllImages, itemsPartiallyOn);
>
> instead of
>
>         std::make_tuple( itemsOnAllImages,  itemsPartiallyOn );

In this kind of stuff blame is good way to research why. (You may use
"git blame" on command line or web interface like [1].) By blaming the
file, I found out commit c786b3b [2], so the reason is "improved
readability and type safetity" as stated in the commit message.

[1] http://quickgit.kde.org/?p=kphotoalbum.git&a=blame&f=AnnotationDialog%2FDialog.cpp
[2] http://quickgit.kde.org/?p=kphotoalbum.git&a=commitdiff&h=c786b3b29828767586d1eb00909792d621b393d5

-- 
Tuomas



More information about the Kphotoalbum mailing list