Re: Changing Original Library API when writing Wrappers

2022-01-30 Thread Ayush Singh
Ok, so for a more involved example, take the case of a method in KConfigGroup: `void writePathEntry (const QString &pKey, const QString &path, WriteConfigFlags pFlags=Normal)` Here, the path has a type of QString. In Rust, we can instead use the type `Path` to represent this and convert it to `QSt

Re: Changing Original Library API when writing Wrappers

2022-01-30 Thread David Hurka
On Sunday, January 30, 2022 2:20:10 PM CET Ayush Singh wrote: > An example of this situation: > `QString readGenericName () const` > method of KDesktopFile > (https://api.kde.org/frameworks/kconfig/html/classKDesktopFile.html#aaf263b7 > 9cce3125c9e6e52428e05c524). If I am doing a one-to-one wrappin

Re: Changing Original Library API when writing Wrappers

2022-01-30 Thread Ingo Klöcker
On Sonntag, 30. Januar 2022 14:20:10 CET Ayush Singh wrote: > Hello everyone, I am currently working on a Rust Wrapper for KConfig > KDE Framework (https://invent.kde.org/oreki/kconfig-rs) as part of > Season of KDE 2022. For the most part, I have made the wrapping > methods one-to-one with the C++

Changing Original Library API when writing Wrappers

2022-01-30 Thread Ayush Singh
Hello everyone, I am currently working on a Rust Wrapper for KConfig KDE Framework (https://invent.kde.org/oreki/kconfig-rs) as part of Season of KDE 2022. For the most part, I have made the wrapping methods one-to-one with the C++ API. So they use the same arguments and return types as their C++ c