// Return the current class info list.
QList<ClassInfo> qpycore_get_class_info_list()
{
    PyFrameObject *frame = PyEval_GetFrame();
    QList<ClassInfo> class_info_list = class_info_hash.values(frame);

    class_info_hash.remove(frame);

    return class_info_list;
}
Ejemplo n.º 2
0
void QxtRPCServiceIntrospector::disconnectObject(QObject* obj)
{
    const QMetaObject* meta = obj->metaObject();

    foreach(const SignalDef& sig, signalToId.keys()) {
        // Iterate through all tracked connections and skip any that don't match the incoming object.
        if(sig.first != obj) continue;

        int methodID = methodIDs[qMakePair(meta, sig.second)];
        foreach(int id, signalToId.values(sig)) {
            // Iterate through all of the different connections for the object and explicitly disconnect them.
            QMetaObject::disconnect(obj, methodID, this, id);

            // Remove the connection from our mappings.
            idToRpc.remove(id);
            idToParams.remove(id);
        }

        // Remove the object/signal from the mapping.
        signalToId.remove(sig);
    }
}