void HTMLTitleElementImpl::setTitle() { kdDebug( 6030 ) << "Title:close" << endl; if(!_first || _first->id() != ID_TEXT) return; TextImpl *t = static_cast<TextImpl *>(_first); QString s = t->data().string(); s.compose(); HTMLDocumentImpl *d = static_cast<HTMLDocumentImpl *>(document); emit d->view()->part()->setWindowCaption( s.visual() ); }
QChar VisiblePosition::character() const { Position pos = position(); NodeImpl *node = pos.node(); if (!node || !node->isTextNode()) { return QChar(); } TextImpl *textNode = static_cast<TextImpl *>(pos.node()); long offset = pos.offset(); if ((unsigned)offset >= textNode->length()) { return QChar(); } return textNode->data()[offset]; }