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

List:       kwrite-devel
Subject:    Re: Crash when reloading document with on-the-fly spell checking
From:       Michel Ludwig <michel.ludwig () gmail ! com>
Date:       2010-04-27 20:37:23
Message-ID: 201004272137.23721.michel.ludwig () gmail ! com
[Download RAW message or body]

On Tue 27 Apr 2010 19:18:22 Christoph Cullmann wrote:
> Tried hard to get your crash/assert, can't reproduce it.

Just to double check: please make sure that on-the-fly spell checking is 
enabled before you do the reload (with F5, for example). It triggers the 
assert here every time, and on two different machines.

Anyway, the attached patch fixes it for me and opening documents still works.

> Seems the Dictionary Ranges in the document are still smart thought :P

Yes, I'll take care of that in the next days. Shouldn't be too hard to convert 
that as one can now delete moving ranges in feedback handlers. :-)


Thanks,

Michel


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
["signal.patch" (text/x-patch)]

diff --git a/part/document/katedocument.cpp b/part/document/katedocument.cpp
index 8b37044..1104fc9 100644
--- a/part/document/katedocument.cpp
+++ b/part/document/katedocument.cpp
@@ -2078,7 +2078,6 @@ bool KateDocument::openFile()
     view->setUpdatesEnabled (false);
 
   history()->doEdit( new KateEditInfo(Kate::OpenFileEdit, \
                KTextEditor::Range(0,0,0,0), QStringList(), documentRange(), \
                QStringList()) );
-  emit KTextEditor::Document::textInserted(this, documentRange());
 
   //
   // yeah, success
@@ -2107,9 +2106,6 @@ bool KateDocument::openFile()
     }
   }
 
-  // Inform that the text has changed (required as we're not inside the usual \
                editStart/End stuff)
-  emit textChanged (this);
-
   //
   // update views
   //
@@ -2121,6 +2117,12 @@ bool KateDocument::openFile()
     view->updateView (true);
   }
 
+  // emit all signals about new text after view updates
+  emit KTextEditor::Document::textInserted(this, documentRange());
+
+  // Inform that the text has changed (required as we're not inside the usual \
editStart/End stuff) +  emit textChanged (this);
+  
   if (!m_reloading)
   {
     //



_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


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

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