~ubuntu-branches/ubuntu/natty/kdemultimedia/natty-proposed

« back to all changes in this revision

Viewing changes to libkcddb/smtpsubmit.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Debian Qt/KDE Maintainers
  • Date: 2011-05-26 02:41:36 UTC
  • mfrom: (0.2.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 108.
  • Revision ID: james.westby@ubuntu.com-20110526024136-jjwsigfy402jhupm
Tags: upstream-4.6.3
ImportĀ upstreamĀ versionĀ 4.6.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
        const QString& from, const QString& to)
29
29
    : Submit(), from_(from), to_(to)
30
30
  {
31
 
    url_.setProtocol("smtp");
 
31
    url_.setProtocol(QLatin1String( "smtp" ));
32
32
    url_.setHost(hostname);
33
33
    url_.setPort(port);
34
34
    if (!username.isEmpty())
35
35
      url_.setUser(username);
36
 
    url_.setPath("/send");
 
36
    url_.setPath(QLatin1String( "/send" ));
37
37
  }
38
38
 
39
39
  SMTPSubmit::~SMTPSubmit()
43
43
 
44
44
  KIO::Job* SMTPSubmit::createJob(const CDInfo& cdInfo)
45
45
  {
46
 
    url_.setQuery(QString("to=%1&subject=cddb %2 %3&from=%4")
 
46
      url_.setQuery(QString::fromLatin1("to=%1&subject=cddb %2 %3&from=%4")
47
47
      .arg(to_, cdInfo.get(Category).toString(),
48
 
        cdInfo.get("discid").toString(), from_));
 
48
        cdInfo.get(QLatin1String( "discid" )).toString(), from_));
49
49
    kDebug(60010) << "Url is: " << url_.prettyUrl();
50
50
 
51
51
    return KIO::storedPut(diskData_.toUtf8().data(), url_, -1, KIO::HideProgressInfo);
53
53
 
54
54
  void SMTPSubmit::makeDiskData( const CDInfo& cdInfo, const TrackOffsetList& offsetList )
55
55
  {
56
 
    diskData_ = "Content-Type: text/plain; charset=\"utf-8\";\n";
 
56
    diskData_ = QLatin1String( "Content-Type: text/plain; charset=\"utf-8\";\n" );
57
57
 
58
58
    Submit::makeDiskData(cdInfo, offsetList);
59
59
  }