Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate


Monday, December 31st, 2007 at 11:37:22am UTC 

  1.         // newMessageNode is common to both code path
  2.         // FIXME: Find a better than to create a dummy span.
  3.         DOM::HTMLElement newMessageNode = document().createElement( QString("span") );
  4.         newMessageNode.setInnerHTML( formattedMessageHtml );
  6.         // Find the insert Node
  7.         DOM::HTMLElement insertNode = document().getElementById( QString("insert") );
  9.         if( isConsecutiveMessage && !insertNode.isNull() )
  10.         {
  11.                 // Replace the insert block, because it's a consecutive message.
  12.                 insertNode.parentNode().replaceChild(newMessageNode, insertNode);
  13.         }
  14.         else
  15.         {
  16.                 // Remove the insert block, because it's a new message.
  17.                 if( !insertNode.isNull() )
  18.                         insertNode.parentNode().removeChild(insertNode);
  19.                 // Append to the chat.
  20.                 chatNode.appendChild(newMessageNode);
  21.         }


Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)

Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus