This patch adds an option to close a Viewer tab using the middle mouse click.
This could lead to handle a popup menu on the Viewer tab.
FIXED: [ 228461 ] KrViewer - Middle mouse button to close tabs in default settings
BUG: 228461
This patch adds an option to close a Viewer tab using the middle mouse click.
This could lead to handle a popup menu on the Viewer tab.
FIXED: [ 228461 ] KrViewer - Middle mouse button to close tabs in default settings
BUG: 228461
Compile and test using different Kparts.
Lint Skipped |
Unit Tests Skipped |
Thank you, Davide, for those important changes!
And thanks, Yuri, for testing!
krusader/KViewer/krviewer.cpp | ||
---|---|---|
81 | What about using: In theory, qobject_cast is better in those cases (https://stackoverflow.com/questions/43994584/what-is-qobject-cast , https://doc.qt.io/qt-5/qobject.html#qobject_cast) | |
krusader/KViewer/viewertabbar.cpp | ||
27 | Using the style of other places of the source code, it would be: ViewerTabWidget::ViewerTabWidget(QWidget *parent) : QTabWidget(parent) with a space before the :, though it's not so important :-) | |
36 | Using the style of other places of the source code, those lines would not be there, and in the header file the ViewerTabBar(QWidget *parent); would be a: explicit ViewerTabBar(QWidget *parent) : QTabBar(parent) {} though it's not so important (well, the explicit can avoid some possible errors) :-) | |
krusader/KViewer/viewertabbar.h | ||
36 | What about using an explicit in order to avoid some possible errors? explicit ViewerTabWidget(QWidget *parent); :-? | |
52 | Using the style of other places of the source code, it would be: void mousePressEvent(QMouseEvent *) override; with a space before the *, though it's not so important :-) | |
56 | What about using emitted when the user mid-clicks on the tab with an s, although we know it's not so important :-) |