mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-10-31 13:21:29 +01:00 
			
		
		
		
	IDE: compiler options: when warn about paths give hint where to find the inherited paths
git-svn-id: trunk@51758 -
This commit is contained in:
		
							parent
							
								
									53d48e17bf
								
							
						
					
					
						commit
						aa1dbeba55
					
				| @ -76,7 +76,7 @@ implementation | |||||||
| const | const | ||||||
|   cBrowseBtnSize = 50; |   cBrowseBtnSize = 50; | ||||||
| 
 | 
 | ||||||
| function CheckSearchPath(const Context, ExpandedPath: string; Level: TCheckCompileOptionsMsgLvl): boolean; | function CheckSearchPath(const Context, ExpandedPath: string; Level: TCheckCompileOptionsMsgLvl; Hint: string = ''): boolean; | ||||||
| var | var | ||||||
|   CurPath: string; |   CurPath: string; | ||||||
|   p: integer; |   p: integer; | ||||||
| @ -85,13 +85,15 @@ var | |||||||
| begin | begin | ||||||
|   Result := False; |   Result := False; | ||||||
| 
 | 
 | ||||||
|  |   if Hint<>'' then Hint:=#13#13+Hint; | ||||||
|  | 
 | ||||||
|   // check for * |   // check for * | ||||||
|   if Ord(Level) <= Ord(ccomlHints) then |   if Ord(Level) <= Ord(ccomlHints) then | ||||||
|   begin |   begin | ||||||
|     if System.Pos('*', ExpandedPath) > 0 then |     if System.Pos('*', ExpandedPath) > 0 then | ||||||
|     begin |     begin | ||||||
|       if IDEMessageDialog(lisHint, Format( |       if IDEMessageDialog(lisHint, Format( | ||||||
|         lisTheContainsAStarCharacterLazarusUsesThisAsNormalCh, [Context, LineEnding]), |         lisTheContainsAStarCharacterLazarusUsesThisAsNormalCh, [Context, LineEnding])+Hint, | ||||||
|         mtWarning, [mbOK, mbCancel]) <> mrOk then |         mtWarning, [mbOK, mbCancel]) <> mrOk then | ||||||
|         exit; |         exit; | ||||||
|     end; |     end; | ||||||
| @ -110,7 +112,7 @@ begin | |||||||
|         if not DirPathExistsCached(CurPath) then |         if not DirPathExistsCached(CurPath) then | ||||||
|         begin |         begin | ||||||
|           if IDEMessageDialog(lisCCOWarningCaption, Format( |           if IDEMessageDialog(lisCCOWarningCaption, Format( | ||||||
|             lisTheContainsANotExistingDirectory, [Context, LineEnding, CurPath]), |             lisTheContainsANotExistingDirectory, [Context, LineEnding, CurPath])+Hint, | ||||||
|             mtWarning, [mbIgnore, mbCancel]) <> mrIgnore then |             mtWarning, [mbIgnore, mbCancel]) <> mrIgnore then | ||||||
|             Exit; |             Exit; | ||||||
|         end; |         end; | ||||||
| @ -130,7 +132,7 @@ begin | |||||||
|         ErrorMsg := SpecialCharsToStr(HasChars); |         ErrorMsg := SpecialCharsToStr(HasChars); | ||||||
|       if ErrorMsg <> '' then |       if ErrorMsg <> '' then | ||||||
|       begin |       begin | ||||||
|         if IDEMessageDialog(lisCCOWarningCaption, Context + LineEnding + ErrorMsg, |         if IDEMessageDialog(lisCCOWarningCaption, Context + LineEnding + ErrorMsg+Hint, | ||||||
|           mtWarning, [mbOK, mbCancel]) <> mrOk then |           mtWarning, [mbOK, mbCancel]) <> mrOk then | ||||||
|           exit; |           exit; | ||||||
|       end; |       end; | ||||||
| @ -162,7 +164,7 @@ var | |||||||
|     if NewParsedOutputDir<>'' then |     if NewParsedOutputDir<>'' then | ||||||
|       p:=RemoveSearchPaths(p,NewParsedOutputDir); |       p:=RemoveSearchPaths(p,NewParsedOutputDir); | ||||||
| 
 | 
 | ||||||
|     Result := CheckSearchPath(Context, p, Level); |     Result := CheckSearchPath(Context, p, Level, lisHintClickOnShowOptionsToFindOutWhereInheritedPaths); | ||||||
|   end; |   end; | ||||||
| 
 | 
 | ||||||
| var | var | ||||||
|  | |||||||
| @ -2396,6 +2396,8 @@ resourcestring | |||||||
|   lisSAMUnableToShowAbstractMethodsOfTheCurrentClassBecaus = 'Unable to show ' |   lisSAMUnableToShowAbstractMethodsOfTheCurrentClassBecaus = 'Unable to show ' | ||||||
|     +'abstract methods of the current class, because'; |     +'abstract methods of the current class, because'; | ||||||
|   lisCCOWarningCaption = 'Warning'; |   lisCCOWarningCaption = 'Warning'; | ||||||
|  |   lisHintClickOnShowOptionsToFindOutWhereInheritedPaths = 'Hint: Click on "' | ||||||
|  |     +'Show Options" to find out where inherited paths are coming from.'; | ||||||
|   lisFileNotFound5 = 'File not found:%s%s'; |   lisFileNotFound5 = 'File not found:%s%s'; | ||||||
|   lisMovingTheseUnitsWillBreakTheirUsesSectionsSeeMessa = 'Moving these units ' |   lisMovingTheseUnitsWillBreakTheirUsesSectionsSeeMessa = 'Moving these units ' | ||||||
|     +'will break their uses sections. See Messages window for details.'; |     +'will break their uses sections. See Messages window for details.'; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 mattias
						mattias