Added Comments for klocalizedtranslator.

This commit is contained in:
Ayush Singh 2022-01-01 20:21:40 +05:30
parent a5ca07bad8
commit 47c519e109
2 changed files with 3 additions and 1 deletions

View file

@ -19,7 +19,7 @@ cpp! {{
}}
cpp_class!(
/// Struct representing KLocalizedContext. Mainly used with QML.
/// Struct representing [KLocalizedContext](https://api.kde.org/frameworks/ki18n/html/classKLocalizedContext.html). Mainly used with QML.
pub unsafe struct KLocalizedContext as "KLocalizedContextHolder"
);

View file

@ -14,11 +14,13 @@ cpp! {{
}}
cpp_class!(
/// Struct representing [KLocalizedTranslator](https://api.kde.org/frameworks/ki18n/html/classKLocalizedTranslator.html).
pub unsafe struct KLocalizedTranslator as "KLocalizedTranslatorHolder"
);
impl KLocalizedTranslator {
#[cfg(feature = "qmetaobject")]
/// Initialize KLocalizedTranslator.
pub fn new<T: QObject + Sized>(obj: QObjectPinned<T>) -> KLocalizedTranslator {
let obj_ptr = obj.get_or_create_cpp_object();
cpp!(unsafe [obj_ptr as "QObject *"] -> KLocalizedTranslator as "KLocalizedTranslatorHolder" {