Misc: Replace dynamic_cast with qobject_cast
This commit is contained in:
committed by
Benjamin Nauck
parent
f2cd99c50a
commit
b14d3a224b
@@ -1130,7 +1130,7 @@ void Model::renameAcceptedSlot()
|
||||
assert(selections.size() == 1);
|
||||
const GraphLinkRecord &record = findRecord(selections.front(), *graphLink);
|
||||
|
||||
auto lineEdit = dynamic_cast<LineEdit*>(proxy->widget());
|
||||
auto lineEdit = qobject_cast<LineEdit*>(proxy->widget());
|
||||
assert(lineEdit);
|
||||
const_cast<App::DocumentObject*>(record.DObject)->Label.setValue(lineEdit->text().toUtf8().constData()); //const hack
|
||||
|
||||
|
||||
Reference in New Issue
Block a user