File indexing completed on 2024-12-22 04:57:02

0001 /*
0002     SPDX-FileCopyrightText: 2015-2019 Krzysztof Nowicki <krissn@op.pl>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "ewsjob.h"
0008 #include "ewsclient_debug.h"
0009 
0010 EwsJob::EwsJob(QObject *parent)
0011     : KCompositeJob(parent)
0012     , m_ewsRespCode(EwsResponseCodeUnknown)
0013 {
0014 }
0015 
0016 EwsJob::~EwsJob() = default;
0017 
0018 bool EwsJob::doKill()
0019 {
0020     const auto jobs{subjobs()};
0021     for (KJob *job : jobs) {
0022         job->kill(KJob::Quietly);
0023     }
0024     clearSubjobs();
0025 
0026     return true;
0027 }
0028 
0029 bool EwsJob::setErrorMsg(const QString &msg, int code)
0030 {
0031     setError(code);
0032     setErrorText(msg);
0033     qCWarningNC(EWSCLI_LOG) << msg;
0034     return false;
0035 }
0036 
0037 #include "moc_ewsjob.cpp"