"Show Class/Proc hint" feature gets confused with 2 method declarations inside {$IFDEF} {$ELSE} {$ENDIF}
Original Reporter info from Mantis: JuhaManninen @JuhaManninen
-
Reporter name: Juha Manninen
Original Reporter info from Mantis: JuhaManninen @JuhaManninen
- Reporter name: Juha Manninen
Description:
For example lcl/interfaces/qt/qtwidgets has lines:
{$IFDEF FPC_HAS_CONSTREF}
function TQtWidget.QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
{$ELSE}
function TQtWidget.QueryInterface(const iid: tguid; out obj): longint; stdcall;
{$ENDIF}
Later in code the active (upper) declaration :
function TQtWidget.QueryInterface(constref ...
is shown at the top of source editor, as if all the following code was a sub-function inside it.
P.S.
IIRC "FPC_HAS_CONSTREF" is defined in FPC versions that Lazarus supports (2.6.x) and the IFDEF should be removed.
However this editor bug is not related to "FPC_HAS_CONSTREF". I remember seeing it elsewhere, too.
Steps to reproduce:
Open lcl/interfaces/qt/qtwidgets.pas in Lazarus source editor and move to near the end of file.
Make sure the feature "Show Class/Proc hint" is enabled in IDE options.
Mantis conversion info:
- Mantis ID: 25479
- Build: latest
- Version: 1.3 (SVN)