mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 16:19:13 +02:00
MG: fixed codetools abort
git-svn-id: trunk@3612 -
This commit is contained in:
parent
d4b3937a3a
commit
fb4ff8c25c
@ -337,10 +337,6 @@ var CodeToolBoss: TCodeToolManager;
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
|
||||||
type
|
|
||||||
ECodeToolAbort = Exception;
|
|
||||||
|
|
||||||
|
|
||||||
function CompareCodeToolMainSources(Data1, Data2: Pointer): integer;
|
function CompareCodeToolMainSources(Data1, Data2: Pointer): integer;
|
||||||
var
|
var
|
||||||
Src1, Src2: integer;
|
Src1, Src2: integer;
|
||||||
@ -598,10 +594,6 @@ begin
|
|||||||
fErrorCode:=ErrorSrcTool.ErrorPosition.Code;
|
fErrorCode:=ErrorSrcTool.ErrorPosition.Code;
|
||||||
fErrorColumn:=ErrorSrcTool.ErrorPosition.X;
|
fErrorColumn:=ErrorSrcTool.ErrorPosition.X;
|
||||||
fErrorLine:=ErrorSrcTool.ErrorPosition.Y;
|
fErrorLine:=ErrorSrcTool.ErrorPosition.Y;
|
||||||
end else if (AnException is ECodeToolAbort) then begin
|
|
||||||
// abort
|
|
||||||
FErrorMsg:='Abort';
|
|
||||||
fErrorCode:=nil;
|
|
||||||
end else begin
|
end else begin
|
||||||
// unknown exception
|
// unknown exception
|
||||||
FErrorMsg:=AnException.ClassName+': '+FErrorMsg;
|
FErrorMsg:=AnException.ClassName+': '+FErrorMsg;
|
||||||
@ -1549,7 +1541,7 @@ end;
|
|||||||
|
|
||||||
function TCodeToolManager.OnParserProgress(Tool: TCustomCodeTool): boolean;
|
function TCodeToolManager.OnParserProgress(Tool: TCustomCodeTool): boolean;
|
||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=true;
|
||||||
if not FAbortable then exit;
|
if not FAbortable then exit;
|
||||||
if not Assigned(OnCheckAbort) then exit;
|
if not Assigned(OnCheckAbort) then exit;
|
||||||
Result:=not OnCheckAbort();
|
Result:=not OnCheckAbort();
|
||||||
@ -1557,7 +1549,7 @@ end;
|
|||||||
|
|
||||||
function TCodeToolManager.OnScannerProgress(Sender: TLinkScanner): boolean;
|
function TCodeToolManager.OnScannerProgress(Sender: TLinkScanner): boolean;
|
||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=true;
|
||||||
if not FAbortable then exit;
|
if not FAbortable then exit;
|
||||||
if not Assigned(OnCheckAbort) then exit;
|
if not Assigned(OnCheckAbort) then exit;
|
||||||
Result:=not OnCheckAbort();
|
Result:=not OnCheckAbort();
|
||||||
|
22
lcl/forms.pp
22
lcl/forms.pp
@ -225,14 +225,16 @@ type
|
|||||||
|
|
||||||
TCloseEvent = procedure(Sender: TObject; var Action: TCloseAction) of object;
|
TCloseEvent = procedure(Sender: TObject; var Action: TCloseAction) of object;
|
||||||
TCloseQueryEvent = procedure(Sender : TObject; var CanClose : boolean) of object;
|
TCloseQueryEvent = procedure(Sender : TObject; var CanClose : boolean) of object;
|
||||||
|
|
||||||
TFormStateType = (
|
TFormStateType = (
|
||||||
fsCreating,
|
fsCreating, // initializing (form streaming)
|
||||||
fsVisible,
|
fsVisible, // form should be shown
|
||||||
fsShowing,
|
fsShowing,
|
||||||
fsModal,
|
fsModal, // form is modal
|
||||||
fsCreatedMDIChild
|
fsCreatedMDIChild
|
||||||
);
|
);
|
||||||
TFormState = set of TFormStateType;
|
TFormState = set of TFormStateType;
|
||||||
|
|
||||||
TModalResult = low(Integer)..high(Integer);
|
TModalResult = low(Integer)..high(Integer);
|
||||||
|
|
||||||
TCustomForm = class(TScrollingWinControl)
|
TCustomForm = class(TScrollingWinControl)
|
||||||
@ -478,6 +480,20 @@ type
|
|||||||
HintData: Pointer;
|
HintData: Pointer;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
TCMHintShow = record
|
||||||
|
Msg: Cardinal;
|
||||||
|
Reserved: Integer;
|
||||||
|
HintInfo: PHintInfo;
|
||||||
|
Result: Integer;
|
||||||
|
end;
|
||||||
|
|
||||||
|
TCMHintShowPause = record
|
||||||
|
Msg: Cardinal;
|
||||||
|
WasActive: Integer;
|
||||||
|
Pause: PInteger;
|
||||||
|
Result: Integer;
|
||||||
|
end;
|
||||||
|
|
||||||
TAppHintTimerType = (ahtNone, ahtShowHint, ahtHideHint, ahtReshowHint);
|
TAppHintTimerType = (ahtNone, ahtShowHint, ahtHideHint, ahtReshowHint);
|
||||||
|
|
||||||
TShowHintEvent = procedure (var HintStr: string; var CanShow: Boolean;
|
TShowHintEvent = procedure (var HintStr: string; var CanShow: Boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user