Qt branch updates

Dirk Hohndel dirk at hohndel.org
Sun May 12 10:42:00 PDT 2013


On May 12, 2013 9:32:20 AM Tomaz Canabrava <tcanabrava at kde.org> wrote:
> Dirk,
>
> I looked at the code on the Web ( no computer to try them now, traveling
> around )

Can't believe you did that...

> Just 2 notes:
> 1- QItemSelection selection; instead of = QItemSelection(); there's no need
> to equal a new object with another if what you want is a stack allocated
> memory ( on the heap you need a 'new' or malloc)

So if I just use the object all is initialized to sane default values? Good.

> 2 - the code from up arrow, down arrow and selection logic looks like a lot
> of duplicated code - can't that be handled my some helpers?

I will look into that. It didn't seem that way when I wrote the code, but 
it's possible I overlooked an angle to do that. We are checking similar but 
distinctively different conditions. But I'm sure some of the logic of 
'walking the tree' should be put into helpers just to make the code easier 
to read...

Thanks

/D




More information about the subsurface mailing list