From 934bc75cee90f9ea71347cee4c4dd35bbb276f22 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 31 Aug 2022 12:00:39 +0200 Subject: [PATCH] macOS: Fix description where to change reload settings in the dialog that asks you what to do when a file changed on disk. Fixes: QTCREATORBUG-27809 Change-Id: I47b3a7287c725c8f4d37564c1b6a9788665e345e Reviewed-by: Reviewed-by: Leena Miettinen Reviewed-by: Christian Stenger --- src/libs/utils/reloadpromptutils.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/libs/utils/reloadpromptutils.cpp b/src/libs/utils/reloadpromptutils.cpp index 079a17ecaf5..50f4f503ab5 100644 --- a/src/libs/utils/reloadpromptutils.cpp +++ b/src/libs/utils/reloadpromptutils.cpp @@ -5,8 +5,8 @@ #include "fileutils.h" -#include #include +#include #include #include @@ -29,11 +29,19 @@ QTCREATOR_UTILS_EXPORT ReloadPromptAnswer reloadPrompt(const FilePath &fileName, msg = QCoreApplication::translate("Utils::reloadPrompt", "The file %1 has been changed on disk. Do you want to reload it?"); } - msg = "

" + msg.arg(fileName.fileName()) + "

" - + QCoreApplication::translate( - "Utils::reloadPrompt", - "The default behavior can be set in Edit > Preferences > Environment > System.") - + "

"; + msg = "

" + msg.arg(fileName.fileName()) + "

"; + if (HostOsInfo::isMacHost()) { + msg += QCoreApplication::translate( + "Utils::reloadPrompt", + "The default behavior can be set in %1 > Preferences > Environment > System.", + "macOS") + .arg(QGuiApplication::applicationDisplayName()); + } else { + msg += QCoreApplication::translate( + "Utils::reloadPrompt", + "The default behavior can be set in Edit > Preferences > Environment > System."); + } + msg += "

"; return reloadPrompt(title, msg, fileName.toUserOutput(), enableDiffOption, parent); }