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

List:       kde-commits
Subject:    branches/work/kdab-post-4.0/kdepim
From:       Volker Krause <vkrause () kde ! org>
Date:       2007-12-13 14:54:27
Message-ID: 1197557667.540141.26982.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 748077 by vkrause:

Merged revisions 748069 via svnmerge from 
https://vkrause@svn.kde.org/home/kde/branches/kdepim/enterprise/kdepim

........
  r748069 | vkrause | 2007-12-13 15:32:52 +0100 (Thu, 13 Dec 2007) | 2 lines
  
  Fix crash.
........


 _M            . (directory)  
 M  +6 -4      kmail/editorwatcher.cpp  
 M  +1 -0      kmail/editorwatcher.h  


** branches/work/kdab-post-4.0/kdepim #property svnmerge-integrated
   - /branches/kdepim/enterprise/kdepim:1-708704,708706,708741,708749,709066,711604,71 \
1623,712056,714358,715112,717162,717727,723348-723367,723653,724153,724155,724546,7293 \
06,729611,731653,733159,733883,734242,734247,734273,735684,738629,739069,739670,743884,744689,747182,747318,747971,748016 \
/trunk/KDE/kdepim:1-738080  + \
/branches/kdepim/enterprise/kdepim:1-708704,708706,708741,708749,709066,711604,711623, \
712056,714358,715112,717162,717727,723348-723367,723653,724153,724155,724546,729306,72 \
9611,731653,733159,733883,734242,734247,734273,735684,738629,739069,739670,743884,744689,747182,747318,747971,748016,748069 \
                /trunk/KDE/kdepim:1-738080
--- branches/work/kdab-post-4.0/kdepim/kmail/editorwatcher.cpp #748076:748077
@@ -70,7 +70,8 @@
     mHaveInotify( false ),
     mFileOpen( false ),
     mEditorRunning( false ),
-    mFileModified( true ) // assume the worst unless we know better
+    mFileModified( true ), // assume the worst unless we know better
+    mDone( false )
 {
   assert( mUrl.isLocalFile() );
   mTimer.setSingleShot( true );
@@ -161,8 +162,11 @@
 
 void EditorWatcher::checkEditDone()
 {
-  if ( mEditorRunning || (mFileOpen && mHaveInotify) )
+  if ( mEditorRunning || (mFileOpen && mHaveInotify) || mDone )
     return;
+  // protect us against double-deletion by calling this method again while
+  // the subeventloop of the message box is running
+  mDone = true;
   // nobody can edit that fast, we seem to be unable to detect
   // when the editor will be closed
   if ( mEditTime.elapsed() <= 3000 ) {
@@ -174,6 +178,4 @@
   deleteLater();
 }
 
-
-
 #include "editorwatcher.moc"
--- branches/work/kdab-post-4.0/kdepim/kmail/editorwatcher.h #748076:748077
@@ -69,6 +69,7 @@
     QTime mEditTime;
 
     bool mError;
+    bool mDone;
 };
 
 }


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

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