kdevplatform/vcs
#include <vcsjob.h>

Public Types | |
enum | JobStatus { JobRunning = 0, JobSucceeded = 1, JobCanceled = 2, JobFailed = 3, JobNotStarted = 4 } |
enum | JobType { Unknown = -1, Add = 0, Remove = 1, Copy = 2, Move = 3, Diff = 4, Commit = 5, Update = 6, Merge = 7, Resolve = 8, Import = 9, Checkout = 10, Log = 11, Push = 12, Pull = 13, Annotate = 14, Clone = 15, Status = 16, Revert = 17, Cat = 18, UserType = 1000 } |
Signals | |
void | resultsReady (KDevelop::VcsJob *) |
Public Member Functions | |
VcsJob (QObject *parent=nullptr, OutputJobVerbosity verbosity=OutputJob::Verbose) | |
~VcsJob () override | |
virtual QVariant | fetchResults ()=0 |
void | setType (JobType) |
virtual JobStatus | status () const =0 |
JobType | type () const |
virtual KDevelop::IPlugin * | vcsPlugin () const =0 |
Detailed Description
This class provides an extension of KJob to get various VCS-specific information about the job.
This includes the type, the state and the results provided by the job.
Member Enumeration Documentation
◆ JobStatus
◆ JobType
To easily check which type of job this is.
Constructor & Destructor Documentation
◆ VcsJob()
|
explicit |
Definition at line 48 of file vcsjob.cpp.
◆ ~VcsJob()
|
overridedefault |
Member Function Documentation
◆ fetchResults()
|
pure virtual |
This method will return all new results of the job.
The actual data type that is wrapped in the QVariant depends on the type of job.
- Note
- Results returned by a previous call to fetchResults are not returned.
Implemented in KDevelop::DVcsJob.
◆ resultsReady
|
signal |
This signal is emitted when new results are available.
Depending on the plugin and the operation, it may be emitted only once when all results are ready, or several times.
◆ setType()
void KDevelop::VcsJob::setType | ( | VcsJob::JobType | t | ) |
This can be used to set the type of the vcs job in subclasses.
Definition at line 76 of file vcsjob.cpp.
◆ status()
|
pure virtual |
Find out in which state the job is.
It can be running, canceled, failed or finished
- Returns
- the status of the job
- See also
- JobStatus
Implemented in KDevelop::DVcsJob.
◆ type()
VcsJob::JobType KDevelop::VcsJob::type | ( | ) | const |
Used to find out about the type of job.
- Returns
- the type of job
Definition at line 69 of file vcsjob.cpp.
◆ vcsPlugin()
|
pure virtual |
Used to get at the version control plugin.
The plugin can be used to get one of the interfaces to execute more vcs actions, depending on this job's results (like getting a diff for an entry in a log)
Implemented in KDevelop::DVcsJob.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 18 2021 23:36:01 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.