mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 05:09:33 +02:00
LCL-Qt5: Support Wayland, improve build with QT_NO_SESSIONMANAGER. Issue #38197, patch from Marius Maximus.
git-svn-id: trunk@64193 -
This commit is contained in:
parent
fe15ff7582
commit
c3eb57a7fc
@ -336,7 +336,9 @@ QObjectH = class(TObject) end;
|
||||
QNetworkAccessManagerH = class(QObjectH) end;
|
||||
QNetworkCookieJarH = class(QObjectH) end;
|
||||
QScreenH = class(QObjectH) end;
|
||||
{$ifndef QT_NO_SESSIONMANAGER}
|
||||
QSessionManagerH = class(QObjectH) end;
|
||||
{$endif}
|
||||
QShortcutH = class(QObjectH) end;
|
||||
QSocketNotifierH = class(QObjectH) end;
|
||||
QStyleH = class(QObjectH) end;
|
||||
@ -5467,8 +5469,7 @@ type
|
||||
QDrag_actionChanged_Event = procedure (action: QtDropAction) of object cdecl;
|
||||
QDrag_targetChanged_Event = procedure (newTarget: QObjectH) of object cdecl;
|
||||
|
||||
|
||||
|
||||
{$ifndef QT_NO_SESSIONMANAGER}
|
||||
type
|
||||
QSessionManagerRestartHint = ( // QSessionManager::RestartHint (1)
|
||||
QSessionManagerRestartIfRunning, QSessionManagerRestartAnyway, QSessionManagerRestartImmediately, QSessionManagerRestartNever );
|
||||
@ -5489,6 +5490,7 @@ procedure QSessionManager_setManagerProperty(handle: QSessionManagerH; name: PWi
|
||||
procedure QSessionManager_setManagerProperty(handle: QSessionManagerH; name: PWideString; value: QStringListH); cdecl; external Qt5PasLib name 'QSessionManager_setManagerProperty2';
|
||||
function QSessionManager_isPhase2(handle: QSessionManagerH): Boolean; cdecl; external Qt5PasLib name 'QSessionManager_isPhase2';
|
||||
procedure QSessionManager_requestPhase2(handle: QSessionManagerH); cdecl; external Qt5PasLib name 'QSessionManager_requestPhase2';
|
||||
{$endif}
|
||||
|
||||
function QGuiApplication_Create(argc: PInteger; argv: PPAnsiChar; AnonParam3: Integer = ApplicationFlags): QGuiApplicationH; cdecl; external Qt5PasLib name 'QGuiApplication_Create';
|
||||
procedure QGuiApplication_Destroy(handle: QGuiApplicationH); cdecl; external Qt5PasLib name 'QGuiApplication_Destroy';
|
||||
@ -5539,9 +5541,10 @@ type
|
||||
QGuiApplication_lastWindowClosed_Event = procedure () of object cdecl;
|
||||
QGuiApplication_focusObjectChanged_Event = procedure (focusObject: QObjectH) of object cdecl;
|
||||
QGuiApplication_focusWindowChanged_Event = procedure (focusWindow: QWindowH) of object cdecl;
|
||||
{$ifndef QT_NO_SESSIONMANAGER}
|
||||
QGuiApplication_commitDataRequest_Event = procedure (sessionManager: QSessionManagerH) of object cdecl;
|
||||
QGuiApplication_saveStateRequest_Event = procedure (sessionManager: QSessionManagerH) of object cdecl;
|
||||
|
||||
{$endif}
|
||||
|
||||
|
||||
type
|
||||
@ -14809,9 +14812,10 @@ procedure QGuiApplication_hook_hook_screenAdded(handle: QGuiApplication_hookH; h
|
||||
procedure QGuiApplication_hook_hook_lastWindowClosed(handle: QGuiApplication_hookH; hook: QGuiApplication_lastWindowClosed_Event); cdecl; external Qt5PasLib name 'QGuiApplication_hook_hook_lastWindowClosed';
|
||||
procedure QGuiApplication_hook_hook_focusObjectChanged(handle: QGuiApplication_hookH; hook: QGuiApplication_focusObjectChanged_Event); cdecl; external Qt5PasLib name 'QGuiApplication_hook_hook_focusObjectChanged';
|
||||
procedure QGuiApplication_hook_hook_focusWindowChanged(handle: QGuiApplication_hookH; hook: QGuiApplication_focusWindowChanged_Event); cdecl; external Qt5PasLib name 'QGuiApplication_hook_hook_focusWindowChanged';
|
||||
{$ifndef QT_NO_SESSIONMANAGER}
|
||||
procedure QGuiApplication_hook_hook_commitDataRequest(handle: QGuiApplication_hookH; hook: QGuiApplication_commitDataRequest_Event); cdecl; external Qt5PasLib name 'QGuiApplication_hook_hook_commitDataRequest';
|
||||
procedure QGuiApplication_hook_hook_saveStateRequest(handle: QGuiApplication_hookH; hook: QGuiApplication_saveStateRequest_Event); cdecl; external Qt5PasLib name 'QGuiApplication_hook_hook_saveStateRequest';
|
||||
|
||||
{$endif}
|
||||
function QApplication_hook_Create(handle: QObjectH): QApplication_hookH; cdecl; external Qt5PasLib name 'QApplication_hook_Create';
|
||||
procedure QApplication_hook_Destroy(handle: QApplication_hookH); cdecl; external Qt5PasLib name 'QApplication_hook_Destroy';
|
||||
procedure QApplication_hook_hook_focusChanged(handle: QApplication_hookH; hook: QApplication_focusChanged_Event); cdecl; external Qt5PasLib name 'QApplication_hook_hook_focusChanged';
|
||||
|
@ -17,4 +17,7 @@
|
||||
{enable this define if you have problems when dialogs are shown behind application}
|
||||
{.$DEFINE TQTMESSAGEBOXUSEPARENT}
|
||||
{$ENDIF}
|
||||
{enable this define if you have Qt build with "QT_NO_SESSIONMANAGER" for example Somlabs i.MX8 with Wayland }
|
||||
{defined on Qt side in file "qtgui-config.h"}
|
||||
{.$DEFINE QT_NO_SESSIONMANAGER}
|
||||
{$ENDIF}
|
||||
|
@ -130,8 +130,10 @@ type
|
||||
function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; cdecl;
|
||||
procedure FocusChanged(aold: QWidgetH; anew: QWidgetH); cdecl;
|
||||
procedure OnWakeMainThread(Sender: TObject);
|
||||
{$ifndef QT_NO_SESSIONMANAGER}
|
||||
procedure SlotCommitDataRequest(sessionManager: QSessionManagerH); cdecl;
|
||||
procedure SlotSaveDataRequest(sessionManager: QSessionManagerH); cdecl;
|
||||
{$endif}
|
||||
public
|
||||
function LCLPlatform: TLCLPlatform; override;
|
||||
function GetLCLCapability(ACapability: TLCLCapability): PtrUInt; override;
|
||||
|
@ -209,7 +209,7 @@ begin
|
||||
|
||||
if not FIsLibraryInstance then
|
||||
begin
|
||||
{$IF DEFINED(HAIKU) OR DEFINED(QTOPIA)}
|
||||
{$IF DEFINED(HAIKU) OR DEFINED(QTOPIA) OR DEFINED(QT_NO_SESSIONMANAGER)}
|
||||
FAppSessionQuit := nil;
|
||||
FAppSaveSessionRequest := nil;
|
||||
{$ELSE}
|
||||
@ -1213,6 +1213,7 @@ begin
|
||||
QCoreApplication_postEvent(QCoreApplication_instance(), Event, 1 {high priority});
|
||||
end;
|
||||
|
||||
{$ifndef QT_NO_SESSIONMANAGER}
|
||||
procedure TQtWidgetSet.SlotCommitDataRequest(sessionManager: QSessionManagerH);
|
||||
cdecl;
|
||||
var
|
||||
@ -1256,6 +1257,7 @@ begin
|
||||
DebugLn('TQtWidgetSet.SlotSaveDataRequest ');
|
||||
{$ENDIF}
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
function TQtWidgetSet.LCLPlatform: TLCLPlatform;
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user