From ff1f5a93123db705419a60d8028c21c0dd7f4124 Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@qt.io>
Date: Wed, 16 Oct 2019 12:27:16 +0200
Subject: [PATCH] Qt Designer: Fix updating of object names in the signal/slot
 editor

Fix invalid indexes emitted in update signal.

Fixes: QTBUG-79267
Change-Id: I5c99d8102d9be0e5296364697e85ee55f49147d9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
---
 .../src/components/signalsloteditor/signalsloteditorwindow.cpp  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp b/src/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
index f44c3cd5a..f8651877f 100644
--- a/src/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
+++ b/src/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
@@ -391,7 +391,7 @@ void ConnectionModel::connectionChanged(Connection *con)
 
 void ConnectionModel::updateAll()
 {
-    emit dataChanged(index(0, 0), index(rowCount(), columnCount()));
+    emit dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1));
 }
 }
 
-- 
GitLab