~ubuntu-branches/ubuntu/oneiric/pyside/oneiric

« back to all changes in this revision

Viewing changes to PySide/QtCore/glue/qobject_connect.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Didier Raboud
  • Date: 2010-10-19 22:52:14 UTC
  • mfrom: (1.1.4 upstream)
  • mto: (13.1.1 sid)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20101019225214-0s9fbpz12x3962qa
Tags: upstream-0.4.2
ImportĀ upstreamĀ versionĀ 0.4.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
        slotIndex = metaObject->indexOfSlot(slot);
76
76
    }
77
77
    if (QMetaObject::connect(source, signalIndex, receiver, slotIndex, type)) {
 
78
        if (usingGlobalReceiver)
 
79
            signalManager.globalReceiverConnectNotify(source, slotIndex);
78
80
        #ifndef AVOID_PROTECTED_HACK
79
81
            source->connectNotify(signal - 1);
80
82
        #else
82
84
            // connectNotify when avoiding the protected hack.
83
85
            reinterpret_cast<QObjectWrapper*>(source)->connectNotify(signal - 1);
84
86
        #endif
85
 
        if (usingGlobalReceiver)
86
 
            signalManager.globalReceiverConnectNotify(source, slotIndex);
87
87
 
88
88
        return true;
89
89
    }
114
114
        if (usingGlobalReceiver) {
115
115
            int slotIndex = metaObject->indexOfSlot(callbackSig.constData());
116
116
            signalManager.globalReceiverDisconnectNotify(source, slotIndex);
 
117
        #ifndef AVOID_PROTECTED_HACK
 
118
            source->disconnectNotify(signal - 1);
 
119
        #else
 
120
            // Need to cast to QObjectWrapper* and call the public version of
 
121
            // connectNotify when avoiding the protected hack.
 
122
            reinterpret_cast<QObjectWrapper*>(source)->disconnectNotify(signal - 1);
 
123
        #endif
117
124
        }
118
125
        return true;
119
126
    }