fixed illegal ancestor search

git-svn-id: trunk@5415 -
This commit is contained in:
mattias 2004-04-19 10:06:56 +00:00
parent 2d80402433
commit 9fbcc69584
6 changed files with 27 additions and 9 deletions

View File

@ -2924,16 +2924,23 @@ begin
ReadNextAtom; // read keyword 'class', 'object', 'interface', 'dispinterface'
if UpAtomIs('PACKED') then ReadNextAtom;
ReadNextAtom;
ClassIdentNode:=ClassNode.Parent;
if AtomIsChar('(') then begin
ReadNextAtom;
if not AtomIsIdentifier(false) then exit;
// ancestor name found
AncestorAtom:=CurPos;
SearchBaseClass:=false;
if (ClassIdentNode<>nil)
and (CompareIdentifiers(@Src[CurPos.StartPos],
@Src[ClassIdentNode.StartPos])=0)
then begin
MoveCursorToCleanPos(CurPos.StartPos);
RaiseException('ancestor has same name as class');
end;
end else begin
// no ancestor class specified
// check class name
ClassIdentNode:=ClassNode.Parent;
if (ClassIdentNode=nil) or (ClassIdentNode.Desc<>ctnTypeDefinition) then
begin
MoveCursorToNodeStart(ClassNode);
@ -2954,6 +2961,7 @@ begin
writeln('[TFindDeclarationTool.FindAncestorOfClass] ',
' search ancestor class = ',GetAtom);
{$ENDIF}
// search ancestor class context
CurPos.StartPos:=CurPos.EndPos;
Params.Save(OldInput);
@ -3062,6 +3070,7 @@ var
OldInput: TFindDeclarationInput;
begin
Result:=false;
if not (fdfSearchInAncestors in Params.Flags) then exit;
Result:=FindAncestorOfClass(ClassNode,Params,true);
if not Result then exit;

View File

@ -1161,6 +1161,7 @@ begin
Add('CONTINUE' ,{$ifdef FPC}@{$endif}AllwaysTrue);
// only fpc 1.1
Add('LONGWORD' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('WORD' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('LONGINT' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('COPY' ,{$ifdef FPC}@{$endif}AllwaysTrue);
end;

View File

@ -2554,7 +2554,7 @@ var
MessI : TLMEnter;
begin
Result := CallBackDefaultReturn;
//writeln('[gtkFocusInNotifyCB] ',TObject(data).ClassName);
//writeln('[gtkFocusInNotifyCB] ',TControl(data).Name,':',TObject(data).ClassName);
EventTrace ('FocusInNotify (alias Enter)', data);
if (Event=nil) then ;
@ -2573,7 +2573,7 @@ var
MessI : TLMExit;
begin
Result := CallBackDefaultReturn;
//writeln('[gtkFocusOutNotifyCB] ',TObject(data).ClassName);
//writeln('[gtkFocusOutNotifyCB] ',TControl(data).Name,':',TObject(data).ClassName);
EventTrace ('FocusOutNotify (alias Exit)', data);
if (Event=nil) then ;
@ -3070,6 +3070,9 @@ end;
{ =============================================================================
$Log$
Revision 1.227 2004/04/19 10:06:56 mattias
fixed illegal ancestor search
Revision 1.226 2004/04/11 18:58:25 micha
fix (lm_)setcursor changes for gtk target

View File

@ -4734,26 +4734,26 @@ begin
GDK_KEY_RELEASE_MASK);
end;
LM_MONTHCHANGED : //calendar
LM_MONTHCHANGED: //calendar
Begin
ConnectSenderSignal(gObject, 'month-changed', @gtkmonthchanged);
ConnectSenderSignal(gObject, 'prev-month', @gtkmonthchanged);
ConnectSenderSignal(gObject, 'next-month', @gtkmonthchanged);
end;
LM_PRESSED :
LM_PRESSED:
begin
Assert(False, 'Trace:OBSOLETE: [TGtkWidgetSet.SetCallback] LM_PRESSED');
ConnectSenderSignal(gObject, 'pressed', @gtkpressedCB);
end;
LM_RELEASED :
LM_RELEASED:
begin
Assert(False, 'Trace:OBSOLETE: [TGtkWidgetSet.SetCallback] LM_RELEASED');
ConnectSenderSignal(gObject, 'released', @gtkreleasedCB);
end;
LM_MOVECURSOR :
LM_MOVECURSOR:
begin
ConnectSenderSignal(gFixed, 'move-cursor', @gtkmovecursorCB);
end;
@ -9404,6 +9404,9 @@ end;
{ =============================================================================
$Log$
Revision 1.497 2004/04/19 10:06:56 mattias
fixed illegal ancestor search
Revision 1.496 2004/04/19 09:30:04 marc
* Fixed compilation for gtk2

View File

@ -117,7 +117,7 @@ else
SrcPatch=fpcsrc-patch
# patch sources
patch -p2 -d $TmpDir/ < $SrcPatch
patch -l -p2 -d $TmpDir/ -i $SrcPatch
# change spec file
cat $SpecFile | \
@ -148,6 +148,8 @@ else
fi
cd -
exit
#----------------------------------------------------------------------------
# compile
#----------------------------------------------------------------------------

View File

@ -16,7 +16,7 @@ if [ "x$FPCRPM" = "x" ]; then
fi
Date=$Year$Month$Day
LazVersion=0.9.1.2
LazVersion=0.9.1.3
LazRelease=`echo $FPCRPM | sed -e 's/-/_/g'`
SrcTGZ=lazarus-$Date.tgz
TmpDir=/tmp/lazarus$LazVersion