summaryrefslogtreecommitdiffabout
path: root/libkcal/alarm.cpp
Side-by-side diff
Diffstat (limited to 'libkcal/alarm.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/alarm.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libkcal/alarm.cpp b/libkcal/alarm.cpp
index d8f15b5..6de1566 100644
--- a/libkcal/alarm.cpp
+++ b/libkcal/alarm.cpp
@@ -337,49 +337,49 @@ void Alarm::setTime(const QDateTime &alarmTime)
}
int Alarm::offset()
{
if ( hasTime() ) {
if (mParent->type()=="Todo") {
Todo *t = static_cast<Todo*>(mParent);
return t->dtDue().secsTo( mAlarmTime ) ;
} else
return mParent->dtStart().secsTo( mAlarmTime ) ;
}
else
{
return mOffset.asSeconds();
}
}
QString Alarm::offsetText()
{
int min = -offset()/60;
int hours = min /60;
min = min % 60;
int days = hours /24;
hours = hours % 24;
QString message;
- qDebug("%d %d %d ", days, hours, min );
+ //qDebug("%d %d %d ", days, hours, min );
if ( days > 0 )
message += i18n("%1d").arg( days );
if ( hours > 0 ) {
if ( !message.isEmpty() ) message += "/";
message += i18n("%1h").arg( hours );
}
if ( min > 0 ) {
if ( !message.isEmpty() ) message += "/";
message += i18n("%1min").arg( min );
}
if ( message.isEmpty() )
message = i18n("%1min").arg( 0 );
return message;
}
QDateTime Alarm::time() const
{
if ( hasTime() )
return mAlarmTime;
else
{
if (mParent->type()=="Todo") {
Todo *t = static_cast<Todo*>(mParent);