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

List:       kde-commits
Subject:    KDE/kdepimlibs/kabc
From:       Allen Winter <winter () kde ! org>
Date:       2006-08-01 1:41:29
Message-ID: 1154396489.681689.12469.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 568408 by winterz:

passbyvalue fix.


 M  +6 -5      ldifconverter.cpp  
 M  +4 -3      ldifconverter.h  


--- trunk/KDE/kdepimlibs/kabc/ldifconverter.cpp #568407:568408
@@ -159,7 +159,7 @@
 
 /* convert from LDIF stream */
 
-bool LDIFConverter::LDIFToAddressee( const QString &str, AddresseeList &addrList, \
QDateTime dt ) +bool LDIFConverter::LDIFToAddressee( const QString &str, \
AddresseeList &addrList, const QDateTime &dt )  {
   if (str.isEmpty())
      return true;
@@ -171,9 +171,10 @@
   Address homeAddr, workAddr;
 
   ldif.setLDIF( str.toLatin1() );
-  if (!dt.isValid())
-    dt = QDateTime::currentDateTime();
-  a.setRevision(dt);
+  QDateTime qdt = dt;
+  if (!qdt.isValid())
+    qdt = QDateTime::currentDateTime();
+  a.setRevision(qdt);
   homeAddr = Address( Address::Home );
   workAddr = Address( Address::Work );
 
@@ -197,7 +198,7 @@
           addrList.append( a );
         }
         a = Addressee();
-        a.setRevision(dt);
+        a.setRevision(qdt);
         homeAddr = Address( Address::Home );
         workAddr = Address( Address::Work );
         break;
--- trunk/KDE/kdepimlibs/kabc/ldifconverter.h #568407:568408
@@ -29,8 +29,8 @@
 namespace KABC {
 
   /**
-   * A set of functions to convert a string with LDIF information to addressees 
-   * and vice versa. It is useful for addressbook import- and exportfilters 
+   * A set of functions to convert a string with LDIF information to addressees
+   * and vice versa. It is useful for addressbook import- and exportfilters
    * and might be used to read and write Mozilla and Netscape addresssbooks.
    */
 
@@ -43,7 +43,8 @@
    * @param addrList    The addresseelist.
    * @param dt          The date & time value of the last modification (e.g. file \
                modification time).
    */
-  KABC_EXPORT bool LDIFToAddressee( const QString &str, AddresseeList &addrList, \
QDateTime dt = QDateTime::currentDateTime() ); +  KABC_EXPORT bool LDIFToAddressee( \
const QString &str, AddresseeList &addrList, +                                    \
const QDateTime &dt = QDateTime::currentDateTime() );  
   /**
    * Converts a list of addressees to a LDIF string.


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

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