feat: Add restartApp support

This commit is contained in:
Alex Jbanca 2024-02-05 00:02:07 +02:00
parent 2d733c5ec6
commit acf83a023d
No known key found for this signature in database
GPG Key ID: 6004079575C21C5D
2 changed files with 5 additions and 0 deletions

View File

@ -137,6 +137,7 @@ proc dos_qguiapplication_try_enable_threaded_renderer() {.cdecl, dynlib: dynLibN
proc dos_qguiapplication_create() {.cdecl, dynlib: dynLibName, importc.}
proc dos_qguiapplication_exec() {.cdecl, dynlib: dynLibName, importc.}
proc dos_qguiapplication_quit() {.cdecl, dynlib: dynLibName, importc.}
proc dos_qguiapplication_restart() {.cdecl, dynlib: dynLibName, importc.}
proc dos_qguiapplication_icon(filename: cstring) {.cdecl, dynlib: dynLibName, importc.}
proc dos_qguiapplication_delete() {.cdecl, dynlib: dynLibName, importc.}

View File

@ -32,6 +32,10 @@ proc quit*(self: QGuiApplication) =
## Quit the Qt event loop
dos_qguiapplication_quit()
proc restartApplication*() =
## Restart the app
dos_qguiapplication_restart()
proc setClipboardText*(text: string = "") =
dos_qguiapplication_clipboard_setText(text.cstring)