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

List:       kde-commits
Subject:    branches/KDE/3.5/kdepim/libkcal
From:       Reinhold Kainhofer <reinhold () kainhofer ! com>
Date:       2006-12-27 19:46:54
Message-ID: 1167248814.237975.5120.nullmailer () svn ! kde ! org
[Download RAW message or body]

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  


--- branches/KDE/3.5/kdepim/libkcal/incidence.cpp #617026:617027
@@ -92,7 +92,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 );
 
@@ -102,9 +102,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