LCL: small optimization

git-svn-id: trunk@29589 -
This commit is contained in:
mattias 2011-02-17 10:07:01 +00:00
parent fa186c4933
commit 2829b842e8
2 changed files with 5 additions and 5 deletions

View File

@ -410,7 +410,7 @@ begin
FStringList.Insert(Index, S);
if TQtTextEdit(FOwner.Handle).getBlockCount - Index <= 1 then
begin
if (UTF8Pos('<', S) > 0) or (UTF8Pos('>',S) > 0) then
if (System.Pos('<', S) > 0) or (System.Pos('>',S) > 0) then
begin
// workaround for qt richtext parser bug
W := GetUTF8String(S);

View File

@ -596,8 +596,8 @@ function CreateFileDialogHandle(AOpenDialog: TOpenDialog): THandle;
function GetDefaultExt: String;
begin
Result := AOpenDialog.DefaultExt;
if UTF8Pos('.', Result) = 1 then
UTF8Delete(Result, 1, 1);
if (Result<>'') and (Result[1]='.') then
System.Delete(Result, 1, 1);
end;
const
@ -788,8 +788,8 @@ FOS_FORCEPREVIEWPANEON}
function GetDefaultExt: String;
begin
Result := AOpenDialog.DefaultExt;
if UTF8Pos('.', Result) = 1 then
UTF8Delete(Result, 1, 1);
if (Result<>'') and (Result[1]='.') then
System.Delete(Result, 1, 1);
end;
var