File indexing completed on 2025-01-05 04:29:53
0001 /** 0002 * SPDX-FileCopyrightText: 2021 Bart De Vries <bart@mogwai.be> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 #include "updatedevicerequest.h" 0008 0009 #include <QNetworkReply> 0010 0011 #include "sync/syncutils.h" 0012 #include "synclogging.h" 0013 0014 UpdateDeviceRequest::UpdateDeviceRequest(SyncUtils::Provider provider, QNetworkReply *reply, QObject *parent) 0015 : GenericRequest(provider, reply, parent) 0016 { 0017 } 0018 0019 bool UpdateDeviceRequest::success() const 0020 { 0021 return m_success; 0022 } 0023 0024 void UpdateDeviceRequest::processResults() 0025 { 0026 if (m_reply->error()) { 0027 m_error = m_reply->error(); 0028 m_errorString = m_reply->errorString(); 0029 qCDebug(kastsSync) << "m_reply error" << m_reply->errorString(); 0030 } else if (!m_abort) { 0031 m_success = true; 0032 } 0033 Q_EMIT finished(); 0034 m_reply->deleteLater(); 0035 deleteLater(); 0036 }