forked from qt-creator/qt-creator
QmlDesigner: Prevent potential nullptr access
Change-Id: Ia11e0968bfc1368e3485a4b5f0d0ea0fa95a7a3f Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
d88ba65a57
commit
c4ff03d8b5
@@ -193,15 +193,6 @@ QWidget *DynamicPropertiesDelegate::createEditor(QWidget *parent, const QStyleOp
|
||||
QWidget *widget = QStyledItemDelegate::createEditor(parent, option, index);
|
||||
|
||||
const DynamicPropertiesModel *model = qobject_cast<const DynamicPropertiesModel*>(index.model());
|
||||
|
||||
model->connectionView()->allModelNodes();
|
||||
|
||||
// PropertiesComboBox *dynamicPropertiesComboBox = qobject_cast<DynamicPropertiesComboBox*>(widget);
|
||||
|
||||
// if (!dynamicPropertiesComboBox) {
|
||||
// return widget;
|
||||
// }
|
||||
|
||||
if (!model) {
|
||||
qWarning() << "BindingDelegate::createEditor no model";
|
||||
return widget;
|
||||
@@ -211,6 +202,13 @@ QWidget *DynamicPropertiesDelegate::createEditor(QWidget *parent, const QStyleOp
|
||||
qWarning() << "BindingDelegate::createEditor no connection view";
|
||||
return widget;
|
||||
}
|
||||
model->connectionView()->allModelNodes();
|
||||
|
||||
// PropertiesComboBox *dynamicPropertiesComboBox = qobject_cast<DynamicPropertiesComboBox*>(widget);
|
||||
|
||||
// if (!dynamicPropertiesComboBox) {
|
||||
// return widget;
|
||||
// }
|
||||
|
||||
BindingProperty bindingProperty = model->bindingPropertyForRow(index.row());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user