~ubuntu-branches/ubuntu/vivid/kdepim/vivid

« back to all changes in this revision

Viewing changes to kmail/util.cpp

  • Committer: Package Import Robot
  • Author(s): Rohan Garg
  • Date: 2013-02-06 11:49:08 UTC
  • mfrom: (0.2.38)
  • Revision ID: package-import@ubuntu.com-20130206114908-eb7adh9xp54jk7gi
Tags: 4:4.10.0a-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
 
101
101
}
102
102
 
103
 
void KMail::Util::handleClickedURL( const KUrl &url )
 
103
bool KMail::Util::handleClickedURL( const KUrl &url )
104
104
{
105
105
  if ( url.protocol() == QLatin1String( "mailto" ) )
106
106
  {
121
121
    KMail::Composer * win = KMail::makeComposer( msg, false, false,KMail::Composer::New, 0 );
122
122
    win->setFocusToSubject();
123
123
    win->show();
 
124
    return true;
124
125
  } else {
125
126
    kWarning() << "Can't handle URL:" << url;
 
127
    return false;
126
128
  }
127
129
}
128
130
 
129
 
void KMail::Util::handleClickedURL( const KUrl &url, const QSharedPointer<MailCommon::FolderCollection> &folder )
 
131
bool KMail::Util::handleClickedURL( const KUrl &url, const QSharedPointer<MailCommon::FolderCollection> &folder )
130
132
{
131
133
  if ( url.protocol() == QLatin1String( "mailto" ) )
132
134
  {
153
155
    win->setFocusToSubject();
154
156
    win->setCollectionForNewMessage( folder->collection() );
155
157
    win->show();
 
158
    return true;
156
159
  } else {
157
160
    kWarning() << "Can't handle URL:" << url;
 
161
    return false;
158
162
  }
159
163
}
160
164
 
176
180
  }
177
181
 
178
182
  if ( !urlToHandle.isEmpty() ) {
179
 
    KMail::Util::handleClickedURL( urlToHandle, folder );
180
 
    return true;
 
183
    return KMail::Util::handleClickedURL( urlToHandle, folder );
181
184
  } else {
182
185
    kWarning()<< "Can't handle url";
183
186
    return false;