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

List:       koffice-devel
Subject:    [PATCH] kword spellchecking trouble
From:       Waldo Bastian <bastian () kde ! org>
Date:       2004-02-13 16:10:17
Message-ID: 200402131710.17309.bastian () kde ! org
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

kword locks up hard with ispell when typing a number and then RMB clicking.
(See kword.bt for backtrace)

The reason is that KOISpell::cleanFputsWord() bails out if it doesn't 
encounter a word but KOISpell::checkWord() nonetheless waits for an answer 
from ispell. koispell1.patch fixes.

Unfortunately that bring us to another bug because now the popup dialog gets 
highly confused by the modal dialog that is created as part of 
KOISpell::enter_loop() and you need "alt-tab" to get keyboard control back.
koispell2.patch solves that problem but the comment about the other 999999999 
problems still holds true, so that's not a good solution.

Cheers,
Waldo
- -- 
bastian@kde.org -=|[ SUSE, The Linux Desktop Experts ]|=- bastian@suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFALPbpN4pvrENfboIRAg+mAJ9aaFi/gOCXU+njyjSnfZ+hgaGWFQCffk8u
xefr1QI5e/4TUXwGGL4fV28=
=8Vit
-----END PGP SIGNATURE-----

["kword.bt" (text/plain)]

#4  0x40e40deb in QEventLoop::processEvents(unsigned) (this=0x8085da0, flags=4) at \
kernel/qeventloop_x11.cpp:286 #5  0x40eae222 in QEventLoop::enterLoop() \
(this=0x8085da0) at kernel/qeventloop.cpp:198 #6  0x40e98931 in \
QApplication::enter_loop() (this=0xbffff270) at kernel/qapplication.cpp:2737 #7  \
0x42096c1a in KOISpell::enter_loop() (this=0x82e05d8) at koispell.cpp:1340 #8  \
0x42092914 in KOISpell::checkWord(QString const&, bool, bool) (this=0x82e05d8, \
buffer=@0xbfffe600, synchronous=true) at koispell.cpp:475 #9  0x4209183e in \
KOISpell::resultCheckWord(QString const&) (this=0x82e0668, _word=@0xbfffe600) at \
koispell.cpp:248 #10 0x41c8d2ce in KWView::listOfResultOfCheckWord(QString const&) \
(this=0x818ed58, word=@0xbfffe600) at kwview.cc:7240 #11 0x41cbe57b in \
KWTextFrameSetEdit::showPopup(KWFrame*, KWView*, QPoint const&) (this=0x8338d58, \
view=0x818ed58, point=@0xbfffe740)  at kwtextframeset.cc:3866
#12 0x41c075f8 in KWTableFrameSetEdit::showPopup(KWFrame*, KWView*, QPoint const&) \
(this=0xfffffdfe, frame=0x81ce560, view=0x818ed58,  point=@0xbfffe740) at \
kwtableframeset.cc:2841 #13 0x41c80bab in KWView::openPopupMenuInsideFrame(KWFrame*, \
QPoint const&) (this=0x818ed58, frame=0x81ce560, _point=@0xbfffe740) at \
kwview.cc:5211 #14 0x41c0e898 in KWCanvas::contentsMousePressEvent(QMouseEvent*) \
(this=0x8240eb8, e=0xbfffe820) at kwview.h:784 #15 0x4101d96b in \
QScrollView::viewportMousePressEvent(QMouseEvent*) (this=0x8240eb8, e=0xbfffee30) at \
widgets/qscrollview.cpp:1729 #16 0x4101d0ac in QScrollView::eventFilter(QObject*, \
QEvent*) (this=0x8240eb8, obj=0x8241870, e=0xbfffee30) at \
widgets/qscrollview.cpp:1497 #17 0x41c190f0 in KWCanvas::eventFilter(QObject*, \
QEvent*) (this=0x8240eb8, o=0x8241870, e=0xbfffee30) at kwcanvas.cc:2580 #18 \
0x40ef9104 in QObject::activate_filters(QEvent*) (this=0x8241870, e=0xbfffee30) at \
kernel/qobject.cpp:902 #19 0x40ef8f76 in QObject::event(QEvent*) (this=0x8241870, \
e=0xbfffee30) at kernel/qobject.cpp:735 #20 0x40f32af1 in QWidget::event(QEvent*) \
(this=0x8241870, e=0xbfffee30) at kernel/qwidget.cpp:4408 #21 0x40e98747 in \
QApplication::internalNotify(QObject*, QEvent*) (this=0xbffff270, receiver=0x8241870, \
e=0xbfffee30)  at kernel/qapplication.cpp:2582
#22 0x40e97efd in QApplication::notify(QObject*, QEvent*) (this=0xbffff270, \
receiver=0x8241870, e=0xbfffee30) at kernel/qapplication.cpp:2368 #23 0x40a0fe9d in \
KApplication::notify(QObject*, QEvent*) () from /ext/kde_32/lib/libkdecore.so.4 #24 \
0x40e2f60b in QApplication::sendSpontaneousEvent(QObject*, QEvent*) \
(receiver=0x8241870, event=0xbfffee30) at qapplication.h:495 #25 0x40e28d8b in \
QETWidget::translateMouseEvent(_XEvent const*) (this=0x8241870, event=0xbffff140) at \
kernel/qapplication_x11.cpp:4351 #26 0x40e26adb in \
QApplication::x11ProcessEvent(_XEvent*) (this=0xbffff270, event=0xbffff140) at \
kernel/qapplication_x11.cpp:3529 #27 0x40e40850 in \
QEventLoop::processEvents(unsigned) (this=0x8085da0, flags=4) at \
kernel/qeventloop_x11.cpp:192 #28 0x40eae222 in QEventLoop::enterLoop() \
(this=0x8085da0) at kernel/qeventloop.cpp:198 #29 0x40eae13e in QEventLoop::exec() \
(this=0x8085da0) at kernel/qeventloop.cpp:145 #30 0x40e988c7 in QApplication::exec() \
(this=0xbffff270) at kernel/qapplication.cpp:2705 #31 0x400184ef in main (argc=2, \
argv=0xbffff3a4) at main.cc:43


["koispell1.patch" (text/x-diff)]

Index: koispell.cpp
===================================================================
RCS file: /home/kde/koffice/lib/kospell/koispell.cpp,v
retrieving revision 1.20.2.2
diff -u -p -r1.20.2.2 koispell.cpp
--- koispell.cpp	18 Jan 2004 16:36:14 -0000	1.20.2.2
+++ koispell.cpp	13 Feb 2004 15:57:18 -0000
@@ -469,10 +469,10 @@ bool KOISpell::checkWord (const QString 
     OUTPUT (checkWord2);
 
   proc->fputs ("%"); // turn off terse mode
-  cleanFputsWord( qs ); // send the word to ispell
 
-  //MAGIC 2: and here we wait for the results
-  enter_loop();
+  if (cleanFputsWord( qs )) // send the word to ispell
+     enter_loop(); //MAGIC 2: and here we wait for the results
+
   return true;
 }
 

["koispell2.patch" (text/x-diff)]

Index: koispell.cpp
===================================================================
RCS file: /home/kde/koffice/lib/kospell/koispell.cpp,v
retrieving revision 1.20.2.2
diff -u -p -r1.20.2.2 koispell.cpp
--- koispell.cpp	18 Jan 2004 16:36:14 -0000	1.20.2.2
+++ koispell.cpp	13 Feb 2004 15:59:03 -0000
@@ -1334,11 +1334,11 @@ void qt_enter_modal( QWidget *widget );
 void qt_leave_modal( QWidget *widget );
 void KOISpell::enter_loop()
 {
-  QWidget dummy(0,0,WType_Dialog | WShowModal);
-  dummy.setFocusPolicy( QWidget::NoFocus );
-  qt_enter_modal(&dummy);
+//  QWidget dummy(0,0,WType_Dialog | WShowModal);
+//  dummy.setFocusPolicy( QWidget::NoFocus );
+//  qt_enter_modal(&dummy);
   qApp->enter_loop();
-  qt_leave_modal(&dummy);
+//  qt_leave_modal(&dummy);
 }
 
 void KOISpell::slotSynchronousReady()


_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


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

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