summaryrefslogtreecommitdiffstats
path: root/kbugbuster/backend/bugdetailsjob.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbd9e6617827818fd043452c08c606f07b78014a0 (patch)
tree425bb4c3168f9c02f10150f235d2cb998dcc6108 /kbugbuster/backend/bugdetailsjob.cpp
downloadtdesdk-bd9e6617827818fd043452c08c606f07b78014a0.tar.gz
tdesdk-bd9e6617827818fd043452c08c606f07b78014a0.zip
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
Diffstat (limited to 'kbugbuster/backend/bugdetailsjob.cpp')
-rw-r--r--kbugbuster/backend/bugdetailsjob.cpp50
1 files changed, 50 insertions, 0 deletions
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 <kdebug.h>
+#include <assert.h>
+
+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
+ */