From 5728f09facdaa4c2e358221f3b9ca66f8651c049 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 6 Feb 2023 15:46:56 +0100 Subject: [PATCH] Editors: Fix message box when opening broken code style file The file name is not supposed to be the button label. Fixes: QTCREATORBUG-28746 Change-Id: I45ee2a860da8f7ffefc6d72c0d85b7f6a261489c Reviewed-by: David Schulz Reviewed-by: Qt CI Bot --- src/plugins/texteditor/codestyleselectorwidget.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/texteditor/codestyleselectorwidget.cpp b/src/plugins/texteditor/codestyleselectorwidget.cpp index 4021fc1b05f..ec028f0e88d 100644 --- a/src/plugins/texteditor/codestyleselectorwidget.cpp +++ b/src/plugins/texteditor/codestyleselectorwidget.cpp @@ -209,8 +209,9 @@ void CodeStyleSelectorWidget::slotImportClicked() if (importedStyle) m_codeStyle->setCurrentDelegate(importedStyle); else - QMessageBox::warning(this, tr("Import Code Style"), - tr("Cannot import code style from %1"), fileName.toUserOutput()); + QMessageBox::warning(this, + tr("Import Code Style"), + tr("Cannot import code style from %1").arg(fileName.toUserOutput())); } }