From bd9e6617827818fd043452c08c606f07b78014a0 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kbugbuster/backend/bugdetailsjob.cpp | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 kbugbuster/backend/bugdetailsjob.cpp (limited to 'kbugbuster/backend/bugdetailsjob.cpp') diff --git a/kbugbuster/backend/bugdetailsjob.cpp b/kbugbuster/backend/bugdetailsjob.cpp new file mode 100644 index 00000000..83599c1d --- /dev/null +++ b/kbugbuster/backend/bugdetailsjob.cpp @@ -0,0 +1,50 @@ + +#include "bugdetailsjob.h" +#include "bug.h" +#include "bugdetails.h" +#include "bugdetailsimpl.h" +#include "packageimpl.h" +#include "bugserver.h" +#include "processor.h" + +#include +#include + +BugDetailsJob::BugDetailsJob( BugServer *server ) + : BugJob( server ) +{ +} + +BugDetailsJob::~BugDetailsJob() +{ +} + +void BugDetailsJob::start( const Bug &bug ) +{ + m_bug = bug; + + KURL bugUrl = server()->bugDetailsUrl( bug ); + + kdDebug() << "BugDetailsJob::start(): " << bugUrl.url() << endl; + BugJob::start( bugUrl ); +} + +void BugDetailsJob::process( const QByteArray &data ) +{ + BugDetails bugDetails; + + KBB::Error err = server()->processor()->parseBugDetails( data, bugDetails ); + + if ( err ) { + emit error( i18n("Bug %1: %2").arg( m_bug.number() ) + .arg( err.message() ) ); + } else { + emit bugDetailsAvailable( m_bug, bugDetails ); + } +} + +#include "bugdetailsjob.moc" + +/* + * vim:sw=4:ts=4:et + */ -- cgit v1.2.1