[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepimlibs/kcal
From: Bertjan Broeksema <b.broeksema () home ! nl>
Date: 2010-06-10 16:39:03
Message-ID: 20100610163903.2C4A6AC8CF () svn ! kde ! org
[Download RAW message or body]
SVN commit 1136751 by bbroeksema:
Implement assignment operator
M +9 -0 recurrence.cpp
M +7 -0 recurrence.h
--- trunk/KDE/kdepimlibs/kcal/recurrence.cpp #1136750:1136751
@@ -150,6 +150,15 @@
return *d == *r2.d;
}
+Recurrence &Recurrence::operator=( const Recurrence &other )
+{
+ if ( &other == this ) // Check for self assignment
+ return *this;
+
+ *d = *other.d;
+ return *this;
+}
+
void Recurrence::addObserver( RecurrenceObserver *observer )
{
if ( !d->mObservers.contains( observer ) ) {
--- trunk/KDE/kdepimlibs/kcal/recurrence.h #1136750:1136751
@@ -145,6 +145,13 @@
*/
bool operator!=( const Recurrence &r ) const { return !operator==(r); }
+ /**
+ * Assignment operator.
+ *
+ * @param r the recurrence which will be assigned to this.
+ */
+ Recurrence &operator=( const Recurrence &r );
+
/** Return the start date/time of the recurrence (Time for all-day recurrences will be 0:00).
@return the current start/time of the recurrence. */
KDateTime startDateTime() const;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic