mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-21 02:04:07 +01:00
Qt: fixed build under haiku.patch by olivier, modified by me. issue #26574
git-svn-id: trunk@46340 -
This commit is contained in:
parent
1d7f7a7b0a
commit
d35a4d5554
@ -235,10 +235,15 @@ begin
|
|||||||
|
|
||||||
if not FIsLibraryInstance then
|
if not FIsLibraryInstance then
|
||||||
begin
|
begin
|
||||||
|
{$IFDEF HAIKU}
|
||||||
|
FAppSessionQuit := nil;
|
||||||
|
FAppSaveSessionRequest := nil;
|
||||||
|
{$ELSE}
|
||||||
FAppSessionQuit := QApplication_hook_create(App);
|
FAppSessionQuit := QApplication_hook_create(App);
|
||||||
QApplication_hook_hook_commitDataRequest(FAppSessionQuit, @SlotCommitDataRequest);
|
QApplication_hook_hook_commitDataRequest(FAppSessionQuit, @SlotCommitDataRequest);
|
||||||
FAppSaveSessionRequest := QApplication_hook_create(App);
|
FAppSaveSessionRequest := QApplication_hook_create(App);
|
||||||
QApplication_hook_hook_saveStateRequest(FAppSaveSessionRequest, @SlotSaveDataRequest);
|
QApplication_hook_hook_saveStateRequest(FAppSaveSessionRequest, @SlotSaveDataRequest);
|
||||||
|
{$ENDIF}
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
FAppSessionQuit := nil;
|
FAppSessionQuit := nil;
|
||||||
@ -322,6 +327,7 @@ begin
|
|||||||
// do not quit application if we are library
|
// do not quit application if we are library
|
||||||
if not FIsLibraryInstance then
|
if not FIsLibraryInstance then
|
||||||
begin
|
begin
|
||||||
|
{$IFNDEF HAIKU}
|
||||||
if Assigned(FAppSessionQuit) then
|
if Assigned(FAppSessionQuit) then
|
||||||
begin
|
begin
|
||||||
QApplication_hook_destroy(FAppSessionQuit);
|
QApplication_hook_destroy(FAppSessionQuit);
|
||||||
@ -332,6 +338,7 @@ begin
|
|||||||
QApplication_hook_destroy(FAppSaveSessionRequest);
|
QApplication_hook_destroy(FAppSaveSessionRequest);
|
||||||
FAppSaveSessionRequest := nil;
|
FAppSaveSessionRequest := nil;
|
||||||
end;
|
end;
|
||||||
|
{$ENDIF}
|
||||||
QCoreApplication_quit;
|
QCoreApplication_quit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -1097,6 +1104,7 @@ begin
|
|||||||
' errorInteraction ',dbgs(QSessionManager_allowsErrorInteraction(sessionManager)),
|
' errorInteraction ',dbgs(QSessionManager_allowsErrorInteraction(sessionManager)),
|
||||||
' phase2 ',dbgs(QSessionManager_isPhase2(sessionManager)));
|
' phase2 ',dbgs(QSessionManager_isPhase2(sessionManager)));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
{$IFNDEF HAIKU}
|
||||||
// if session manager does not allow interaction, then we close app without any intf calls
|
// if session manager does not allow interaction, then we close app without any intf calls
|
||||||
if QSessionManager_allowsInteraction(sessionManager) then
|
if QSessionManager_allowsInteraction(sessionManager) then
|
||||||
begin
|
begin
|
||||||
@ -1118,6 +1126,7 @@ begin
|
|||||||
QSessionManager_release(sessionManager);
|
QSessionManager_release(sessionManager);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TQtWidgetSet.SlotSaveDataRequest(sessionManager: QSessionManagerH);
|
procedure TQtWidgetSet.SlotSaveDataRequest(sessionManager: QSessionManagerH);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user