[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepimlibs/kcal
From: Allen Winter <winter () kde ! org>
Date: 2006-09-24 23:56:15
Message-ID: 1159142175.710652.24214.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 588105 by winterz:
remove deprecated functions.
some minor cleanups and doxygen stuff.
M +8 -12 duration.cpp
M +9 -5 duration.h
M +2 -20 period.cpp
M +6 -7 period.h
--- trunk/KDE/kdepimlibs/kcal/duration.cpp #588104:588105
@@ -18,7 +18,14 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
+/**
+ @file
+ This file is part of the API for handling calendar data and
+ defines the Duration class.
+ @author Cornelius Schumacher
+*/
+
#include <kdatetime.h>
#include "duration.h"
@@ -40,7 +47,7 @@
mSeconds = seconds;
}
-bool KCal::operator==( const Duration& d1, const Duration& d2 )
+bool KCal::operator==( const Duration &d1, const Duration &d2 )
{
return ( d1.asSeconds() == d2.asSeconds() );
}
@@ -55,14 +62,3 @@
return mSeconds;
}
-// DEPRECATED methods
-Duration::Duration( const QDateTime &start, const QDateTime &end )
-{
- mSeconds = start.secsTo( end );
-}
-
-QDateTime Duration::end( const QDateTime &start ) const
-{
- return start.addSecs( mSeconds );
-}
-
--- trunk/KDE/kdepimlibs/kcal/duration.h #588104:588105
@@ -18,18 +18,24 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
+/**
+ @file
+ This file is part of the API for handling calendar data and
+ defines the Duration class.
+
+ @author Cornelius Schumacher
+*/
#ifndef KCAL_DURATION_H
#define KCAL_DURATION_H
#include "kcal.h"
class KDateTime;
-//TODO: remove following declaration
-class QDateTime;
namespace KCal {
/**
+ @brief
This class represents a duration.
*/
class KCAL_EXPORT Duration
@@ -37,11 +43,9 @@
public:
Duration();
Duration( const KDateTime &start, const KDateTime &end );
- KDE_CONSTRUCTOR_DEPRECATED Duration( const QDateTime &start, const QDateTime &end );
Duration( int seconds ); //not explicit
KDateTime end( const KDateTime &start ) const;
- KDE_DEPRECATED QDateTime end( const QDateTime &start ) const;
int asSeconds() const;
@@ -52,7 +56,7 @@
Private *d;
};
-bool operator==( const Duration&, const Duration& );
+bool operator==( const Duration &d1, const Duration &d2 );
inline bool operator!=( const Duration &d1, const Duration &d2 )
{
return !operator==( d1, d2 );
--- trunk/KDE/kdepimlibs/kcal/period.cpp #588104:588105
@@ -116,29 +116,11 @@
return d->mHasDuration;
}
-void Period::shiftTimes(const KDateTime::Spec &oldSpec, const KDateTime::Spec &newSpec)
+void Period::shiftTimes( const KDateTime::Spec &oldSpec,
+ const KDateTime::Spec &newSpec )
{
d->mStart = d->mStart.toTimeSpec( oldSpec );
d->mStart.setTimeSpec( newSpec );
d->mEnd = d->mEnd.toTimeSpec( oldSpec );
d->mEnd.setTimeSpec( newSpec );
}
-
-// DEPRECATED methods
-Period::Period( const QDateTime &start, const QDateTime &end )
- : d( new KCal::Period::Private )
-{
- // Use local time zone
- d->mStart = KDateTime(start);
- d->mEnd = KDateTime(end);
- d->mHasDuration = false;
-}
-
-Period::Period( const QDateTime &start, const Duration &duration )
- : d( new KCal::Period::Private )
-{
- // Use local time zone
- d->mStart = KDateTime(start);
- d->mEnd = KDateTime(duration.end( start ));
- d->mHasDuration = true;
-}
--- trunk/KDE/kdepimlibs/kcal/period.h #588104:588105
@@ -58,7 +58,6 @@
@param end the time the period ends.
*/
Period( const KDateTime &start, const KDateTime &end );
- KDE_CONSTRUCTOR_DEPRECATED Period( const QDateTime &start, const QDateTime &end );
/**
Constructs a period from @p start and lasting @p duration.
@@ -67,7 +66,6 @@
@param duration how long the period lasts.
*/
Period( const KDateTime &start, const Duration &duration );
- KDE_CONSTRUCTOR_DEPRECATED Period( const QDateTime &start, const Duration &duration );
/**
Constructs a period by copying another period object
@@ -130,15 +128,16 @@
time zone rather than from the actual period time zone.
For example, shifting a period whose start time is 09:00 America/New York,
- using an old viewing time zone (@p oldSpec) of Europe/London, to a new time
- zone (@p newSpec) of Europe/Paris, will result in the time being shifted
- from 14:00 (which is the London time of the period start) to 14:00 Paris
- time.
+ using an old viewing time zone (@p oldSpec) of Europe/London, to a new
+ time zone (@p newSpec) of Europe/Paris, will result in the time being
+ shifted from 14:00 (which is the London time of the period start) to
+ 14:00 Paris time.
@param oldSpec the time specification which provides the clock times
@param newSpec the new time specification
*/
- void shiftTimes( const KDateTime::Spec &oldSpec, const KDateTime::Spec &newSpec );
+ void shiftTimes( const KDateTime::Spec &oldSpec,
+ const KDateTime::Spec &newSpec );
private:
//@cond PRIVATE
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic