{"action":"reopened","issue":{"url":"https://api.github.com/repos/Pelagicore/gdbus-codegen-glibmm/issues/28","repository_url":"https://api.github.com/repos/Pelagicore/gdbus-codegen-glibmm","labels_url":"https://api.github.com/repos/Pelagicore/gdbus-codegen-glibmm/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/Pelagicore/gdbus-codegen-glibmm/issues/28/comments","events_url":"https://api.github.com/repos/Pelagicore/gdbus-codegen-glibmm/issues/28/events","html_url":"https://github.com/Pelagicore/gdbus-codegen-glibmm/issues/28","id":348452066,"node_id":"MDU6SXNzdWUzNDg0NTIwNjY=","number":28,"title":"Compile error for generated template function in proxy","user":{"login":"zxtwonder","id":20675066,"node_id":"MDQ6VXNlcjIwNjc1MDY2","avatar_url":"https://avatars0.githubusercontent.com/u/20675066?v=4","gravatar_id":"","url":"https://api.github.com/users/zxtwonder","html_url":"https://github.com/zxtwonder","followers_url":"https://api.github.com/users/zxtwonder/followers","following_url":"https://api.github.com/users/zxtwonder/following{/other_user}","gists_url":"https://api.github.com/users/zxtwonder/gists{/gist_id}","starred_url":"https://api.github.com/users/zxtwonder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zxtwonder/subscriptions","organizations_url":"https://api.github.com/users/zxtwonder/orgs","repos_url":"https://api.github.com/users/zxtwonder/repos","events_url":"https://api.github.com/users/zxtwonder/events{/privacy}","received_events_url":"https://api.github.com/users/zxtwonder/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-07T19:15:20Z","updated_at":"2018-09-20T06:47:55Z","closed_at":null,"author_association":"NONE","body":"First of all, thank you so much for providing this great utility. There seems to be trivial issue with the generated template function.\r\n\r\nInput method schema:\r\n```xml\r\n        <method name=\"SetProperty\">\r\n            <arg name=\"name\" type=\"s\" direction=\"in\"/>\r\n            <arg name=\"value\" type=\"v\" direction=\"in\"/>\r\n        </method>\r\n```\r\nGenerated proxy template function (indent as generated):\r\n```cpp\r\n    template <typename T>\r\n    void SetProperty(\r\n        std::string name,\r\n        T value,\r\n        const Gio::SlotAsyncReady &callback)\r\n    {\r\n        Glib::VariantContainerBase base;\r\n        std::vector<Glib::VariantBase> params;\r\n        Glib::Variant<Glib::ustring> name_param = Glib::Variant<Glib::ustring>::create(arg_name);\r\n        params.push_back(name_param);\r\n        Glib::Variant<Glib::Variant<T> > value_variantValue;\r\n        value_variantValue = Glib::Variant<Glib::Variant<T> >::create(Glib::Variant<T>::create(value_param));\r\n        params.push_back(value_variantValue);\r\n        base = Glib::VariantContainerBase::create_tuple(params);\r\n\r\n    m_proxy->call(\r\n        \"SetProperty\",\r\n        callback,\r\n        base);\r\n}\r\n```\r\n\r\nComparing the generated template function and other functions, it seems that the function argument naming and the variantValue reference are inconsistent. Is it correct that the template function should be generated as the following?\r\n\r\n```cpp\r\n    template <typename T>\r\n    void SetProperty(\r\n        std::string arg_name,\r\n        T arg_value,\r\n        const Gio::SlotAsyncReady &callback)\r\n    {\r\n        ...\r\n        Glib::Variant<Glib::ustring> name_param = Glib::Variant<Glib::ustring>::create(arg_name);\r\n        ...\r\n        value_variantValue = Glib::Variant<Glib::Variant<T> >::create(Glib::Variant<T>::create(arg_value));\r\n        ...\r\n```\r\n\r\nRelated code: https://github.com/Pelagicore/gdbus-codegen-glibmm/blob/35bef0fab90efa2635c037fd6804eddb13063852/codegen_glibmm/codegen.py#L149"}}
{"actor":{"display_login":"zxtwonder"}}