Skip to content

QApplication::beep() broken on many systems. Use another API for BEL instead #985

@christianparpart

Description

@christianparpart

As reported by @cqexbesd, BEL is not working, even though QApplication::beep() is being invoked. Googling for that turns out that this doesn't seem to always work and other people's fix was to simply not use it but other APIs, e.g. QMediaPlayer from QtMultimedia.

This seems as simple as:

QMediaPlayer player; 

// ...

player.setMedia(QUrl::fromLocalFile("/usr/share/sounds/freedesktop/stereo/bell.oga"));
player.setVolume(50); 

// ...

player.play();

But while being at it, why not making it (per profile) configurable, such that users can tweak what's about to be played when BEL is being processed.

NB: In case of BEL spam, a new sound must not be played if an old one is still playing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocker:officeBug reported by my colleges, and hence should be fixed ASAP. :)bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions