diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/designer/src/components/signalsloteditor/signalslot_utils.cpp | 22 | ||||
-rw-r--r-- | tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp | 2 |
2 files changed, 11 insertions, 13 deletions
diff --git a/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp b/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp index aecd1e5..d0af770 100644 --- a/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp +++ b/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp @@ -72,7 +72,6 @@ static void memberList(QDesignerFormEditorInterface *core, { if (!object) return; - // 1) member sheet const QDesignerMemberSheetExtension *members = qt_extension<QDesignerMemberSheetExtension*>(core->extensionManager(), object); Q_ASSERT(members != 0); @@ -118,15 +117,15 @@ static void memberList(QDesignerFormEditorInterface *core, if (!metaDataBase) return; - const qdesigner_internal::MetaDataBaseItem *mdbItem = metaDataBase->metaDataBaseItem(object); - Q_ASSERT(mdbItem); - const QStringList mdbFakeMethods = member_type == qdesigner_internal::SlotMember ? mdbItem->fakeSlots() : mdbItem->fakeSignals(); - if (!mdbFakeMethods.empty()) - foreach (const QString &fakeMethod, mdbFakeMethods) - if (predicate(fakeMethod)) { - *it = ClassNameSignaturePair(className, fakeMethod); - ++it; - } + if (const qdesigner_internal::MetaDataBaseItem *mdbItem = metaDataBase->metaDataBaseItem(object)) { + const QStringList mdbFakeMethods = member_type == qdesigner_internal::SlotMember ? mdbItem->fakeSlots() : mdbItem->fakeSignals(); + if (!mdbFakeMethods.empty()) + foreach (const QString &fakeMethod, mdbFakeMethods) + if (predicate(fakeMethod)) { + *it = ClassNameSignaturePair(className, fakeMethod); + ++it; + } + } } namespace { @@ -245,10 +244,9 @@ namespace qdesigner_internal { ClassesMemberFunctions reverseClassesMemberFunctions(const QString &obj_name, MemberType member_type, const QString &peer, QDesignerFormWindowInterface *form) { - QObject *object = qFindChild<QObject*>(form, obj_name); + QObject *object = qFindChild<QObject*>(form->mainContainer(), obj_name); if (!object) return ClassesMemberFunctions(); - QDesignerFormEditorInterface *core = form->core(); ClassesMemberFunctions rc; diff --git a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp index ecee08e..831649f 100644 --- a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp +++ b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp @@ -658,7 +658,7 @@ QWidget *ConnectionDelegate::createEditor(QWidget *parent, const qdesigner_internal::ClassesMemberFunctions class_list = qdesigner_internal::reverseClassesMemberFunctions(obj_name, type, peer, m_form); - QObject *object = qFindChild<QObject*>(m_form, obj_name); + QObject *object = qFindChild<QObject*>(m_form->mainContainer(), obj_name); inline_editor->addText(type == qdesigner_internal::SignalMember ? tr("<signal>") : tr("<slot>")); foreach (const qdesigner_internal::ClassMemberFunctions &class_info, class_list) { |