diff options
author | Joel Nordell <joel.nordell@chloridepower.com> | 2009-05-20 01:26:15 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-06-24 14:40:46 (GMT) |
commit | 5f5cf5b798cc7e65e47987b654beaf9d762406eb (patch) | |
tree | 92c53770483bf6fa390d3695df421927201ec60c | |
parent | a6b97b648a4c42b4bb5b75dcc6edceefa68bc347 (diff) | |
download | Qt-5f5cf5b798cc7e65e47987b654beaf9d762406eb.zip Qt-5f5cf5b798cc7e65e47987b654beaf9d762406eb.tar.gz Qt-5f5cf5b798cc7e65e47987b654beaf9d762406eb.tar.bz2 |
fix crash when using plugin that supplies a QDesignerMemberSheetExtension
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 <thiago.macieira@nokia.com>
Reviewed-By: Thorbjørn Lindeijer
-rw-r--r-- | tools/designer/src/components/signalsloteditor/signalslot_utils.cpp | 4 |
1 files 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<QDesignerMemberSheet*>(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<QDesignerMemberSheet*>(core->extensionManager()->extension(object, Q_TYPEID(QDesignerMemberSheetExtension))); - return memberSheet->isQt3Slot(i); + return (memberSheet && memberSheet->isQt3Slot(i)); } } return false; |