Use of QSignalMapper for switchToTab() method in terms of code unification

Review Request #101246 - Created April 28, 2011 and submitted

Information
Thomas Murach
rekonq
Reviewers
rekonq
The principle of tab switching by shortcut (switchToTab()) is pretty much the same as loading favorites by shortcut (loadFavorite(const int index)), therefore a similar code should be used for both method invocations. As I was recommended to use QSignalMapper for loadFavorite(...), this class is now also used for switchToTab(...) as well.
I couldn't figure out how to do this without having to instance another object of QSignalMapper class. Thus I have to use two seperate objects, which should be fine, I guess.

  
Andrea Diamantini
Andrea Diamantini
Thomas Murach
Review request changed

Change Summary:

Fixing case index == 0 (which didn't lead to an error, but it's definitely cleaner this way).
Getting rid of now unused property which was set with QVariant (both in tab switching and in load favorite functions)

Diff:

Revision 2 (+12 -16)

Show changes

Andrea Diamantini
Sounds good now!
Merging in the morning, together with the other patch...
Loading...