mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 03:18:07 +00:00
fix crash on launch : do not create QAccessibleAnnouncementEvent if target is null
This commit is contained in:
parent
592eea016d
commit
f173a887cd
1 changed files with 1 additions and 0 deletions
|
|
@ -28,6 +28,7 @@ DEFINE_ABSTRACT_OBJECT(AccessibilityHelper)
|
|||
|
||||
void AccessibilityHelper::announceMessage(const QString &message, QObject *context, bool assertive) {
|
||||
QObject *target = context ? context : static_cast<QObject *>(Utils::getMainWindow());
|
||||
if (!target) return;
|
||||
QAccessibleAnnouncementEvent event(target, message);
|
||||
event.setPoliteness(assertive ? QAccessible::AnnouncementPoliteness::Assertive
|
||||
: QAccessible::AnnouncementPoliteness::Polite);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue