[Interest] QLIneEdit Bug still valid ?

Andre Somers andre at familiesomers.nl
Tue Jul 17 08:13:18 CEST 2012


Op 17-7-2012 2:51, Constantin Makshin schreef:
> I can't say for sure, but most probably yes.
You'd have to check to see if that does not block the emission of the 
signal then after the user edited the text. Does anyone know what the 
signal emission order _should_ be in case where a user edits the line 
edit, and the validator corrects that input?

André

>
> On 07/17/2012 04:10 AM, Petric Frank wrote:
>> Hello René,
>>
>> so patching this location to pass false as additional third parameter should
>> fix the issue, right ?
>>
>> regards
>>    Petric
>>
>> Am Dienstag, 17. Juli 2012, 01:06:43 schrieb Constantin Makshin:
>>> It works incorrectly only when the validator changes the text.
>>>
>>> The cause is QLineControl::fixup() (src/gui/widgets/qlinecontrol.cpp,
>>> line 387) --- it calls QLineControl::internalSetText() with only 2
>>> parameters, omitting the one that controls emission of the textEdited()
>>> signal. And since that parameter defaults to 'true', you get what you get.
>>>
>>> On 07/16/2012 03:38 PM, R. Reucher wrote:
>>>> On Monday 16 July 2012 09:14:31 Constantin Makshin wrote:
>>>>> Functions you are interested in are (line numbers are taken from the
>>>>> code in the Git repository):
>>>>> src/gui/widgets/qlineedit.cpp, line 383 (QLineEdit::setText)
>>>>> src/gui/widgets/qlinecontrol_p.h, line 213 (QLineControl::setText)
>>>>> src/gui/widgets/qlinecontrol.cpp, line 676
>>>>> (QLineControl::internalSetText) src/gui/widgets/qlinecontrol.cpp, line
>>>>> 620 (QLineControl::finishChange)
>>>>>
>>>>> Nothing looks wrong there...
>>>> Yeah, I also recall it was working correctly when I used it last time...
>>>>
>>>> However, the example acts "wrongly", but it somehow only happens when
>>>> the validator is set. The attached example (w/o the validator) works
>>>> correctly.
>>>>
>>>> HTH, René
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120717/f41c1295/attachment.html>


More information about the Interest mailing list