-rw-r--r-- | libkcal/event.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/libkcal/event.cpp b/libkcal/event.cpp index dd67252..dfa265b 100644 --- a/libkcal/event.cpp +++ b/libkcal/event.cpp | |||
@@ -15,65 +15,64 @@ | |||
15 | You should have received a copy of the GNU Library General Public License | 15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to | 16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <kglobal.h> | 21 | #include <kglobal.h> |
22 | #include <klocale.h> | 22 | #include <klocale.h> |
23 | #include <kdebug.h> | 23 | #include <kdebug.h> |
24 | 24 | ||
25 | #include "event.h" | 25 | #include "event.h" |
26 | 26 | ||
27 | using namespace KCal; | 27 | using namespace KCal; |
28 | 28 | ||
29 | Event::Event() : | 29 | Event::Event() : |
30 | mHasEndDate( false ), mTransparency( Opaque ) | 30 | mHasEndDate( false ), mTransparency( Opaque ) |
31 | { | 31 | { |
32 | } | 32 | } |
33 | 33 | ||
34 | Event::Event(const Event &e) : Incidence(e) | 34 | Event::Event(const Event &e) : Incidence(e) |
35 | { | 35 | { |
36 | mDtEnd = e.mDtEnd; | 36 | mDtEnd = e.mDtEnd; |
37 | mHasEndDate = e.mHasEndDate; | 37 | mHasEndDate = e.mHasEndDate; |
38 | mTransparency = e.mTransparency; | 38 | mTransparency = e.mTransparency; |
39 | } | 39 | } |
40 | 40 | ||
41 | Event::~Event() | 41 | Event::~Event() |
42 | { | 42 | { |
43 | } | 43 | } |
44 | 44 | ||
45 | Incidence *Event::clone() | 45 | Incidence *Event::clone() |
46 | { | 46 | { |
47 | kdDebug(5800) << "Event::clone()" << endl; | ||
48 | return new Event(*this); | 47 | return new Event(*this); |
49 | } | 48 | } |
50 | 49 | ||
51 | bool KCal::operator==( const Event& e1, const Event& e2 ) | 50 | bool KCal::operator==( const Event& e1, const Event& e2 ) |
52 | { | 51 | { |
53 | return operator==( (const Incidence&)e1, (const Incidence&)e2 ) && | 52 | return operator==( (const Incidence&)e1, (const Incidence&)e2 ) && |
54 | e1.dtEnd() == e2.dtEnd() && | 53 | e1.dtEnd() == e2.dtEnd() && |
55 | e1.hasEndDate() == e2.hasEndDate() && | 54 | e1.hasEndDate() == e2.hasEndDate() && |
56 | e1.transparency() == e2.transparency(); | 55 | e1.transparency() == e2.transparency(); |
57 | } | 56 | } |
58 | 57 | ||
59 | 58 | ||
60 | 59 | ||
61 | void Event::setDtEnd(const QDateTime &dtEnd) | 60 | void Event::setDtEnd(const QDateTime &dtEnd) |
62 | { | 61 | { |
63 | if (mReadOnly) return; | 62 | if (mReadOnly) return; |
64 | 63 | ||
65 | mDtEnd = getEvenTime( dtEnd ); | 64 | mDtEnd = getEvenTime( dtEnd ); |
66 | 65 | ||
67 | setHasEndDate(true); | 66 | setHasEndDate(true); |
68 | setHasDuration(false); | 67 | setHasDuration(false); |
69 | 68 | ||
70 | updated(); | 69 | updated(); |
71 | } | 70 | } |
72 | 71 | ||
73 | QDateTime Event::dtEnd() const | 72 | QDateTime Event::dtEnd() const |
74 | { | 73 | { |
75 | if (hasEndDate()) return mDtEnd; | 74 | if (hasEndDate()) return mDtEnd; |
76 | if (hasDuration()) return dtStart().addSecs(duration()); | 75 | if (hasDuration()) return dtStart().addSecs(duration()); |
77 | 76 | ||
78 | kdDebug(5800) << "Warning! Event '" << summary() | 77 | kdDebug(5800) << "Warning! Event '" << summary() |
79 | << "' does have neither end date nor duration." << endl; | 78 | << "' does have neither end date nor duration." << endl; |