[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-12-29 23:20:47
Message-ID: 1167434447.398469.18018.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 617692 by winterz:

forward port SVN commit 617027 by kainhofe:

Fix a crash with relatedTo and read-only calendar when reloading or closing these \
calendars. setRelatedTo works only on read-enabled calendars (as it also changes the \
incidence, which shouldn't be done here anyway...)


 M  +2 -4      incidence.cpp  


--- trunk/KDE/kdepimlibs/kcal/incidence.cpp #617691:617692
@@ -94,7 +94,7 @@
     Incidence::List Relations = mRelations;
     List::ConstIterator it;
     for ( it = Relations.begin(); it != Relations.end(); ++it ) {
-        if ( (*it)->relatedTo() == this ) (*it)->setRelatedTo( 0 );
+      if ( (*it)->relatedTo() == this ) (*it)->mRelatedTo = 0;
     }
     if ( relatedTo() ) relatedTo()->removeRelation( this );
 
@@ -104,9 +104,7 @@
 // A string comparison that considers that null and empty are the same
 static bool stringCompare( const QString& s1, const QString& s2 )
 {
-    if ( s1.isEmpty() && s2.isEmpty() )
-        return true;
-    return s1 == s2;
+  return ( s1.isEmpty() && s2.isEmpty() ) || (s1 == s2);
 }
 
 bool Incidence::operator==( const Incidence& i2 ) const


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

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