[QScintilla] Bug in QsciScintilla::clearAnnotations()?

Moritz Wenk Moritz.Wenk at br-automation.com
Tue Jul 20 09:55:23 BST 2010


Hello,

my QScintilla Application (using version 2.4.4) crashes when calling 
QsciScintilla::clearAnnotations(-1) to remove all the annotations.
>From version 2.4 to 2.4.4 the greather than / less than in the if 
condition in qscintilla.cpp was changed. 
Looks like it is wrong in 2.4.4?

Code from 2.4.0:

// Clear annotations.
void QsciScintilla::clearAnnotations(int line)
{
    if (line > 0)
        SendScintilla(SCI_ANNOTATIONSETTEXT, line, (const char *)0);
    else
        SendScintilla(SCI_ANNOTATIONCLEARALL);
}


Code from 2.4.4:

// Clear annotations.
void QsciScintilla::clearAnnotations(int line)
{
    if (line < 0)
        SendScintilla(SCI_ANNOTATIONSETTEXT, line, (const char *)0);
    else
        SendScintilla(SCI_ANNOTATIONCLEARALL);
}


Thanks,
Moritz Wenk


More information about the QScintilla mailing list