JsonWizard: use double quotes for emphasis

Change-Id: I1b30fc146764517ef00949b9f5ecc3266c03fc78
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Leena Miettinen
2015-03-16 14:10:48 +01:00
committed by Tobias Hunger
parent ceb0349380
commit 6a3d376cb2
2 changed files with 13 additions and 13 deletions

View File

@@ -148,14 +148,14 @@ JsonFieldPage::Field *JsonFieldPage::Field::parse(const QVariant &input, QString
const QString type = tmp.value(QLatin1String(TYPE_KEY)).toString(); const QString type = tmp.value(QLatin1String(TYPE_KEY)).toString();
if (type.isEmpty()) { if (type.isEmpty()) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage",
"Field '%1' has no type.").arg(name); "Field \"%1\" has no type.").arg(name);
return 0; return 0;
} }
Field *data = createFieldData(type); Field *data = createFieldData(type);
if (!data) { if (!data) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage",
"Field '%1' has unsupported type '%2'.") "Field \"%1\" has unsupported type \"%2\".")
.arg(name).arg(type); .arg(name).arg(type);
return 0; return 0;
} }
@@ -171,7 +171,7 @@ JsonFieldPage::Field *JsonFieldPage::Field::parse(const QVariant &input, QString
QVariant dataVal = tmp.value(QLatin1String(DATA_KEY)); QVariant dataVal = tmp.value(QLatin1String(DATA_KEY));
if (!data->parseData(dataVal, errorMessage)) { if (!data->parseData(dataVal, errorMessage)) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage",
"When parsing Field '%1': %2") "When parsing Field \"%1\": %2")
.arg(name).arg(*errorMessage); .arg(name).arg(*errorMessage);
delete data; delete data;
return 0; return 0;
@@ -278,7 +278,7 @@ bool JsonFieldPage::SpacerField::parseData(const QVariant &data, QString *errorM
if (!ok) { if (!ok) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage",
"'factor' is no integer value."); "\"factor\" is no integer value.");
return false; return false;
} }
@@ -518,9 +518,9 @@ bool JsonFieldPage::PathChooserField::parseData(const QVariant &data, QString *e
m_kind = PathChooser::Any; m_kind = PathChooser::Any;
} else { } else {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage",
"kind '%1' is not one of the supported 'existingDirectory', " "kind \"%1\" is not one of the supported \"existingDirectory\", "
"'directory', 'file', 'saveFile', 'existingCommand', " "\"directory\", \"file\", \"saveFile\", \"existingCommand\", "
"'command', 'any'.") "\"command\", \"any\".")
.arg(kindStr); .arg(kindStr);
return false; return false;
} }
@@ -664,7 +664,7 @@ QPair<QString, QString> parseComboBoxItem(const QVariant &item, QString *errorMe
QString value = tmp.value(QLatin1String("value"), QString()).toString(); QString value = tmp.value(QLatin1String("value"), QString()).toString();
if (key.isNull() || key.isEmpty()) { if (key.isNull() || key.isEmpty()) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage",
"No 'key' found in ComboBox items."); "No \"key\" found in ComboBox items.");
return qMakePair(QString(), QString()); return qMakePair(QString(), QString());
} }
if (value.isNull()) if (value.isNull())
@@ -690,25 +690,25 @@ bool JsonFieldPage::ComboBoxField::parseData(const QVariant &data, QString *erro
m_index = tmp.value(QLatin1String("index"), 0).toInt(&ok); m_index = tmp.value(QLatin1String("index"), 0).toInt(&ok);
if (!ok) { if (!ok) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage",
"ComboBox 'index' is not an integer value."); "ComboBox \"index\" is not an integer value.");
return false; return false;
} }
m_disabledIndex = tmp.value(QLatin1String("disabledIndex"), -1).toInt(&ok); m_disabledIndex = tmp.value(QLatin1String("disabledIndex"), -1).toInt(&ok);
if (!ok) { if (!ok) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage",
"ComboBox 'disabledIndex' is not an integer value."); "ComboBox \"disabledIndex\" is not an integer value.");
return false; return false;
} }
QVariant value = tmp.value(QLatin1String("items")); QVariant value = tmp.value(QLatin1String("items"));
if (value.isNull()) { if (value.isNull()) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage",
"ComboBox 'items' missing."); "ComboBox \"items\" missing.");
return false; return false;
} }
if (value.type() != QVariant::List) { if (value.type() != QVariant::List) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage", *errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage",
"ComboBox 'items' is not a list."); "ComboBox \"items\" is not a list.");
return false; return false;
} }

View File

@@ -150,7 +150,7 @@ void JsonSummaryPage::triggerCommit(const JsonWizard::GeneratorFiles &files)
QString errorMessage; QString errorMessage;
if (!runVersionControl(coreFiles, &errorMessage)) { if (!runVersionControl(coreFiles, &errorMessage)) {
QMessageBox::critical(wizard(), tr("Failed to Commit to Version Control"), QMessageBox::critical(wizard(), tr("Failed to Commit to Version Control"),
tr("Error message from Version Control System: '%1'.") tr("Error message from Version Control System: \"%1\".")
.arg(errorMessage)); .arg(errorMessage));
} }
} }