[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: BIC issue in kspell
From: Laurent Montel <lmontel () mandrakesoft ! com>
Date: 2001-02-12 10:42:19
[Download RAW message or body]
Le Lundi 12 Février 2001 11:29, Laurent Montel a écrit :
> Le Lundi 12 Février 2001 10:11, Simon Hausmann a écrit :
> > On Mon, Feb 12, 2001 at 10:55:32AM +0000, Laurent Montel wrote:
> > > Le Lundi 12 Février 2001 09:29, Werner Trobin a écrit :
> > > > Hi!
> > > >
> > > > Laurent changed a static member in kspell and IMHO this is
> > > > a BIC change.
> > > >
> > > > Comments?
> > >
> > > Hi, Werner
> > >
> > > I just change this function :
> > >
> > > int
> > > KSpell::modalCheck( QString& text, KSpellConfig* _kcs )
> > >
> > > this static function is just used by kspread (tools/spell)
> > > I changed it to allow to used local kspell config in kspread.
> > > Because in kspread now you can change locally spell language.
> > > So kspread doesn't modify global spell.
> >
> > This change is indeed binary incompatible, as the function signature
> > changed. (...talking about reviewed patches... ;-)
>
> Yes it's right, but this function is just used by kspread.
>
> > How about having two methods:
> >
> > int modalCheck( QString &text ) // marked as deprecated
> >
> > and
> >
> > int modalCheck( QString &text, KSpellConfig *_kcs )
>
> So I can write this two function, if you want, no problem.
>
> bye
>
> > Bye,
> > Simon
I send you my kspell patch.
Can I apply it ?
bye
["kspell.diff" (text/x-c++)]
cvs server: Diffing .
Index: kspell.cpp
===================================================================
RCS file: /home/kde/kdelibs/kspell/kspell.cpp,v
retrieving revision 1.71
diff -u -u -p -r1.71 kspell.cpp
--- kspell.cpp 2001/02/12 08:38:23 1.71
+++ kspell.cpp 2001/02/12 10:38:13
@@ -1164,6 +1164,34 @@ void KSpell::moveDlg (int x, int y)
// --------------------------------------------------
int
+KSpell::modalCheck( QString& text )
+{
+ modalreturn = 0;
+ modaltext = text;
+
+ /*modalWidgetHack = new QWidget(0,0,WType_Modal);
+ modalWidgetHack->setGeometry(-10,-10,2,2);
+ */
+
+ // kdDebug() << "KSpell1" << endl;
+ KSpell* spell = new KSpell( 0L, i18n("Spell Checker"), 0 ,
+ 0, 0, true, true );
+ //modalWidgetHack->show();
+ //qApp->enter_loop();
+
+ while (spell->status()!=Finished)
+ kapp->processEvents();
+
+ text = modaltext;
+
+ //delete modalWidgetHack;
+ //modalWidgetHack = 0;
+
+ delete spell;
+ return modalreturn;
+}
+
+int
KSpell::modalCheck( QString& text, KSpellConfig* _kcs )
{
modalreturn = 0;
Index: kspell.h
===================================================================
RCS file: /home/kde/kdelibs/kspell/kspell.h,v
retrieving revision 1.30
diff -u -u -p -r1.30 kspell.h
--- kspell.h 2001/02/12 08:38:23 1.30
+++ kspell.h 2001/02/12 10:38:14
@@ -266,7 +266,13 @@ public:
* This method does not return until spellchecking is done or canceled.
* Your application's GUI will still be updated, however.
*/
+ static int modalCheck( QString& text ); // marked as deprecated
+
+ /**
+ * Used local spell config
+ */
static int modalCheck( QString& text, KSpellConfig * _kcs=0 );
+
signals:
_______________________________________________
Koffice-devel mailing list
Koffice-devel@master.kde.org
http://master.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