File indexing completed on 2024-05-05 04:39:02

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_DIFFJOB_H
0008 #define BAZAAR_DIFFJOB_H
0009 
0010 #include <QVariant>
0011 #include <QPointer>
0012 
0013 #include <vcs/vcsjob.h>
0014 
0015 namespace KDevelop
0016 {
0017 class DVcsJob;
0018 }
0019 
0020 class QDir;
0021 class BazaarPlugin;
0022 
0023 class DiffJob : public KDevelop::VcsJob
0024 {
0025     Q_OBJECT
0026 
0027 public:
0028     DiffJob(const QDir& workingDir, const QString& revisionSpecRange, const QUrl& fileOrDirectory, BazaarPlugin* parent = nullptr, OutputJobVerbosity verbosity = OutputJob::Silent);
0029 
0030     KDevelop::IPlugin* vcsPlugin() const override;
0031     KDevelop::VcsJob::JobStatus status() const override;
0032     QVariant fetchResults() override;
0033     void start() override;
0034 
0035 protected:
0036     bool doKill() override;
0037 
0038 private Q_SLOTS:
0039     void prepareResult(KJob*);
0040 
0041 private:
0042     BazaarPlugin* m_plugin;
0043     QVariant m_result;
0044 
0045     JobStatus m_status;
0046     QPointer<KDevelop::DVcsJob> m_job;
0047 };
0048 
0049 #endif // BAZAAR_DIFFJOB_H