Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/vcs/vcsevent.h
Show All 16 Lines | |||||
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
19 | * 02110-1301, USA. | 19 | * 02110-1301, USA. | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #ifndef KDEVPLATFORM_VCSEVENT_H | 22 | #ifndef KDEVPLATFORM_VCSEVENT_H | ||
23 | #define KDEVPLATFORM_VCSEVENT_H | 23 | #define KDEVPLATFORM_VCSEVENT_H | ||
24 | 24 | | |||
25 | #include <QVariant> | 25 | #include <QMetaType> | ||
26 | #include <QSharedDataPointer> | ||||
26 | 27 | | |||
27 | #include "vcsexport.h" | 28 | #include "vcsexport.h" | ||
28 | 29 | | |||
29 | class QString; | 30 | class QString; | ||
30 | class QDateTime; | 31 | class QDateTime; | ||
31 | template <typename T> class QList; | 32 | template <typename T> class QList; | ||
32 | 33 | | |||
33 | namespace KDevelop | 34 | namespace KDevelop | ||
Show All 38 Lines | 44 | public: | |||
72 | void setRepositoryLocation( const QString& ); | 73 | void setRepositoryLocation( const QString& ); | ||
73 | void setRepositoryCopySourceLocation( const QString& ); | 74 | void setRepositoryCopySourceLocation( const QString& ); | ||
74 | void setRepositoryCopySourceRevision( const KDevelop::VcsRevision& ); | 75 | void setRepositoryCopySourceRevision( const KDevelop::VcsRevision& ); | ||
75 | void setActions( Actions ); | 76 | void setActions( Actions ); | ||
76 | 77 | | |||
77 | VcsItemEvent& operator=( const VcsItemEvent& rhs); | 78 | VcsItemEvent& operator=( const VcsItemEvent& rhs); | ||
78 | 79 | | |||
79 | private: | 80 | private: | ||
80 | const QScopedPointer<class VcsItemEventPrivate> d; | 81 | QSharedDataPointer<class VcsItemEventPrivate> d; | ||
81 | }; | 82 | }; | ||
82 | 83 | | |||
83 | /** | 84 | /** | ||
84 | * Small container class that contains information about a single revision. | 85 | * Small container class that contains information about a single revision. | ||
85 | * | 86 | * | ||
86 | * @note log() only returns information about the specific item that was asked | 87 | * @note log() only returns information about the specific item that was asked | ||
87 | * about. When working with a VCS that supports atomic commits (i.e. where a | 88 | * about. When working with a VCS that supports atomic commits (i.e. where a | ||
88 | * revision might affect more than one item), use change() to retrieve | 89 | * revision might affect more than one item), use change() to retrieve | ||
Show All 16 Lines | 94 | public: | |||
105 | void setAuthor( const QString& ); | 106 | void setAuthor( const QString& ); | ||
106 | void setDate( const QDateTime& ); | 107 | void setDate( const QDateTime& ); | ||
107 | void setMessage(const QString& ); | 108 | void setMessage(const QString& ); | ||
108 | void setItems( const QList<VcsItemEvent>& ); | 109 | void setItems( const QList<VcsItemEvent>& ); | ||
109 | void addItem(const VcsItemEvent& item); | 110 | void addItem(const VcsItemEvent& item); | ||
110 | VcsEvent& operator=( const VcsEvent& rhs); | 111 | VcsEvent& operator=( const VcsEvent& rhs); | ||
111 | 112 | | |||
112 | private: | 113 | private: | ||
113 | const QScopedPointer<class VcsEventPrivate> d; | 114 | QSharedDataPointer<class VcsEventPrivate> d; | ||
114 | }; | 115 | }; | ||
115 | 116 | | |||
116 | } | 117 | } | ||
117 | 118 | | |||
118 | Q_DECLARE_OPERATORS_FOR_FLAGS( KDevelop::VcsItemEvent::Actions ) | 119 | Q_DECLARE_OPERATORS_FOR_FLAGS( KDevelop::VcsItemEvent::Actions ) | ||
119 | Q_DECLARE_METATYPE( KDevelop::VcsEvent ) | 120 | Q_DECLARE_METATYPE( KDevelop::VcsEvent ) | ||
121 | Q_DECLARE_TYPEINFO( KDevelop::VcsEvent, Q_MOVABLE_TYPE ); | ||||
120 | Q_DECLARE_METATYPE( KDevelop::VcsItemEvent ) | 122 | Q_DECLARE_METATYPE( KDevelop::VcsItemEvent ) | ||
123 | Q_DECLARE_TYPEINFO( KDevelop::VcsItemEvent, Q_MOVABLE_TYPE ); | ||||
121 | #endif | 124 | #endif | ||
122 | 125 | |