Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / qt / 2011-03

Warning about wrong char code with QT bindings

5 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Juha Manninen

Zeljan:

About r.29822.
In Search dialog, when pressing Enter you get a DebugLn warning (changed from Assertion failure) about key not being LM_SYSCHAR. It happens only with QT.

Can you please see if it is something to worry about.

Juha

zeljko
to Juha Manninen
Juha Manninen wrote 8 lines
Zeljan: About r.29822. In Search dialog, when pressing Enter you get a DebugLn warning (changed from Assertion failure) about key not being LM_SYSCHAR. It happens only with QT. Can you please see if it is something to worry about.
Does Paul's mail to lazdevel explains this problem ? You introduced (probably)
a lot of new bugs with assert() cleanups.
Like
if Something then
  Assert()
if SomeCode then
begin
end;

Now looks like

if Something then
  // DebugLn()
if SomeCode then
begin
end;
Show quoted text 7 lines
Juha _______________________________________________ Qt mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/qt
Juha Manninen
to zeljko

zeljko kirjoitti maanantai 14 maaliskuu 2011 09:06:29:

Show quoted text 12 lines
On Sunday 13 of March 2011 22:33:39 Juha Manninen wrote: > Zeljan: > > About r.29822. > In Search dialog, when pressing Enter you get a DebugLn warning (changed > from Assertion failure) about key not being LM_SYSCHAR. > It happens only with QT. > > Can you please see if it is something to worry about. Does Paul's mail to lazdevel explains this problem ? You introduced (probably) a lot of new bugs with assert() cleanups.

Yes sorry. I went through the changes and fixed the remaining issues.

The LM_SYSCHAR issue is different. It was a "real" assertion, not one of those "Trace:" assertions. I changed it to a "if ... then" test + a DebugLn so that I don't get Assert failures all the time. I am planning to build Lazarus with assertions enabled, yes.

The check can be useless and there is no error. Then it can be deleted. If the test is valid then QT binding key codes have a problem.

With GTK2 I don't get any warning.

Juha

zeljko
to Juha Manninen
Juha Manninen wrote 23 lines
zeljko kirjoitti maanantai 14 maaliskuu 2011 09:06:29: > On Sunday 13 of March 2011 22:33:39 Juha Manninen wrote: > > Zeljan: > > > > About r.29822. > > In Search dialog, when pressing Enter you get a DebugLn warning > > (changed from Assertion failure) about key not being LM_SYSCHAR. > > It happens only with QT. > > > > Can you please see if it is something to worry about. > > Does Paul's mail to lazdevel explains this problem ? You introduced > (probably) a lot of new bugs with assert() cleanups. Yes sorry. I went through the changes and fixed the remaining issues. The LM_SYSCHAR issue is different. It was a "real" assertion, not one of those "Trace:" assertions. I changed it to a "if ... then" test + a DebugLn so that I don't get Assert failures all the time. I am planning to build Lazarus with assertions enabled, yes. The check can be useless and there is no error. Then it can be deleted. If the test is valid then QT binding key codes have a problem.

no time to dig into atm.

zeljko

zeljko
to Juha Manninen: Zeljan: About r.29822. In Search dialog, when pressing Enter you get a DebugLn warning…
Juha Manninen wrote 8 lines
Zeljan: About r.29822. In Search dialog, when pressing Enter you get a DebugLn warning (changed from Assertion failure) about key not being LM_SYSCHAR. It happens only with QT. Can you please see if it is something to worry about.

Well...yes, or qt is wrong or LCL is wrong :)
Qt sends LM_CHAR instead of LM_SYSCHAR when there's no syskey pressed (Alt, Ctrl etc)
I've readed http://wiki.freepascal.org/LCL_Key_Handling and there's no explanation about difference between LM_CHAR and LM_SYSCHAR (and when each of them should be sended and why).
So when I get that informations, that part will be fixed in a second.

zeljko