Conversation
Signed-off-by: nandan <nandan.ghildiyal@gmail.com>
MarkRiddoch
left a comment
There was a problem hiding this comment.
No, this is not what is needed. The default should not be hard coded in the config category class. The filter sets its default to the empty string. Please find out what is adding the extra quotes and fix the problem where it is broken.
Hi Mark, Constructor of CategoryItem itself is adding extra quotes in case of blank values to default. Below are the details from config_category.cpp file at line number# 1267 So it's ok to modify constructor itself ? |
|
Fixing the constructor would be the right place to fix this. |
…lank value or default config item Signed-off-by: nandan <nandan.ghildiyal@gmail.com>
It is done |
…es for blank value or default config item" This reverts commit 7615dc0.
|
Reverted changes as fixing in constructor failing during reconfigure because JSON is having blank value for default instead of quotes |
Signed-off-by: nandan <nandan.ghildiyal@gmail.com>
|
We do not have to do this for any other configuration type, why do we need to do this for scripts? Where did it fail when you fixed the constructor? |
Well if config item is of type script / code then constructor explicitly sets it to quotes rather If I change m_default = "" then final value in JSON is shown as So it gets crashed due to Invalid JSON. That's why in case of script/code we should not use escape character sequence So instead of blank it translates to quotes and GUI get quotes as a value of length 2 instead of empty value of length zero. That's why GUI fails here. Let me know further action on this. |
Signed-off-by: nandan nandan.ghildiyal@gmail.com