new: calling favorite pages via shortcut
Review Request #101043 - Created April 6, 2011 and submitted
This patch adds the following functionality: Pressing Ctrl + 1 up to Ctrl + 9 will load the favorite page with number 1 ... 9 in the current tab. I find this very useful when using Opera. This is my first patch. So please tell me if there is something to improve in my kind of coding / formatting / ... The code itself is pretty much copied from the function SwitchToTab() in MainView. Numbers higher than 9 do not make sense as shortcuts (in my opinion) and are therefore omitted, as well as zero
Yes. Couldn't find any problems. For example pressing Ctrl + _Number_X_ doesn't crash if you have less than _Number_X_ favorite pages
Welcome to Rekonq ! :) Apart from the naming, I think the index logic could get a bit more elegant and robust.
the name is a bit confusing, technically it is loading the favorite, not switching to it like you switch to a tab.
you could make this slot take the index as a parameter and use QSignalMapper to establish the connections. http://doc.qt.nokia.com/latest/qsignalmapper.html
You could use a signal mapper and do the mapping here. and the appropriate connections (actions to mapper within the loop, mapper to slot once you're out)
Review request changed