forked from qt-creator/qt-creator
CMake: Fix UI text
Change-Id: I5bf6e8a67bb09500502b4d35e227354390a3be19 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
@@ -221,12 +221,12 @@ void CMakeProcess::handleProcessFinished(int code, QProcess::ExitStatus status)
|
|||||||
QString msg;
|
QString msg;
|
||||||
if (status != QProcess::NormalExit) {
|
if (status != QProcess::NormalExit) {
|
||||||
if (m_processWasCanceled) {
|
if (m_processWasCanceled) {
|
||||||
msg = tr("*** cmake process was canceled by the user.");
|
msg = tr("CMake process was canceled by the user.");
|
||||||
} else {
|
} else {
|
||||||
msg = tr("*** cmake process crashed.");
|
msg = tr("CMake process crashed.");
|
||||||
}
|
}
|
||||||
} else if (code != 0) {
|
} else if (code != 0) {
|
||||||
msg = tr("*** cmake process exited with exit code %1.").arg(code);
|
msg = tr("CMake process exited with exit code %1.").arg(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!msg.isEmpty()) {
|
if (!msg.isEmpty()) {
|
||||||
|
@@ -57,7 +57,7 @@ static void reportFileApiSetupFailure()
|
|||||||
{
|
{
|
||||||
Core::MessageManager::write(QCoreApplication::translate(
|
Core::MessageManager::write(QCoreApplication::translate(
|
||||||
"CMakeProjectManager::Internal",
|
"CMakeProjectManager::Internal",
|
||||||
"Failed to set up cmake fileapi support. Creator can not extract project information."));
|
"Failed to set up CMake file API support. Qt Creator can not extract project information."));
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::pair<int, int> cmakeVersion(const QJsonObject &obj)
|
static std::pair<int, int> cmakeVersion(const QJsonObject &obj)
|
||||||
@@ -112,7 +112,7 @@ static ReplyFileContents readReplyFile(const QFileInfo &fi, QString &errorMessag
|
|||||||
{
|
{
|
||||||
const QJsonDocument document = readJsonFile(fi.filePath());
|
const QJsonDocument document = readJsonFile(fi.filePath());
|
||||||
static const QString msg = QCoreApplication::translate("CMakeProjectManager::Internal",
|
static const QString msg = QCoreApplication::translate("CMakeProjectManager::Internal",
|
||||||
"Invalid reply file created by cmake.");
|
"Invalid reply file created by CMake.");
|
||||||
|
|
||||||
ReplyFileContents result;
|
ReplyFileContents result;
|
||||||
if (document.isNull() || document.isEmpty() || !document.isObject()) {
|
if (document.isNull() || document.isEmpty() || !document.isObject()) {
|
||||||
@@ -175,7 +175,7 @@ static CMakeConfig readCacheFile(const QString &cacheFile, QString &errorMessage
|
|||||||
|
|
||||||
if (!checkJsonObject(root, "cache", 2)) {
|
if (!checkJsonObject(root, "cache", 2)) {
|
||||||
errorMessage = QCoreApplication::translate("CMakeProjectManager::Internal",
|
errorMessage = QCoreApplication::translate("CMakeProjectManager::Internal",
|
||||||
"Invalid cache file generated by cmake.");
|
"Invalid cache file generated by CMake.");
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,7 +221,7 @@ std::vector<CMakeFileInfo> readCMakeFilesFile(const QString &cmakeFilesFile, QSt
|
|||||||
|
|
||||||
if (!checkJsonObject(root, "cmakeFiles", 1)) {
|
if (!checkJsonObject(root, "cmakeFiles", 1)) {
|
||||||
errorMessage = QCoreApplication::translate("CMakeProjectManager::Internal",
|
errorMessage = QCoreApplication::translate("CMakeProjectManager::Internal",
|
||||||
"Invalid cmakeFiles file generated by cmake.");
|
"Invalid cmakeFiles file generated by CMake.");
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -252,7 +252,7 @@ std::vector<Directory> extractDirectories(const QJsonArray &directories, QString
|
|||||||
if (directories.isEmpty()) {
|
if (directories.isEmpty()) {
|
||||||
errorMessage = QCoreApplication::translate(
|
errorMessage = QCoreApplication::translate(
|
||||||
"CMakeProjectManager::Internal",
|
"CMakeProjectManager::Internal",
|
||||||
"Invalid codemodel file generated by cmake: No directories.");
|
"Invalid codemodel file generated by CMake: No directories.");
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -262,7 +262,7 @@ std::vector<Directory> extractDirectories(const QJsonArray &directories, QString
|
|||||||
if (obj.isEmpty()) {
|
if (obj.isEmpty()) {
|
||||||
errorMessage = QCoreApplication::translate(
|
errorMessage = QCoreApplication::translate(
|
||||||
"CMakeProjectManager::Internal",
|
"CMakeProjectManager::Internal",
|
||||||
"Invalid codemodel file generated by cmake: Empty directory object.");
|
"Invalid codemodel file generated by CMake: Empty directory object.");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Directory dir;
|
Directory dir;
|
||||||
@@ -284,7 +284,7 @@ static std::vector<Project> extractProjects(const QJsonArray &projects, QString
|
|||||||
if (projects.isEmpty()) {
|
if (projects.isEmpty()) {
|
||||||
errorMessage = QCoreApplication::translate(
|
errorMessage = QCoreApplication::translate(
|
||||||
"CMakeProjectManager::Internal",
|
"CMakeProjectManager::Internal",
|
||||||
"Invalid codemodel file generated by cmake: No projects.");
|
"Invalid codemodel file generated by CMake: No projects.");
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -294,7 +294,7 @@ static std::vector<Project> extractProjects(const QJsonArray &projects, QString
|
|||||||
if (obj.isEmpty()) {
|
if (obj.isEmpty()) {
|
||||||
errorMessage = QCoreApplication::translate(
|
errorMessage = QCoreApplication::translate(
|
||||||
"CMakeProjectManager::Internal",
|
"CMakeProjectManager::Internal",
|
||||||
"Invalid codemodel file generated by cmake: Empty project object.");
|
"Invalid codemodel file generated by CMake: Empty project object.");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Project project;
|
Project project;
|
||||||
@@ -309,7 +309,7 @@ static std::vector<Project> extractProjects(const QJsonArray &projects, QString
|
|||||||
if (project.name.isEmpty() || project.directories.empty()) {
|
if (project.name.isEmpty() || project.directories.empty()) {
|
||||||
errorMessage = QCoreApplication::translate(
|
errorMessage = QCoreApplication::translate(
|
||||||
"CMakeProjectManager::Internal",
|
"CMakeProjectManager::Internal",
|
||||||
"Invalid codemodel file generated by cmake: Broken project data.");
|
"Invalid codemodel file generated by CMake: Broken project data.");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -323,7 +323,7 @@ static std::vector<Target> extractTargets(const QJsonArray &targets, QString &er
|
|||||||
if (targets.isEmpty()) {
|
if (targets.isEmpty()) {
|
||||||
errorMessage
|
errorMessage
|
||||||
= QCoreApplication::translate("CMakeProjectManager::Internal",
|
= QCoreApplication::translate("CMakeProjectManager::Internal",
|
||||||
"Invalid codemodel file generated by cmake: No targets.");
|
"Invalid codemodel file generated by CMake: No targets.");
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -333,7 +333,7 @@ static std::vector<Target> extractTargets(const QJsonArray &targets, QString &er
|
|||||||
if (obj.isEmpty()) {
|
if (obj.isEmpty()) {
|
||||||
errorMessage = QCoreApplication::translate(
|
errorMessage = QCoreApplication::translate(
|
||||||
"CMakeProjectManager::Internal",
|
"CMakeProjectManager::Internal",
|
||||||
"Invalid codemodel file generated by cmake: Empty target object.");
|
"Invalid codemodel file generated by CMake: Empty target object.");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Target target;
|
Target target;
|
||||||
@@ -347,7 +347,7 @@ static std::vector<Target> extractTargets(const QJsonArray &targets, QString &er
|
|||||||
|| target.directory == -1 || target.project == -1) {
|
|| target.directory == -1 || target.project == -1) {
|
||||||
errorMessage = QCoreApplication::translate(
|
errorMessage = QCoreApplication::translate(
|
||||||
"CMakeProjectManager::Internal",
|
"CMakeProjectManager::Internal",
|
||||||
"Invalid codemodel file generated by cmake: Broken target data.");
|
"Invalid codemodel file generated by CMake: Broken target data.");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -448,7 +448,7 @@ static std::vector<Configuration> extractConfigurations(const QJsonArray &config
|
|||||||
if (configs.isEmpty()) {
|
if (configs.isEmpty()) {
|
||||||
errorMessage = QCoreApplication::translate(
|
errorMessage = QCoreApplication::translate(
|
||||||
"CMakeProjectManager::Internal",
|
"CMakeProjectManager::Internal",
|
||||||
"Invalid codemodel file generated by cmake: No configurations.");
|
"Invalid codemodel file generated by CMake: No configurations.");
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -458,7 +458,7 @@ static std::vector<Configuration> extractConfigurations(const QJsonArray &config
|
|||||||
if (obj.isEmpty()) {
|
if (obj.isEmpty()) {
|
||||||
errorMessage = QCoreApplication::translate(
|
errorMessage = QCoreApplication::translate(
|
||||||
"CMakeProjectManager::Internal",
|
"CMakeProjectManager::Internal",
|
||||||
"Invalid codemodel file generated by cmake: Empty configuration object.");
|
"Invalid codemodel file generated by CMake: Empty configuration object.");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Configuration config;
|
Configuration config;
|
||||||
@@ -471,8 +471,8 @@ static std::vector<Configuration> extractConfigurations(const QJsonArray &config
|
|||||||
if (!validateIndexes(config)) {
|
if (!validateIndexes(config)) {
|
||||||
errorMessage
|
errorMessage
|
||||||
= QCoreApplication::translate("CMakeProjectManager::Internal",
|
= QCoreApplication::translate("CMakeProjectManager::Internal",
|
||||||
"Invalid codemodel file generated by cmake: Broken "
|
"Invalid codemodel file generated by CMake: Broken "
|
||||||
"indexes in directories/projects/targets.");
|
"indexes in directories, projects, or targets.");
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -489,7 +489,7 @@ static std::vector<Configuration> readCodemodelFile(const QString &codemodelFile
|
|||||||
|
|
||||||
if (!checkJsonObject(root, "codemodel", 2)) {
|
if (!checkJsonObject(root, "codemodel", 2)) {
|
||||||
errorMessage = QCoreApplication::translate("CMakeProjectManager::Internal",
|
errorMessage = QCoreApplication::translate("CMakeProjectManager::Internal",
|
||||||
"Invalid codemodel file generated by cmake.");
|
"Invalid codemodel file generated by CMake.");
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -787,7 +787,7 @@ TargetDetails readTargetFile(const QString &targetFile, QString &errorMessage)
|
|||||||
if (errorMessage.isEmpty() && !validateTargetDetails(result)) {
|
if (errorMessage.isEmpty() && !validateTargetDetails(result)) {
|
||||||
errorMessage = QCoreApplication::translate(
|
errorMessage = QCoreApplication::translate(
|
||||||
"CMakeProjectManager::Internal",
|
"CMakeProjectManager::Internal",
|
||||||
"Invalid target file generated by cmake: Broken indexes in target details.");
|
"Invalid target file generated by CMake: Broken indexes in target details.");
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user