/* Return a weak reference to the QObject associated with 'key' if 'key' is present in the dictionary, NULL otherwise.  */
QObject* qdict_get(const QDict *qdict, const char *key)
/* Return a weak reference to the QObject associated with 'key' if 'key' is present in the dictionary, NULL otherwise.  */
QObject* qdict_get(const QDict *qdict, const char *key)
{
    QDictEntry *entry;
    entry = qdict_find(qdict, key, tdb_hash(key) % QDICT_BUCKET_MAX);
    return (entry == NULL ? NULL : entry->value);
}