Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 7ff765cd authored by Lukas Appelhans's avatar Lukas Appelhans

Port kDebug to qCDebug, and finally a basic transfer is working

parent 8bf5d056
......@@ -141,6 +141,7 @@ remove_definitions(-DQT_NO_HTTP)
# kgetcore
set(kgetcore_SRCS
kget_debug.cpp
core/job.cpp
core/jobqueue.cpp
core/kget.cpp
......@@ -229,6 +230,7 @@ install(TARGETS kgetcore ${INSTALL_TARGETS_DEFAULT_ARGS})
# kget
set(kget_SRCS ${kget_adaptor_SRCS} ${kget_transfer_adaptor_SRCS}
kget_debug.cpp
conf/autopastemodel.cpp
conf/integrationpreferences.cpp
conf/dlgwebinterface.cpp
......
......@@ -18,6 +18,9 @@
#include "core/transfertreemodel.h"
#include "core/transfertreeselectionmodel.h"
#include "kget_debug.h"
#include <qdebug.h>
#include <QHeaderView>
#include <KLineEdit>
......@@ -81,7 +84,7 @@ void TransfersGroupTree::setModel(QAbstractItemModel *model)
int nGroups = model->rowCount(QModelIndex());
for (int i = 0; i < nGroups; i++) {
kDebug(5001) << "openEditor for row " << i;
qCDebug(KGET_DEBUG) << "openEditor for row " << i;
openPersistentEditor(model->index(i, TransferTreeModel::Status, QModelIndex()));
}
......@@ -92,7 +95,7 @@ void TransfersGroupTree::rowsInserted(const QModelIndex &parent, int start, int
{
if (!parent.isValid()) {
for (int i = start; i <= end; ++i) {
kDebug(5001) << "openEditor for row " << i;
qCDebug(KGET_DEBUG) << "openEditor for row " << i;
openPersistentEditor(model()->index(i, TransferTreeModel::Status, parent));
}
}
......@@ -135,7 +138,7 @@ void TransfersGroupTree::renameSelectedGroup()
void TransfersGroupTree::changeIcon(const QString &icon)
{
kDebug(5001);
qCDebug(KGET_DEBUG);
TransferTreeSelectionModel *selModel = KGet::selectionModel();
QModelIndexList indexList = selModel->selectedRows();
......
This diff is collapsed.
......@@ -11,13 +11,14 @@
#include <QFile>
#include <KDebug>
#include "kget_debug.h"
#include <qdebug.h>
Download::Download(const QUrl &srcUrl, const QUrl &destUrl)
: m_srcUrl(srcUrl),
m_destUrl(destUrl)
{
kDebug(5001) << "DownloadFile: " << m_srcUrl.url() << " to dest: " << m_destUrl.url();
qCDebug(KGET_DEBUG) << "DownloadFile: " << m_srcUrl.url() << " to dest: " << m_destUrl.url();
m_copyJob = KIO::get(m_srcUrl, KIO::NoReload, KIO::HideProgressInfo);
connect(m_copyJob, SIGNAL(data(KIO::Job*,QByteArray)), SLOT(slotData(KIO::Job*,QByteArray)));
connect(m_copyJob, SIGNAL(result(KJob*)), SLOT(slotResult(KJob*)));
......@@ -30,7 +31,7 @@ Download::~Download()
void Download::slotData(KIO::Job *job, const QByteArray& data)
{
Q_UNUSED(job)
kDebug(5001);
qCDebug(KGET_DEBUG);
/**if (data.size() == 0)
{
slotResult(job);
......@@ -41,12 +42,12 @@ void Download::slotData(KIO::Job *job, const QByteArray& data)
void Download::slotResult(KJob * job)
{
kDebug(5001);
qCDebug(KGET_DEBUG);
switch (job->error())
{
case 0://The download has finished
{
kDebug(5001) << "Downloading successfully finished" << m_destUrl.url();
qCDebug(KGET_DEBUG) << "Downloading successfully finished" << m_destUrl.url();
QFile torrentFile(m_destUrl.toLocalFile());
if (!torrentFile.open(QIODevice::WriteOnly | QIODevice::Text)) {}
//TODO: Do a Message box here
......@@ -58,14 +59,14 @@ void Download::slotResult(KJob * job)
}
case KIO::ERR_FILE_ALREADY_EXIST:
{
kDebug(5001) << "ERROR - File already exists";
qCDebug(KGET_DEBUG) << "ERROR - File already exists";
QFile file(m_destUrl.toLocalFile());
emit finishedSuccessfully(m_destUrl, file.readAll());
m_data = 0;
break;
}
default:
kDebug(5001) << "We are sorry to say you, that there were errors while downloading :(";
qCDebug(KGET_DEBUG) << "We are sorry to say you, that there were errors while downloading :(";
m_data = 0;
emit finishedWithError();
break;
......
......@@ -13,8 +13,8 @@
#include "core/jobqueue.h"
#include "core/scheduler.h"
#include <kdebug.h>
#include "kget_debug.h"
#include <qdebug.h>
Job::Job(Scheduler * scheduler, JobQueue * parent)
: QObject(parent),
......@@ -47,7 +47,7 @@ void Job::setStatus(Status jobStatus)
void Job::setStartStatus(Status jobStatus)
{
kDebug(5001) << "Setting start status to " << jobStatus;
qCDebug(KGET_DEBUG) << "Setting start status to " << jobStatus;
m_startStatus = jobStatus;
}
......@@ -56,7 +56,7 @@ void Job::setPolicy(Policy jobPolicy)
if(jobPolicy == m_policy)
return;
kDebug(5001) << "Job::setPolicy(" << jobPolicy << ")";
qCDebug(KGET_DEBUG) << "Job::setPolicy(" << jobPolicy << ")";
m_policy = jobPolicy;
m_scheduler->jobChangedEvent(this, m_policy);
......
......@@ -12,7 +12,8 @@
#include "core/scheduler.h"
#include "settings.h"
#include <kdebug.h>
#include "kget_debug.h"
#include <qdebug.h>
JobQueue::JobQueue(Scheduler * parent)
: QObject(parent),
......@@ -122,7 +123,7 @@ void JobQueue::remove(const QList<Job*> jobs)
void JobQueue::move(Job * job, Job * after)
{
kDebug(5001) << "JobQueue::move";
qCDebug(KGET_DEBUG) << "JobQueue::move";
if( (m_jobs.removeAll(job) == 0) || (job == after) ||
((after) && (after->jobQueue() != this)) )
......
......@@ -21,7 +21,8 @@
#include "settings.h"
#include "signature_p.h"
#include <KDebug>
#include "kget_debug.h"
#include <qdebug.h>
#include <KIO/Job>
#include <KLocale>
#include <KMessageBox>
......@@ -105,7 +106,7 @@ void KeyDownloader::downloadKey(QString fingerprint, Signature *sig, bool mirror
url.setQuery("op=get&options=mr&search=" + fingerprint);
url.setPort(11371);
kDebug(5001) << "Dowloading:" << url;
qCDebug(KGET_DEBUG) << "Dowloading:" << url;
KIO::StoredTransferJob *job = KIO::storedGet(url, KIO::Reload, KIO::HideProgressInfo);
m_jobs[job] = fingerprint;
......@@ -124,7 +125,7 @@ void KeyDownloader::slotDownloaded(KJob *job)
KIO::StoredTransferJob *transferJob = static_cast<KIO::StoredTransferJob*>(job);
if (transferJob->isErrorPage()) {
kDebug(5001) << "Mirror did not work, try another one.";
qCDebug(KGET_DEBUG) << "Mirror did not work, try another one.";
downloadKey(fingerprint, 0, true);
return;
}
......@@ -132,7 +133,7 @@ void KeyDownloader::slotDownloaded(KJob *job)
QByteArray data = transferJob->data();
if (data.isEmpty()) {
kDebug(5001) << "Downloaded data is empty.";
qCDebug(KGET_DEBUG) << "Downloaded data is empty.";
downloadKey(fingerprint, 0, true);
return;
}
......@@ -140,7 +141,7 @@ void KeyDownloader::slotDownloaded(KJob *job)
const int indexStart = data.indexOf("<pre>");
const int indexEnd = data.indexOf("</pre>", indexStart);
if ((indexStart == -1) || (indexEnd == -1)) {
kDebug(5001) << "Could not find a key.";
qCDebug(KGET_DEBUG) << "Could not find a key.";
downloadKey(fingerprint, 0, true);
return;
}
......@@ -150,13 +151,13 @@ void KeyDownloader::slotDownloaded(KJob *job)
GpgME::initializeLibrary();
GpgME::Error err = GpgME::checkEngine(GpgME::OpenPGP);
if (err) {
kDebug(5001) << "Problem checking the engine.";
qCDebug(KGET_DEBUG) << "Problem checking the engine.";
return;
}
QScopedPointer<GpgME::Context> context(GpgME::Context::createForProtocol(GpgME::OpenPGP));
if (!context.data()) {
kDebug(5001) << "Could not create context.";
qCDebug(KGET_DEBUG) << "Could not create context.";
return;
}
......@@ -165,11 +166,11 @@ void KeyDownloader::slotDownloaded(KJob *job)
GpgME::ImportResult importResult = context->importKeys(key);
err = importResult.error();
if (err) {
kDebug(5001) << "Error while importing key.";;
qCDebug(KGET_DEBUG) << "Error while importing key.";;
return;
}
kDebug(5001) << "Key downloaded, notifying requesters.";
qCDebug(KGET_DEBUG) << "Key downloaded, notifying requesters.";
QList<Signature*> sigs = m_downloading.values(fingerprint);
foreach (Signature *sig, sigs) {
......@@ -178,7 +179,7 @@ void KeyDownloader::slotDownloaded(KJob *job)
m_downloading.remove(fingerprint);
#else //HAVE_QGPGME
Q_UNUSED(job)
kWarning(5001) << "No QGPGME support.";
qCWarning(KGET_DEBUG) << "No QGPGME support.";
#endif //HAVE_QGPGME
}
......
This diff is collapsed.
......@@ -12,6 +12,8 @@
#include "transferhandler.h"
#include "kget.h"
#include "kget_debug.h"
#include <qdebug.h>
#include <klocale.h>
#include <kuiserverjobtracker.h>
......@@ -44,7 +46,7 @@ void KGetGlobalJob::update()
}
}
// kDebug(5001) << totalAmount;
// qCDebug(KGET_DEBUG) << totalAmount;
if (totalAmount > 0)
percent = 100 * processedAmount / totalAmount;
......@@ -63,7 +65,7 @@ void KGetGlobalJob::update()
bool KGetGlobalJob::doKill()
{
kDebug(5001) << "Kill of global job called:" << this;
qCDebug(KGET_DEBUG) << "Kill of global job called:" << this;
emit requestStop(this, 0);
return KJob::doKill();
}
......
......@@ -10,6 +10,8 @@
*/
#include "kgetkjobadapter.h"
#include "kget_debug.h"
#include <qdebug.h>
#include <KLocale>
KGetKJobAdapter::KGetKJobAdapter(QObject *parent, TransferHandler *transfer)
......@@ -54,7 +56,7 @@ void KGetKJobAdapter::slotUpdateDescription()
bool KGetKJobAdapter::doKill()
{
kDebug(5001) << "Kill of job adapter called:" << this << m_transferHandler->dest();
qCDebug(KGET_DEBUG) << "Kill of job adapter called:" << this << m_transferHandler->dest();
emit requestStop(this, m_transferHandler);
return KJob::doKill();
}
......
......@@ -18,8 +18,9 @@
#include "settings.h"
#include "kget.h"
#include "kget_debug.h"
#include <qdebug.h>
#include <kuiserverjobtracker.h>
#include <kdebug.h>
KUiServerJobs::KUiServerJobs(QObject *parent)
: QObject(parent), m_globalJob(0)
......@@ -55,7 +56,7 @@ void KUiServerJobs::settingsChanged()
void KUiServerJobs::slotTransfersAdded(QList<TransferHandler*> transfers)
{
kDebug(5001);
qCDebug(KGET_DEBUG);
foreach (TransferHandler *transfer, transfers) {
if(shouldBeShown(transfer))
......@@ -72,7 +73,7 @@ void KUiServerJobs::slotTransfersAdded(QList<TransferHandler*> transfers)
void KUiServerJobs::slotTransfersAboutToBeRemoved(const QList<TransferHandler*> &transfers)
{
kDebug(5001);
qCDebug(KGET_DEBUG);
m_invalidTransfers << transfers;
foreach (TransferHandler *transfer, transfers) {
......@@ -89,7 +90,7 @@ void KUiServerJobs::slotTransfersAboutToBeRemoved(const QList<TransferHandler*>
void KUiServerJobs::slotTransfersChanged(QMap<TransferHandler *, Transfer::ChangesFlags> transfers)
{
kDebug(5001);
qCDebug(KGET_DEBUG);
if(!Settings::enableKUIServerIntegration())
return;
......
......@@ -21,12 +21,13 @@
#include "kget.h"
#include "plugin/transferfactory.h"
#include <KDebug>
#include "kget_debug.h"
#include <qdebug.h>
#include <KIO/NetAccess>
QUrl mostLocalUrl(const QUrl &url)
{
kDebug(5001);
qCDebug(KGET_DEBUG);
const QString protocol = url.scheme();
foreach (TransferFactory *factory, KGet::factories()) {
if (factory->addsProtocols().contains(protocol)) {
......@@ -34,7 +35,7 @@ QUrl mostLocalUrl(const QUrl &url)
}
}
kDebug(5001) << "Starting KIO::NetAccess::mostLocalUrl for:" << url;
qCDebug(KGET_DEBUG) << "Starting KIO::NetAccess::mostLocalUrl for:" << url;
return KIO::NetAccess::mostLocalUrl(url, 0);
}
......@@ -71,7 +72,7 @@ void MostLocalUrlJob::start()
}
if (startJob) {
kDebug(5001) << "Starting KIO::mostLocalUrl for:" << m_url;
qCDebug(KGET_DEBUG) << "Starting KIO::mostLocalUrl for:" << m_url;
KIO::Job *job = KIO::mostLocalUrl(m_url, KIO::HideProgressInfo);
addSubjob(job);
} else {
......@@ -83,11 +84,11 @@ void MostLocalUrlJob::start()
void MostLocalUrlJob::slotResult(KJob* job)
{
if (job->error()) {
kWarning(5001) << "Error" << job->error() << "happened for:" << m_url;
qCWarning(KGET_DEBUG) << "Error" << job->error() << "happened for:" << m_url;
m_mostLocalUrl = m_url;
} else {
m_mostLocalUrl = static_cast<KIO::StatJob*>(job)->mostLocalUrl();
}
kDebug(5001) << "Setting mostLocalUrl to" << m_mostLocalUrl;
qCDebug(KGET_DEBUG) << "Setting mostLocalUrl to" << m_mostLocalUrl;
emitResult();
}
......@@ -17,7 +17,8 @@
#include <algorithm>
#include <boost/bind.hpp>
#include <KDebug>
#include "kget_debug.h"
#include <qdebug.h>
Scheduler::Scheduler(QObject * parent)
: QObject(parent),
......@@ -169,7 +170,7 @@ void Scheduler::jobQueueRemovedJobsEvent(JobQueue *queue, const QList<Job*> jobs
void Scheduler::jobChangedEvent(Job * job, Job::Status status)
{
kDebug(5001) << "Scheduler::jobChangedEvent (job=" << job << " status=" << status << ")";
qCDebug(KGET_DEBUG) << "Scheduler::jobChangedEvent (job=" << job << " status=" << status << ")";
if (!m_failureCheckTimer)
m_failureCheckTimer = startTimer(1000);
......@@ -190,25 +191,25 @@ void Scheduler::jobChangedEvent(Job * job, JobFailure failure)
switch(failure.status)
{
case None:
kDebug(5001) << "job = " << job << " failure (#" << failure.count << ") = None ";
qCDebug(KGET_DEBUG) << "job = " << job << " failure (#" << failure.count << ") = None ";
break;
case AboutToStall:
kDebug(5001) << "job = " << job << " failure (#" << failure.count << ") = AboutToStall ";
qCDebug(KGET_DEBUG) << "job = " << job << " failure (#" << failure.count << ") = AboutToStall ";
break;
case Stall:
kDebug(5001) << "job = " << job << " failure (#" << failure.count << ") = Stall ";
qCDebug(KGET_DEBUG) << "job = " << job << " failure (#" << failure.count << ") = Stall ";
break;
case StallTimeout:
kDebug(5001) << "job = " << job << " failure (#" << failure.count << ") = StallTimeout ";
qCDebug(KGET_DEBUG) << "job = " << job << " failure (#" << failure.count << ") = StallTimeout ";
break;
case Abort:
kDebug(5001) << "job = " << job << " failure (#" << failure.count << ") = Abort ";
qCDebug(KGET_DEBUG) << "job = " << job << " failure (#" << failure.count << ") = Abort ";
break;
case AbortTimeout:
kDebug(5001) << "job = " << job << " failure (#" << failure.count << ") = AbortTimeout ";
qCDebug(KGET_DEBUG) << "job = " << job << " failure (#" << failure.count << ") = AbortTimeout ";
break;
case Error:
kDebug(5001) << "job = " << job << " failure (#" << failure.count << ") = Error ";
qCDebug(KGET_DEBUG) << "job = " << job << " failure (#" << failure.count << ") = Error ";
break;
}
......@@ -276,8 +277,8 @@ void Scheduler::updateQueue( JobQueue * queue )
for( int job=0 ; it!=itEnd ; ++it, ++job)
{
//kDebug(5001) << "MaxSimJobs " << queue->maxSimultaneousJobs();
kDebug(5001) << "Scheduler: Evaluating job " << job;
//qCDebug(KGET_DEBUG) << "MaxSimJobs " << queue->maxSimultaneousJobs();
qCDebug(KGET_DEBUG) << "Scheduler: Evaluating job " << job;
JobFailure failure = m_failedJobs.value(*it);
......@@ -287,7 +288,7 @@ void Scheduler::updateQueue( JobQueue * queue )
{
if( !shouldBeRunning(*it) )
{
kDebug(5001) << "Scheduler: stopping job";
qCDebug(KGET_DEBUG) << "Scheduler: stopping job";
(*it)->stop();
}
else if(failure.status == None || failure.status == AboutToStall)
......@@ -299,7 +300,7 @@ void Scheduler::updateQueue( JobQueue * queue )
{
if( shouldBeRunning(*it) )
{
kDebug(5001) << "Scheduler: starting job";
qCDebug(KGET_DEBUG) << "Scheduler: starting job";
(*it)->start();
if((failure.status == None || failure.status == AboutToStall) && (*it)->status() != Job::FinishedKeepAlive)
runningJobs++;
......@@ -311,7 +312,7 @@ void Scheduler::updateQueue( JobQueue * queue )
else
{
//Stop all the other running downloads
kDebug(5001) << "Scheduler: stopping job over maxSimJobs limit";
qCDebug(KGET_DEBUG) << "Scheduler: stopping job over maxSimJobs limit";
(*it)->stop();
}
}
......@@ -348,7 +349,7 @@ bool Scheduler::shouldBeRunning( Job * job )
void Scheduler::timerEvent( QTimerEvent * event )
{
Q_UNUSED(event)
// kDebug(5001);
// qCDebug(KGET_DEBUG);
if (!shouldUpdate()) {
return;
......@@ -429,7 +430,7 @@ void Scheduler::timerEvent( QTimerEvent * event )
m_failedJobs.remove(*it);
// if(failure.isValid() || prevFailure.isValid())
// kDebug(5001) << "failure = " << failure.status << " T=" << failure.time << " prevFailure = " << prevFailure.status;
// qCDebug(KGET_DEBUG) << "failure = " << failure.status << " T=" << failure.time << " prevFailure = " << prevFailure.status;
if(failure.status != prevFailure.status)
jobChangedEvent(*it, failure); // Notify the scheduler
......
......@@ -21,7 +21,8 @@
#include "keydownloader.h"
#include "settings.h"
#include <KDebug>
#include "kget_debug.h"
#include <qdebug.h>
#include <KLocale>
#include <KMessageBox>
......@@ -56,7 +57,7 @@ SignaturePrivate::~SignaturePrivate()
void SignaturePrivate::signatureDownloaded()
{
if (verifyTried) {
kDebug(5001) << "Rerun verification.";
qCDebug(KGET_DEBUG) << "Rerun verification.";
q->verify();
}
}
......@@ -72,13 +73,13 @@ GpgME::VerificationResult SignaturePrivate::verify(const KUrl &dest, const QByte
GpgME::initializeLibrary();
GpgME::Error error = GpgME::checkEngine(GpgME::OpenPGP);
if (error) {
kDebug(5001) << "OpenPGP not supported!";
qCDebug(KGET_DEBUG) << "OpenPGP not supported!";
return result;
}
QScopedPointer<GpgME::Context> context(GpgME::Context::createForProtocol(GpgME::OpenPGP));
if (!context.data()) {
kDebug(5001) << "Could not create context.";
qCDebug(KGET_DEBUG) << "Could not create context.";
return result;
}
......@@ -177,7 +178,7 @@ QString Signature::fingerprint()
void Signature::downloadKey(QString fingerprint) // krazy:exclude=passbyvalue
{
#ifdef HAVE_QGPGME
kDebug(5001) << "Downloading key:" << fingerprint;
qCDebug(KGET_DEBUG) << "Downloading key:" << fingerprint;
signatureDownloader->downloadKey(fingerprint, this);
#else
Q_UNUSED(fingerprint)
......@@ -207,7 +208,7 @@ void Signature::slotVerified(const GpgME::VerificationResult &result)
d->status = Signature::NotWorked;
if (!d->verificationResult.numSignatures()) {
kDebug(5001) << "No signatures\n";
qCDebug(KGET_DEBUG) << "No signatures\n";
emit verified(d->status);
return;
}
......@@ -217,12 +218,12 @@ void Signature::slotVerified(const GpgME::VerificationResult &result)
d->error = signature.status().code();
d->fingerprint = signature.fingerprint();
kDebug(5001) << "Fingerprint:" << d->fingerprint;
kDebug(5001) << "Signature summary:" << d->sigSummary;
kDebug(5001) << "Error code:" << d->error;
qCDebug(KGET_DEBUG) << "Fingerprint:" << d->fingerprint;
qCDebug(KGET_DEBUG) << "Signature summary:" << d->sigSummary;
qCDebug(KGET_DEBUG) << "Error code:" << d->error;
if (d->sigSummary & GpgME::Signature::KeyMissing) {
kDebug(5001) << "Public key missing.";
qCDebug(KGET_DEBUG) << "Public key missing.";
if (Settings::signatureAutomaticDownloading() ||
(KMessageBox::warningYesNoCancel(0,
i18n("The key to verify the signature is missing, do you want to download it?")) == KMessageBox::Yes)) {
......
......@@ -20,7 +20,8 @@
#include "signaturethread.h"
#include "signature_p.h"
#include <KDebug>
#include "kget_debug.h"
#include <qdebug.h>
SignatureThread::SignatureThread(QObject *parent)
: QThread(parent),
......@@ -73,6 +74,6 @@ void SignatureThread::run()
}
}
#else //HAVE_QGPGME
kWarning(5001) << "No QGPGME support.";
qCWarning(KGET_DEBUG) << "No QGPGME support.";
#endif //HAVE_QGPGME
}
......@@ -10,7 +10,8 @@
#include "transferdatasource.h"
#include <kdebug.h>
#include "kget_debug.h"
#include <qdebug.h>
TransferDataSource::TransferDataSource(const QUrl &srcUrl, QObject *parent)
: QObject(parent),
......@@ -21,12 +22,12 @@ TransferDataSource::TransferDataSource(const QUrl &srcUrl, QObject *parent)
m_currentSegments(0),
m_capabilities(0)
{
kDebug(5001) ;
qCDebug(KGET_DEBUG) ;
}
TransferDataSource::~TransferDataSource()
{
kDebug(5001) ;
qCDebug(KGET_DEBUG) ;
}
Transfer::Capabilities TransferDataSource::capabilities() const
......
......@@ -14,7 +14,8 @@
#include "core/transfergrouphandler.h"
#include "core/kget.h"
#include <KDebug>
#include "kget_debug.h"
#include <qdebug.h>
#include <kio/global.h>
#include <QDomElement>
......@@ -225,14 +226,14 @@ int TransferGroup::downloadLimit(Transfer::SpeedLimit limit) const
void TransferGroup::calculateSpeedLimits()
{
kDebug(5001) << "We will calculate the new SpeedLimits now";
qCDebug(KGET_DEBUG) << "We will calculate the new SpeedLimits now";
calculateDownloadLimit();
calculateUploadLimit();
}
void TransferGroup::calculateDownloadLimit()
{
kDebug(5001) << "Calculate new DownloadLimit of " + QString::number(m_downloadLimit);
qCDebug(KGET_DEBUG) << "Calculate new DownloadLimit of " + QString::number(m_downloadLimit);
if (supportsSpeedLimits())
{
const QList<Job*> running = runningJobs();
......@@ -275,7 +276,7 @@ void TransferGroup::calculateDownloadLimit()
void TransferGroup::calculateUploadLimit()
{
kDebug(5001) << "Calculate new Upload Limit of " + QString::number(m_uploadLimit);
qCDebug(KGET_DEBUG) << "Calculate new Upload Limit of " + QString::number(m_uploadLimit);
if (supportsSpeedLimits())
{
const QList<Job*> running = runningJobs();
......@@ -318,7 +319,7 @@ void TransferGroup::calculateUploadLimit()
void TransferGroup::save(QDomElement e) // krazy:exclude=passbyvalue
{
//kDebug(5001) << " --> " << name();
//qCDebug(KGET_DEBUG) << " --> " << name();
e.setAttribute("Name", m_name);
e.setAttribute("DefaultFolder", m_defaultFolder);
......@@ -346,7 +347,7 @@ void TransferGroup::save(QDomElement e) // krazy:exclude=passbyvalue
for( ; it!=itEnd; ++it )
{
Transfer* transfer = static_cast<Transfer*>(*it);
kDebug(5001) << " --> " << name() << " transfer: " << transfer->source();
qCDebug(KGET_DEBUG) << " --> " << name() << " transfer: " << transfer->source();
QDomElement t = e.ownerDocument().createElement("Transfer");
e.appendChild(t);
transfer->save(t);
......@@ -355,7 +356,7 @@ void TransferGroup::save(QDomElement e) // krazy:exclude=passbyvalue
void TransferGroup::load(const QDomElement & e)
{
kDebug(5001) << "TransferGroup::load";
qCDebug(KGET_DEBUG) << "TransferGroup::load";
m_name = e.attribute("Name");
m_defaultFolder = e.attribute("DefaultFolder");
......@@ -391,6 +392,6 @@ void TransferGroup::load(const QDomElement & e)
elements << nodeList.item(i).toElement();
}
kDebug(5001) << "TransferGroup::load ->" << "add" << nItems << "transfers";
qCDebug(KGET_DEBUG) << "TransferGroup::load ->" << "add" << nItems << "transfers";
KGet::addTransfers(elements, name());
}
......@@ -17,7 +17,8 @@
#include "core/transfer.h"
#include "core/kget.h"
#include <kdebug.h>
#include "kget_debug.h"
#include <qdebug.h>