forked from qt-creator/qt-creator
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: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
#include "fileutils.h"
|
#include "fileutils.h"
|
||||||
|
|
||||||
#include <QCoreApplication>
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
#include <QGuiApplication>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
|
|
||||||
@@ -29,11 +29,19 @@ QTCREATOR_UTILS_EXPORT ReloadPromptAnswer reloadPrompt(const FilePath &fileName,
|
|||||||
msg = QCoreApplication::translate("Utils::reloadPrompt",
|
msg = QCoreApplication::translate("Utils::reloadPrompt",
|
||||||
"The file <i>%1</i> has been changed on disk. Do you want to reload it?");
|
"The file <i>%1</i> has been changed on disk. Do you want to reload it?");
|
||||||
}
|
}
|
||||||
msg = "<p>" + msg.arg(fileName.fileName()) + "</p><p>"
|
msg = "<p>" + msg.arg(fileName.fileName()) + "</p><p>";
|
||||||
+ QCoreApplication::translate(
|
if (HostOsInfo::isMacHost()) {
|
||||||
"Utils::reloadPrompt",
|
msg += QCoreApplication::translate(
|
||||||
"The default behavior can be set in Edit > Preferences > Environment > System.")
|
"Utils::reloadPrompt",
|
||||||
+ "</p>";
|
"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 += "</p>";
|
||||||
return reloadPrompt(title, msg, fileName.toUserOutput(), enableDiffOption, parent);
|
return reloadPrompt(title, msg, fileName.toUserOutput(), enableDiffOption, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user