D19782: Allow dolphin to auto play previewed media file after a 1 second delay

Kai Uwe Broulik noreply at phabricator.kde.org
Sat Mar 16 09:45:27 GMT 2019


broulik added inline comments.

INLINE COMMENTS

> phononwidget.cpp:75
> +    m_autoPlayTimer->setSingleShot(true);
> +    connect(m_autoPlayTimer, &QTimer::timeout, [this](){
> +        play();

Add a context `this` or else it will crash when timer fires with the widget being gone:

  connect(m_autoPlayTimer, &QTimer::timeout, this, [this]() {

You can also probably just connect to `&PhononWidget::play` directly without a lambda

REPOSITORY
  R318 Dolphin

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

To: meven, #dolphin
Cc: broulik, kfm-devel, pekkah, alexde, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20190316/1edc0456/attachment.htm>


More information about the kfm-devel mailing list