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

List:       kde-commits
Subject:    kdesdk/kbabel/kbabel
From:       Stanislav Višňovský <visnovsky () nenya ! ms ! mff ! cuni ! cz
Date:       2004-08-25 15:34:39
Message-ID: 20040825153439.756B67AFF () office ! kde ! org
[Download RAW message or body]

CVS commit by nanulo: 

destroy syntax highlighter for destroyed text editors

CCMAIL: 87437-done@bugs.kde.org


  M +3 -0      kbhighlighting.cpp   1.12
  M +7 -0      mymultilineedit.cpp   1.106
  M +1 -0      mymultilineedit.h   1.55


--- kdesdk/kbabel/kbabel/kbhighlighting.cpp  #1.11:1.12
@@ -68,4 +68,5 @@ KBabelHighlighter::KBabelHighlighter( QT
 void KBabelHighlighter::highlight( )
 {
+  kdDebug(KBABEL) << this << ": Highlight started" << endl;
   // no updates while we're highlighting
   _edit->blockSignals( true );
@@ -141,4 +142,6 @@ void KBabelHighlighter::highlight( )
   _edit->updateContents( );
   _edit->ensureCursorVisible();
+  
+  kdDebug(KBABEL) << this << ": Highlight finished" << endl;
 }
 

--- kdesdk/kbabel/kbabel/mymultilineedit.cpp  #1.105:1.106
@@ -562,4 +562,5 @@ MsgMultiLineEdit::MsgMultiLineEdit(int I
                 _diffDelColor(Qt::darkRed),
                 _currentUnicodeNumber(0),
+                highlighter(0),
                 _tagStartPara(0), _tagStartIndex(0), _tagEndPara(0), _tagEndIndex(0)
 {
@@ -595,4 +596,10 @@ MsgMultiLineEdit::MsgMultiLineEdit(int I
 }
 
+MsgMultiLineEdit::~MsgMultiLineEdit ()
+{
+    if(highlighter)
+        delete highlighter;
+}
+
 void MsgMultiLineEdit::setText(const QString& s)
 {

--- kdesdk/kbabel/kbabel/mymultilineedit.h  #1.54:1.55
@@ -145,4 +145,5 @@ public:
 
    MsgMultiLineEdit(int ID, KSpell* spell=0, QWidget* parent=0,const char* name=0);
+   virtual ~MsgMultiLineEdit();
 
    /** is displaying surrounding quotes enabled? */


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

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