Missing call for SCI_ANNOTATIONGETTEXT in QsciScintilla::annotation?
Moritz Wenk
moritz.wenk at de.abb.com
Fri Mar 20 10:12:30 GMT 2026
Hello,
Is this a bug in QsciScintilla::annotation() (from qsciscintilla.cpp in version 2.14.1) ? The variable “buf” is never initialized with anything.
// Get the annotation for a line, if any.
QString QsciScintilla::annotation(int line) const
{
int size = SendScintilla(SCI_ANNOTATIONGETTEXT, line, (const char *)0);
char *buf = new char[size + 1];
QString qs = bytesAsText(buf, size);
delete[] buf;
return qs;
}
I think there is a call for SendScintilla() missing:
char *buf = new char[size + 1];
SendScintilla(SCI_ANNOTATIONGETTEXT, line, (char *)buf);
Greetings,
Moritz
[ABB logotype]
—
Moritz Wenk
PA-PCP – APROL – R&D Engineer
ABB AG
An der Reichsbank 8
44127 Essen
Phone: +49 201 56577 100
E-mail: moritz.wenk at de.abb.com<mailto:moritz.wenk at de.abb.com>
abb.com<https://www.abb.com/>
[ABB logotype]
ABB AG
Sitz/Head Office: Mannheim
Registergericht/Registry Court: Mannheim
Handelsregisternummer/Commercial Register No.: HRB 4664
Vorstand/Managing Board: Klaus Eble (Vorsitzender/Chairman), Alexander Zumkeller
Vorsitzender des Aufsichtsrats/ Chairman of Supervisory Board: Adrian Guggisberg
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
Bitte beachten Sie auch unsere Datenschutzerklärung, die Sie auf unserer Webseite<https://new.abb.com/privacy-policy/de/datenschutz> finden.
This E-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this E-mail in error) please notify the sender immediately and destroy this E-mail. Any unauthorized copying, disclosure or distribution of the material in this E-mail is strictly forbidden.
Please also take note of our privacy notice, which you can find on our webpage<https://new.abb.com/privacy-notice>.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/qscintilla/attachments/20260320/a4d0b46b/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 2246 bytes
Desc: image001.png
URL: <https://www.riverbankcomputing.com/pipermail/qscintilla/attachments/20260320/a4d0b46b/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 1589 bytes
Desc: image002.png
URL: <https://www.riverbankcomputing.com/pipermail/qscintilla/attachments/20260320/a4d0b46b/attachment-0003.png>
More information about the QScintilla
mailing list