Sign in Join

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

Mailing lists / qt / 2009-06

Lazarus build problem is reported at russian forum

4 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.

Zeljan, I suppose you are testing only with Qt 4.5?

Please check next errors:

qtwidgets.pas(1418,44) Error: Identifier not found "QPaletteToolTipBase"
qtwidgets.pas(1419,42) Error: Identifier not found "QPaletteToolTipText"
qtwidgets.pas(10074) Fatal: There were 2 errors compiling module, stopping
Best regards, Paul Ishenin.
zeljko
to Paul Ishenin
Paul Ishenin wrote 9 lines
Hello, Items specific to the Qt widget set. Zeljan, I suppose you are testing only with Qt 4.5? Please check next errors: qtwidgets.pas(1418,44) Error: Identifier not found "QPaletteToolTipBase" qtwidgets.pas(1419,42) Error: Identifier not found "QPaletteToolTipText" qtwidgets.pas(10074) Fatal: There were 2 errors compiling module, stopping

Fixed in r20567

zeljko

Paul Ishenin
to zeljko
zeljko wrote
Fixed in r20567

Thanks.

Btw, regards that code:

procedure TQtWidget.InitializeWidget;
begin
   // default color roles
   if InheritsFrom(TQtAbstractButton) then
...

Why do you use InheritsFrom? Why not to call some virtual method and otherride it in TQtAbstractButton, TQtHintWindow, ...?

Imo it is not a good way at all to compare in ancestor class inheritance from descendant and execute descendant code. And moreover various "InheritsFrom", "is", "as", '.ClassType = TSomeClass' links all that classes into executable even if they are not used in real.

Can you refactor this piece of code please?

Best regards,
Paul Ishenin.

zeljko
to Paul Ishenin
Paul Ishenin wrote 21 lines
zeljko wrote: > Fixed in r20567 Thanks. Btw, regards that code: procedure TQtWidget.InitializeWidget; begin // default color roles if InheritsFrom(TQtAbstractButton) then ... Why do you use InheritsFrom? Why not to call some virtual method and otherride it in TQtAbstractButton, TQtHintWindow, ...? Imo it is not a good way at all to compare in ancestor class inheritance from descendant and execute descendant code. And moreover various "InheritsFrom", "is", "as", '.ClassType = TSomeClass' links all that classes into executable even if they are not used in real.

I had big problems with MacOSX (lost at least 2 days with this problem) until discovered qt bugs, so I reduced patch size as much as I can, so I can better track what's up (the original patch contained code as I mention below - without any InheritsFrom() or ClassType=XXX).
Now when it works correct it can be refactored (that's the reason why we have WidgetColorRole & TextRole properties) - each widget creation MUST initialize it's own default WidgetRole & TextRole.
My general idea about palette rework is that default WidgetRole & TextRole should be in each CreateWidget() for widgets which aren't QPaletteWindow.

Can you refactor this piece of code please?

yes