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

kdevplatform/vcs

  • sources
  • kfour-appscomplete
  • kdevelop
  • kdevplatform
  • vcs
vcsdiff.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * This file is part of KDevelop *
3  * Copyright 2007 Andreas Pakulat <[email protected]> *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU Library General Public License as *
7  * published by the Free Software Foundation; either version 2 of the *
8  * License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU Library General Public *
16  * License along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19  ***************************************************************************/
20 
21 #include "vcsdiff.h"
22 
23 #include <QString>
24 #include <QUrl>
25 #include <QSharedData>
26 
27 namespace KDevelop
28 {
29 
30 class VcsDiffPrivate : public QSharedData
31 {
32 public:
33  QUrl baseDiff;
34  QString diff;
35  uint depth = 0;
36 };
37 
38 VcsDiff::VcsDiff()
39  : d(new VcsDiffPrivate)
40 {
41 }
42 
43 VcsDiff::~VcsDiff() = default;
44 
45 VcsDiff::VcsDiff( const VcsDiff& rhs )
46  : d(rhs.d)
47 {
48 }
49 
50 bool VcsDiff::isEmpty() const
51 {
52  return d->diff.isEmpty();
53 }
54 
55 QString VcsDiff::diff() const
56 {
57  return d->diff;
58 }
59 
60 
61 void VcsDiff::setDiff( const QString& s )
62 {
63  d->diff = s;
64 }
65 
66 VcsDiff& VcsDiff::operator=( const VcsDiff& rhs)
67 {
68  d = rhs.d;
69  return *this;
70 }
71 
72 QUrl VcsDiff::baseDiff() const
73 {
74  return d->baseDiff;
75 }
76 
77 uint VcsDiff::depth() const
78 {
79  return d->depth;
80 }
81 
82 void VcsDiff::setBaseDiff(const QUrl& url)
83 {
84  d->baseDiff=url;
85 }
86 
87 void VcsDiff::setDepth(const uint depth)
88 {
89  d->depth = depth;
90 }
91 
92 
93 }
94 
QSharedData
QUrl
KDevelop::VcsDiff
Definition: vcsdiff.h:37
KDevelop::VcsDiff::setDepth
void setDepth(const uint depth)
Sets the depth of the diff to depth.
Definition: vcsdiff.cpp:103
vcsdiff.h
KDevelop::VcsDiff::depth
uint depth() const
Depth - number of directories to left-strip from paths in the patch - see "patch -p" Defaults to 0.
Definition: vcsdiff.cpp:93
KDevelop::VcsDiff::~VcsDiff
virtual ~VcsDiff()
KDevelop::VcsDiff::setBaseDiff
void setBaseDiff(const QUrl &url)
Sets the base directory of the diff to the url.
Definition: vcsdiff.cpp:98
KDevelop::VcsDiff::operator=
VcsDiff & operator=(const VcsDiff &rhs)
Definition: vcsdiff.cpp:82
QString
KDevelop::VcsDiff::isEmpty
bool isEmpty() const
Definition: vcsdiff.cpp:66
KDevelop::VcsDiff::diff
QString diff() const
Definition: vcsdiff.cpp:71
KDevelop::VcsDiff::setDiff
void setDiff(const QString &)
Definition: vcsdiff.cpp:77
KDevelop::VcsDiff::VcsDiff
VcsDiff()
Definition: vcsdiff.cpp:54
KDevelop
Definition: dvcsevent.h:33
KDevelop::VcsDiff::baseDiff
QUrl baseDiff() const
Definition: vcsdiff.cpp:88
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Mar 3 2021 00:38:30 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