[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    [PATCH] fix wrong warning
From:       Wolfgang Rohdewald <wolfgang () rohdewald ! de>
Date:       2003-09-17 4:12:35
[Download RAW message or body]

the attached message generates

QDate::setYMD: Invalid date 1090617968-1090593784-1090616096

The attached patch fixes this. Beware - there is another identical piece
of code in the same file which should probably be fixed too.

Could somebody please apply this?

-- 
Wolfgang

["forwarded message" (message/rfc822)]

Date: Tue, 16 Sep 2003 17:56:43 +1000
From: Brad Hards <bhards@bigpond.net.au>
To: kde-devel@kde.org
Subject: Re: Newbie Guide to Building KDE from CVS. Comments sought.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

There are some - mainly in kdesdk by the looks.

Brad
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE/ZsI8W6pHgIdAuOMRAtH0AJ4jOhrs/xC2g7lLVSeq63VP9+reBQCgu7vg
zETJMMhnnTkoEzTprgN5N2M=
=Jlad
-----END PGP SIGNATURE-----
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

["date.patch" (text/x-diff)]

--- old.cpp	2003-09-17 05:42:41.000000000 +0200
+++ objecttreeparser.cpp	2003-09-17 06:06:20.000000000 +0200
@@ -2317,16 +2317,18 @@
                 }
                 else {
                   if( !block.keyId.isEmpty() ) {
-                    bool dateOK = (0 < block.creationTime.tm_year);
-                    QDate created( 1900 + block.creationTime.tm_year,
+                    bool dateOK = ((0 < block.creationTime.tm_year) && \
(block.creationTime.tm_year<3000)); +                    if( dateOK ) {
+                        QDate created( 1900 + block.creationTime.tm_year,
                                   block.creationTime.tm_mon,
                                   block.creationTime.tm_mday );
-                    if( dateOK && created.isValid() )
-                        htmlStr += i18n( "Message was signed with unknown key %1, \
created %2." ) +                        if( created.isValid() )
+                            htmlStr += i18n( "Message was signed with unknown key \
                %1, created %2." )
                                 .arg( keyWithWithoutURL ).arg( created.toString( \
                Qt::LocalDate ) );
-                    else
-                        htmlStr += i18n( "Message was signed with unknown key %1." )
+                        else
+                            htmlStr += i18n( "Message was signed with unknown key \
                %1." )
                                 .arg( keyWithWithoutURL );
+                    }
                   }
                   else
                     htmlStr += i18n( "Message was signed with unknown key." );



_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic