diff --git a/src/css/css_base.cpp b/src/css/css_base.cpp --- a/src/css/css_base.cpp +++ b/src/css/css_base.cpp @@ -146,7 +146,7 @@ { // qDebug() << "[Selector: tag = " << QString::number(makeId(tagNamespace.id(), tagLocalName.id()),16) << ", attr = \"" << makeId(attrNamespace.id(), attrLocalName.id()) << "\", match = \"" << match // << "\" value = \"" << value.string().string().toLatin1().constData() << "\" relation = " << (int)relation - // << "]" << endl; + // << "]"; if (tagHistory) { tagHistory->print(); } diff --git a/src/css/css_valueimpl.cpp b/src/css/css_valueimpl.cpp --- a/src/css/css_valueimpl.cpp +++ b/src/css/css_valueimpl.cpp @@ -888,7 +888,7 @@ bool success = parser.parseValue(this, id, value, important); if (!success) { // qDebug() << "CSSStyleDeclarationImpl::setProperty invalid property: [" << getPropertyName(id).string() - //<< "] value: [" << value.string() << "]"<< endl; + //<< "] value: [" << value.string() << "]"; } else { setChanged(); } diff --git a/src/css/cssparser.cpp b/src/css/cssparser.cpp --- a/src/css/cssparser.cpp +++ b/src/css/cssparser.cpp @@ -248,7 +248,7 @@ { #ifdef CSS_DEBUG qDebug() << "CSSParser::parseValue: id=" << _id << " important=" << _important - << " value='" << string.string() << "'" << endl; + << " value='" << string.string() << "'"; #endif styleElement = declaration->stylesheet(); @@ -278,7 +278,7 @@ { #ifdef CSS_DEBUG qDebug() << "CSSParser::parseDeclaration:" - << " value='" << string.string() << "'" << endl; + << " value='" << string.string() << "'"; #endif styleElement = declaration->stylesheet(); @@ -2395,8 +2395,7 @@ while (value) { // qDebug() << "got value " << value->id << " / " // << (value->unit == CSSPrimitiveValue::CSS_STRING || -// value->unit == CSSPrimitiveValue::CSS_IDENT ? qString( value->string ) : QString() ) -// << endl; +// value->unit == CSSPrimitiveValue::CSS_IDENT ? qString( value->string ) : QString() ); Value *nextValue = valueList->next(); bool nextValBreaksFont = !nextValue || (nextValue->unit == Value::Operator && nextValue->iValue == ','); bool nextValIsFontName = nextValue && diff --git a/src/css/cssstyleselector.cpp b/src/css/cssstyleselector.cpp --- a/src/css/cssstyleselector.cpp +++ b/src/css/cssstyleselector.cpp @@ -2331,7 +2331,7 @@ CSSImportRuleImpl *import = static_cast(item); //qDebug() << "@import: Media: " - // << import->media()->mediaText().string() << endl; + // << import->media()->mediaText().string(); if (!import->media() || medium->eval(import->media(), styleSelector)) { CSSStyleSheetImpl *importedSheet = import->styleSheet(); @@ -2342,7 +2342,7 @@ CSSRuleListImpl *rules = r->cssRules(); //qDebug() << "@media: Media: " - // << r->media()->mediaText().string() << endl; + // << r->media()->mediaText().string(); if ((!r->media() || medium->eval(r->media(), styleSelector)) && rules) { // Traverse child elements of the @import rule. Since @@ -2368,13 +2368,13 @@ styleSelector->fontSelector()->addFontFaceRule(fontFaceRule); } else { //qDebug() << "Ignoring child rule of " - // "ImportRule: rule is not a StyleRule!" << endl; + // "ImportRule: rule is not a StyleRule!"; } } // for rules } // if rules else { //qDebug() << "CSSMediaRule not rendered: " - // << "rule empty or wrong medium!" << endl; + // << "rule empty or wrong medium!"; } } else if (item->isFontFaceRule() && styleSelector) { const CSSFontFaceRuleImpl *fontFaceRule = static_cast(item); diff --git a/src/dom/QualifiedName.cpp b/src/dom/QualifiedName.cpp --- a/src/dom/QualifiedName.cpp +++ b/src/dom/QualifiedName.cpp @@ -65,8 +65,8 @@ bool QualifiedName::operator==(const QualifiedName &other) const { - /*// qDebug() << m_prefix.id() << other.prefixId().id() << ((m_prefix == other.prefixId())) << endl; - // qDebug() << (m_prefix == other.prefixId()) << (m_localName == other.localNameId()) << (m_namespace == other.namespaceNameId()) << endl;*/ + /*// qDebug() << m_prefix.id() << other.prefixId().id() << ((m_prefix == other.prefixId())); + // qDebug() << (m_prefix == other.prefixId()) << (m_localName == other.localNameId()) << (m_namespace == other.namespaceNameId());*/ return (m_prefix == other.prefixId() && m_localName == other.localNameId() && m_namespace == other.namespaceNameId()); } diff --git a/src/ecma/kjs_html.cpp b/src/ecma/kjs_html.cpp --- a/src/ecma/kjs_html.cpp +++ b/src/ecma/kjs_html.cpp @@ -2098,7 +2098,7 @@ case ElementIsContentEditable: return jsBoolean(element.isContentEditable()); } - qCritical() << "HTMLElement::getValueProperty unhandled token " << token << endl; + qCritical() << "HTMLElement::getValueProperty unhandled token " << token; return jsUndefined(); } @@ -2445,7 +2445,7 @@ #ifdef KJS_VERBOSE qDebug() << "KJS::HTMLElement::tryPut " << propertyName.qstring() << " thisTag=" << element.tagName().string() - << " str=" << str.string() << endl; + << " str=" << str.string(); #endif // @@ -2539,7 +2539,7 @@ #ifdef KJS_VERBOSE qDebug() << "KJS::HTMLElement::putValueProperty " << " thisTag=" << element.tagName().string() - << " token=" << token << endl; + << " token=" << token; #endif switch (element.id()) { diff --git a/src/editing/editor.cpp b/src/editing/editor.cpp --- a/src/editing/editor.cpp +++ b/src/editing/editor.cpp @@ -253,7 +253,7 @@ case Selection::RANGE: if (m_part->xmlDocImpl() && style) { #ifdef DEBUG_COMMANDS - // qDebug() << "[create ApplyStyleCommand]" << endl; + // qDebug() << "[create ApplyStyleCommand]"; #endif // FIXME (new ApplyStyleCommandImpl(m_part->xmlDocImpl(), style))->apply(); @@ -424,7 +424,7 @@ void Editor::appliedEditing(EditCommandImpl *cmd) { #ifdef DEBUG_COMMANDS - // qDebug() << "[Applied editing]" << endl; + // qDebug() << "[Applied editing]"; #endif // make sure we have all the changes in rendering tree applied with relayout if needed before setting caret // in particular that could be required for inline boxes recomputation when inserting text @@ -543,17 +543,17 @@ case Qt::Key_Delete: { Selection selectionToDelete = m_part->caret(); #ifdef DEBUG_COMMANDS - // qDebug() << "========== KEY_DELETE ==========" << endl; + // qDebug() << "========== KEY_DELETE =========="; #endif if (selectionToDelete.state() == Selection::CARET) { Position pos(selectionToDelete.start()); #ifdef DEBUG_COMMANDS - // qDebug() << "pos.inLastEditableInRootEditableElement " << pos.inLastEditableInRootEditableElement() << " pos.offset " << pos.offset() << " pos.max " << pos.node()->caretMaxRenderedOffset() << endl; + // qDebug() << "pos.inLastEditableInRootEditableElement " << pos.inLastEditableInRootEditableElement() << " pos.offset " << pos.offset() << " pos.max " << pos.node()->caretMaxRenderedOffset(); #endif if (pos.nextCharacterPosition() == pos) { // we're at the end of a root editable block...do nothing #ifdef DEBUG_COMMANDS - // qDebug() << "no delete!!!!!!!!!!" << endl; + // qDebug() << "no delete!!!!!!!!!!"; #endif break; } diff --git a/src/editing/htmlediting_impl.cpp b/src/editing/htmlediting_impl.cpp --- a/src/editing/htmlediting_impl.cpp +++ b/src/editing/htmlediting_impl.cpp @@ -628,17 +628,17 @@ element->document()->defaultView()->getComputedStyle(element, nullptr)); assert(!computedStyle.isNull()); #ifdef DEBUG_COMMANDS - qDebug() << "[change style]" << element << endl; + qDebug() << "[change style]" << element; #endif QListIterator it(*(style->values())); while (it.hasNext()) { CSSProperty *property = it.next(); CSSValueImpl *computedValue = computedStyle->getPropertyCSSValue(property->id()); DOMString newValue = property->value()->cssText(); #ifdef DEBUG_COMMANDS - qDebug() << "[new value]:" << property->cssText() << endl; - qDebug() << "[computedValue]:" << computedValue->cssText() << endl; + qDebug() << "[new value]:" << property->cssText(); + qDebug() << "[computedValue]:" << computedValue->cssText(); #endif if (strcasecmp(computedValue->cssText(), newValue)) { // we can do better and avoid parsing property @@ -657,36 +657,36 @@ Position start(endingSelection().start().equivalentDownstreamPosition().equivalentRangeCompliantPosition()); Position end(endingSelection().end().equivalentUpstreamPosition()); #ifdef DEBUG_COMMANDS - qDebug() << "[APPLY STYLE]" << start << end << endl; + qDebug() << "[APPLY STYLE]" << start << end; printEnclosingBlockTree(start.node()->enclosingBlockFlowElement()); #endif if (isBlockLevelStyle(m_style)) { #ifdef DEBUG_COMMANDS - qDebug() << "[APPLY BLOCK LEVEL STYLE]" << endl; + qDebug() << "[APPLY BLOCK LEVEL STYLE]"; #endif ElementImpl *startBlock = start.node()->enclosingBlockFlowElement(); ElementImpl *endBlock = end.node()->enclosingBlockFlowElement(); #ifdef DEBUG_COMMANDS - qDebug() << startBlock << startBlock->nodeName() << endl; + qDebug() << startBlock << startBlock->nodeName(); #endif if (startBlock == endBlock && startBlock == start.node()->rootEditableElement()) { ElementImpl *block = document()->createHTMLElement("DIV"); #ifdef DEBUG_COMMANDS - qDebug() << "[Create DIV with Style:]" << m_style->cssText() << endl; + qDebug() << "[Create DIV with Style:]" << m_style->cssText(); #endif block->setAttribute(ATTR_STYLE, m_style->cssText()); for (NodeImpl *node = startBlock->firstChild(); node; node = startBlock->firstChild()) { #ifdef DEBUG_COMMANDS - qDebug() << "[reparent node]" << node << node->nodeName() << endl; + qDebug() << "[reparent node]" << node << node->nodeName(); #endif removeNode(node); appendNode(block, node); } appendNode(startBlock, block); } else if (startBlock == endBlock) { // StyleChange styleChange = computeStyleChange(Position(startBlock, 0), m_style); - //qDebug() << "[Modify block with style change:]" << styleChange.cssStyle << endl; + //qDebug() << "[Modify block with style change:]" << styleChange.cssStyle; applyStyleChangeOnTheNode(startBlock, m_style); // startBlock->setAttribute(ATTR_STYLE, styleChange.cssStyle); } @@ -705,7 +705,7 @@ end = endingSelection().end(); #ifdef DEBUG_COMMANDS - qDebug() << "[start;end]" << start << end << endl; + qDebug() << "[start;end]" << start << end; #endif if (start.node() == end.node()) { // simple case...start and end are the same node @@ -842,7 +842,7 @@ { if (start.node()->isTextNode() && start.offset() > start.node()->caretMinOffset() && start.offset() < start.node()->caretMaxOffset()) { #ifdef DEBUG_COMMANDS - qDebug() << "[split start]" << start.offset() << start.node()->caretMinOffset() << start.node()->caretMaxOffset() << endl; + qDebug() << "[split start]" << start.offset() << start.node()->caretMinOffset() << start.node()->caretMaxOffset(); #endif long endOffsetAdjustment = start.node() == end.node() ? start.offset() : 0; TextImpl *text = static_cast(start.node()); @@ -858,7 +858,7 @@ { if (end.node()->isTextNode() && end.offset() > end.node()->caretMinOffset() && end.offset() < end.node()->caretMaxOffset()) { #ifdef DEBUG_COMMANDS - qDebug() << "[split end]" << end.offset() << end.node()->caretMinOffset() << end.node()->caretMaxOffset() << endl; + qDebug() << "[split end]" << end.offset() << end.node()->caretMinOffset() << end.node()->caretMaxOffset(); #endif TextImpl *text = static_cast(end.node()); RefPtr cmd = new SplitTextNodeCommandImpl(document(), text, end.offset()); @@ -897,17 +897,17 @@ element->document()->defaultView()->getComputedStyle(element, nullptr)); assert(!computedStyle.isNull()); #ifdef DEBUG_COMMANDS - qDebug() << "[check styling]" << element << endl; + qDebug() << "[check styling]" << element; #endif QListIterator it(*(style->values())); while (it.hasNext()) { CSSProperty *property = it.next(); CSSValueImpl *computedValue = computedStyle->getPropertyCSSValue(property->id()); DOMString newValue = property->value()->cssText(); #ifdef DEBUG_COMMANDS - qDebug() << "[new value]:" << property->cssText() << endl; - qDebug() << "[computedValue]:" << computedValue->cssText() << endl; + qDebug() << "[new value]:" << property->cssText(); + qDebug() << "[computedValue]:" << computedValue->cssText(); #endif if (strcasecmp(computedValue->cssText(), newValue)) { return true; @@ -937,7 +937,7 @@ bool ApplyStyleCommandImpl::currentlyHasStyle(const Position &pos, const CSSProperty *property) const { assert(pos.notEmpty()); - qDebug() << pos << endl; + qDebug() << pos; CSSStyleDeclarationImpl *decl = document()->defaultView()->getComputedStyle(pos.element(), nullptr); assert(decl); CSSValueImpl *value = decl->getPropertyCSSValue(property->id()); @@ -955,11 +955,11 @@ while (it.hasNext()) { CSSProperty *property = it.next(); #ifdef DEBUG_COMMANDS - qDebug() << "[CSS property]:" << property->cssText() << endl; + qDebug() << "[CSS property]:" << property->cssText(); #endif if (!currentlyHasStyle(insertionPoint, property)) { #ifdef DEBUG_COMMANDS - qDebug() << "[Add to style change]" << endl; + qDebug() << "[Add to style change]"; #endif switch (property->id()) { case CSS_PROP_FONT_WEIGHT: @@ -1090,27 +1090,27 @@ Position upstream = pos.equivalentUpstreamPosition(); Position downstream = pos.equivalentDownstreamPosition(); #ifdef DEBUG_COMMANDS - qDebug() << "[pos]" << pos << endl; - qDebug() << "[upstream:downstream]" << upstream << downstream << endl; + qDebug() << "[pos]" << pos; + qDebug() << "[upstream:downstream]" << upstream << downstream; printEnclosingBlockTree(pos.node()); #endif bool del = shouldDeleteUpstreamPosition(upstream); #ifdef DEBUG_COMMANDS - qDebug() << "[delete upstream]" << del << endl; + qDebug() << "[delete upstream]" << del; #endif if (upstream == downstream) { return upstream; } #ifdef DEBUG_COMMANDS PositionIterator iter(upstream); - qDebug() << "[before print]" << endl; + qDebug() << "[before print]"; for (iter.next(); iter.current() != downstream; iter.next()) { - qDebug() << "[iterate]" << iter.current() << endl; + qDebug() << "[iterate]" << iter.current(); } - qDebug() << "[after print]" << endl; + qDebug() << "[after print]"; #endif PositionIterator it(upstream); @@ -1127,7 +1127,7 @@ while (it.current() != downstream) { Position next = it.peekNext(); #ifdef DEBUG_COMMANDS - qDebug() << "[iterate and delete]" << next << endl; + qDebug() << "[iterate and delete]" << next; #endif if (next.node() != deleteStart.node()) { // TODO assert(deleteStart.node()->isTextNode()); @@ -1150,7 +1150,7 @@ } } else { #ifdef DEBUG_COMMANDS - qDebug() << "[not text node is not supported yet]" << endl; + qDebug() << "[not text node is not supported yet]"; #endif } deleteStart = next; @@ -1311,7 +1311,7 @@ void DeleteSelectionCommandImpl::deleteContentInsideNode(NodeImpl *node, int startOffset, int endOffset) { #ifdef DEBUG_COMMANDS - qDebug() << "[Delete content inside node]" << node << startOffset << endOffset << endl; + qDebug() << "[Delete content inside node]" << node << startOffset << endOffset; #endif if (node->isTextNode()) { // check if nothing to delete @@ -1328,7 +1328,7 @@ return; } #ifdef DEBUG_COMMANDS - qDebug() << "[non-text node] not supported" << endl; + qDebug() << "[non-text node] not supported"; #endif } @@ -1368,8 +1368,8 @@ NodeImpl *endBlock = downstreamEnd.node()->enclosingBlockFlowElement(); #ifdef DEBUG_COMMANDS - qDebug() << "[Delete:Start]" << upstreamStart << downstreamStart << endl; - qDebug() << "[Delete:End]" << upstreamEnd << downstreamEnd << endl; + qDebug() << "[Delete:Start]" << upstreamStart << downstreamStart; + qDebug() << "[Delete:End]" << upstreamEnd << downstreamEnd; printEnclosingBlockTree(upstreamStart.node()); #endif if (startBlock != endBlock) { @@ -1387,7 +1387,7 @@ NodeImpl *node, *next; for (node = upstreamStart.node()->traverseNextNode(); node && node != downstreamEnd.node(); node = next) { #ifdef DEBUG_COMMANDS - qDebug() << "[traverse and delete]" << node << (node->renderer() && node->renderer()->isEditable()) << endl; + qDebug() << "[traverse and delete]" << node << (node->renderer() && node->renderer()->isEditable()); #endif next = node->traverseNextNode(); if (node->renderer() && node->renderer()->isEditable()) { @@ -1420,7 +1420,7 @@ bool adjustEndingPositionDownstream = false; bool onlyWhitespace = containsOnlyWhitespace(upstreamStart, downstreamEnd); - qDebug() << "[OnlyWhitespace]" << onlyWhitespace << endl; + qDebug() << "[OnlyWhitespace]" << onlyWhitespace; bool startCompletelySelected = !onlyWhitespace && (downstreamStart.offset() <= downstreamStart.node()->caretMinOffset() && @@ -1432,24 +1432,24 @@ ((downstreamStart.node() != upstreamEnd.node()) || (downstreamStart.offset() <= downstreamStart.node()->caretMinOffset()))); - qDebug() << "[{start:end}CompletelySelected]" << startCompletelySelected << endCompletelySelected << endl; + qDebug() << "[{start:end}CompletelySelected]" << startCompletelySelected << endCompletelySelected; unsigned long startRenderedOffset = downstreamStart.renderedOffset(); bool startAtStartOfRootEditableElement = startRenderedOffset == 0 && downstreamStart.inFirstEditableInRootEditableElement(); bool startAtStartOfBlock = startAtStartOfRootEditableElement || (startRenderedOffset == 0 && downstreamStart.inFirstEditableInContainingEditableBlock()); bool endAtEndOfBlock = downstreamEnd.isLastRenderedPositionInEditableBlock(); - qDebug() << "[startAtStartOfRootEditableElement]" << startAtStartOfRootEditableElement << endl; - qDebug() << "[startAtStartOfBlock]" << startAtStartOfBlock << endl; - qDebug() << "[endAtEndOfBlock]" << endAtEndOfBlock << endl; + qDebug() << "[startAtStartOfRootEditableElement]" << startAtStartOfRootEditableElement; + qDebug() << "[startAtStartOfBlock]" << startAtStartOfBlock; + qDebug() << "[endAtEndOfBlock]" << endAtEndOfBlock; NodeImpl *startBlock = upstreamStart.node()->enclosingBlockFlowElement(); NodeImpl *endBlock = downstreamEnd.node()->enclosingBlockFlowElement(); bool startBlockEndBlockAreSiblings = startBlock->parentNode() == endBlock->parentNode(); - qDebug() << "[startBlockEndBlockAreSiblings]" << startBlockEndBlockAreSiblings << startBlock << endBlock << endl; + qDebug() << "[startBlockEndBlockAreSiblings]" << startBlockEndBlockAreSiblings << startBlock << endBlock; debugPosition("upstreamStart: ", upstreamStart); debugPosition("downstreamStart: ", downstreamStart); @@ -1518,7 +1518,7 @@ // Do the delete // NodeImpl *n = downstreamStart.node()->traverseNextNode(); - qDebug() << "[n]" << n << endl; + qDebug() << "[n]" << n; // work on start node if (startCompletelySelected) { @@ -1698,14 +1698,14 @@ int exceptionCode = 0; NodeImpl *enclosingBlock = selection.start().node()->enclosingBlockFlowElement(); - qDebug() << enclosingBlock->nodeName() << endl; + qDebug() << enclosingBlock->nodeName(); if (enclosingBlock->id() == ID_LI) { // need to insert new list item or split existing one into 2 // consider example:
  • xxx|xxx
  • (| - caret position) // result should look like:
  • xxx
  • |xx
  • // idea is to walk up to the li item and split and reattach correspondent nodes #ifdef DEBUG_COMMANDS - qDebug() << "[insert new list item]" << selection << endl; + qDebug() << "[insert new list item]" << selection; printEnclosingBlockTree(selection.start().node()); #endif Position pos(selection.start().equivalentDownstreamPosition()); @@ -1724,16 +1724,16 @@ // walk up and reattach while (true) { #ifdef DEBUG_COMMANDS - qDebug() << "[handle node]" << node << endl; + qDebug() << "[handle node]" << node; printEnclosingBlockTree(enclosingBlock->parent()); #endif NodeImpl *parent = node->parent(); // FIXME copy attributes, styles etc too RefPtr newParent = parent->cloneNode(false); insertNodeAfter(newParent.get(), parent); for (NodeImpl *nextSibling = nullptr; node; node = nextSibling) { #ifdef DEBUG_COMMANDS - qDebug() << "[reattach sibling]" << node << endl; + qDebug() << "[reattach sibling]" << node; #endif nextSibling = node->nextSibling(); removeNode(node); @@ -1756,7 +1756,7 @@ } #ifdef DEBUG_COMMANDS - qDebug() << "[result]" << endl; + qDebug() << "[result]"; printEnclosingBlockTree(enclosingBlock->parent()); #endif // FIXME set selection after operation @@ -1767,7 +1767,7 @@ // assert(exceptionCode == 0); #ifdef DEBUG_COMMANDS - qDebug() << "[insert break]" << selection << endl; + qDebug() << "[insert break]" << selection; printEnclosingBlockTree(enclosingBlock); #endif @@ -1786,7 +1786,7 @@ bool atEndOfBlock = pos.isLastRenderedPositionInEditableBlock(); #ifdef DEBUG_COMMANDS - qDebug() << "[pos]" << pos << atStart << atEndOfBlock << endl; + qDebug() << "[pos]" << pos << atStart << atEndOfBlock; #endif if (atEndOfBlock) { @@ -1879,7 +1879,7 @@ assert(selection.state() == Selection::CARET); #ifdef DEBUG_COMMANDS - qDebug() << "[prepare selection]" << selection << endl; + qDebug() << "[prepare selection]" << selection; #endif Position pos = selection.start(); @@ -1890,7 +1890,7 @@ } #ifdef DEBUG_COMMANDS - qDebug() << "[prepare position]" << pos << endl; + qDebug() << "[prepare position]" << pos; #endif if (!pos.node()->isTextNode()) { @@ -1955,15 +1955,15 @@ void InputTextCommandImpl::execute(const DOMString &text) { #ifdef DEBUG_COMMANDS - qDebug() << "[execute command]" << text << endl; + qDebug() << "[execute command]" << text; #endif Selection selection = endingSelection(); #ifdef DEBUG_COMMANDS - qDebug() << "[ending selection]" << selection << endl; + qDebug() << "[ending selection]" << selection; #endif bool adjustDownstream = selection.start().isFirstRenderedPositionOnLine(); #ifdef DEBUG_COMMANDS - qDebug() << "[adjust]" << adjustDownstream << endl; + qDebug() << "[adjust]" << adjustDownstream; #endif #ifdef DEBUG_COMMANDS @@ -1978,23 +1978,23 @@ } #ifdef DEBUG_COMMANDS - qDebug() << "[after collapsible whitespace deletion]" << endl; + qDebug() << "[after collapsible whitespace deletion]"; printEnclosingBlockTree(selection.start().node()); #endif // EDIT FIXME: Need to take typing style from upstream text, if any. // Make sure the document is set up to receive text Position pos = prepareForTextInsertion(adjustDownstream); #ifdef DEBUG_COMMANDS - qDebug() << "[after prepare]" << pos << endl; + qDebug() << "[after prepare]" << pos; #endif TextImpl *textNode = static_cast(pos.node()); long offset = pos.offset(); #ifdef DEBUG_COMMANDS - qDebug() << "[insert at]" << textNode << offset << endl; + qDebug() << "[insert at]" << textNode << offset; #endif // This is a temporary implementation for inserting adjoining spaces @@ -2699,20 +2699,20 @@ assert(selectionToDelete.state() != Selection::NONE); #ifdef DEBUG_COMMANDS - qDebug() << "[selection]" << selectionToDelete << endl; + qDebug() << "[selection]" << selectionToDelete; #endif if (selectionToDelete.state() == Selection::CARET) { #ifdef DEBUG_COMMANDS - qDebug() << "[caret selection]" << endl; + qDebug() << "[caret selection]"; #endif Position pos(selectionToDelete.start()); if (pos.inFirstEditableInRootEditableElement() && pos.offset() <= pos.node()->caretMinOffset()) { // we're at the start of a root editable block...do nothing return; } selectionToDelete = Selection(pos.previousCharacterPosition(), pos); #ifdef DEBUG_COMMANDS - qDebug() << "[modified selection]" << selectionToDelete << endl; + qDebug() << "[modified selection]" << selectionToDelete; #endif } deleteSelection(selectionToDelete); @@ -2803,7 +2803,7 @@ void TypingCommandImpl::insertText0(DocumentImpl *document, const DOMString &text) { #ifdef DEBUG_COMMANDS - qDebug() << "[insert text]" << text << endl; + qDebug() << "[insert text]" << text; #endif assert(document); Editor *ed = document->part()->editor(); @@ -2833,29 +2833,29 @@ void InsertListCommandImpl::doApply() { #ifdef DEBUG_COMMANDS - qDebug() << "[make current selection/paragraph a list]" << endingSelection() << endl; + qDebug() << "[make current selection/paragraph a list]" << endingSelection(); #endif Position start = endingSelection().start(); Position end = endingSelection().end(); ElementImpl *startBlock = start.node()->enclosingBlockFlowElement(); ElementImpl *endBlock = end.node()->enclosingBlockFlowElement(); #ifdef DEBUG_COMMANDS - qDebug() << "[start:end blocks]" << startBlock << endBlock << endl; + qDebug() << "[start:end blocks]" << startBlock << endBlock; printEnclosingBlockTree(start.node()); #endif if (startBlock == endBlock) { if (startBlock->id() == ID_LI) { // we already have a list item, remove it then #ifdef DEBUG_COMMANDS - qDebug() << "[remove list item]" << endl; + qDebug() << "[remove list item]"; #endif NodeImpl *listBlock = startBlock->parent(); // it's either
      or
        // we need to properly split or even remove the list leaving 2 lists: // [listBlock->firstChild(), startBlock) and (startBlock, listBlock->lastChild()] if (listBlock->firstChild() == listBlock->lastChild() && listBlock->firstChild() == startBlock) { // get rid of list completely #ifdef DEBUG_COMMANDS - qDebug() << "[remove list completely]" << endl; + qDebug() << "[remove list completely]"; #endif removeNodePreservingChildren(listBlock); removeNodePreservingChildren(startBlock); @@ -2901,7 +2901,7 @@ NodeImpl *nextNode; for (NodeImpl *node = startBlock->firstChild(); node; node = nextNode) { #ifdef DEBUG_COMMANDS - qDebug() << "[reattach node]" << node << endl; + qDebug() << "[reattach node]" << node; #endif nextNode = node->nextSibling(); removeNode(node); @@ -2911,7 +2911,7 @@ } } else { #ifdef DEBUG_COMMANDS - qDebug() << "[different blocks are not supported yet]" << endl; + qDebug() << "[different blocks are not supported yet]"; #endif } } @@ -2940,16 +2940,16 @@ { Selection selection = endingSelection(); #ifdef DEBUG_COMMANDS - qDebug() << "[indent selection]" << selection << endl; + qDebug() << "[indent selection]" << selection; #endif NodeImpl *startBlock = selection.start().node()->enclosingBlockFlowElement(); NodeImpl *endBlock = selection.end().node()->enclosingBlockFlowElement(); if (startBlock == endBlock) { // check if selection is the list, but not fully covered if (startBlock->id() == ID_LI && (startBlock->previousSibling() || startBlock->nextSibling())) { #ifdef DEBUG_COMMANDS - qDebug() << "[modify list]" << endl; + qDebug() << "[modify list]"; #endif RefPtr newList = startBlock->parent()->cloneNode(false); insertNodeAfter(newList.get(), startBlock); @@ -2973,7 +2973,7 @@ } else { if (startBlock->id() == ID_LI && endBlock->id() == ID_LI && startBlock->parent() == endBlock->parent()) { #ifdef DEBUG_COMMANDS - qDebug() << "[indent some items inside list]" << endl; + qDebug() << "[indent some items inside list]"; #endif RefPtr nestedList = startBlock->parent()->cloneNode(false); insertNodeBefore(nestedList.get(), startBlock); @@ -2988,7 +2988,7 @@ } } else { #ifdef DEBUG_COMMANDS - qDebug() << "[blocks not from one list are not supported yet]" << endl; + qDebug() << "[blocks not from one list are not supported yet]"; #endif } } @@ -3020,21 +3020,21 @@ { Selection selection = endingSelection(); #ifdef DEBUG_COMMANDS - qDebug() << "[indent selection]" << selection << endl; + qDebug() << "[indent selection]" << selection; #endif NodeImpl *startBlock = selection.start().node()->enclosingBlockFlowElement(); NodeImpl *endBlock = selection.end().node()->enclosingBlockFlowElement(); if (startBlock->id() == ID_LI && endBlock->id() == ID_LI && startBlock->parent() == endBlock->parent()) { #ifdef DEBUG_COMMANDS - qDebug() << "[list items selected]" << endl; + qDebug() << "[list items selected]"; #endif bool firstItemSelected = !hasPreviousListItem(startBlock); bool lastItemSelected = !hasNextListItem(endBlock); bool listFullySelected = firstItemSelected && lastItemSelected; #ifdef DEBUG_COMMANDS - qDebug() << "[first/last item selected]" << firstItemSelected << lastItemSelected << endl; + qDebug() << "[first/last item selected]" << firstItemSelected << lastItemSelected; #endif NodeImpl *listNode = startBlock->parent(); @@ -3083,12 +3083,12 @@ removeNodePreservingChildren(startBlock); } else { #ifdef DEBUG_COMMANDS - qDebug() << "[not the list or blockquote]" << endl; + qDebug() << "[not the list or blockquote]"; #endif } } else { #ifdef DEBUG_COMMANDS - qDebug() << "[blocks not from one list are not supported yet]" << endl; + qDebug() << "[blocks not from one list are not supported yet]"; #endif } } diff --git a/src/editing/jsediting.cpp b/src/editing/jsediting.cpp --- a/src/editing/jsediting.cpp +++ b/src/editing/jsediting.cpp @@ -631,7 +631,7 @@ const CommandImp *result = commandDictionary.value(command.string().toLower()); #ifdef DEBUG_COMMANDS if (!result) { - qDebug() << "[Command is not supported yet]" << command << endl; + qDebug() << "[Command is not supported yet]" << command; } #endif return result; diff --git a/src/html/html_elementimpl.cpp b/src/html/html_elementimpl.cpp --- a/src/html/html_elementimpl.cpp +++ b/src/html/html_elementimpl.cpp @@ -228,7 +228,7 @@ default: #ifdef UNSUPPORTED_ATTR qDebug() << "UATTR: <" << this->nodeName().string() << "> [" - << attr->name().string() << "]=[" << attr->value().string() << "]" << endl; + << attr->name().string() << "]=[" << attr->value().string() << "]"; #endif break; } diff --git a/src/html/htmlparser.cpp b/src/html/htmlparser.cpp --- a/src/html/htmlparser.cpp +++ b/src/html/htmlparser.cpp @@ -247,7 +247,7 @@ #ifdef PARSER_DEBUG qDebug() << "\n\n==> parser: processing token " << getParserPrintableName(t->tid) << "(" << t->tid << ")" - << " current = " << getParserPrintableName(current->id()) << "(" << current->id() << ")" << endl; + << " current = " << getParserPrintableName(current->id()) << "(" << current->id() << ")"; qDebug() << "inline=" << m_inline << " inBody=" << inBody << " haveFrameSet=" << haveFrameSet << " haveContent=" << haveContent; #endif diff --git a/src/html/htmltokenizer.cpp b/src/html/htmltokenizer.cpp --- a/src/html/htmltokenizer.cpp +++ b/src/html/htmltokenizer.cpp @@ -2023,7 +2023,7 @@ NodeImpl::Id tid = currToken.attrs->idAt(i); DOMString value = currToken.attrs->valueAt(i); qDebug() << " " << tid << " " << LocalName::fromId(localNamePart(tid)).toString() - << "=\"" << value.string() << "\"" << endl; + << "=\"" << value.string() << "\""; } } #endif diff --git a/src/imload/decoders/qimageioloader.cpp b/src/imload/decoders/qimageioloader.cpp --- a/src/imload/decoders/qimageioloader.cpp +++ b/src/imload/decoders/qimageioloader.cpp @@ -179,7 +179,7 @@ } if (!mimetype.isEmpty()) { s_formats.append(mimetype); - // qDebug() << "QImageIO - Format supported: " << mimetype << endl; + // qDebug() << "QImageIO - Format supported: " << mimetype; } } return s_formats; @@ -195,7 +195,7 @@ if (format.isEmpty() || !isSupportedFormat(format)) { return nullptr; } else - // qDebug() << "QImageIO - Format guessed: " << format << endl; + // qDebug() << "QImageIO - Format guessed: " << format; { return new QImageIOLoader; diff --git a/src/java/kjavaapplet.cpp b/src/java/kjavaapplet.cpp --- a/src/java/kjavaapplet.cpp +++ b/src/java/kjavaapplet.cpp @@ -256,7 +256,7 @@ d->state = newState; } else { qCritical() << "KJavaApplet::stateChange : don't want to switch from state " - << d->state << " to " << newState << endl; + << d->state << " to " << newState; } } diff --git a/src/java/kjavaappletcontext.cpp b/src/java/kjavaappletcontext.cpp --- a/src/java/kjavaappletcontext.cpp +++ b/src/java/kjavaappletcontext.cpp @@ -162,7 +162,7 @@ const int height = arg[2].toInt(&ok); if (!ok) { - qCritical() << "could not parse out parameters for resize" << endl; + qCritical() << "could not parse out parameters for resize"; } else { KJavaApplet *const tmp = d->applets[appletID]; if (tmp) { @@ -181,7 +181,7 @@ js_args.pop_front(); applet->jsData(js_args); } else { - qCritical() << "parse JS event " << arg[0] << " " << arg[1] << endl; + qCritical() << "parse JS event " << arg[0] << " " << arg[1]; } } else if (cmd == QLatin1String("AppletStateNotification")) { bool ok; @@ -197,13 +197,13 @@ emit appletLoaded(); } } else { - qCritical() << "AppletStateNotification: status is not numerical" << endl; + qCritical() << "AppletStateNotification: status is not numerical"; } } else { qWarning() << "AppletStateNotification: No such Applet with ID=" << arg[0]; } } else { - qCritical() << "AppletStateNotification: Applet ID is not numerical" << endl; + qCritical() << "AppletStateNotification: Applet ID is not numerical"; } } else if (cmd == QLatin1String("AppletFailed")) { bool ok; diff --git a/src/java/kjavaappletserver.cpp b/src/java/kjavaappletserver.cpp --- a/src/java/kjavaappletserver.cpp +++ b/src/java/kjavaappletserver.cpp @@ -515,15 +515,15 @@ } // qDebug() << "PutData(" << ID_num << ") size=" << qb.size() - index; } else { - qCritical() << "PutData error " << ok << endl; + qCritical() << "PutData error " << ok; } return; } //now parse out the arguments while (index < qb_size) { int sep_pos = qb.indexOf((char) 0, index); if (sep_pos < 0) { - qCritical() << "Missing separation byte" << endl; + qCritical() << "Missing separation byte"; sep_pos = qb_size; } //qDebug() << "KJavaAppletServer::slotJavaRequest: "<< QString::fromLocal8Bit( qb.data() + index, sep_pos - index ); @@ -554,7 +554,7 @@ d->kiojobs.insert(ID_num, new KJavaDownloader(ID_num, args.first())); // qDebug() << "GetURLData(" << ID_num << ") url=" << args.first(); } else { - qCritical() << "GetURLData error " << ok << " args:" << args.size() << endl; + qCritical() << "GetURLData error " << ok << " args:" << args.size(); } return; case KJAS_PUT_URLDATA: @@ -564,7 +564,7 @@ job->start(); // qDebug() << "PutURLData(" << ID_num << ") url=" << args.first(); } else { - qCritical() << "PutURLData error " << ok << " args:" << args.size() << endl; + qCritical() << "PutURLData error " << ok << " args:" << args.size(); } return; case KJAS_DATA_COMMAND: @@ -576,7 +576,7 @@ } // qDebug() << "KIO Data command: " << ID_num << " " << args.first(); } else { - qCritical() << "KIO Data command error " << ok << " args:" << args.size() << endl; + qCritical() << "KIO Data command error " << ok << " args:" << args.size(); } return; case KJAS_JAVASCRIPT_EVENT: @@ -586,7 +586,7 @@ // qDebug() << "Javascript request: "<< contextID // << " code: " << args[0] << endl; } else { - qCritical() << "Expected args not to be empty!" << endl; + qCritical() << "Expected args not to be empty!"; } break; @@ -606,51 +606,51 @@ // qDebug() << "Error: Missed return member data"; } } else { - qCritical() << "Expected args not to be empty!" << endl; + qCritical() << "Expected args not to be empty!"; } return; } case KJAS_AUDIOCLIP_PLAY: cmd = QLatin1String("audioclip_play"); if (!args.empty()) { // qDebug() << "Audio Play: url=" << args[0]; } else { - qCritical() << "Expected args not to be empty!" << endl; + qCritical() << "Expected args not to be empty!"; } break; case KJAS_AUDIOCLIP_LOOP: cmd = QLatin1String("audioclip_loop"); if (!args.empty()) { // qDebug() << "Audio Loop: url=" << args[0]; } else { - qCritical() << "Expected args not to be empty!" << endl; + qCritical() << "Expected args not to be empty!"; } break; case KJAS_AUDIOCLIP_STOP: cmd = QLatin1String("audioclip_stop"); if (!args.empty()) { // qDebug() << "Audio Stop: url=" << args[0]; } else { - qCritical() << "Expected args not to be empty!" << endl; + qCritical() << "Expected args not to be empty!"; } break; case KJAS_APPLET_STATE: if (args.size() > 1) { // qDebug() << "Applet State Notification for Applet " << args[0] << ". New state=" << args[1]; } else { - qCritical() << "Expected args not to be empty!" << endl; + qCritical() << "Expected args not to be empty!"; } cmd = QLatin1String("AppletStateNotification"); break; case KJAS_APPLET_FAILED: if (args.size() > 1) { // qDebug() << "Applet " << args[0] << " Failed: " << args[1]; } else { - qCritical() << "Expected args not to be empty!" << endl; + qCritical() << "Expected args not to be empty!"; } cmd = QLatin1String("AppletFailed"); @@ -704,15 +704,15 @@ } if (!ok) { - qCritical() << "could not parse out contextID to call command on" << endl; + qCritical() << "could not parse out contextID to call command on"; return; } KJavaAppletContext *const context = d->contexts[ ID_num ]; if (context) { context->processCmd(cmd, args); } else if (cmd != "AppletStateNotification") { - qCritical() << "no context object for this id" << endl; + qCritical() << "no context object for this id"; } } diff --git a/src/java/kjavaappletwidget.cpp b/src/java/kjavaappletwidget.cpp --- a/src/java/kjavaappletwidget.cpp +++ b/src/java/kjavaappletwidget.cpp @@ -92,7 +92,7 @@ m_swallowTitle == w_info.visibleName()) { KWindowSystem::setState(w, NET::Hidden | NET::SkipTaskbar | NET::SkipPager); // qDebug() << "swallowing our window: " << m_swallowTitle - << ", window id = " << w << endl; + << ", window id = " << w; delete d->tmplabel; d->tmplabel = 0; diff --git a/src/java/kjavadownloader.cpp b/src/java/kjavadownloader.cpp --- a/src/java/kjavadownloader.cpp +++ b/src/java/kjavadownloader.cpp @@ -45,7 +45,7 @@ void KJavaKIOJob::data(const QByteArray &) { - qCritical() << "Job id mixup" << endl; + qCritical() << "Job id mixup"; } //----------------------------------------------------------------------------- @@ -277,7 +277,7 @@ server->sendURLData(d->loaderID, ERRORCODE, d->file); d->file.resize(0); } else { // shouldn't come here - qCritical() << "slotResult(" << d->loaderID << ") job:" << d->job << endl; + qCritical() << "slotResult(" << d->loaderID << ") job:" << d->job; } d->job = nullptr; // signal KIO::Job::result deletes itself server->removeDataJob(d->loaderID); // will delete this diff --git a/src/java/kjavaprocess.cpp b/src/java/kjavaprocess.cpp --- a/src/java/kjavaprocess.cpp +++ b/src/java/kjavaprocess.cpp @@ -241,23 +241,23 @@ char length[9] = { 0 }; const int num_bytes = read(length, 8); if (num_bytes == -1) { - qCritical() << "could not read 8 characters for the message length!!!!" << endl; + qCritical() << "could not read 8 characters for the message length!!!!"; return; } const QString lengthstr(length); bool ok; const int num_len = lengthstr.toInt(&ok); if (!ok) { - qCritical() << "could not parse length out of: " << lengthstr << endl; + qCritical() << "could not parse length out of: " << lengthstr; return; } //now parse out the rest of the message. char *const msg = new char[num_len]; const int num_bytes_msg = read(msg, num_len); if (num_bytes_msg == -1 || num_bytes_msg != num_len) { - qCritical() << "could not read the msg, num_bytes_msg = " << num_bytes_msg << endl; + qCritical() << "could not read the msg, num_bytes_msg = " << num_bytes_msg; delete[] msg; return; } diff --git a/src/khtml_caret.cpp b/src/khtml_caret.cpp --- a/src/khtml_caret.cpp +++ b/src/khtml_caret.cpp @@ -525,7 +525,7 @@ } else { r = 0; qWarning() << "Mapping from nodes of type " << node->nodeType() - << " not supported!" << endl; + << " not supported!"; } } @@ -584,7 +584,7 @@ } else { offset = 0; qWarning() << "Mapping to nodes of type " << node->nodeType() - << " not supported!" << endl; + << " not supported!"; } } @@ -1766,8 +1766,7 @@ // ### Can inline elements have top/bottom margins? Couldn't find // it in the CSS 2 spec, but Mozilla ignores them, so we do, too. << " marl " << s->marginLeft().value() - << " marr " << s->marginRight().value() - << endl; + << " marr " << s->marginRight().value(); #endif #endif break; @@ -2589,7 +2588,7 @@ }/*wend*/ } else { - kError(6201) << "Neither common cell nor section! " << commonAncestor->renderName() << endl; + kError(6201) << "Neither common cell nor section! " << commonAncestor->renderName(); // will crash on uninitialized table row iterator }/*end if*/ diff --git a/src/khtml_part.cpp b/src/khtml_part.cpp --- a/src/khtml_part.cpp +++ b/src/khtml_part.cpp @@ -6476,7 +6476,7 @@ if (pos.isEmpty()) { pos = Position(innerNode.handle(), innerNode.handle()->caretMinOffset()); } - // qDebug() << event->x() << event->y() << pos << endl; + // qDebug() << event->x() << event->y() << pos; sel = caret(); if (extendSelection && sel.notEmpty()) { diff --git a/src/khtmlview.cpp b/src/khtmlview.cpp --- a/src/khtmlview.cpp +++ b/src/khtmlview.cpp @@ -1376,7 +1376,7 @@ // qDebug() << "mouse move: " << _mouse->pos() // << " button " << _mouse->button() - // << " state " << _mouse->state() << endl; + // << " state " << _mouse->state(); DOM::NodeImpl *target = mev.innerNode.handle(); DOM::NodeImpl *fn = m_part->xmlDocImpl()->focusNode(); @@ -1924,7 +1924,7 @@ if (m_part->xmlDocImpl() && focusNextPrevNode(next)) { //if (m_part->xmlDocImpl()->focusNode()) // qDebug() << "focusNode.name: " - // << m_part->xmlDocImpl()->focusNode()->nodeName().string() << endl; + // << m_part->xmlDocImpl()->focusNode()->nodeName().string(); return true; // focus node found } @@ -2520,13 +2520,13 @@ } else { // if it's an editable element, activate the caret if (!m_part->isCaretMode() && newFocusNode->isContentEditable()) { - // qDebug() << "show caret! fn: " << newFocusNode->nodeName().string() << endl; + // qDebug() << "show caret! fn: " << newFocusNode->nodeName().string(); m_part->clearCaretRectIfNeeded(); m_part->d->editor_context.m_selection.moveTo(Position(newFocusNode, 0L)); m_part->setCaretVisible(true); } else { m_part->setCaretVisible(false); - // qDebug() << "hide caret! fn: " << newFocusNode->nodeName().string() << endl; + // qDebug() << "hide caret! fn: " << newFocusNode->nodeName().string(); } m_part->notifySelectionChanged(); @@ -3175,7 +3175,7 @@ ); // qDebug() << "printing: physical page width = " << printer.width() - // << " height = " << printer.height() << endl; + // << " height = " << printer.height(); root->setStaticMode(true); root->setPagedMode(true); root->setWidth(printer.width()); @@ -3210,11 +3210,11 @@ // ok. now print the pages. // qDebug() << "printing: html page width = " << root->docWidth() - // << " height = " << root->docHeight() << endl; + // << " height = " << root->docHeight(); // qDebug() << "printing: margins left = " << printer.pageRect().left() - printer.paperRect().left() - // << " top = " << printer.pageRect().top() - printer.paperRect().top() << endl; + // << " top = " << printer.pageRect().top() - printer.paperRect().top(); // qDebug() << "printing: paper width = " << printer.width() - // << " height = " << printer.height() << endl; + // << " height = " << printer.height(); // if the width is too large to fit on the paper we just scale // the whole thing. int pageWidth = printer.width(); @@ -3235,7 +3235,7 @@ } #endif // qDebug() << "printing: scaled html width = " << pageWidth - // << " height = " << pageHeight << endl; + // << " height = " << pageHeight; root->setHeight(pageHeight); root->setPageBottom(pageHeight); diff --git a/src/rendering/RenderPath.cpp b/src/rendering/RenderPath.cpp --- a/src/rendering/RenderPath.cpp +++ b/src/rendering/RenderPath.cpp @@ -228,7 +228,7 @@ //paintInfo.p->fillRect(0, 0, 50, 50, QBrush(Qt::yellow)); /*paintInfo.p->setPen(Qt::blue); - // qDebug() << "path:" << *m_path.platformPath() << endl; + // qDebug() << "path:" << *m_path.platformPath(); paintInfo.p->drawPath(*m_path.platformPath());*/ /*SVGResourceFilter* filter = 0; diff --git a/src/rendering/RenderSVGInlineText.cpp b/src/rendering/RenderSVGInlineText.cpp --- a/src/rendering/RenderSVGInlineText.cpp +++ b/src/rendering/RenderSVGInlineText.cpp @@ -131,7 +131,7 @@ InlineTextBox *RenderSVGInlineText::createInlineTextBox() { - // qDebug() << "allocate" << endl; + // qDebug() << "allocate"; return new(renderArena()) SVGInlineTextBox(this); } diff --git a/src/rendering/RenderSVGRoot.cpp b/src/rendering/RenderSVGRoot.cpp --- a/src/rendering/RenderSVGRoot.cpp +++ b/src/rendering/RenderSVGRoot.cpp @@ -176,11 +176,11 @@ childPaintInfo.p->restore(); #if 0 - // qDebug() << "in paint()" << endl; + // qDebug() << "in paint()"; /*if (!paintInfo.context) { GraphicsContext context(paintInfo.p); paintInfo.context = &context; - // qDebug() << "context:" << &context << endl; + // qDebug() << "context:" << &context; }*/ if (paintInfo.context->paintingDisabled()) { return; @@ -190,11 +190,11 @@ SVGSVGElement *svg = static_cast(element()); // A value of zero disables rendering of the element. - // qDebug() << "viewport:" << viewport().width() << viewport().height() << endl; + // qDebug() << "viewport:" << viewport().width() << viewport().height(); if (viewport().width() <= 0. || viewport().height() <= 0.) { return; } - // qDebug() << "painting:" << parentX << parentY << viewport().width() << viewport().height() << endl; + // qDebug() << "painting:" << parentX << parentY << viewport().width() << viewport().height(); // This should only exist for renderers /*if (hasBoxDecorations() && (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection))*/ @@ -214,7 +214,7 @@ RenderObject::PaintInfo childPaintInfo(paintInfo); childPaintInfo.context->save(); - // qDebug() << "context= " << childPaintInfo.context << "parent=" << paintInfo.context << endl; + // qDebug() << "context= " << childPaintInfo.context << "parent=" << paintInfo.context; /*applyContentTransforms(childPaintInfo, parentX, parentY); diff --git a/src/rendering/RenderSVGText.cpp b/src/rendering/RenderSVGText.cpp --- a/src/rendering/RenderSVGText.cpp +++ b/src/rendering/RenderSVGText.cpp @@ -117,7 +117,7 @@ { Q_UNUSED(makePlaceHolderBox); Q_UNUSED(isRootLineBox); - // qDebug() << "createInlineBox" << makePlaceHolderBox << isRootLineBox << endl; + // qDebug() << "createInlineBox" << makePlaceHolderBox << isRootLineBox; ASSERT(!isInlineFlow()); InlineFlowBox *flowBox = new(renderArena()) SVGRootInlineBox(this); diff --git a/src/rendering/SVGInlineTextBox.cpp b/src/rendering/SVGInlineTextBox.cpp --- a/src/rendering/SVGInlineTextBox.cpp +++ b/src/rendering/SVGInlineTextBox.cpp @@ -62,7 +62,7 @@ SVGRootInlineBox *SVGInlineTextBox::svgRootInlineBox() const { - // qDebug() << "find inline box" << endl; + // qDebug() << "find inline box"; // Find associated root inline box InlineFlowBox *parentBox = parent(); @@ -358,7 +358,7 @@ Q_UNUSED(chars); Q_UNUSED(length); Q_UNUSED(activePaintServer); - // qDebug() << "paint character" << endl; + // qDebug() << "paint character"; /*FIXME khtml if (object()->style()->visibility() != VISIBLE || paintInfo.phase == PaintPhaseOutline) return; @@ -426,7 +426,7 @@ } IntPoint origin((int) svgChar.x, (int) svgChar.y); - // qDebug() << "origin: " << svgChar.x << svgChar.y << endl; + // qDebug() << "origin: " << svgChar.x << svgChar.y; //TextRun run = svgTextRunForInlineTextBox(chars, length, styleToUse, this, svgChar.x); #if ENABLE(SVG_FONTS) diff --git a/src/rendering/SVGRootInlineBox.cpp b/src/rendering/SVGRootInlineBox.cpp --- a/src/rendering/SVGRootInlineBox.cpp +++ b/src/rendering/SVGRootInlineBox.cpp @@ -502,7 +502,7 @@ const Vector::iterator &start, const Vector::iterator &end) { Q_UNUSED(chunkCtm); - //qDebug() << "text chunk rendering code here" << endl; + //qDebug() << "text chunk rendering code here"; RenderText *text = textBox->/*textObject()*/renderText(); ASSERT(text); @@ -610,9 +610,9 @@ prepareToRenderSVGContent(object(), paintInfo, boundingBox, filter); paintInfo.p->setWorldMatrix(object()->localTransform().inverse(), true); - //qDebug() << "paint at" << tx << ty << endl; - //qDebug() << "pos: (" << (tx + xPos()) << "," << (ty + yPos()) << ")" << endl; - //qDebug() << "size: " << width() << "x" << height() << endl; + //qDebug() << "paint at" << tx << ty; + //qDebug() << "pos: (" << (tx + xPos()) << "," << (ty + yPos()) << ")"; + //qDebug() << "size: " << width() << "x" << height(); // Render text, chunk-by-chunk SVGRootInlineBoxPaintWalker walkerCallback(this, filter, paintInfo, tx, ty); @@ -841,7 +841,7 @@ static float calculateTextLengthCorrectionForTextChunk(SVGTextChunk &chunk, ELengthAdjust lengthAdjust, float &computedLength) { - //qDebug() << "text length" << endl; + //qDebug() << "text length"; if (chunk.textLength <= 0.0f) { return 0.0f; } @@ -912,38 +912,38 @@ void SVGRootInlineBox::computePerCharacterLayoutInformation() { - //qDebug() << "computePerCharacterLayoutInformation()" << endl; + //qDebug() << "computePerCharacterLayoutInformation()"; // Clean up any previous layout information m_svgChars.clear(); m_svgTextChunks.clear(); // Build layout information for all contained render objects SVGCharacterLayoutInfo info(m_svgChars); - //qDebug() << "before build layout info" << endl; + //qDebug() << "before build layout info"; buildLayoutInformation(this, info); - //qDebug() << "after build layout info" << endl; + //qDebug() << "after build layout info"; // Now all layout information are available for every character // contained in any of our child inline/flow boxes. Build list // of text chunks now, to be able to apply text-anchor shifts. buildTextChunks(m_svgChars, m_svgTextChunks, this); - //qDebug() << "after build text chunks" << endl; + //qDebug() << "after build text chunks"; // Layout all text chunks // text-anchor needs to be applied to individual chunks. layoutTextChunks(); - //qDebug() << "after layout text chunks" << endl; + //qDebug() << "after layout text chunks"; // Finally the top left position of our box is known. // Propagate this knownledge to our RenderSVGText parent. FloatPoint topLeft = topLeftPositionOfCharacterRange(m_svgChars); object()->setPos((int) floorf(topLeft.x()), (int) floorf(topLeft.y())); // Layout all InlineText/Flow boxes // BEWARE: This requires the root top/left position to be set correctly before! - //qDebug() << "before layout inline boxes" << endl; + //qDebug() << "before layout inline boxes"; layoutInlineBoxes(); - //qDebug() << "at the end" << endl; + //qDebug() << "at the end"; } void SVGRootInlineBox::buildLayoutInformation(InlineFlowBox *start, SVGCharacterLayoutInfo &info) diff --git a/src/rendering/bidi.cpp b/src/rendering/bidi.cpp --- a/src/rendering/bidi.cpp +++ b/src/rendering/bidi.cpp @@ -1367,7 +1367,7 @@ #if BIDI_DEBUG > 0 qDebug() << "reached end of line current=" << bidi.current.obj << "/" << bidi.current.pos - << ", eor=" << bidi.eor.obj << "/" << bidi.eor.pos << endl; + << ", eor=" << bidi.eor.obj << "/" << bidi.eor.pos; #endif if (!emptyRun && bidi.sor != bidi.current) { bidi.eor = bidi.last; @@ -1623,7 +1623,7 @@ // SVG if (lineBox->isSVGRootInlineBox()) { - //qDebug() << "svgrootinline box:" << endl; + //qDebug() << "svgrootinline box:"; WebCore::SVGRootInlineBox *svgLineBox = static_cast(lineBox); svgLineBox->computePerCharacterLayoutInformation(); } diff --git a/src/rendering/render_block.cpp b/src/rendering/render_block.cpp --- a/src/rendering/render_block.cpp +++ b/src/rendering/render_block.cpp @@ -826,7 +826,7 @@ // qDebug() << floatingObjects << "," << oldWidth << "," // << m_width << ","<< needsLayout() << "," << isAnonymousBox() << "," - // << isPositioned() << endl; + // << isPositioned(); #ifdef DEBUG_LAYOUT qDebug() << renderName() << "(RenderBlock) " << this << " ::layout() width=" << m_width << ", needsLayout=" << needsLayout(); @@ -3485,7 +3485,7 @@ m_maxWidth = inlineMax; } // qDebug() << "m_minWidth=" << m_minWidth - // << " m_maxWidth=" << m_maxWidth << endl; + // << " m_maxWidth=" << m_maxWidth; } // Use a very large value (in effect infinite). @@ -3717,8 +3717,7 @@ s.fill(' ', indent); qDebug() << s << renderName() << ": " << (r->type == FloatingObject::FloatLeft ? "FloatLeft" : "FloatRight") << - "[" << r->node->renderName() << ": " << (void *)r->node << "] (" << r->startY << " - " << r->endY << ")" << "width: " << r->width << - endl; + "[" << r->node->renderName() << ": " << (void *)r->node << "] (" << r->startY << " - " << r->endY << ")" << "width: " << r->width; } } } diff --git a/src/rendering/render_container.cpp b/src/rendering/render_container.cpp --- a/src/rendering/render_container.cpp +++ b/src/rendering/render_container.cpp @@ -57,7 +57,7 @@ { #ifdef DEBUG_LAYOUT // qDebug() << this << ": " << renderName() << "(RenderObject)::addChild( " << newChild << ": " << - newChild->renderName() << ", " << (beforeChild ? beforeChild->renderName() : "0") << " )" << endl; + // newChild->renderName() << ", " << (beforeChild ? beforeChild->renderName() : "0") << " )"; #endif // protect ourselves from deletion setDoNotDelete(true); diff --git a/src/rendering/render_flow.cpp b/src/rendering/render_flow.cpp --- a/src/rendering/render_flow.cpp +++ b/src/rendering/render_flow.cpp @@ -128,7 +128,7 @@ { #ifdef DEBUG_LAYOUT // qDebug() << renderName() << "(RenderFlow)::addChild( " << newChild->renderName() << - ", " << (beforeChild ? beforeChild->renderName() : "0") << " )" << endl; + // ", " << (beforeChild ? beforeChild->renderName() : "0") << " )"; // qDebug() << "current height = " << m_height; #endif diff --git a/src/rendering/render_form.cpp b/src/rendering/render_form.cpp --- a/src/rendering/render_form.cpp +++ b/src/rendering/render_form.cpp @@ -790,7 +790,7 @@ QWidget *pw = parentWidget(); KHTMLWidget *kwp = dynamic_cast(pw); if (!kwp) { - qDebug() << "CompletionWidget has no KHTMLWidget parent" << endl; + qDebug() << "CompletionWidget has no KHTMLWidget parent"; return KCompletionBox::globalPositionHint(); } QPoint dest; diff --git a/src/rendering/render_object.cpp b/src/rendering/render_object.cpp --- a/src/rendering/render_object.cpp +++ b/src/rendering/render_object.cpp @@ -2664,7 +2664,7 @@ node = state.m_lastNode; offset = state.m_lastOffset; //qDebug() << "RenderObject::checkSelectionPoint " << this << " before this child " - // << node << "-> returning SelectionPointInside, offset=" << offset << endl; + // << node << "-> returning SelectionPointInside, offset=" << offset; return SelectionPointInside; } else { node = nod; diff --git a/src/rendering/render_position.cpp b/src/rendering/render_position.cpp --- a/src/rendering/render_position.cpp +++ b/src/rendering/render_position.cpp @@ -57,13 +57,13 @@ } // return renderObject->inlineBox(0) ? RenderPosition(position) : RenderPosition(); - // qDebug() << "[text position]" << position << endl; + // qDebug() << "[text position]" << position; const RenderText *renderText = static_cast(renderObject); int domOffset = position.offset(); int renderOffset = renderText->convertToRenderedPosition(domOffset); domOffset = renderText->convertToDOMPosition(renderOffset); // now we need to modify original position - // qDebug() << "[equivalent offset]" << domOffset << endl; + // qDebug() << "[equivalent offset]" << domOffset; RenderPosition result(Position(node, domOffset)); if (!result.getInlineBoxAndOffset(renderOffset)) { return RenderPosition(); @@ -76,10 +76,10 @@ // default value offset = 0; if (!renderer()) { - // qDebug() << "[EMPTY POSITION]" << endl; + // qDebug() << "[EMPTY POSITION]"; return nullptr; } - // qDebug() << "[find inline box]" << m_position << endl; + // qDebug() << "[find inline box]" << m_position; const NodeImpl *node = m_position.node(); /*const*/ RenderObject *renderObject = node->renderer(); @@ -99,15 +99,15 @@ for (textBox = renderText->firstTextBox(); textBox; textBox = textBox->nextTextBox()) { if (renderOffset >= textBox->start() && renderOffset <= textBox->end()) { offset = renderOffset; // - textBox->start(); - // qDebug() << "[result]" << offset << textBox << endl; + // qDebug() << "[result]" << offset << textBox; return textBox; } else if (renderOffset < textBox->start()) { offset = textBox->start(); - // qDebug() << "[result]" << offset << textBox << endl; + // qDebug() << "[result]" << offset << textBox; return textBox; } else if (!textBox->nextTextBox()) { offset = textBox->start() + textBox->len(); - // qDebug() << "[result]" << offset << textBox << endl; + // qDebug() << "[result]" << offset << textBox; return textBox; } // choose right box we're at @@ -118,7 +118,7 @@ bool RenderPosition::rendersInDifferentPosition(const RenderPosition &self, const RenderPosition &other) { - // qDebug() << "[compare]" << self.position() << other.position() << endl; + // qDebug() << "[compare]" << self.position() << other.position(); if (self == other) { return false; } @@ -170,53 +170,53 @@ RenderPosition RenderPosition::previousLinePosition(int x) { - // qDebug() << "[Previous line at x]" << x << endl; + // qDebug() << "[Previous line at x]" << x; if (!renderer()) { return *this; } int rOffset; NodeImpl *node = m_position.node(); InlineBox *box = getInlineBoxAndOffset(rOffset); - // qDebug() << "[box;offset]" << box << rOffset << endl; + // qDebug() << "[box;offset]" << box << rOffset; RenderBlock *containingBlock = nullptr; RootInlineBox *root = nullptr; if (box) { root = box->root()->prevRootBox(); } - // qDebug() << "[root]" << root << endl; + // qDebug() << "[root]" << root; if (root) { containingBlock = node->renderer()->containingBlock(); } else { // This containing editable block does not have a previous line. // Need to move back to previous containing editable block in this root editable // block and find the last root line box in that block. NodeImpl *startBlock = node->enclosingBlockFlowElement(); NodeImpl *n = node->previousEditable(); - // qDebug() << "[StartBlock]" << startBlock << (startBlock ? startBlock->renderer() : 0) << endl; + // qDebug() << "[StartBlock]" << startBlock << (startBlock ? startBlock->renderer() : 0); while (n && startBlock == n->enclosingBlockFlowElement()) { n = n->previousEditable(); } - // qDebug() << "[n]" << n << (n ? n->renderer() : 0) << (n ? n->nodeName() : "") << endl; + // qDebug() << "[n]" << n << (n ? n->renderer() : 0) << (n ? n->nodeName() : ""); printEnclosingBlockTree(n); if (n) { while (n && !Position(n, n->caretMaxOffset()).inRenderedContent()) { - // qDebug() << "[previous]" << n << endl; + // qDebug() << "[previous]" << n; n = n->previousEditable(); } - // qDebug() << "[n]" << n << (n ? n->renderer() : 0) << endl; + // qDebug() << "[n]" << n << (n ? n->renderer() : 0); if (n && inSameRootNavigableElement(n, node)) { assert(n->renderer()); // box = n->renderer()->inlineBox(n->caretMaxOffset()); int offset; box = RenderPosition::fromDOMPosition(Position(n, n->caretMaxOffset())).getInlineBoxAndOffset(offset); - // qDebug() << "[box]" << box << offset << endl; + // qDebug() << "[box]" << box << offset; // previous root line box found if (box) { root = box->root(); containingBlock = n->renderer()->containingBlock(); - // qDebug() << "[root,block]" << root << containingBlock << endl; + // qDebug() << "[root,block]" << root << containingBlock; } return RenderPosition::fromDOMPosition(Position(n, n->caretMaxOffset())).position(); } @@ -226,26 +226,26 @@ if (root) { int absx, absy; containingBlock->absolutePosition(absx, absy); - // qDebug() << "[cb]" << containingBlock << absx << absy << endl; + // qDebug() << "[cb]" << containingBlock << absx << absy; RenderObject *renderer = root->closestLeafChildForXPos(x, absx)->object(); - // qDebug() << "[renderer]" << renderer << endl; + // qDebug() << "[renderer]" << renderer; return renderer->positionForCoordinates(x, absy + root->topOverflow()); } return *this; } RenderPosition RenderPosition::nextLinePosition(int x) { - // qDebug() << "[Next line at x]" << x << endl; + // qDebug() << "[Next line at x]" << x; if (!renderer()) { return *this; } int rOffset; NodeImpl *node = m_position.node(); InlineBox *box = getInlineBoxAndOffset(rOffset); - // qDebug() << "[box;offset]" << box << rOffset << endl; + // qDebug() << "[box;offset]" << box << rOffset; RenderBlock *containingBlock = nullptr; RootInlineBox *root = nullptr; @@ -292,7 +292,7 @@ /*bool RenderPosition::haveRenderPosition() { - // qDebug() << *this << endl; + // qDebug() << *this; if (isEmpty()) return false; @@ -308,10 +308,10 @@ } else if (renderer->isText()) { RenderText *textRenderer = static_cast(renderer); - // qDebug() << "text" << textRenderer << endl; + // qDebug() << "text" << textRenderer; unsigned rOffset = textRenderer->convertToRenderedPosition(offset()); for (InlineTextBox *box = textRenderer->firstTextBox(); box; box = box->nextTextBox()) { - // qDebug() << "box" << box << box->m_start << box->m_start + box->m_len << endl; + // qDebug() << "box" << box << box->m_start << box->m_start + box->m_len; if (rOffset >= box->m_start && rOffset <= box->m_start + box->m_len) { return true; } diff --git a/src/rendering/render_replaced.cpp b/src/rendering/render_replaced.cpp --- a/src/rendering/render_replaced.cpp +++ b/src/rendering/render_replaced.cpp @@ -102,7 +102,7 @@ #if 0 // qDebug() << "RenderReplaced::checkSelectionPoint(_x="<<_x<<",_y="<<_y<<",_tx="<<_tx<<",_ty="<<_ty<<")" << endl << "xPos: " << xPos() << " yPos: " << yPos() << " width: " << width() << " height: " << height() << endl - << "_ty + yPos: " << (_ty + yPos()) << " + height: " << (_ty + yPos() + height()) << "; _tx + xPos: " << (_tx + xPos()) << " + width: " << (_tx + xPos() + width()) << endl; + << "_ty + yPos: " << (_ty + yPos()) << " + height: " << (_ty + yPos() + height()) << "; _tx + xPos: " << (_tx + xPos()) << " + width: " << (_tx + xPos() + width()); #endif node = element(); offset = 0; diff --git a/src/rendering/render_table.cpp b/src/rendering/render_table.cpp --- a/src/rendering/render_table.cpp +++ b/src/rendering/render_table.cpp @@ -161,7 +161,7 @@ { #ifdef DEBUG_LAYOUT qDebug() << renderName() << "(Table)::addChild( " << child->renderName() << ", " << - (beforeChild ? beforeChild->renderName() : "0") << " )" << endl; + (beforeChild ? beforeChild->renderName() : "0") << " )"; #endif bool wrapInAnonymousSection = false; @@ -1096,7 +1096,7 @@ node = state.m_lastNode; offset = state.m_lastOffset; //qDebug() << "RenderTable::checkSelectionPoint " << this << " before this child " - // << node << "-> returning SelectionPointInside, offset=" << offset << endl; + // << node << "-> returning SelectionPointInside, offset=" << offset; return SelectionPointInside; } else { node = nod; @@ -1175,7 +1175,7 @@ { #ifdef DEBUG_LAYOUT qDebug() << renderName() << "(TableSection)::addChild( " << child->renderName() << ", beforeChild=" << - (beforeChild ? beforeChild->renderName() : "0") << " )" << endl; + (beforeChild ? beforeChild->renderName() : "0") << " )"; #endif if (!child->isTableRow()) { // TBODY > FORM quirk (???) @@ -1770,7 +1770,7 @@ { #ifdef DEBUG_LAYOUT qDebug() << "setting position " << r << "/" << c << ": " - << table()->columnPos[c] /*+ padding */ << "/" << rowPos[rindx] << " height=" << rHeight << endl; + << table()->columnPos[c] /*+ padding */ << "/" << rowPos[rindx] << " height=" << rHeight; #endif EVerticalAlign va = cell->style()->verticalAlign(); @@ -2410,7 +2410,7 @@ { #ifdef DEBUG_LAYOUT qDebug() << renderName() << "(TableRow)::addChild( " << child->renderName() << " )" << ", " << - (beforeChild ? beforeChild->renderName() : "0") << " )" << endl; + (beforeChild ? beforeChild->renderName() : "0") << " )"; #endif if (!child->isTableCell()) { diff --git a/src/rendering/render_text.cpp b/src/rendering/render_text.cpp --- a/src/rendering/render_text.cpp +++ b/src/rendering/render_text.cpp @@ -460,7 +460,7 @@ FindSelectionResult InlineTextBox::checkSelectionPoint(int _x, int _y, int _tx, int _ty, int &offset) { // qDebug() << "InlineTextBox::checkSelectionPoint " << this << " _x=" << _x << " _y=" << _y -// << " _tx+m_x=" << _tx+m_x << " _ty+m_y=" << _ty+m_y << endl; +// << " _tx+m_x=" << _tx+m_x << " _ty+m_y=" << _ty+m_y; offset = 0; if (_y < _ty + m_y) { @@ -584,7 +584,7 @@ int InlineTextBox::widthFromStart(int pos) const { // gasp! sometimes pos is i < 0 which crashes Font::width - // qDebug() << this << pos << endl; + // qDebug() << this << pos; pos = qMax(pos, 0); const RenderText *t = renderText(); @@ -643,7 +643,7 @@ //qDebug() << "default"; // else use existing width function - // qDebug() << "result width:" << f->width(t->str->s + m_start, m_len, 0, pos, false) << endl; + // qDebug() << "result width:" << f->width(t->str->s + m_start, m_len, 0, pos, false); return f->width(t->str->s + m_start, m_len, 0, pos, false); } @@ -948,7 +948,7 @@ FindSelectionResult RenderText::checkSelectionPoint(int _x, int _y, int _tx, int _ty, DOM::NodeImpl *&node, int &offset, SelPointState &) { // qDebug() << "RenderText::checkSelectionPoint " << this << " _x=" << _x << " _y=" << _y -// << " _tx=" << _tx << " _ty=" << _ty << endl; +// << " _tx=" << _tx << " _ty=" << _ty; //qDebug() << renderName() << "::checkSelectionPoint x=" << xPos() << " y=" << yPos() << " w=" << width() << " h=" << height(); NodeImpl *lastNode = nullptr; @@ -1024,12 +1024,12 @@ /*const */DOMStringImpl *domString = originalString(); /*const */DOMStringImpl *renderedString = string(); if (domString == renderedString) { - // qDebug() << "[rendered == dom]" << position << endl; + // qDebug() << "[rendered == dom]" << position; return position; } /* // qDebug() << "[convert]" << position << endl << DOMString(domString) << endl - << DOMString(renderedString) << endl;*/ + << DOMString(renderedString);*/ if (!domString || !renderedString) { return position; @@ -1056,7 +1056,7 @@ ++i; ++j; } - // qDebug() << "[result]" << i << endl; + // qDebug() << "[result]" << i; return i; } @@ -1068,12 +1068,12 @@ /*const */DOMStringImpl *domString = originalString(); /*const */DOMStringImpl *renderedString = string(); if (domString == renderedString) { - // qDebug() << "[rendered == dom]" << position << endl; + // qDebug() << "[rendered == dom]" << position; return position; } /* // qDebug() << "[convert]" << position << endl << DOMString(domString) << endl - << DOMString(renderedString) << endl;*/ + << DOMString(renderedString);*/ if (!domString || !renderedString) { return position; @@ -1100,20 +1100,20 @@ ++i; ++j; } - // qDebug() << "[result]" << j << endl; + // qDebug() << "[result]" << j; return j; } RenderPosition RenderText::positionForCoordinates(int _x, int _y) { - // qDebug() << this << _x << _y << endl; + // qDebug() << this << _x << _y; if (!firstTextBox() || stringLength() == 0) { return Position(element(), 0); } int absx, absy; containingBlock()->absolutePosition(absx, absy); - // qDebug() << "absolute(" << absx << absy << ")" << endl; + // qDebug() << "absolute(" << absx << absy << ")"; if (_y < absy + firstTextBox()->root()->bottomOverflow() && _x < absx + firstTextBox()->m_x) { // at the y coordinate of the first line or above @@ -1128,16 +1128,16 @@ } for (InlineTextBox *box = firstTextBox(); box; box = box->nextTextBox()) { - // qDebug() << "[check box]" << box << endl; + // qDebug() << "[check box]" << box; if (_y >= absy + box->root()->topOverflow() && _y < absy + box->root()->bottomOverflow()) { if (_x < absx + box->m_x + box->m_width) { // and the x coordinate is to the left of the right edge of this box // check to see if position goes in this box int offset; box->checkSelectionPoint(_x, absy + box->yPos(), absx, absy, offset); - // qDebug() << "offset" << offset << endl; + // qDebug() << "offset" << offset; if (offset != -1) { - // qDebug() << "return" << Position(element(), convertToDOMPosition(offset + box->m_start)) << endl; + // qDebug() << "return" << Position(element(), convertToDOMPosition(offset + box->m_start)); return RenderPosition(element(), offset + box->m_start); } } else if (!box->prevOnLine() && _x < absx + box->m_x) @@ -1158,7 +1158,7 @@ void RenderText::caretPos(int offset, int flags, int &_x, int &_y, int &width, int &height) const { - // qDebug() << offset << flags << endl; + // qDebug() << offset << flags; if (!m_firstTextBox) { _x = _y = height = -1; width = 1; @@ -1175,16 +1175,16 @@ _x = s->m_x + s->widthFromStart(pos); _y = s->m_y + s->baseline() - fm.ascent(); - // qDebug() << "(" << _x << _y << ")" << endl; + // qDebug() << "(" << _x << _y << ")"; width = 1; if (flags & CFOverride) { width = offset < caretMaxOffset() ? fm.width(str->s[offset]) : 1; - // qDebug() << "CFOverride" << width << endl; + // qDebug() << "CFOverride" << width; }/*end if*/ #if 0 // qDebug() << "_x="<<_x << " s->m_x="<m_x << " s->m_start" << s->m_start - << " s->m_len" << s->m_len << " _y=" << _y << endl; + << " s->m_len" << s->m_len << " _y=" << _y; #endif int absx, absy; diff --git a/src/svg/SVGDocumentExtensions.cpp b/src/svg/SVGDocumentExtensions.cpp --- a/src/svg/SVGDocumentExtensions.cpp +++ b/src/svg/SVGDocumentExtensions.cpp @@ -64,7 +64,7 @@ if (!m_doc || !m_doc->part()) { return nullptr; } - // qDebug() << "create listener: (" << code << functionName << node << ")" << endl; + // qDebug() << "create listener: (" << code << functionName << node << ")"; return m_doc->part()->createHTMLEventListener(code.string(), functionName.string(), node, true/*svg*/); } diff --git a/src/svg/SVGElement.cpp b/src/svg/SVGElement.cpp --- a/src/svg/SVGElement.cpp +++ b/src/svg/SVGElement.cpp @@ -118,7 +118,7 @@ void SVGElement::addSVGEventListener(/*const AtomicString& eventType*/const EventImpl::EventId &eventType, const Attribute *attr) { - // qDebug() << "add listener for: " << EventName::fromId(eventType).toString() << endl; + // qDebug() << "add listener for: " << EventName::fromId(eventType).toString(); Element::setHTMLEventListener(EventName::fromId(eventType), document()->accessSVGExtensions()-> createSVGEventListener(attr->localName().string(), attr->value(), this)); } @@ -189,15 +189,15 @@ void SVGElement::sendSVGLoadEventIfPossible(bool sendParentLoadEvents) { - // qDebug() << "send svg load event" << endl; + // qDebug() << "send svg load event"; RefPtr currentTarget = this; - // qDebug() << currentTarget << currentTarget->haveLoadedRequiredResources() << endl; + // qDebug() << currentTarget << currentTarget->haveLoadedRequiredResources(); while (currentTarget && currentTarget->haveLoadedRequiredResources()) { RefPtr parent; if (sendParentLoadEvents) { parent = currentTarget->parentNode(); // save the next parent to dispatch too incase dispatching the event changes the tree } - // qDebug() << hasLoadListener(currentTarget.get()) << endl; + // qDebug() << hasLoadListener(currentTarget.get()); if (hasLoadListener(currentTarget.get())) { //Event* event = new Event(EventImpl::LOAD_EVENT, true/*false*/, false); //event->setTarget(currentTarget.get()); @@ -260,7 +260,7 @@ Q_UNUSED(e); Q_UNUSED(ec); Q_UNUSED(tempEvent); - // qDebug() << "dispatch event" << endl; + // qDebug() << "dispatch event"; // TODO: This function will be removed in a follow-up patch! /*EventTarget* target = this; @@ -301,7 +301,7 @@ void SVGElement::addCSSProperty(Attribute *attr, int id, const String &value) { Q_UNUSED(attr); - // qDebug() << "called with: " << id << " " << value << endl; + // qDebug() << "called with: " << id << " " << value; /* WARNING: copy&past'ed from HTMLElementImpl class */ if (!m_hasCombinedStyle) { createNonCSSDecl(); @@ -313,7 +313,7 @@ void SVGElement::addCSSProperty(Attribute *attr, int id, int value) { Q_UNUSED(attr); - // qDebug() << "called with: " << id << " " << value << endl; + // qDebug() << "called with: " << id << " " << value; /* WARNING: copy&past'ed from HTMLElementImpl class */ if (!m_hasCombinedStyle) { createNonCSSDecl(); diff --git a/src/svg/SVGGradientElement.cpp b/src/svg/SVGGradientElement.cpp --- a/src/svg/SVGGradientElement.cpp +++ b/src/svg/SVGGradientElement.cpp @@ -125,7 +125,7 @@ SVGResource *SVGGradientElement::canvasResource() { - // qDebug() << "request gradient paint server" << endl; + // qDebug() << "request gradient paint server"; if (!m_resource) { if (gradientType() == LinearGradientPaintServer) { m_resource = SVGPaintServerLinearGradient::create(this); diff --git a/src/svg/SVGLinearGradientElement.cpp b/src/svg/SVGLinearGradientElement.cpp --- a/src/svg/SVGLinearGradientElement.cpp +++ b/src/svg/SVGLinearGradientElement.cpp @@ -128,7 +128,7 @@ if (!attributes.hasStops()) { const Vector &stops(current->buildStops()); - // qDebug() << "stops.isEmpty()" << stops.isEmpty() << endl; + // qDebug() << "stops.isEmpty()" << stops.isEmpty(); if (!stops.isEmpty()) { attributes.setStops(stops); } @@ -161,7 +161,7 @@ if (refNode && (refNode->hasTagName(SVGNames::linearGradientTag) || refNode->hasTagName(SVGNames::radialGradientTag))) { current = static_cast(const_cast(refNode)); // int ec; - // qDebug() << "take attributes from" << current->getAttributeNS("", "id", ec) << endl; + // qDebug() << "take attributes from" << current->getAttributeNS("", "id", ec); // Cycle detection if (processedGradients.contains(current)) { diff --git a/src/svg/SVGPolyElement.cpp b/src/svg/SVGPolyElement.cpp --- a/src/svg/SVGPolyElement.cpp +++ b/src/svg/SVGPolyElement.cpp @@ -110,7 +110,7 @@ // Spec: Additionally, the 'points' attribute on the original element // accessed via the XML DOM (e.g., using the getAttribute() method call) // will reflect any changes made to points. - // qDebug() << "fixme!!!!!!!!!" << endl; + // qDebug() << "fixme!!!!!!!!!"; /*FIXME KHTML String _points; int len = points()->numberOfItems(); for (int i = 0; i < len; ++i) { diff --git a/src/svg/SVGRectElement.cpp b/src/svg/SVGRectElement.cpp --- a/src/svg/SVGRectElement.cpp +++ b/src/svg/SVGRectElement.cpp @@ -59,7 +59,7 @@ void SVGRectElement::parseMappedAttribute(MappedAttribute *attr) { - // qDebug() << "called with" << attr->localName() << attr->value() << endl; + // qDebug() << "called with" << attr->localName() << attr->value(); if (attr->name() == SVGNames::xAttr) { setXBaseValue(SVGLength(this, LengthModeWidth, attr->value())); } else if (attr->name() == SVGNames::yAttr) { diff --git a/src/svg/SVGSVGElement.cpp b/src/svg/SVGSVGElement.cpp --- a/src/svg/SVGSVGElement.cpp +++ b/src/svg/SVGSVGElement.cpp @@ -252,7 +252,7 @@ void SVGSVGElement::parseMappedAttribute(MappedAttribute *attr) { - // qDebug() << "parse attribute: " << attr->localName() << attr->value() << endl; + // qDebug() << "parse attribute: " << attr->localName() << attr->value(); if (!nearestViewportElement()) { // Only handle events if we're the outermost element /*if (attr->name() == onunloadAttr) @@ -273,13 +273,13 @@ } else if (attr->name() == SVGNames::yAttr) { setYBaseValue(SVGLength(this, LengthModeHeight, attr->value())); } else if (attr->name() == SVGNames::widthAttr) { - // qDebug() << "set width" << attr->value() << endl; + // qDebug() << "set width" << attr->value(); setWidthBaseValue(SVGLength(this, LengthModeWidth, attr->value())); addCSSProperty(attr, CSSPropertyWidth, attr->value()); /*if (width().value() < 0.0) document()->accessSVGExtensions()->reportError("A negative value for svg attribute is not allowed");*/ } else if (attr->name() == SVGNames::heightAttr) { - // qDebug() << "set height" << attr->value() << endl; + // qDebug() << "set height" << attr->value(); setHeightBaseValue(SVGLength(this, LengthModeHeight, attr->value())); addCSSProperty(attr, CSSPropertyHeight, attr->value()); /*if (height().value() < 0.0) @@ -469,7 +469,7 @@ RenderObject *SVGSVGElement::createRenderer(RenderArena *arena, RenderStyle *) { - // qDebug() << "create RenderSVGRoot from element" << endl; + // qDebug() << "create RenderSVGRoot from element"; return new(arena) RenderSVGRoot(this); /*if (isOutermostSVG()) return new (arena) RenderSVGRoot(this); diff --git a/src/svg/SVGStopElement.cpp b/src/svg/SVGStopElement.cpp --- a/src/svg/SVGStopElement.cpp +++ b/src/svg/SVGStopElement.cpp @@ -49,7 +49,7 @@ { if (attr->name() == SVGNames::offsetAttr) { const String &value = attr->value(); - // qDebug() << "parse offset:" << value << endl; + // qDebug() << "parse offset:" << value; if (value.endsWith("%")) { setOffsetBaseValue(value.substring(0, value.length() - 1).toFloat() / 100.0f); } else { diff --git a/src/svg/SVGStyleElement.cpp b/src/svg/SVGStyleElement.cpp --- a/src/svg/SVGStyleElement.cpp +++ b/src/svg/SVGStyleElement.cpp @@ -90,7 +90,7 @@ void SVGStyleElement::parseMappedAttribute(MappedAttribute *attr) { - // qDebug() << "parse: " << attr->id() << attr->localName() << attr->value() << endl; + // qDebug() << "parse: " << attr->id() << attr->localName() << attr->value(); if (/*attr->name() == titleAttr*/attr->id() == ATTR_TITLE && m_sheet) ;//FIXME m_sheet->setTitle(attr->value()); else { @@ -112,15 +112,15 @@ /*if (!m_createdByParser) StyleElement::insertedIntoDocument(document(), this);*/ // Copy implementation from HTMLStyleElementImpl for KHTML - // qDebug() << "not implemented" << endl; + // qDebug() << "not implemented"; } void SVGStyleElement::removedFromDocument() { SVGElement::removedFromDocument(); /*StyleElement::removedFromDocument(document());*/ // Copy implementation from HTMLStyleElementImpl for KHTML - // qDebug() << "not implemented" << endl; + // qDebug() << "not implemented"; } void SVGStyleElement::childrenChanged(bool changedByParser, Node *beforeChange, Node *afterChange, int childCountDelta) @@ -133,7 +133,7 @@ SVGElement::childrenChanged(); /*StyleElement::process(this);*/ // Copy implementation from HTMLStyleElementImpl for KHTML - // qDebug() << "not implemented" << endl; + // qDebug() << "not implemented"; } StyleSheet *SVGStyleElement::sheet() diff --git a/src/svg/SVGTextElement.cpp b/src/svg/SVGTextElement.cpp --- a/src/svg/SVGTextElement.cpp +++ b/src/svg/SVGTextElement.cpp @@ -111,7 +111,7 @@ RenderObject *SVGTextElement::createRenderer(RenderArena *arena, RenderStyle *style) { Q_UNUSED(style); - // qDebug() << "create renderer for " << endl; + // qDebug() << "create renderer for "; return new(arena) RenderSVGText(this); } diff --git a/src/svg/SVGTextPositioningElement.cpp b/src/svg/SVGTextPositioningElement.cpp --- a/src/svg/SVGTextPositioningElement.cpp +++ b/src/svg/SVGTextPositioningElement.cpp @@ -54,7 +54,7 @@ void SVGTextPositioningElement::parseMappedAttribute(MappedAttribute *attr) { - // qDebug() << "parse:" << attr->localName() << attr->value() << endl; + // qDebug() << "parse:" << attr->localName() << attr->value(); if (attr->name() == SVGNames::xAttr) { xBaseValue()->parse(attr->value(), this, LengthModeWidth); } else if (attr->name() == SVGNames::yAttr) { diff --git a/src/svg/SVGURIReference.cpp b/src/svg/SVGURIReference.cpp --- a/src/svg/SVGURIReference.cpp +++ b/src/svg/SVGURIReference.cpp @@ -42,9 +42,9 @@ bool SVGURIReference::parseMappedAttribute(MappedAttribute *attr) { - // qDebug() << "parse" << attr->localName() << attr->value() << endl; + // qDebug() << "parse" << attr->localName() << attr->value(); if (attr->id() == ATTR_XLINK_HREF) { - // qDebug() << "set href base value" << attr->value() << endl; + // qDebug() << "set href base value" << attr->value(); setHrefBaseValue(attr->value()); return true; } diff --git a/src/svg/graphics/SVGPaintServerLinearGradient.cpp b/src/svg/graphics/SVGPaintServerLinearGradient.cpp --- a/src/svg/graphics/SVGPaintServerLinearGradient.cpp +++ b/src/svg/graphics/SVGPaintServerLinearGradient.cpp @@ -35,7 +35,7 @@ SVGPaintServerLinearGradient::SVGPaintServerLinearGradient(const SVGGradientElement *owner) : SVGPaintServerGradient(owner) { - // qDebug() << "create LinearGradient Paint server" << endl; + // qDebug() << "create LinearGradient Paint server"; } SVGPaintServerLinearGradient::~SVGPaintServerLinearGradient() diff --git a/src/svg/graphics/qt/SVGPaintServerGradientQt.cpp b/src/svg/graphics/qt/SVGPaintServerGradientQt.cpp --- a/src/svg/graphics/qt/SVGPaintServerGradientQt.cpp +++ b/src/svg/graphics/qt/SVGPaintServerGradientQt.cpp @@ -41,11 +41,11 @@ void SVGPaintServerGradient::fillColorArray(QGradient &gradient, const Vector &stops, float opacity) const { - // qDebug() << stops.size() << endl; + // qDebug() << stops.size(); for (unsigned i = 0; i < stops.size(); ++i) { float offset = stops[i].first; QColor color = stops[i].second; - // qDebug() << "offset" << offset << "color" << color << endl; + // qDebug() << "offset" << offset << "color" << color; QColor c(color.red(), color.green(), color.blue()); c.setAlpha(int(color.alpha() * opacity)); @@ -58,7 +58,7 @@ SVGPaintTargetType type, bool isPaintingText) const { Q_UNUSED(isPaintingText); - // qDebug() << "!!!!!!!" << endl; + // qDebug() << "!!!!!!!"; m_ownerElement->buildGradient(); /*QPainter* painter(context ? context->platformContext() : 0); @@ -83,7 +83,7 @@ } double opacity = 1.0; - // qDebug() << "type: " << type << (type & ApplyToFillTargetType) << endl; + // qDebug() << "type: " << type << (type & ApplyToFillTargetType); if ((type & ApplyToFillTargetType) && renderStyle->svgStyle()->hasFill()) { fillColorArray(gradient, gradientStops(), opacity); diff --git a/src/svg/graphics/qt/SVGPaintServerRadialGradientQt.cpp b/src/svg/graphics/qt/SVGPaintServerRadialGradientQt.cpp --- a/src/svg/graphics/qt/SVGPaintServerRadialGradientQt.cpp +++ b/src/svg/graphics/qt/SVGPaintServerRadialGradientQt.cpp @@ -89,7 +89,7 @@ fy = int(sin(angle) * r) - 1; } - // qDebug() << "cx:" << cx << "cy:" << cy << "radius:" << gradientRadius() << "fx:" << fx + cx << "fy:" << fy + cy << endl; + // qDebug() << "cx:" << cx << "cy:" << cy << "radius:" << gradientRadius() << "fx:" << fx + cx << "fy:" << fy + cy; QRadialGradient gradient(QPointF(cx, cy), gradientRadius(), QPointF(fx + cx, fy + cy)); return gradient; diff --git a/src/ui/findbar/khtmlfind.cpp b/src/ui/findbar/khtmlfind.cpp --- a/src/ui/findbar/khtmlfind.cpp +++ b/src/ui/findbar/khtmlfind.cpp @@ -574,7 +574,7 @@ #if 0 // qDebug() << "slotHighlight: " << d->m_selectionStart.handle() << "," << d->m_startOffset << " - " << - d->m_selectionEnd.handle() << "," << d->m_endOffset << endl; + d->m_selectionEnd.handle() << "," << d->m_endOffset; it = d->m_stringPortions.begin(); for (; it != d->m_stringPortions.end(); ++it) // qDebug() << " StringPortion: from index=" << (*it).index << " -> node=" << (*it).node; diff --git a/src/xml/dom_docimpl.cpp b/src/xml/dom_docimpl.cpp --- a/src/xml/dom_docimpl.cpp +++ b/src/xml/dom_docimpl.cpp @@ -1210,8 +1210,8 @@ ElementImpl *DocumentImpl::createSVGElement(const QualifiedName &name) { uint id = name.localNameId().id(); - // qDebug() << getPrintableName(name.id()) << endl; - // qDebug() << "svg text: " << getPrintableName(WebCore::SVGNames::textTag.id()) << endl; + // qDebug() << getPrintableName(name.id()); + // qDebug() << "svg text: " << getPrintableName(WebCore::SVGNames::textTag.id()); ElementImpl *n = nullptr; switch (id) { @@ -3153,7 +3153,7 @@ bool DocumentImpl::execCommand(const DOMString &command, bool userInterface, const DOMString &value) { - // qDebug() << "[execute command]" << command << userInterface << value << endl; + // qDebug() << "[execute command]" << command << userInterface << value; return jsEditor()->execCommand(jsEditor()->commandImp(command), userInterface, value); } @@ -3174,7 +3174,7 @@ bool DocumentImpl::queryCommandSupported(const DOMString &command) { - // qDebug() << "[query command supported]" << command << endl; + // qDebug() << "[query command supported]" << command; return jsEditor()->queryCommandSupported(jsEditor()->commandImp(command)); } diff --git a/src/xml/dom_elementimpl.cpp b/src/xml/dom_elementimpl.cpp --- a/src/xml/dom_elementimpl.cpp +++ b/src/xml/dom_elementimpl.cpp @@ -1162,7 +1162,7 @@ // FIXME: reset caret if it is in this node or a child }/*end if*/ // FIXME: use addCSSProperty when I get permission to move it here -// qDebug() << "CSS_PROP__KHTML_USER_INPUT: "<< value << endl; +// qDebug() << "CSS_PROP__KHTML_USER_INPUT: "<< value; getInlineStyleDecls()->setProperty(CSS_PROP__KHTML_USER_INPUT, value, false); setChanged(); } @@ -1801,20 +1801,20 @@ int NamedAttrMapImpl::find(NodeImpl::Id id, const PrefixName &prefix, bool nsAware) const { - //qDebug() << "In find:" << getPrintableName(id) << "[" << prefix.toString() << prefix.id() << "]" << nsAware << endl; - //qDebug() << "m_attrs.size()" << m_attrs.size() << endl; + //qDebug() << "In find:" << getPrintableName(id) << "[" << prefix.toString() << prefix.id() << "]" << nsAware; + //qDebug() << "m_attrs.size()" << m_attrs.size(); unsigned len = m_attrs.size(); for (unsigned i = 0; i < len; ++i) { - //qDebug() << "check attr[" << i << "]" << getPrintableName(m_attrs[i].id()) << "prefix:" << m_attrs[i].prefix() << endl; + //qDebug() << "check attr[" << i << "]" << getPrintableName(m_attrs[i].id()) << "prefix:" << m_attrs[i].prefix(); if (nsAware && namespacePart(id) == anyNamespace && localNamePart(id) == localNamePart(m_attrs[i].id())) { return i; } if ((nsAware && id == m_attrs[i].id()) || (!nsAware && localNamePart(id) == localNamePart(m_attrs[i].id()) && prefix == m_attrs[i].prefixName())) { - //qDebug() << "attribute matched: exiting..." << endl; + //qDebug() << "attribute matched: exiting..."; return i; } } - //qDebug() << "attribute doesn't match: exiting... with -1" << endl; + //qDebug() << "attribute doesn't match: exiting... with -1"; return -1; } diff --git a/src/xml/dom_position.cpp b/src/xml/dom_position.cpp --- a/src/xml/dom_position.cpp +++ b/src/xml/dom_position.cpp @@ -116,25 +116,25 @@ temp.fill(' ', indent); // qDebug() << temp << node << node->nodeName() << node->renderer() // << (node->renderer() ? node->renderer()->renderName() : "") - // << (node->isTextNode() ? static_cast(node)->toString() : "") << endl; + // << (node->isTextNode() ? static_cast(node)->toString() : ""); for (NodeImpl *subNode = node->firstChild(); subNode; subNode = subNode->nextSibling()) { printSubTree(subNode, indent + 1); } } void printEnclosingBlockTree(NodeImpl *node) { if (!node || !node->enclosingBlockFlowElement()) { - // qDebug() << "[null node]" << node << endl; + // qDebug() << "[null node]" << node; return; } printSubTree(node->enclosingBlockFlowElement()); } void printRootEditableTree(NodeImpl *node) { if (!node || !node->rootEditableElement()) { - // qDebug() << "[null node]" << node << endl; + // qDebug() << "[null node]" << node; return; } printSubTree(node->rootEditableElement()); @@ -200,7 +200,7 @@ Position Position::equivalentLeafPosition() const { #ifdef DEBUG_CARET - // qDebug() << *this << endl; + // qDebug() << *this; #endif if (isEmpty()) { return Position(); @@ -211,7 +211,7 @@ } #ifdef DEBUG_CARET - // qDebug() << "[Position]" << this << endl; + // qDebug() << "[Position]" << this; #endif NodeImpl *n = node(); int count = 0; @@ -221,7 +221,7 @@ return *this; } #ifdef DEBUG_CARET - // qDebug() << "[iterate]" << n << count << n->maxOffset() << endl; + // qDebug() << "[iterate]" << n << count << n->maxOffset(); #endif if (count + n->maxOffset() >= offset()) { count = offset() - count; @@ -235,7 +235,7 @@ Position Position::previousRenderedEditablePosition() const { #ifdef DEBUG_CARET - // qDebug() << *this << endl; + // qDebug() << *this; #endif if (isEmpty()) { return Position(); @@ -262,7 +262,7 @@ Position Position::nextRenderedEditablePosition() const { #ifdef DEBUG_CARET - // qDebug() << *this << endl; + // qDebug() << *this; #endif if (isEmpty()) { return Position(); @@ -289,29 +289,29 @@ Position Position::previousCharacterPosition() const { #ifdef DEBUG_CARET - // qDebug() << *this << endl; + // qDebug() << *this; #endif if (isEmpty()) { return Position(); } NodeImpl *fromRootNavigableElement = rootNavigableElement(node()); #ifdef DEBUG_CARET - // qDebug() << "RootElement" << fromRootNavigableElement << endl; + // qDebug() << "RootElement" << fromRootNavigableElement; #endif PositionIterator it(*this); RenderPosition originalRPosition = RenderPosition::fromDOMPosition(*this); while (!it.atStart()) { Position pos = it.previous(); #ifdef DEBUG_CARET - // qDebug() << "iterate" << pos << endl; + // qDebug() << "iterate" << pos; #endif if (rootNavigableElement(pos.node()) != fromRootNavigableElement) { #ifdef DEBUG_CARET - // qDebug() << "different root" << rootNavigableElement(pos.node()) << endl; + // qDebug() << "different root" << rootNavigableElement(pos.node()); #endif return *this; } @@ -321,15 +321,15 @@ } } #ifdef DEBUG_CARET - // qDebug() << "no previous position" << endl; + // qDebug() << "no previous position"; #endif return *this; } Position Position::nextCharacterPosition() const { #ifdef DEBUG_CARET - // qDebug() << *this << endl; + // qDebug() << *this; #endif if (isEmpty()) { return Position(); @@ -424,7 +424,7 @@ Position Position::equivalentUpstreamPosition() const { #ifdef DEBUG_CARET - // qDebug() << *this << endl; + // qDebug() << *this; #endif if (!node()) { return Position(); @@ -435,7 +435,7 @@ PositionIterator it(*this); for (; !it.atStart(); it.previous()) { #ifdef DEBUG_CARET - // qDebug() << "[iterate]" << it.current() << endl; + // qDebug() << "[iterate]" << it.current(); #endif NodeImpl *currentBlock = it.current().node()->enclosingBlockFlowElement(); if (block != currentBlock) { @@ -493,16 +493,16 @@ Position Position::equivalentDownstreamPosition() const { - // qDebug() << *this << endl; + // qDebug() << *this; if (!node()) { return Position(); } NodeImpl *block = node()->enclosingBlockFlowElement(); PositionIterator it(*this); for (; !it.atEnd(); it.next()) { - // qDebug() << "[iterate]" << it.current() << endl; + // qDebug() << "[iterate]" << it.current(); NodeImpl *currentBlock = it.current().node()->enclosingBlockFlowElement(); if (block != currentBlock) { return it.previous(); @@ -640,7 +640,7 @@ bool Position::rendersInDifferentPosition(const Position &pos) const { return RenderPosition::rendersInDifferentPosition(RenderPosition::fromDOMPosition(*this), RenderPosition::fromDOMPosition(pos)); - /*// qDebug() << *this << pos << endl; + /*// qDebug() << *this << pos; if (isEmpty() || pos.isEmpty()) return false; @@ -726,16 +726,16 @@ bool Position::isFirstRenderedPositionOnLine() const { // return RenderPosition::fromDOMPosition(*this).isFirst*/ - // qDebug() << *this << endl; + // qDebug() << *this; if (isEmpty()) { return false; } RenderObject *renderer = node()->renderer(); if (!renderer) { return false; } - // qDebug() << "Renderer" << renderer << renderer->renderName() << endl; + // qDebug() << "Renderer" << renderer << renderer->renderName(); if (renderer->style()->visibility() != khtml::VISIBLE) { return false; @@ -745,7 +745,7 @@ PositionIterator it(pos); while (!it.atStart()) { it.previous(); - // qDebug() << "To previous" << it.current() << endl; + // qDebug() << "To previous" << it.current(); if (it.current().inRenderedContent()) { return !rendersOnSameLine(it.current()); } diff --git a/src/xml/dom_selection.cpp b/src/xml/dom_selection.cpp --- a/src/xml/dom_selection.cpp +++ b/src/xml/dom_selection.cpp @@ -191,9 +191,9 @@ void Selection::moveTo(const Position &base, const Position &extent) { -// kdDebug(6200) << "Selection::moveTo: base(" << base.node() << "," << base.offset() << "), extent(" << extent.node() << "," << extent.offset() << ")" << endl; +// kdDebug(6200) << "Selection::moveTo: base(" << base.node() << "," << base.offset() << "), extent(" << extent.node() << "," << extent.offset() << ")"; #ifdef DEBUG_CARET - qDebug() << *this << base << extent << endl; + qDebug() << *this << base << extent; #endif assignBaseAndExtent(base, extent); validate(); @@ -481,11 +481,11 @@ int w; int offset = RenderPosition::fromDOMPosition(caretPos()).renderedOffset(); #ifdef DEBUG_CARET - qDebug() << "[before caretPos()]" << m_caretX << endl; + qDebug() << "[before caretPos()]" << m_caretX; #endif caretPos().node()->renderer()->caretPos(offset, true, m_caretX, m_caretY, w, m_caretSize); #ifdef DEBUG_CARET - qDebug() << "[after caretPos()]" << m_caretX << endl; + qDebug() << "[after caretPos()]" << m_caretX; #endif } @@ -521,7 +521,7 @@ return; } - // qDebug() << "[NeedsCaretLayout]" << m_needsCaretLayout << endl; + // qDebug() << "[NeedsCaretLayout]" << m_needsCaretLayout; if (m_needsCaretLayout) { // repaint old position and calculate new position v->updateContents(getRepaintRect()); @@ -581,13 +581,13 @@ void Selection::validate(ETextGranularity granularity) { #ifdef DEBUG_CARET - qDebug() << *this << granularity << endl; + qDebug() << *this << granularity; #endif // move the base and extent nodes to their equivalent leaf positions bool baseAndExtentEqual = base() == extent(); if (base().notEmpty()) { #ifdef DEBUG_CARET - qDebug() << "[base not empty]" << endl; + qDebug() << "[base not empty]"; #endif Position pos = base().equivalentLeafPosition(); assignBase(pos); @@ -627,7 +627,7 @@ // calculate the correct start and end positions if (granularity == CHARACTER) { #ifdef DEBUG_CARET - qDebug() << "[character:baseIsStart]" << m_baseIsStart << base() << extent() << endl; + qDebug() << "[character:baseIsStart]" << m_baseIsStart << base() << extent(); #endif if (m_baseIsStart) { assignStartAndEnd(base(), extent()); @@ -640,34 +640,34 @@ int extentStartOffset = extent().offset(); int extentEndOffset = extent().offset(); #ifdef DEBUG_CARET - qDebug() << "WORD GRANULARITY:" << baseStartOffset << baseEndOffset << extentStartOffset << extentEndOffset << endl; + qDebug() << "WORD GRANULARITY:" << baseStartOffset << baseEndOffset << extentStartOffset << extentEndOffset; #endif if (base().notEmpty() && (base().node()->nodeType() == Node::TEXT_NODE || base().node()->nodeType() == Node::CDATA_SECTION_NODE)) { DOMString t = base().node()->nodeValue(); QChar *chars = t.unicode(); uint len = t.length(); #ifdef DEBUG_CARET - qDebug() << "text:" << QString::fromRawData(chars, len) << endl; + qDebug() << "text:" << QString::fromRawData(chars, len); #endif findWordBoundary(chars, len, base().offset(), &baseStartOffset, &baseEndOffset); #ifdef DEBUG_CARET - qDebug() << "after find word boundary" << baseStartOffset << baseEndOffset << endl; + qDebug() << "after find word boundary" << baseStartOffset << baseEndOffset; #endif } if (extent().notEmpty() && (extent().node()->nodeType() == Node::TEXT_NODE || extent().node()->nodeType() == Node::CDATA_SECTION_NODE)) { DOMString t = extent().node()->nodeValue(); QChar *chars = t.unicode(); uint len = t.length(); #ifdef DEBUG_CARET - qDebug() << "text:" << QString::fromRawData(chars, len) << endl; + qDebug() << "text:" << QString::fromRawData(chars, len); #endif findWordBoundary(chars, len, extent().offset(), &extentStartOffset, &extentEndOffset); #ifdef DEBUG_CARET - qDebug() << "after find word boundary" << baseStartOffset << baseEndOffset << endl; + qDebug() << "after find word boundary" << baseStartOffset << baseEndOffset; #endif } #ifdef DEBUG_CARET - qDebug() << "is start:" << m_baseIsStart << endl; + qDebug() << "is start:" << m_baseIsStart; #endif if (m_baseIsStart) { assignStart(Position(base().node(), baseStartOffset)); diff --git a/tests/test_regression_gui_window.cpp b/tests/test_regression_gui_window.cpp --- a/tests/test_regression_gui_window.cpp +++ b/tests/test_regression_gui_window.cpp @@ -564,7 +564,7 @@ // Remove file if already existent... QFile file(fileName); if (!file.remove()) { - kError() << " Can't remove " << fileName << endl; + kError() << " Can't remove " << fileName; exit(1); } } @@ -863,7 +863,7 @@ if (result != Unknown) { // Yes, we're dealing with a test result... if (cacheName.isEmpty()) { // Make sure everything is alright! - kError() << "Couldn't extract cacheName from data=\"" << data << "\"! Ignoring!" << endl; + kError() << "Couldn't extract cacheName from data=\"" << data << "\"! Ignoring!"; continue; } } @@ -1123,7 +1123,7 @@ QFile file(fileName); if (!file.open(fileFlags)) { - kError() << " Can't open " << fileName << endl; + kError() << " Can't open " << fileName; exit(1); } @@ -1162,7 +1162,7 @@ if (fileInfo.exists()) { QFile file(fileName); if (!file.open(QIODevice::ReadOnly)) { - kError() << " Can't open " << fileName << endl; + kError() << " Can't open " << fileName; exit(1); } @@ -1183,7 +1183,7 @@ { QFile file(fileName); if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) { - kError() << " Can't open " << fileName << endl; + kError() << " Can't open " << fileName; exit(1); }