Sign in Join

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

Mailing lists / qt / 2008-01

QtLowEventPriority and QCoreApplication_postEvent

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Paul Ishenin

Hello, Items specific to the Qt widget set

I am wondering why QtLowEventPriority defined as unsigned integer though QCoreApplication_postEvent() has third argument as signed integer?

Den, can you make this things more compatible :) ?

Best regards,
Paul Ishenin.

Reply by email

Den Jean
to Paul Ishenin
pm Paul Ishenin wrote
Den, can you make this things more compatible :) ?

Made more and less compatible :-)
V.57

The enum mentioned defined in qnamespace is technically not related to the parameter type of the method mentioned defined in qcoreapplication.h

    static void postEvent(QObject *receiver, QEvent *event, int priority);

-> priority is defined as int and not as the enum EventPriority

qnamespace.h:
enum EventPriority {
HighEventPriority = 1,
NormalEventPriority = 0,
LowEventPriority = -1

On the other hand:

The pascal line in qt4.pas is generated by the output of c++ program where I always use printf with a %u (always unsigned output)

    QtLowEventPriority = 4294967295 { $ffffffff };

I only use this c++ program technique if I cannot parse one of the enum values (use of named constants e.g.).
But here it should have been easy to parse all lines.

The parser was broken. -> Fixed it.

This changed the type of some enums like QEventType.

Redefine your const LCLQt_Destroy like this to fix your code.

const
  LCLQt_Destroy = QEventType($1000);

Congrats on all the LCL/Qt work. Amazing to see it advance. Did you know that the File Selection Dialog does not allow to select a Directory. Lazarus->Environment Options->Set Lazarus or FPC Directory via Dialog. Many first time users may stumble on this.

regards,

Den Jean

Reply by email