From 743674eff154c49386254d8fbb1fc756fffee09c Mon Sep 17 00:00:00 2001 From: mprakhov Date: Fri, 30 Dec 2022 11:43:20 +0200 Subject: [PATCH] chore(@desktop/general): expose new QSettings functions to nim --- src/nimqml/private/dotherside.nim | 4 ++++ src/nimqml/private/qsettings.nim | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/nimqml/private/dotherside.nim b/src/nimqml/private/dotherside.nim index e3a6594..1fbb85c 100644 --- a/src/nimqml/private/dotherside.nim +++ b/src/nimqml/private/dotherside.nim @@ -371,6 +371,10 @@ proc dos_qsettings_remove(vptr: DosQSettings, key: cstring) {.cdecl, dynlib: dynLibName, importc.} proc dos_qsettings_delete(vptr: DosQSettings) {.cdecl, dynlib: dynLibName, importc.} +proc dos_qsettings_begin_group(vptr: DosQSettings, group: cstring) + {.cdecl, dynlib: dynLibName, importc.} +proc dos_qsettings_end_group(vptr: DosQSettings) + {.cdecl, dynlib: dynLibName, importc.} # QTimer proc dos_qtimer_create(): DosQTimer diff --git a/src/nimqml/private/qsettings.nim b/src/nimqml/private/qsettings.nim index 6e38441..ee2975b 100644 --- a/src/nimqml/private/qsettings.nim +++ b/src/nimqml/private/qsettings.nim @@ -27,4 +27,10 @@ proc setValue*(self: QSettings, key: string, value: QVariant) = dos_qsettings_set_value(self.vptr, key, value.vptr) proc remove*(self: QSettings, key: string) = - dos_qsettings_remove(self.vptr, key) \ No newline at end of file + dos_qsettings_remove(self.vptr, key) + +proc beginGroup*(self: QSettings, group: string) = + dos_qsettings_begin_group(self.vptr, group) + +proc endGroup*(self: QSettings) = + dos_qsettings_end_group(self.vptr) \ No newline at end of file