• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdevelop API Reference
  • KDE Home
  • Contact Us
 

kdevplatform/vcs

  • KDevelop
  • VcsJob
Public Types | Signals | Public Member Functions | List of all members
KDevelop::VcsJob Class Referenceabstract

#include <vcsjob.h>

Inheritance diagram for KDevelop::VcsJob:
Inheritance graph
[legend]

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.

Definition at line 43 of file vcsjob.h.

Member Enumeration Documentation

◆ JobStatus

enum KDevelop::VcsJob::JobStatus

Simple enum to define how the job finished.

Enumerator
JobRunning 

The job is running.

JobSucceeded 

The job succeeded.

JobCanceled 

The job was cancelled.

JobFailed 

The job failed.

JobNotStarted 

The job is not yet started.

Definition at line 83 of file vcsjob.h.

◆ JobType

enum KDevelop::VcsJob::JobType

To easily check which type of job this is.

Todo:
Check how this can be extended via plugins, maybe use QFlag? (not QFlags!)
Enumerator
Unknown 

Unknown job type (default)

Add 

An add job.

Remove 

A remove job.

Copy 

A copy job.

Move 

A move job.

Diff 

A diff job.

Commit 

A commit job.

Update 

An update job.

Merge 

A merge job.

Resolve 

A resolve job.

Import 

An import job.

Checkout 

A checkout job.

Log 

A log job.

Push 

A push job.

Pull 

A pull job.

Annotate 

An annotate job.

Clone 

A clone job.

Status 

A status job.

Revert 

A revert job.

Cat 

A cat job.

UserType 

A custom job.

Definition at line 55 of file vcsjob.h.

Constructor & Destructor Documentation

◆ VcsJob()

KDevelop::VcsJob::VcsJob ( QObject *  parent = nullptr,
OutputJobVerbosity  verbosity = OutputJob::Verbose 
)
explicit

Definition at line 48 of file vcsjob.cpp.

◆ ~VcsJob()

KDevelop::VcsJob::~VcsJob ( )
overridedefault

Member Function Documentation

◆ fetchResults()

virtual QVariant KDevelop::VcsJob::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

void KDevelop::VcsJob::resultsReady ( KDevelop::VcsJob *  )
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()

virtual JobStatus KDevelop::VcsJob::status ( ) const
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()

virtual KDevelop::IPlugin* KDevelop::VcsJob::vcsPlugin ( ) const
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:
  • vcsjob.h
  • vcsjob.cpp
This file is part of the KDE documentation.
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.

kdevplatform/vcs

Skip menu "kdevplatform/vcs"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdevelop API Reference

Skip menu "kdevelop API Reference"
  • kdevplatform
  •   debugger
  •   documentation
  •   interfaces
  •   language
  •     assistant
  •     backgroundparser
  •     checks
  •     classmodel
  •     codecompletion
  •     codegen
  •     duchain
  •     editor
  •     highlighting
  •     interfaces
  •     util
  •   outputview
  •   project
  •   serialization
  •   shell
  •   sublime
  •   tests
  •   util
  •   vcs

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal