Review Request: In Konqueror's session restore dialog, allow user to chose which sessions to restore
David Faure
faure at kde.org
Sat Sep 29 10:20:35 BST 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106503/#review19563
-----------------------------------------------------------
konqueror/src/konqsessionmanager.cpp
<http://git.reviewboard.kde.org/r/106503/#comment15537>
You moved this to the init list, shouldn't it be removed from here?
konqueror/src/konqsessionmanager.cpp
<http://git.reviewboard.kde.org/r/106503/#comment15543>
This code would be better with a KDialog subclass, rather than with all the code in a function -- and then you need a slot in the calling class, and an ugly qobject_cast<window()>...
If you split this up into a proper class, then it can have its own slots and member variables, and this will increase modularity and reusability. (and readability).
Thanks.
konqueror/src/konqsessionmanager.cpp
<http://git.reviewboard.kde.org/r/106503/#comment15542>
Doesn't this lose ItemIsSelectable? I guess item->flags() | Qt::ItemIsUserCheckable would be better.
konqueror/src/konqsessionmanager.cpp
<http://git.reviewboard.kde.org/r/106503/#comment15541>
A QTreeWidgetItemIterator might make this code simpler (one loop instead of two nested loops)
konqueror/src/konqsessionmanager.cpp
<http://git.reviewboard.kde.org/r/106503/#comment15539>
This hash of hash makes the code rather complicated.
I think the goal is to associate data with each item in the list -- for this you can just use QTreeWidgetItem::setData(0, Qt::UserRole, the_internal_string)
and retrieve that again here, rather than a lookup based on the user-visible text (which could have duplicates)
konqueror/src/konqsessionmanager.cpp
<http://git.reviewboard.kde.org/r/106503/#comment15538>
Why did you remove the const? I don't see that you added code that changed that list. Probably a leftover, please revert.
konqueror/src/konqsessionmanager.cpp
<http://git.reviewboard.kde.org/r/106503/#comment15540>
Word puzzles are a big no no, in translated strings.
Use i18nc("...", "Window %1", indexOf+1);
- David Faure
On Sept. 28, 2012, 4:45 p.m., Dawit Alemayehu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106503/
> -----------------------------------------------------------
>
> (Updated Sept. 28, 2012, 4:45 p.m.)
>
>
> Review request for KDE Base Apps and David Faure.
>
>
> Description
> -------
>
> The attached patch fixes one of those pet peeve bugs that infurate me from time to time by allowing me to unselect the sessions I do not want to be restored when Konqueror's restore session dialog pops up.
>
>
> This addresses bug 260282.
> http://bugs.kde.org/show_bug.cgi?id=260282
>
>
> Diffs
> -----
>
> konqueror/src/konqsessionmanager.h ee629e4
> konqueror/src/konqsessionmanager.cpp 68a003f
>
> Diff: http://git.reviewboard.kde.org/r/106503/diff/
>
>
> Testing
> -------
>
> * Unselected sessions should not be restored.
> * If all available sessions are selected (the default), the behavior should remain the same as it is today.
> * If all available sessions are unselected, disable the "Restore Session" button.
>
>
> Screenshots
> -----------
>
> old restore dialog
> http://git.reviewboard.kde.org/r/106503/s/729/
> new restore dialog
> http://git.reviewboard.kde.org/r/106503/s/731/
> new restore dialog v2
> http://git.reviewboard.kde.org/r/106503/s/739/
>
>
> Thanks,
>
> Dawit Alemayehu
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20120929/2cd88991/attachment.htm>
More information about the kde-core-devel
mailing list