From 5e743adc20254b0a5b8e3aa20be1f03d4d07424e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 16 May 2019 14:51:42 +0200 Subject: Don't try to retranslate strings for native color dialogs If the native color dialog is in use we haven't created any of the widgets and will crash when trying to update them. Change-Id: I6c43cc47359110c3b9db7cacb62581446cc6f7a3 Fixes: QTBUG-75858 Reviewed-by: Richard Moe Gustavsen --- src/widgets/dialogs/qcolordialog.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp index 7132bb3297..29178c02c3 100644 --- a/src/widgets/dialogs/qcolordialog.cpp +++ b/src/widgets/dialogs/qcolordialog.cpp @@ -1858,6 +1858,9 @@ void QColorDialogPrivate::_q_addCustom() void QColorDialogPrivate::retranslateStrings() { + if (nativeDialogInUse) + return; + if (!smallDisplay) { lblBasicColors->setText(QColorDialog::tr("&Basic colors")); lblCustomColors->setText(QColorDialog::tr("&Custom colors")); -- cgit v1.2.3