{"action":"created","issue":{"url":"https://api.github.com/repos/lxde/libfm-qt/issues/63","repository_url":"https://api.github.com/repos/lxde/libfm-qt","labels_url":"https://api.github.com/repos/lxde/libfm-qt/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/lxde/libfm-qt/issues/63/comments","events_url":"https://api.github.com/repos/lxde/libfm-qt/issues/63/events","html_url":"https://github.com/lxde/libfm-qt/pull/63","id":206277306,"number":63,"title":"Port libfm C API to C++ 11 with some API redesign/rewrite","user":{"login":"PCMan","id":46543,"avatar_url":"https://avatars3.githubusercontent.com/u/46543?v=3","gravatar_id":"","url":"https://api.github.com/users/PCMan","html_url":"https://github.com/PCMan","followers_url":"https://api.github.com/users/PCMan/followers","following_url":"https://api.github.com/users/PCMan/following{/other_user}","gists_url":"https://api.github.com/users/PCMan/gists{/gist_id}","starred_url":"https://api.github.com/users/PCMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PCMan/subscriptions","organizations_url":"https://api.github.com/users/PCMan/orgs","repos_url":"https://api.github.com/users/PCMan/repos","events_url":"https://api.github.com/users/PCMan/events{/privacy}","received_events_url":"https://api.github.com/users/PCMan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":91,"created_at":"2017-02-08T18:03:25Z","updated_at":"2017-04-17T15:53:57Z","closed_at":"2017-04-17T12:05:55Z","pull_request":{"url":"https://api.github.com/repos/lxde/libfm-qt/pulls/63","html_url":"https://github.com/lxde/libfm-qt/pull/63","diff_url":"https://github.com/lxde/libfm-qt/pull/63.diff","patch_url":"https://github.com/lxde/libfm-qt/pull/63.patch"},"body":"This is a gigantic PR that requires more testing.\r\nPreviously I tried to add C++ wrapper for the libfm C APIs, but after spending a lot of time debugging the mixed C/C++ code across different libraries, tracing some memory errors or race condition, it's became less efficient as expected. After some evaluation, I started experimenting with porting the C APIs to C++-11 instead. This is a work in progress, but most of the parts has been ported.\r\n\r\nThe main focuses of this port/rewrite:\r\n* Use C++-11 smart pointers and move semantics whenever possible.\r\n* Strict const correctness.\r\n* Make careful use of Qt/QObject APIs whenever possible so it integrates with Qt well\r\n* Replace Qt-specific code with equivalent C++ STL containers and algorithms whenever possible\r\n* Examine all APIs and try to redesign some of them, making them more modern C++\r\n* Ensure thread safety and avoid race conditions\r\n* Remove dependency on the libfm C library (still a work in progress)\r\n\r\nThe remaining parts that are not yet fully ported:\r\n* Fm::FileOpsJob (main class handling file operations copy, move, unlink, ...etc)\r\n* Archiver integration\r\n* File templates\r\n* DES-EMA nautilus extension support.\r\n* FmConfig and FmFolderConfig\r\n* FileLaunher\r\n\r\nOtherwise the major parts have been ported to C++-11.\r\nPlease give your comments and help tests.\r\nThank you all."},"comment":{"url":"https://api.github.com/repos/lxde/libfm-qt/issues/comments/294514439","html_url":"https://github.com/lxde/libfm-qt/pull/63#issuecomment-294514439","issue_url":"https://api.github.com/repos/lxde/libfm-qt/issues/63","id":294514439,"user":{"login":"tsujan","id":981076,"avatar_url":"https://avatars0.githubusercontent.com/u/981076?v=3","gravatar_id":"","url":"https://api.github.com/users/tsujan","html_url":"https://github.com/tsujan","followers_url":"https://api.github.com/users/tsujan/followers","following_url":"https://api.github.com/users/tsujan/following{/other_user}","gists_url":"https://api.github.com/users/tsujan/gists{/gist_id}","starred_url":"https://api.github.com/users/tsujan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsujan/subscriptions","organizations_url":"https://api.github.com/users/tsujan/orgs","repos_url":"https://api.github.com/users/tsujan/repos","events_url":"https://api.github.com/users/tsujan/events{/privacy}","received_events_url":"https://api.github.com/users/tsujan/received_events","type":"User","site_admin":false},"created_at":"2017-04-17T15:53:57Z","updated_at":"2017-04-17T15:53:57Z","body":"I think I found the cause -- this time, it wasn't a typo. The pointer returned by `c_str()` can be invalidated easily, hence the possibility of elements with an *invalidated* key. I'll add a PR after being certain about that and some testing."}}
{"actor":{"display_login":"tsujan"}}