mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 18:39:28 +02:00
IDE: Recognize warnings from unknown compiler messages.
This commit is contained in:
parent
3c5ebb53bb
commit
0db4149e93
@ -58,6 +58,7 @@ type
|
|||||||
TCompiler = class(TObject)
|
TCompiler = class(TObject)
|
||||||
private
|
private
|
||||||
FOnCmdLineCreate : TOnCmdLineCreate;
|
FOnCmdLineCreate : TOnCmdLineCreate;
|
||||||
|
procedure WriteError(const Msg: string);
|
||||||
public
|
public
|
||||||
constructor Create;
|
constructor Create;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -65,7 +66,6 @@ type
|
|||||||
const WorkingDir, CompilerFilename, CompilerParams: string;
|
const WorkingDir, CompilerFilename, CompilerParams: string;
|
||||||
BuildAll, SkipLinking, SkipAssembler, CurrentDirectoryIsTestDir: boolean;
|
BuildAll, SkipLinking, SkipAssembler, CurrentDirectoryIsTestDir: boolean;
|
||||||
const aCompileHint: string): TModalResult;
|
const aCompileHint: string): TModalResult;
|
||||||
procedure WriteError(const Msg: string);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// Following classes are for compiler options parsed from "fpc -h" and "fpc -i".
|
// Following classes are for compiler options parsed from "fpc -h" and "fpc -i".
|
||||||
|
@ -1565,12 +1565,17 @@ end;
|
|||||||
function TIDEFPCParser.CheckForUnspecificStdErr(p: PChar): boolean;
|
function TIDEFPCParser.CheckForUnspecificStdErr(p: PChar): boolean;
|
||||||
var
|
var
|
||||||
MsgLine: TMessageLine;
|
MsgLine: TMessageLine;
|
||||||
|
s: string;
|
||||||
begin
|
begin
|
||||||
if not fMsgIsStdErr then exit(false);
|
if not fMsgIsStdErr then exit(false);
|
||||||
Result:=true;
|
Result:=true;
|
||||||
MsgLine:=CreateMsgLine;
|
MsgLine:=CreateMsgLine;
|
||||||
MsgLine.SubTool:=SubToolFPC;
|
MsgLine.SubTool:=SubToolFPC;
|
||||||
MsgLine.Urgency:=mluError;
|
s:=p;
|
||||||
|
if Pos('warning',s)>0 then
|
||||||
|
MsgLine.Urgency:=mluWarning
|
||||||
|
else
|
||||||
|
MsgLine.Urgency:=mluError;
|
||||||
MsgLine.Msg:=p;
|
MsgLine.Msg:=p;
|
||||||
AddMsgLine(MsgLine);
|
AddMsgLine(MsgLine);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user