File indexing completed on 2024-05-05 04:39:01
0001 /* 0002 SPDX-FileCopyrightText: 2013-2014 Maciej Poleski 0003 0004 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 #ifndef BAZAAR_COPYJOB_H 0008 #define BAZAAR_COPYJOB_H 0009 0010 #include <QUrl> 0011 #include <QPointer> 0012 0013 #include <vcs/vcsjob.h> 0014 0015 #include <ctime> 0016 0017 namespace KIO 0018 { 0019 class Job; 0020 } 0021 0022 class BazaarPlugin; 0023 0024 class CopyJob : public KDevelop::VcsJob 0025 { 0026 Q_OBJECT 0027 0028 public: 0029 CopyJob(const QUrl& localLocationSrc, const QUrl& localLocationDstn, BazaarPlugin* parent = nullptr, OutputJobVerbosity verbosity = OutputJob::Verbose); 0030 0031 KDevelop::IPlugin* vcsPlugin() const override; 0032 KDevelop::VcsJob::JobStatus status() const override; 0033 QVariant fetchResults() override; 0034 void start() override; 0035 0036 protected: 0037 bool doKill() override; 0038 0039 private Q_SLOTS: 0040 void finish(KJob*); 0041 void addToVcs(KIO::Job* job, const QUrl& from, const QUrl& to, const QDateTime& mtime, bool directory, bool renamed); 0042 0043 private: 0044 BazaarPlugin* m_plugin; 0045 QUrl m_source; 0046 QUrl m_destination; 0047 0048 JobStatus m_status; 0049 QPointer<KJob> m_job; 0050 }; 0051 0052 #endif // BAZAAR_COPYJOB_H