summaryrefslogtreecommitdiffstats
path: root/tools/designer/src
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-02-23 17:38:46 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2011-02-23 17:38:46 (GMT)
commit4501731349406110ecde2d260a8ab1e1bcedf179 (patch)
tree5ec176e26bbd207741ca40a1704e654c30fb8571 /tools/designer/src
parent3c982b5d214cc7a37ace1d956ac8fb0b9a281722 (diff)
parent0442b383dced6b5cc31e4fc2bf939e3125354f82 (diff)
downloadQt-4501731349406110ecde2d260a8ab1e1bcedf179.zip
Qt-4501731349406110ecde2d260a8ab1e1bcedf179.tar.gz
Qt-4501731349406110ecde2d260a8ab1e1bcedf179.tar.bz2
Merge commit 'refs/merge-requests/1108' of git://gitorious.org/qt/qt into merge-requests/1108
Conflicts: doc/src/declarative/basictypes.qdoc
Diffstat (limited to 'tools/designer/src')
-rw-r--r--tools/designer/src/components/signalsloteditor/signalslot_utils.cpp27
-rw-r--r--tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp8
2 files changed, 21 insertions, 14 deletions
diff --git a/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp b/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp
index aecd1e5..9f72816 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,14 @@ 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 = 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();
ClassesMemberFunctions rc;
diff --git a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
index ecee08e..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, 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())