summaryrefslogtreecommitdiffstats
path: root/tools/designer
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-02-11 13:27:39 (GMT)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-02-11 13:33:47 (GMT)
commitf7e75244ab62b1fe0d1d73b84a6089d6b2a81d1a (patch)
treed228298dfebd1688aac082e3ceebda6fa9f02e8f /tools/designer
parentca13ba801144763b1ca7c39b2ef8594de94e2d3e (diff)
downloadQt-f7e75244ab62b1fe0d1d73b84a6089d6b2a81d1a.zip
Qt-f7e75244ab62b1fe0d1d73b84a6089d6b2a81d1a.tar.gz
Qt-f7e75244ab62b1fe0d1d73b84a6089d6b2a81d1a.tar.bz2
Designer: Slots of main container not visible in signal/slot editor.
Fix a regression introduced by dd7873cd7e02e42b384709f33a34f69bc06fb25d of QTBUG-17179. Reviewed-by: Kai Koehne <kai.koehne@nokia.com> Task-number: QTBUG-17358
Diffstat (limited to 'tools/designer')
-rw-r--r--tools/designer/src/components/signalsloteditor/signalslot_utils.cpp7
-rw-r--r--tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp8
2 files changed, 12 insertions, 3 deletions
diff --git a/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp b/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp
index d0af770..9f72816 100644
--- a/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp
+++ b/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp
@@ -244,7 +244,12 @@ namespace qdesigner_internal {
ClassesMemberFunctions reverseClassesMemberFunctions(const QString &obj_name, MemberType member_type,
const QString &peer, QDesignerFormWindowInterface *form)
{
- QObject *object = qFindChild<QObject*>(form->mainContainer(), obj_name);
+ QObject *object = 0;
+ if (obj_name == form->mainContainer()->objectName()) {
+ object = form->mainContainer();
+ } else {
+ object = qFindChild<QObject*>(form->mainContainer(), obj_name);
+ }
if (!object)
return ClassesMemberFunctions();
QDesignerFormEditorInterface *core = form->core();
diff --git a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
index 831649f..6690948 100644
--- a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
+++ b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
@@ -658,8 +658,12 @@ 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->mainContainer(), obj_name);
-
+ QObject *object = 0;
+ if (obj_name == m_form->mainContainer()->objectName()) {
+ object = m_form->mainContainer();
+ } else {
+ 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) {
if (class_info.m_className.isEmpty() || class_info.m_memberList.isEmpty())