atticaprovider.cpp | atticaprovider.cpp | |||
---|---|---|---|---|
skipping to change at line 286 | skipping to change at line 286 | |||
AccountBalance item = job->result(); | AccountBalance item = job->result(); | |||
QPair<EntryInternal, int> pair = mDownloadLinkJobs.take(job); | QPair<EntryInternal, int> pair = mDownloadLinkJobs.take(job); | |||
EntryInternal entry(pair.first); | EntryInternal entry(pair.first); | |||
Content content = mCachedContent.value(entry.uniqueId()); | Content content = mCachedContent.value(entry.uniqueId()); | |||
if (content.downloadUrlDescription(pair.second).priceAmount() < item.ba lance()) { | if (content.downloadUrlDescription(pair.second).priceAmount() < item.ba lance()) { | |||
kDebug() << "Your balance is greather than the price." | kDebug() << "Your balance is greather than the price." | |||
<< content.downloadUrlDescription(pair.second).priceAmo unt() << " balance: " << item.balance(); | << content.downloadUrlDescription(pair.second).priceAmo unt() << " balance: " << item.balance(); | |||
if (KMessageBox::questionYesNo(0, | if (KMessageBox::questionYesNo(0, | |||
i18nc("the price of a download item, parameter 1 is the cur rency, 2 is the price", | i18nc("the price of a download item, parameter 1 is the cur rency, 2 is the price", | |||
"This items costs %1 %2.\nDo you want to buy it?", | "This item costs %1 %2.\nDo you want to buy it?", | |||
item.currency(), content.downloadUrlDescription(pair. second).priceAmount() | item.currency(), content.downloadUrlDescription(pair. second).priceAmount() | |||
)) == KMessageBox::Yes) { | )) == KMessageBox::Yes) { | |||
ItemJob<DownloadItem>* job = m_provider.downloadLink(entry.uniq ueId(), QString::number(pair.second)); | ItemJob<DownloadItem>* job = m_provider.downloadLink(entry.uniq ueId(), QString::number(pair.second)); | |||
connect(job, SIGNAL(finished(Attica::BaseJob*)), SLOT(downloadI temLoaded(Attica::BaseJob*))); | connect(job, SIGNAL(finished(Attica::BaseJob*)), SLOT(downloadI temLoaded(Attica::BaseJob*))); | |||
connect(job, SIGNAL(jobStarted(QNetworkReply*)), SLOT(atticaJob Started(QNetworkReply*))); | connect(job, SIGNAL(jobStarted(QNetworkReply*)), SLOT(atticaJob Started(QNetworkReply*))); | |||
mDownloadLinkJobs[job] = qMakePair(entry, pair.second); | mDownloadLinkJobs[job] = qMakePair(entry, pair.second); | |||
job->start(); | job->start(); | |||
} else { | } else { | |||
return; | return; | |||
} | } | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |