forked from qt-creator/qt-creator
QmlDesigner: Fix crash
This case should not happen and is handled in a separate patch, but in case we miss another corner case this avoids the crash. Task-number: QTCREATORBUG-25437 Change-Id: I370e3e0b6901d8cdd857714a0766f0f8442a3d66 Reviewed-by: Aleksei German <aleksei.german@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -39,6 +39,8 @@
|
||||
#include <qmldesignerconstants.h>
|
||||
#include <qmldesignerplugin.h>
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QStandardItemModel>
|
||||
#include <QMessageBox>
|
||||
#include <QTableView>
|
||||
@@ -370,7 +372,10 @@ void ConnectionModel::abstractPropertyChanged(const AbstractProperty &abstractPr
|
||||
void ConnectionModel::deleteConnectionByRow(int currentRow)
|
||||
{
|
||||
SignalHandlerProperty targetSignal = signalHandlerPropertyForRow(currentRow);
|
||||
QTC_ASSERT(targetSignal.isValid(), return );
|
||||
QmlDesigner::ModelNode node = targetSignal.parentModelNode();
|
||||
QTC_ASSERT(node.isValid(), return );
|
||||
|
||||
QList<SignalHandlerProperty> allSignals = node.signalProperties();
|
||||
if (allSignals.size() > 1) {
|
||||
if (allSignals.contains(targetSignal))
|
||||
|
||||
Reference in New Issue
Block a user