diff --git a/source/ArmarXGui/gui-plugins/StatechartEditorPlugin/view/dialogs/EditDefaultValueDialog.cpp b/source/ArmarXGui/gui-plugins/StatechartEditorPlugin/view/dialogs/EditDefaultValueDialog.cpp index 1dbea26a76af89a7db567efcbe42052b635f9309..f049a3f51ffd385ffaa31e48c5897ca1cc40bff6 100644 --- a/source/ArmarXGui/gui-plugins/StatechartEditorPlugin/view/dialogs/EditDefaultValueDialog.cpp +++ b/source/ArmarXGui/gui-plugins/StatechartEditorPlugin/view/dialogs/EditDefaultValueDialog.cpp @@ -98,7 +98,7 @@ void EditDefaultValueDialog::onFormat() { std::string compressedJson = ui->textEditJson->toPlainText().toUtf8().data(); ParseResult r = VariantJsonCompressor::FormatUserInput(compressedJson); - if(r.iserr()) + if (r.iserr()) { QMessageBox msgBox; msgBox.setText(QString::fromStdString(r.geterr())); @@ -118,7 +118,7 @@ void EditDefaultValueDialog::onShowInternalJson() { text = getJson(); } - catch(VariantJsonException& ex) + catch (VariantJsonException& ex) { text = QString("Error: ") + QString::fromStdString(ex.what()); } @@ -156,15 +156,16 @@ void EditDefaultValueDialog::onImportInternalJson() compressedJson = VariantJsonCompressor::Compress(json, typeString.toUtf8().data()); ui->textEditJson->setText(QString::fromUtf8(compressedJson.c_str())); } - catch(VariantJsonException& ex) + catch (VariantJsonException& ex) { QMessageBox msgBox; msgBox.setText(QString("Error: ") + QString::fromStdString(ex.getReason())); msgBox.exec(); } - catch(LocalException& ex) + catch (LocalException& ex) { QMessageBox msgBox; + msgBox.setText(QString("Error: ") + QString::fromStdString(ex.getReason())); msgBox.exec(); } diff --git a/source/ArmarXGui/gui-plugins/StatechartEditorPlugin/view/dialogs/StatechartEditorParameterEditor.cpp b/source/ArmarXGui/gui-plugins/StatechartEditorPlugin/view/dialogs/StatechartEditorParameterEditor.cpp index 79657b1bb51e41b402a3d2c18842a5d6718b22b8..991dadfd44d1cdb7ea7c452b8f97cd2886447cd3 100644 --- a/source/ArmarXGui/gui-plugins/StatechartEditorPlugin/view/dialogs/StatechartEditorParameterEditor.cpp +++ b/source/ArmarXGui/gui-plugins/StatechartEditorPlugin/view/dialogs/StatechartEditorParameterEditor.cpp @@ -285,7 +285,7 @@ statechartmodel::StateParameterPtr StatechartEditorParameterEditor::getStatePara auto jsonValues = getProfileJsonMap(getKey(row)); auto variants = getProfileVariantContainerMap(row); - for (const auto & profileName : getRelevantProfiles()) + for (const auto& profileName : getRelevantProfiles()) { p->profileDefaultValues[profileName] = {variants[profileName], jsonValues[profileName]}; } @@ -854,7 +854,7 @@ void StatechartEditorParameterEditor::__buildFromMap(const statechartmodel::Stat auto relevantProfiles = getRelevantProfiles(); - for (const auto & entry : map.toStdMap()) + for (const auto& entry : map.toStdMap()) { const QString& name = entry.first; const statechartmodel::StateParameterPtr& param = entry.second; @@ -863,7 +863,7 @@ void StatechartEditorParameterEditor::__buildFromMap(const statechartmodel::Stat QVector<QString> jsonStrs; QString typeStr = param->type; - for (const QString & profile : relevantProfiles) + for (const QString& profile : relevantProfiles) { QString jsonStr = param->profileDefaultValues[profile].second; jsonStrs.push_back(jsonStr); @@ -889,7 +889,7 @@ QVector<QString> StatechartEditorParameterEditor::getRelevantProfiles() const QVector<QString> result {QString::fromUtf8(currentProfile->getName().c_str())}; auto profile = currentProfile; - while (profile = profile->getParent()) + while ((profile = profile->getParent())) { result.push_back(QString::fromUtf8(profile->getName().c_str())); }