KCDDB

asynchttpsubmit.cpp
1/*
2 SPDX-FileCopyrightText: 2003 Richard Lärkäng <nouseforaname@home.se>
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
12namespace 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
43#include "moc_asynchttpsubmit.cpp"
int error() const
void result(KJob *job)
NETWORKMANAGERQT_EXPORT QString hostname()
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:56:20 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.