void Maemo::Timed::Event::Action::removeDbusSignal() { p->aio()->flags &= ~ActionFlags::DBus_Signal ; removeAttribute("DBUS_PATH") ; removeAttribute("DBUS_SIGNAL") ; removeAttribute("DBUS_INTERFACE") ; }
void Maemo::Timed::Event::Action::removeDbusMethodCall() { p->aio()->flags &= ~ActionFlags::DBus_Method ; removeAttribute("DBUS_SERVICE") ; removeAttribute("DBUS_METHOD") ; removeAttribute("DBUS_PATH") ; removeAttribute("DBUS_INTERFACE") ; }
void Item::copyAttributes(Item* item) { if (item->attributes) { attributes = new ItemAttributes(*item->attributes); } removeAttribute(ATTR_ITEM_DECAYING); removeAttribute(ATTR_ITEM_DURATION); }
static void removeAttribute(const QDomNode &node, const QString &attribute) { if (node.isNull()) return; node.toElement().removeAttribute(attribute); removeAttribute(node.firstChild(), attribute); removeAttribute(node.nextSibling(), attribute); }
void Item::copyAttributes(Item* item) { m_attributes = item->m_attributes; if(item->m_firstAttr){ m_firstAttr = new Attribute(*item->m_firstAttr); } removeAttribute(ATTR_ITEM_DECAYING); removeAttribute(ATTR_ITEM_DURATION); }
static void compareWithoutFontInfo(const QByteArray &source, const QByteArray &reference) { QDomDocument sourceDoc; sourceDoc.setContent(source); QDomDocument referenceDoc; referenceDoc.setContent(reference); QList<QString> fontAttributes; fontAttributes << "font-family" << "font-size" << "font-weight" << "font-style"; foreach (QString attribute, fontAttributes) { removeAttribute(sourceDoc, attribute); removeAttribute(referenceDoc, attribute); }
result_t XmlElement::set_id(const char *newVal) { if (!*newVal) return removeAttribute("id"); return setAttribute("id", newVal); }
void BCLXML::addAttribute(const Attribute& attribute) { removeAttribute(attribute.name()); incrementVersionId(); m_attributes.push_back(attribute); }
result_t XmlElement::set_id(exlib::string newVal) { if (newVal.empty()) return removeAttribute("id"); return setAttribute("id", newVal); }
void Element::setBooleanAttribute(const QualifiedName& name, bool value) { if (value) setAttribute(name, emptyAtom); else removeAttribute(name); }
void HTMLMenuItemElement::defaultEventHandler(Event* event) { if (event->type() == EventTypeNames::click) { if (equalIgnoringCase(fastGetAttribute(typeAttr), "checkbox")) { if (fastHasAttribute(checkedAttr)) removeAttribute(checkedAttr); else setAttribute(checkedAttr, "checked"); } else if (equalIgnoringCase(fastGetAttribute(typeAttr), "radio")) { if (Element* parent = parentElement()) { AtomicString group = fastGetAttribute(radiogroupAttr); for (HTMLMenuItemElement& menuItem : Traversal<HTMLMenuItemElement>::childrenOf(*parent)) { if (!menuItem.fastHasAttribute(checkedAttr)) continue; const AtomicString& groupAttr = menuItem.fastGetAttribute(radiogroupAttr); if (equalIgnoringNullity(groupAttr.impl(), group.impl())) menuItem.removeAttribute(checkedAttr); } } setAttribute(checkedAttr, "checked"); } event->setDefaultHandled(); } }
//----------------------------------------------------------------------------- void CFrame::setFocusDrawingEnabled (bool state) { if (state) setAttribute ('vfde', sizeof(bool), &state); else removeAttribute ('vfde'); }
bool DOMEditor::removeAttribute(Element* element, const String& name, ErrorString* errorString) { TrackExceptionState es; bool result = removeAttribute(element, name, es); populateErrorString(es, errorString); return result; }
bool DOMEditor::removeAttribute(Element* element, const String& name, ErrorString* errorString) { ExceptionCode ec = 0; bool result = removeAttribute(element, name, ec); populateErrorString(ec, errorString); return result; }
void HTMLElement::setContentEditable(const String &enabled) { if (enabled == "inherit") { ExceptionCode ec; removeAttribute(contenteditableAttr, ec); } else setAttribute(contenteditableAttr, enabled.isEmpty() ? "true" : enabled); }
void Element::setBooleanAttribute(const QualifiedName& name, bool b) { if (b) setAttribute(name, name.localName()); else { ExceptionCode ex; removeAttribute(name, ex); } }
void Item::setID(uint16_t newid) { const ItemType& prevIt = Item::items[id]; id = newid; const ItemType& it = Item::items[newid]; uint32_t newDuration = it.decayTime * 1000; if(newDuration == 0 && !it.stopTime && it.decayTo == -1){ removeAttribute(ATTR_ITEM_DECAYING); removeAttribute(ATTR_ITEM_DURATION); } if(newDuration > 0 && (!prevIt.stopTime || !hasAttribute(ATTR_ITEM_DURATION)) ){ setDecaying(DECAYING_FALSE); setDuration(newDuration); } }
int removeAllAttributes(struct p11Object_t *object) { while(object->attrList) { if (removeAttribute(object, &object->attrList->attrData) != CKR_OK) return CKR_GENERAL_ERROR; } return CKR_OK; }
result_t XmlElement::set_className(exlib::string newVal) { if (m_isXml) return CALL_E_INVALID_CALL; if (newVal.empty()) return removeAttribute("class"); return setAttribute("class", newVal); }
result_t XmlElement::set_className(const char *newVal) { if (m_isXml) return CALL_E_INVALID_CALL; if (!*newVal) return removeAttribute("class"); return setAttribute("class", newVal); }
virtual IHqlExpression * createTransformed(IHqlExpression * expr) { OwnedHqlExpr transformed = NewHqlTransformer::createTransformed(expr); if (transformed->getOperator() == no_getgraphresult) { if (hasOperand(transformed, graph)) return removeAttribute(transformed, externalAtom); } return transformed.getClear(); }
void KGraphEditorElementTreeWidget::slotRemoveAttribute() { kDebug() << "Remove Attribute"; if (m_item == 0) // should not happen { kError() << "null item ; should not happen" << endl; return; } emit removeAttribute(m_item->text(0)); delete takeTopLevelItem (indexOfTopLevelItem(m_item)); m_item = 0; }
void HTMLSelectElement::set_multiple(bool newVal) { if (newVal) { // in XML, all attributes must have values setAttribute(WSTR("multiple"), WSTR("multiple")); } else { removeAttribute(WSTR("multiple")); } }
void HTMLElement::setContentEditable(const String& enabled, ExceptionCode& ec) { if (equalIgnoringCase(enabled, "true")) setAttribute(contenteditableAttr, "true"); else if (equalIgnoringCase(enabled, "false")) setAttribute(contenteditableAttr, "false"); else if (equalIgnoringCase(enabled, "plaintext-only")) setAttribute(contenteditableAttr, "plaintext-only"); else if (equalIgnoringCase(enabled, "inherit")) removeAttribute(contenteditableAttr); else ec = SYNTAX_ERR; }
frenzy::dom::Attrp frenzy::dom::Element::removeAttributeNode(frenzy::dom::Attrp oldAttr) { if (!oldAttr || !hasAttribute(oldAttr->get_name())) throw DOMException(DOMException::NOT_FOUND_ERR); if (oldAttr->get_ownerElement() != shared_from_this()) throw DOMException(DOMException::NOT_FOUND_ERR); removeAttribute(oldAttr->get_name()); return oldAttr; }
void HTMLElement::setContentEditable(const String& enabled, ExceptionState& exceptionState) { if (equalIgnoringCase(enabled, "true")) setAttribute(contenteditableAttr, "true"); else if (equalIgnoringCase(enabled, "false")) setAttribute(contenteditableAttr, "false"); else if (equalIgnoringCase(enabled, "plaintext-only")) setAttribute(contenteditableAttr, "plaintext-only"); else if (equalIgnoringCase(enabled, "inherit")) removeAttribute(contenteditableAttr); else exceptionState.throwDOMException(SyntaxError, "The value provided ('" + enabled + "') is not one of 'true', 'false', 'plaintext-only', or 'inherit'."); }
void HTMLElement::setContentEditable(const String& enabled, ExceptionState& es) { if (equalIgnoringCase(enabled, "true")) setAttribute(contenteditableAttr, "true"); else if (equalIgnoringCase(enabled, "false")) setAttribute(contenteditableAttr, "false"); else if (equalIgnoringCase(enabled, "plaintext-only")) setAttribute(contenteditableAttr, "plaintext-only"); else if (equalIgnoringCase(enabled, "inherit")) removeAttribute(contenteditableAttr); else es.throwDOMException(SyntaxError); }
void View::updateTuning() { auto pIT = "#inputTuning"_q; pIT->set_innerHTML( "" ); pIT->removeAttribute( "disabled" ); { switch ( mModel.getKind() ) { case Layout::Kind::Renaissance: { Tuning::Renaissance_Type type = mModel.getType(); Tuning::enumerateAllTypes( [&]( Tuning::Renaissance_Type aType, char const* aTypeName ) { auto pOption = "option"_c; pOption->setAttribute( "value", static_cast<int>( aType ) ); pOption->set_innerHTML( aTypeName ); if ( type == aType ) { pOption->setAttribute( "selected", "selected" ); } pIT->appendChild( pOption ); } ); if ( !mModel.hasType() ) { pIT->setAttribute( "disabled", "disabled" ); } break; } case Layout::Kind::Baroque: { Tuning::BaroqueKey key = mModel.getKey(); Tuning::enumerateAllKeys( [&]( Tuning::BaroqueKey aKey, char const* aKeyName ) { auto pOption = "option"_c; pOption->setAttribute( "value", static_cast<int>( aKey ) ); pOption->set_innerHTML( aKeyName ); if ( key == aKey ) { pOption->setAttribute( "selected", "selected" ); } pIT->appendChild( pOption ); } ); break; } } } }
AmbientLight::AmbientLight() { QString color("{ 'var' : 'lightColor', 'name' : 'Color', 'type' : 'color', 'value' : '#eeeeff', 'glslFragmentConstant' : true }"); QString intensity("{ 'var' : 'lightIntensity', 'name' : 'Intensity', 'type' : 'float', 'min' : 0.0, 'max' : 1.0, 'value' : 0.2, 'glslFragmentConstant' : true }"); QStringList atts; atts << color << intensity; addAttributes(atts); Attribute position = attributeByName("Position"); removeAttribute(position); //QString glslFragmentBegin(); //QString glslFragmentEnd(); }
/* Delete a single file @return Zero on successful wipe */ int deleteFile(char fileName[], int passes) { pcg32_random_t rng; // chmod if requested (-a) if (forceFiles) { removeAttribute(fileName); } if (access(fileName,W_OK) == 0) { printf("\nWiping %s...",fileName); FILE *fp = fopen(fileName,"rb+"); // Move to end of file to get a correct result from ftell fseek(fp, 0, SEEK_END); int fileSize = ftell(fp); // Wipe file int wipeCounter; for (wipeCounter = 0; wipeCounter < passes; wipeCounter++) { int offsetCounter; // Reset position fseek(fp,0,SEEK_SET); for (offsetCounter = 0; offsetCounter < fileSize; offsetCounter++) { int rand = pcg32_boundedrand_r(&rng,256); fprintf(fp,"%c",rand); } } fclose(fp); if (!keepFiles) { printf("\nScrambling and deleting %s...",fileName); scrambleName(fileName,25); } } else { printf("\nERROR: Cannot get write access to %s (try running with -a arg)",fileName); return -1; } return 0; }