[Konsole-devel] [Bug 153376] right click on tab doesn't open context menu anymore

Robert Knight robertknight at gmail.com
Fri Jan 8 17:34:26 UTC 2010


--- Comment #28 from Robert Knight <robertknight gmail com>  2010-01-08 18:34:23 ---

Please post this patch on reviewboard.kde.org.

Some initial comments:

* ViewContainer::_contextMenuTabIndex needs to be initialized in the
ViewContainer constructor
* kDebug() should be used if you need debugging information (in
* I think you can leave out the dynamic_cast in
* The temporary memory leak from the QMenu which is created but not later
destroyed needs to be fixed as per the TODO comment
* I suggest renaming the TabbedViewContainer::contextMenuTabRename() method to
TabbedViewContainer::contextMenuRenameTab() (and likewise for the other context
menu methods)
* When specifying types in SLOT() arguments you can leave out the 'const' and
'&' parts of 'const T&'.  eg.  'SLOT(contextMenu(int, const QPoint &))' can be
more compactly written as 'SLOT(contextMenu(int,QPoint))'
* The captions of the context menu items need to match those in the main menus.
 eg. 'Rename Tab' instead of 'Rename Session'.  For consistency I would suggest
changing the caption of the detach action to 'Detach Tab' in both the main menu
and in the context menu.
* Re these lines:               

TabbedViewContainer * tabbedContainer;
container = tabbedContainer = 
 new TabbedViewContainer(position,_viewSplitter);

The 'tabbedContainer' variable is unnecessary since QObject::connect() uses
duck-typing.  You can pass it a pointer of type ViewContainer (the 'container'
variable) and still connect a signal or slot which is specific to a sub-class
of ViewContainer.

Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the konsole-devel mailing list