D22512: [Dolphin] Hide tooltip instantly on key press

Piotr Dabrowski noreply at phabricator.kde.org
Thu Jul 18 21:46:37 BST 2019


pdabrowski marked an inline comment as done.
pdabrowski added inline comments.

INLINE COMMENTS

> elvisangelaccio wrote in dolphinview.cpp:1427-1435
> I don't like this duplicate function. We could just add the bool parameter to `DolphinView::hideToolTip()`.

Of course a single function was my initial version.
But then I got errors for connect()s:

  connect(m_container->horizontalScrollBar(), &QScrollBar::valueChanged, this, &DolphinView::hideToolTip);
  connect(m_container->verticalScrollBar(), &QScrollBar::valueChanged, this, &DolphinView::hideToolTip);



  error: static assertion failed: Signal and slot arguments are not compatible.

Tried solving this with SLOT(), default argument, separate overloaded function with no arguments.
But to no avail.

It seems that will require QOverload in every connect() call:

  connect(m_container->horizontalScrollBar(), &QScrollBar::valueChanged, this, QOverload<>::of(&DolphinView::hideToolTip));
  connect(m_container->verticalScrollBar(), &QScrollBar::valueChanged, this, QOverload<>::of(&DolphinView::hideToolTip));

Are you OK with this?

REPOSITORY
  R318 Dolphin

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

To: pdabrowski, #dolphin, ngraham, elvisangelaccio
Cc: broulik, elvisangelaccio, kfm-devel, pdabrowski, aprcela, fprice, fbampaloukas, alexde, feverfew, meven, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20190718/4c28652d/attachment.htm>


More information about the kfm-devel mailing list