Example #1
0
/**
 * Remove all objects from a linked list of objects
 *
 * @param list address of the pointer to the first entry in the list
 */
void removeAllObjectsFromList(struct p11Object_t **list)
{
	while(*list) {
		if (removeObjectFromList(list, (*list)->handle) != CKR_OK)
			return;
	}
}
void PopupMenuLayout::removeObjectFromList(QString objectName)
{
	if (objectList.contains(objectName))
	{
		MenuObject *object = objectList[objectName];
		for (int i = 0; i < object->childObjects.size(); ++i)
			removeObjectFromList(object->childObjects[i]->getName());
		objectList.remove(objectName);
	}
}
void PopupMenuLayout::removeTopLevelObject(MenuObject *object)
{
	int objectID = topLevelObjects.indexOf(object);
	if (objectID != -1)
	{
		if (graphicsScene != NULL)
			graphicsScene->removeItem(topLevelObjects[objectID]->getPixmapItem());
		removeObjectFromList(topLevelObjects[objectID]->getName());
		topLevelObjects.removeAt(objectID);
	}
}
Example #4
0
/**
 * Remove a session object
 */
int removeSessionObject(struct p11Session_t *session, CK_OBJECT_HANDLE handle)
{
	int rc;

	rc = removeObjectFromList(&session->sessionObjList, handle);

	if (rc != CKR_OK)
		return rc;

	session->numberOfSessionObjects--;

	return CKR_OK;
}
void ObjectNodeInstance::removeFromOldProperty(QObject *object, QObject *oldParent, const QString &oldParentProperty)
{
    QDeclarativeProperty property(oldParent, oldParentProperty, context());

    if (!property.isValid())
        return;

    if (isList(property)) {
        removeObjectFromList(property, object, nodeInstanceView()->engine());
    } else if (isObject(property)) {
        if (nodeInstanceView()->hasInstanceForObject(oldParent)) {
            nodeInstanceView()->instanceForObject(oldParent).resetProperty(oldParentProperty);
        }
    }

    object->setParent(0);
}
void ObjectNodeInstance::removeFromOldProperty(QObject *object, QObject *oldParent, const PropertyName &oldParentProperty)
{
    QQmlProperty property(oldParent, QString::fromUtf8(oldParentProperty), context());

    if (!property.isValid())
        return;

    if (isList(property)) {
        removeObjectFromList(property, object, nodeInstanceServer()->engine());
    } else if (isObject(property)) {
        if (nodeInstanceServer()->hasInstanceForObject(oldParent)) {
            nodeInstanceServer()->instanceForObject(oldParent).resetProperty(oldParentProperty);
        }
    }

    if (object && object->parent())
        object->setParent(0);
}