]> https://gitweb.dealii.org/ - parameter_gui.git/commitdiff
Fix the detection of boolean parameters. 21/head
authorRene Gassmoeller <rene.gassmoeller@mailbox.org>
Fri, 12 Apr 2019 21:54:43 +0000 (14:54 -0700)
committerRene Gassmoeller <rene.gassmoeller@mailbox.org>
Fri, 12 Apr 2019 21:54:43 +0000 (14:54 -0700)
Previously a selection of true|false|unspecified would be considered
boolean.

xml_parameter_reader.cpp

index a5b6b6d4ceae9696bb8160df0c2f08f50ea4f1ba..fc2e5b4ff3836f985c2799ea3ec50128355562ee 100644 (file)
@@ -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, "");

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.