KCDDB

asynchttpsubmit.cpp
1 /*
2  SPDX-FileCopyrightText: 2003 Richard Lärkäng <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "asynchttpsubmit.h"
8 
9 #include <KIO/Job>
10 #include <QDebug>
11 
12 namespace KCDDB
13 {
14  AsyncHTTPSubmit::AsyncHTTPSubmit(const QString& from, const QString& hostname, uint port)
15  : HTTPSubmit(from, hostname, port)
16  {
17 
18  }
19 
20  AsyncHTTPSubmit::~AsyncHTTPSubmit()
21  {
22 
23  }
24 
25  Result AsyncHTTPSubmit::runJob(KIO::Job* job)
26  {
27  connect(job, &KJob::result, this, &AsyncHTTPSubmit::slotFinished);
28 
29  return Success;
30  }
31 
32  void AsyncHTTPSubmit::slotFinished(KJob* job)
33  {
34  qDebug() << "Finished";
35 
36  if ( job->error()==0 )
37  Q_EMIT finished( Success );
38  else
39  Q_EMIT finished( UnknownError );
40  }
41 }
42 
void result(KJob *job)
int error() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Nov 26 2021 23:22:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.