QtWidgets: Use remove instead of replace

This commit addresses on of the comments from the review of QTBUG-98434.

Use remove instead of replace to delete from the string.

Task-number: QTBUG-103100
Change-Id: Ifa00a9bae24767eb42d6fa5da0ffdbaa230d5d96
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
Mate Barany 2022-09-19 17:10:04 +02:00
parent 16573d6896
commit 9a23a3d1b4

View File

@ -398,7 +398,7 @@ QString QAccessibleMdiSubWindow::text(QAccessible::Text textType) const
{
if (textType == QAccessible::Name) {
QString title = mdiSubWindow()->windowTitle();
title.replace("[*]"_L1, ""_L1);
title.remove("[*]"_L1);
return title;
}
return QAccessibleWidget::text(textType);