mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 22:20:25 +02:00
Carbon,Cocoa,QtCocoa: replaced outdated LSOpenCFURLRef.Now qtcocoa 64bit can be build w/o problems.Patch by Karl-Michael Schindler. issue #26890
git-svn-id: trunk@47654 -
This commit is contained in:
parent
28bef814ed
commit
bde2979aa0
@ -3,15 +3,17 @@
|
||||
// Open a given URL with the default browser
|
||||
function OpenURL(AURL: String): Boolean;
|
||||
var
|
||||
url: CFURLRef;
|
||||
url: NSURL;
|
||||
ws: NSWorkspace;
|
||||
begin
|
||||
Result := False;
|
||||
if AURL = '' then
|
||||
Exit(False);
|
||||
url := CFURLCreateWithBytes(nil, @AURL[1], Length(AURL), kCFStringEncodingUTF8, nil);
|
||||
url := NSURL.URLWithString(NSStr(@AURL[1]));
|
||||
if not Assigned(url) then
|
||||
Exit(False);
|
||||
Result := LSOpenCFURLRef(url, nil) = 0;
|
||||
CFRelease(url);
|
||||
ws := NSWorkspace.sharedWorkspace;
|
||||
Result := ws.openURL(url);
|
||||
end;
|
||||
|
||||
// Open a document with the default application associated with it in the system
|
||||
|
@ -40,12 +40,16 @@ unit LCLIntf;
|
||||
{$mode objfpc}{$H+}
|
||||
{$inline on}
|
||||
|
||||
{$IFDEF DARWIN}
|
||||
{$modeswitch objectivec1}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
{$IFDEF Windows}Windows, ShellApi,{$ENDIF}
|
||||
{$IFDEF UNIX}Unix, {$ENDIF}
|
||||
{$IFDEF Darwin}MacOSAll, {$ENDIF}
|
||||
{$IFDEF Darwin}MacOSAll, CocoaAll,{$ENDIF}
|
||||
Types, Math, Classes, SysUtils, LCLType, LCLProc, GraphType, InterfaceBase,
|
||||
LResources, FileUtil, UTF8Process, Maps, LMessages, LazUTF8, lazutf8sysutils, LCLStrConsts;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user