[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kspell2
From: David Faure <faure () kde ! org>
Date: 2005-10-27 11:09:06
Message-ID: 1130411346.788191.28271.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 474841 by dfaure:
Unbreak another test program (grmbl)
Fix another out-of-bounds assert.
M +4 -1 tests/test_dialog.cpp
M +2 -2 ui/highlighter.cpp
--- trunk/KDE/kdelibs/kspell2/tests/test_dialog.cpp #474840:474841
@@ -26,6 +26,7 @@
#include "filter.h"
#include <kapplication.h>
+#include <kcmdlineargs.h>
#include <kdebug.h>
using namespace KSpell2;
@@ -54,7 +55,9 @@
int main( int argc, char** argv )
{
- KApplication app;
+ KApplication::disableAutoDcopRegistration();
+ KCmdLineArgs::init( argc, argv, "test_dialog", 0, 0, 0, 0 );
+ KApplication app; // with GUI
TestDialog test;
test.check( "This is a sample buffer. Whih this thingg will "
--- trunk/KDE/kdelibs/kspell2/ui/highlighter.cpp #474840:474841
@@ -73,10 +73,10 @@
Q_UNUSED( endStateOfLastPara );
int para, index;
textEdit()->getCursorPosition( ¶, &index );
- int lengthPosition = text.length() - 1;
+ const int lengthPosition = text.length() - 1;
if ( index != lengthPosition ||
- !text[text.length()-2].isLetter() ) {
+ ( lengthPosition > 0 && !text[lengthPosition-1].isLetter() ) ) {
d->filter->setBuffer( text );
Word w = d->filter->nextWord();
while ( !w.end ) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic