~ubuntu-branches/ubuntu/trusty/kdepimlibs/trusty

« back to all changes in this revision

Viewing changes to kblog/blogpost.cpp

  • Committer: Package Import Robot
  • Author(s): Rohan Garg, Rohan Garg, Philip Muškovac
  • Date: 2013-11-23 17:36:44 UTC
  • mfrom: (1.1.102)
  • Revision ID: package-import@ubuntu.com-20131123173644-p5ow94192ezsny8g
Tags: 4:4.11.80-0ubuntu1
[ Rohan Garg ]
* New upstream beta release
  - Bump akonadi requirement to 1.10.45
  - Update install files
  - Update symbols

[ Philip Muškovac ]
* kdepimlibs-dev/-dbg breaks/replaces kdepim-runtime/-dbg (<< 4:4.11.80)

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
  QString username = blog.username();
112
112
  QString blogId = blog.blogId();
113
113
  // Generate unique ID. Should be unique enough...
114
 
  QString id = "kblog-" + url + '-' + blogId  + '-' + username +
115
 
      '-' + d_ptr->mPostId;
 
114
  QString id = QLatin1String("kblog-") + url + QLatin1Char('-') + blogId  + QLatin1Char('-') + username +
 
115
      QLatin1Char('-') + d_ptr->mPostId;
116
116
  KCal::Journal *journal = new KCal::Journal();
117
117
  journal->setUid( id );
118
118
  journal->setSummary( d_ptr->mTitle );
354
354
 
355
355
QString BlogPostPrivate::cleanRichText( QString richText ) const
356
356
{
357
 
  QRegExp getBodyContents( "<body[^>]*>(.*)</body>" );
 
357
  QRegExp getBodyContents( QLatin1String("<body[^>]*>(.*)</body>") );
358
358
  if ( getBodyContents.indexIn( richText ) ) {
359
359
    // Get anything inside but excluding the body tags
360
360
    richText = getBodyContents.cap( 1 );
361
361
    // Get rid of any whitespace
362
 
    richText.remove( QRegExp( "^\\s+" ) );
 
362
    richText.remove( QRegExp( QLatin1String("^\\s+") ) );
363
363
  }
364
364
  // Get rid of styled paragraphs
365
 
  richText.replace( QRegExp( "<p style=\"[^\"]*\">" ), "<p>" );
 
365
  richText.replace( QRegExp( QLatin1String("<p style=\"[^\"]*\">" )), QLatin1String("<p>") );
366
366
 
367
367
  // If we're left with empty content then return a clean empty string
368
 
  if ( richText == "<p></p>" ) {
 
368
  if ( richText == QLatin1String("<p></p>") ) {
369
369
    richText.clear();
370
370
  }
371
371
 
373
373
}
374
374
 
375
375
} // namespace KBlog
376