Menu

#17 Bug on RichText feature

1.0
closed
aliks-os
None
2014-11-24
2014-11-17
Mauro Anjo
No

Hey Alik, I found a small bug on richtext feature.

When you're creating the report there is a line that gets the document cursor to insert the text in place of or [Field]. The signature of QTextDocument find() function is incorrect. You are passing an option flag on the second argument instead of the position to start looking for the substrig.

Current not correct version:

QTextCursor c = document.find(currentFragment.text(),QTextDocument::FindWholeWords);

Correct version:

QTextCursor c = document.find(currentFragment.text(),0,QTextDocument::FindWholeWords);

this would generate bugs when the [Fild] or are in the beginning of the text since QTextDocument::FindWholeWords is equal to 4.

Discussion

  • aliks-os

    aliks-os - 2014-11-17

    Thank you, fixed it

     
  • aliks-os

    aliks-os - 2014-11-24
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB