[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdepimlibs/kblog
From:       Allen Winter <winter () kde ! org>
Date:       2008-09-27 14:15:44
Message-ID: 1222524944.065730.32001.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 865411 by winterz:

QString::replace("foo","") ->  QString::remove("foo")
QString foo = QString() -> QString foo.clear()
minor coding style


 M  +6 -7      blogpost.cpp  
 M  +2 -2      wordpressbuggy.cpp  


--- trunk/KDE/kdepimlibs/kblog/blogpost.cpp #865410:865411
@@ -325,20 +325,19 @@
 
 QString BlogPostPrivate::cleanRichText( QString richText ) const
 {
-  QRegExp getBodyContents("<body[^>]*>(.*)</body>");
-  if ( getBodyContents.indexIn( richText ) )
-  {
+  QRegExp getBodyContents( "<body[^>]*>(.*)</body>" );
+  if ( getBodyContents.indexIn( richText ) ) {
     // Get anything inside but excluding the body tags
-    richText = getBodyContents.cap(1);
+    richText = getBodyContents.cap( 1 );
     // Get rid of any whitespace
-    richText.replace(QRegExp("^\\s+"),"");
+    richText.remove( QRegExp( "^\\s+" ) );
   }
   // Get rid of styled paragraphs
-  richText.replace(QRegExp("<p style=\"[^\"]*\">"),"<p>");
+  richText.replace( QRegExp( "<p style=\"[^\"]*\">" ), "<p>" );
 
   // If we're left with empty content then return a clean empty string
   if ( richText == "<p></p>" ) {
-    richText = QString();
+    richText.clear();
   }
 
   return richText;
--- trunk/KDE/kdepimlibs/kblog/wordpressbuggy.cpp #865410:865411
@@ -89,7 +89,7 @@
     xmlMarkup += "<value><array>";
     QList<QString>::ConstIterator it = catList.begin();
     QList<QString>::ConstIterator end = catList.end();
-    for ( ; it != end; it++ ){
+    for ( ; it != end; ++it ){
       xmlMarkup += "<data><string><![CDATA[" + ( *it ) + "]]></string></data>";
     }
     xmlMarkup += "</array></value>";
@@ -180,7 +180,7 @@
     xmlMarkup += "<value><array>";
     QList<QString>::ConstIterator it = catList.begin();
     QList<QString>::ConstIterator end = catList.end();
-    for ( ; it != end; it++ ){
+    for ( ; it != end; ++it ){
       xmlMarkup += "<data><string><![CDATA[" + ( *it ) + "]]></string></data>";
     }
     xmlMarkup += "</array></value>";
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic