D16158: Context menu for statusbar

David Rosca noreply at phabricator.kde.org
Fri Oct 12 16:38:27 BST 2018


drosca requested changes to this revision.
drosca added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> statusbar.cpp:248
> +{
> +    if (event->button()==Qt::RightButton) {
> +        QMenu *context = new QMenu;

`event->button() == Qt::RightButton)`

> statusbar.cpp:249
> +    if (event->button()==Qt::RightButton) {
> +        QMenu *context = new QMenu;
> +

This leaks, create it on stack instead (`QMenu context;`).

> statusbar.cpp:253
> +        connect(hide_bar,&QAction::triggered,m_window,&BrowserWindow::toggleShowStatusBar);
> +        context->addAction(hide_bar);
> +

Just:

`context.addAction(tr("Hide"), m_window, &BrowserWindow::toggleShowStatusBar);

REPOSITORY
  R875 Falkon

REVISION DETAIL
  https://phabricator.kde.org/D16158

To: pflynn, drosca
Cc: drosca, falkon, herrold, anmolgautam, SGOrava, iodelay, spoorun, ptabis, navarromorales, cochise, clivej, ach
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/falkon/attachments/20181012/730904d5/attachment.html>


More information about the Falkon mailing list