Advertisement
ReillyBrogan

Untitled

Mar 25th, 2024
33
0
73 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.33 KB | None | 0 0
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: Reilly Brogan <reilly@reillybrogan.com>
  3. Date: Mon, 25 Mar 2024 10:33:35 -0500
  4. Subject: [PATCH] Support Wayland appId
  5.  
  6. ---
  7. lcl/interfaces/qt5/cbindings/qt5.pas | 1 +
  8. lcl/interfaces/qt5/cbindings/src/qguiapplication_c.cpp | 7 +++++++
  9. lcl/interfaces/qt5/cbindings/src/qguiapplication_c.h | 1 +
  10. lcl/interfaces/qt5/qt56.pas | 1 +
  11. lcl/interfaces/qt6/cbindings/src/qguiapplication_c.cpp | 7 +++++++
  12. lcl/interfaces/qt6/cbindings/src/qguiapplication_c.h | 1 +
  13. lcl/interfaces/qt6/qt62.pas | 1 +
  14. 7 files changed, 19 insertions(+)
  15.  
  16. diff --git a/lcl/interfaces/qt5/cbindings/qt5.pas b/lcl/interfaces/qt5/cbindings/qt5.pas
  17. index f7a35f5a08..ad0951f0eb 100644
  18. --- a/lcl/interfaces/qt5/cbindings/qt5.pas
  19. +++ b/lcl/interfaces/qt5/cbindings/qt5.pas
  20. @@ -5475,6 +5475,7 @@ function QGuiApplication_Create(argc: PInteger; argv: PPAnsiChar; AnonParam3: In
  21. procedure QGuiApplication_Destroy(handle: QGuiApplicationH); cdecl; external Qt5PasLib name 'QGuiApplication_Destroy';
  22. procedure QGuiApplication_setApplicationDisplayName(name: PWideString); cdecl; external Qt5PasLib name 'QGuiApplication_setApplicationDisplayName';
  23. procedure QGuiApplication_applicationDisplayName(retval: PWideString); cdecl; external Qt5PasLib name 'QGuiApplication_applicationDisplayName';
  24. +procedure QGuiApplication_setDesktopFileName(name: PWideString); cdecl; external Qt5PasLib name 'QGuiApplication_setDesktopFileName';
  25. procedure QGuiApplication_allWindows(retval: PPtrIntArray); cdecl; external Qt5PasLib name 'QGuiApplication_allWindows';
  26. procedure QGuiApplication_topLevelWindows(retval: PPtrIntArray); cdecl; external Qt5PasLib name 'QGuiApplication_topLevelWindows';
  27. function QGuiApplication_topLevelAt(pos: PQtPoint): QWindowH; cdecl; external Qt5PasLib name 'QGuiApplication_topLevelAt';
  28. diff --git a/lcl/interfaces/qt5/cbindings/src/qguiapplication_c.cpp b/lcl/interfaces/qt5/cbindings/src/qguiapplication_c.cpp
  29. index d92049c2c1..d702bd71d6 100644
  30. --- a/lcl/interfaces/qt5/cbindings/src/qguiapplication_c.cpp
  31. +++ b/lcl/interfaces/qt5/cbindings/src/qguiapplication_c.cpp
  32. @@ -35,6 +35,13 @@ void QGuiApplication_applicationDisplayName(PWideString retval)
  33. copyQStringToPWideString(t_retval, retval);
  34. }
  35.  
  36. +void QGuiApplication_setDesktopFileName(PWideString name)
  37. +{
  38. + QString t_name;
  39. + copyPWideStringToQString(name, t_name);
  40. + QGuiApplication::setDesktopFileName(t_name);
  41. +}
  42. +
  43. Qt::ApplicationState QGuiApplication_applicationState()
  44. {
  45. return (Qt::ApplicationState) QGuiApplication::applicationState();
  46. diff --git a/lcl/interfaces/qt5/cbindings/src/qguiapplication_c.h b/lcl/interfaces/qt5/cbindings/src/qguiapplication_c.h
  47. index 0587d8a371..c4669c05cd 100644
  48. --- a/lcl/interfaces/qt5/cbindings/src/qguiapplication_c.h
  49. +++ b/lcl/interfaces/qt5/cbindings/src/qguiapplication_c.h
  50. @@ -18,6 +18,7 @@
  51. C_EXPORT QGuiApplicationH QGuiApplication_Create(int* argc, char** argv, int AnonParam3);
  52. C_EXPORT void QGuiApplication_Destroy(QGuiApplicationH handle);
  53. C_EXPORT void QGuiApplication_setApplicationDisplayName(PWideString name);
  54. +C_EXPORT void QGuiApplication_setDesktopFileName(PWideString name);
  55. C_EXPORT void QGuiApplication_applicationDisplayName(PWideString retval);
  56. C_EXPORT Qt::ApplicationState QGuiApplication_applicationState();
  57. C_EXPORT void QGuiApplication_allWindows(PPtrIntArray retval);
  58. diff --git a/lcl/interfaces/qt5/qt56.pas b/lcl/interfaces/qt5/qt56.pas
  59. index cafda5eebb..0b0e3eed98 100644
  60. --- a/lcl/interfaces/qt5/qt56.pas
  61. +++ b/lcl/interfaces/qt5/qt56.pas
  62. @@ -5505,6 +5505,7 @@ function QGuiApplication_Create(argc: PInteger; argv: PPAnsiChar; AnonParam3: In
  63. procedure QGuiApplication_Destroy(handle: QGuiApplicationH); cdecl; external Qt5PasLib name 'QGuiApplication_Destroy';
  64. procedure QGuiApplication_setApplicationDisplayName(name: PWideString); cdecl; external Qt5PasLib name 'QGuiApplication_setApplicationDisplayName';
  65. procedure QGuiApplication_applicationDisplayName(retval: PWideString); cdecl; external Qt5PasLib name 'QGuiApplication_applicationDisplayName';
  66. +procedure QGuiApplication_setDesktopFileName(name: PWideString); cdecl; external Qt5PasLib name 'QGuiApplication_setDesktopFileName';
  67. function QGuiApplication_applicationState(): QtApplicationState; cdecl; external Qt5PasLib name 'QGuiApplication_applicationState';
  68. procedure QGuiApplication_allWindows(retval: PPtrIntArray); cdecl; external Qt5PasLib name 'QGuiApplication_allWindows';
  69. procedure QGuiApplication_topLevelWindows(retval: PPtrIntArray); cdecl; external Qt5PasLib name 'QGuiApplication_topLevelWindows';
  70. diff --git a/lcl/interfaces/qt6/cbindings/src/qguiapplication_c.cpp b/lcl/interfaces/qt6/cbindings/src/qguiapplication_c.cpp
  71. index 757f41fd9f..e25fb3695e 100644
  72. --- a/lcl/interfaces/qt6/cbindings/src/qguiapplication_c.cpp
  73. +++ b/lcl/interfaces/qt6/cbindings/src/qguiapplication_c.cpp
  74. @@ -35,6 +35,13 @@ void QGuiApplication_applicationDisplayName(PWideString retval)
  75. copyQStringToPWideString(t_retval, retval);
  76. }
  77.  
  78. +void QGuiApplication_setDesktopFileName(PWideString name)
  79. +{
  80. + QString t_name;
  81. + copyPWideStringToQString(name, t_name);
  82. + QGuiApplication::setDesktopFileName(t_name);
  83. +}
  84. +
  85. void QGuiApplication_allWindows(PPtrIntArray retval)
  86. {
  87. QWindowList t_retval;
  88. diff --git a/lcl/interfaces/qt6/cbindings/src/qguiapplication_c.h b/lcl/interfaces/qt6/cbindings/src/qguiapplication_c.h
  89. index dc72f0886f..25a021b1a3 100644
  90. --- a/lcl/interfaces/qt6/cbindings/src/qguiapplication_c.h
  91. +++ b/lcl/interfaces/qt6/cbindings/src/qguiapplication_c.h
  92. @@ -19,6 +19,7 @@ C_EXPORT QGuiApplicationH QGuiApplication_Create(int* argc, char** argv, int Ano
  93. C_EXPORT void QGuiApplication_Destroy(QGuiApplicationH handle);
  94. C_EXPORT void QGuiApplication_setApplicationDisplayName(PWideString name);
  95. C_EXPORT void QGuiApplication_applicationDisplayName(PWideString retval);
  96. +C_EXPORT void QGuiApplication_setDesktopFileName(PWideString name);
  97. C_EXPORT void QGuiApplication_allWindows(PPtrIntArray retval);
  98. C_EXPORT void QGuiApplication_topLevelWindows(PPtrIntArray retval);
  99. C_EXPORT QWindowH QGuiApplication_topLevelAt(const QPointH pos);
  100. diff --git a/lcl/interfaces/qt6/qt62.pas b/lcl/interfaces/qt6/qt62.pas
  101. index 9def6242a2..0de7cf3fba 100644
  102. --- a/lcl/interfaces/qt6/qt62.pas
  103. +++ b/lcl/interfaces/qt6/qt62.pas
  104. @@ -5512,6 +5512,7 @@ function QGuiApplication_Create(argc: PInteger; argv: PPAnsiChar; AnonParam3: In
  105. procedure QGuiApplication_Destroy(handle: QGuiApplicationH); cdecl; external Qt6PasLib name 'QGuiApplication_Destroy';
  106. procedure QGuiApplication_setApplicationDisplayName(name: PWideString); cdecl; external Qt6PasLib name 'QGuiApplication_setApplicationDisplayName';
  107. procedure QGuiApplication_applicationDisplayName(retval: PWideString); cdecl; external Qt6PasLib name 'QGuiApplication_applicationDisplayName';
  108. +procedure QGuiApplication_setDesktopFileName(name: PWideString); cdecl; external Qt6PasLib name 'QGuiApplication_setDesktopFileName';
  109. procedure QGuiApplication_allWindows(retval: PPtrIntArray); cdecl; external Qt6PasLib name 'QGuiApplication_allWindows';
  110. procedure QGuiApplication_topLevelWindows(retval: PPtrIntArray); cdecl; external Qt6PasLib name 'QGuiApplication_topLevelWindows';
  111. function QGuiApplication_topLevelAt(pos: PQtPoint): QWindowH; cdecl; external Qt6PasLib name 'QGuiApplication_topLevelAt';
  112.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement