summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper
Side-by-side diff
Diffstat (limited to 'kmicromail/libmailwrapper') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/abstractmail.cpp11
-rw-r--r--kmicromail/libmailwrapper/genericwrapper.cpp16
2 files changed, 16 insertions, 11 deletions
diff --git a/kmicromail/libmailwrapper/abstractmail.cpp b/kmicromail/libmailwrapper/abstractmail.cpp
index 374d606..44878e0 100644
--- a/kmicromail/libmailwrapper/abstractmail.cpp
+++ b/kmicromail/libmailwrapper/abstractmail.cpp
@@ -163,5 +163,5 @@ void AbstractMail::deleteMailList(const QValueList<RecMailP>&target)
void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targetMail )
{
- qDebug("AbstractMail::downloadNewMails %s ", fromFolder->getName().latin1());
+ //qDebug("AbstractMail::downloadNewMails %s ", fromFolder->getName().latin1());
// get local folder
Account * acc = getAccount();
@@ -185,5 +185,5 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe
QValueList<RecMailP> e;
targetMail->listMessages(lfName,e,acc->getMaxMailSize() );
- qDebug("target has mails %d ", e.count());
+ //qDebug("target has mails %d ", e.count());
QValueList<RecMailP> n;
int iii = 0;
@@ -202,9 +202,4 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe
++jjj;
}
- if ( found )
- qDebug("found ");
- else
- qDebug("NOT found ");
-
if ( !found ) {
n.append( r );
@@ -217,5 +212,5 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe
}
mvcpMailList( n,lfName,targetMail,!acc->getLeaveOnServer());
-
+ Global::statusMessage(tr("Downloaded %1 messages").arg(n.count()));
#if 0
diff --git a/kmicromail/libmailwrapper/genericwrapper.cpp b/kmicromail/libmailwrapper/genericwrapper.cpp
index 2b04847..ed591fc 100644
--- a/kmicromail/libmailwrapper/genericwrapper.cpp
+++ b/kmicromail/libmailwrapper/genericwrapper.cpp
@@ -47,8 +47,17 @@ QString Genericwrapper::parseDateTime( mailimf_date_time *date )
}
- QDateTime dt (QDate(date->dt_year,date->dt_month, date->dt_day ),QTime(date->dt_hour, date->dt_min, date->dt_sec ) );
+ QDate da (date->dt_year,date->dt_month, date->dt_day );
+ QTime ti ( date->dt_hour, date->dt_min, date->dt_sec );
+ QDateTime dt ( da ,ti );
int off = KGlobal::locale()->localTimeOffset( dt );
- dt = dt.addSecs( off*60 );
- QString ret = KGlobal::locale()->formatDateTime( dt,true,true);
+ //dt = dt.addSecs( off*60 );
+ QString ret;
+ if ( da == QDate::currentDate () )
+ ret = KGlobal::locale()->formatTime( ti,true);
+
+ else {
+ ret = KGlobal::locale()->formatDateTime( dt,true,true);
+ }
+#if 0
if ( off < 0 )
ret += " -";
@@ -57,4 +66,5 @@ QString Genericwrapper::parseDateTime( mailimf_date_time *date )
ret += QString::number( off / 60 );
ret += "h";
+#endif
#if 0
char tmp[23];