From: Rene Gassmoeller Date: Fri, 12 Apr 2019 21:54:43 +0000 (-0700) Subject: Fix the detection of boolean parameters. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F21%2Fhead;p=parameter_gui.git Fix the detection of boolean parameters. Previously a selection of true|false|unspecified would be considered boolean. --- diff --git a/xml_parameter_reader.cpp b/xml_parameter_reader.cpp index a5b6b6d..fc2e5b4 100644 --- a/xml_parameter_reader.cpp +++ b/xml_parameter_reader.cpp @@ -217,7 +217,7 @@ namespace dealii QRegExp rx_string("\\b(Anything|FileName|DirectoryName|Selection|List|MultipleSelection)\\b"), rx_integer("\\b(Integer)\\b"), rx_double("\\b(Float|Floating|Double)\\b"), - rx_bool("\\b(Selection true|false)\\b"); + rx_bool("\\b(Bool)\\b"); // store the type "Anything" or "Filename" as a QString if (rx_string.indexIn (pattern_description) != -1) @@ -273,7 +273,7 @@ namespace dealii else if (test.exactMatch("false")) value = false; else - xml.raiseError(QObject::tr("Cannot convert boolen type to boolean!")); + xml.raiseError(QObject::tr("Cannot convert boolean type to boolean!")); // this is needed because we use for booleans the standard delegate parent->setText(1, "");