From 5f5cf5b798cc7e65e47987b654beaf9d762406eb Mon Sep 17 00:00:00 2001 From: Joel Nordell Date: Tue, 19 May 2009 20:26:15 -0500 Subject: fix crash when using plugin that supplies a QDesignerMemberSheetExtension MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit plugins external to Qt Designer can not define objects inheriting from QDesignerMemberSheet, as that is defined in a private header. the functions isQt3Signal and isQt3Slot assume that all QDesignerMemberSheetExtension objects at QDesignerMemberSheet, but this is not the case with 3rd party plugins. Merge-request: 452 Reviewed-By: Thiago Macieira Reviewed-By: Thorbjørn Lindeijer --- tools/designer/src/components/signalsloteditor/signalslot_utils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp b/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp index 37269c5..c268d5f 100644 --- a/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp +++ b/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp @@ -275,7 +275,7 @@ namespace qdesigner_internal { const QDesignerMemberSheet *memberSheet = qobject_cast(core->extensionManager()->extension(object, Q_TYPEID(QDesignerMemberSheetExtension))); - return memberSheet->isQt3Signal(i); + return (memberSheet && memberSheet->isQt3Signal(i)); } } @@ -294,7 +294,7 @@ namespace qdesigner_internal { const QDesignerMemberSheet *memberSheet = qobject_cast(core->extensionManager()->extension(object, Q_TYPEID(QDesignerMemberSheetExtension))); - return memberSheet->isQt3Slot(i); + return (memberSheet && memberSheet->isQt3Slot(i)); } } return false; -- cgit v0.12