-
-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix syntax check on columns flux #5350
Fix syntax check on columns flux #5350
Conversation
… time JASP crashes when closing the workspace if a TextArea was open in an Analysis form.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really beautiful...
Could the column encoding not be a function of the column object directly? Then no need to cache the column names in the columnEncoder (and then no need to add all this code to catch up any change in the dataset)?
connect(this, SIGNAL(applyRequest()), this, SLOT(checkSyntaxHandler())); | ||
//If "rowCount" changes on VariableInfo it means a column has been added or removed, this means the model should be reencoded and checked | ||
//Fixes https://github.com/jasp-stats/jasp-issues/issues/2462 | ||
connect(VariableInfo::info(), &VariableInfo::rowCountChanged, this, &TextAreaBase::checkSyntaxHandler); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really beautiful, but I don't see how to do that in another way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well we couldve added more signals and all that but this should work fine
@@ -48,6 +48,7 @@ void RowControls::init(int row, const Term& key, bool isNew) | |||
context->setContextProperty("rowValue", key.asQString()); | |||
|
|||
_rowObject = qobject_cast<QQuickItem*>(_rowComponent->create(context)); | |||
_rowObject->setParent(_parentModel); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed: the rowObject was not deleted.... and so all rowComponents.
This can make JASP crashing because these components can be connected to VariableInfo signals even if the analysis does not exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
But I suggest we do that later, I could do it together with the refactor of empty values that im planning for after the release. |
* Make sure to update ColumnEncoder at right times * make sure textarea runs checkSyntax whenever amount of columns changes * RowComponent should get the right parent to be destroyed at the right time JASP crashes when closing the workspace if a TextArea was open in an Analysis form. --------- Co-authored-by: boutinb <[email protected]>
Fixes jasp-stats/jasp-issues#2462