Index: fcitx5-5.0.7/src/frontend/ibusfrontend/ibusfrontend.cpp =================================================================== --- fcitx5-5.0.7.orig/src/frontend/ibusfrontend/ibusfrontend.cpp +++ fcitx5-5.0.7/src/frontend/ibusfrontend/ibusfrontend.cpp @@ -580,14 +580,23 @@ private: ([]() -> dbus::DBusStruct { return {0, 0}; }), +#if __GNUC__ < 9 + ([&](dbus::DBusStruct type) { +#else ([this](dbus::DBusStruct type) { +#endif setContentType(std::get<0>(type), std::get<1>(type)); }), dbus::PropertyOption::Hidden); FCITX_OBJECT_VTABLE_WRITABLE_PROPERTY( clientCommitPreedit, "ClientCommitPreedit", "(b)", +#if __GNUC__ < 9 + ([&]() -> dbus::DBusStruct { return {clientCommitPreedit_}; }), + ([&](dbus::DBusStruct value) { +#else ([this]() -> dbus::DBusStruct { return {clientCommitPreedit_}; }), ([this](dbus::DBusStruct value) { +#endif clientCommitPreedit_ = std::get<0>(value); }), dbus::PropertyOption::Hidden); Index: fcitx5-5.0.7/test/testdbus.cpp =================================================================== --- fcitx5-5.0.7.orig/test/testdbus.cpp +++ fcitx5-5.0.7/test/testdbus.cpp @@ -67,7 +67,11 @@ private: []() { return 5; }); FCITX_OBJECT_VTABLE_WRITABLE_PROPERTY( testProperty2, "testProperty2", "i", [this]() { return prop2; }, - [this](int32_t v) { prop2 = v; }); +#if __GNUC__ < 9 + [&](int32_t v) { prop2 = v; }); +#else + [this](int32_t v) { prop2 = v; }); +#endif }; #define TEST_SERVICE "org.fcitx.Fcitx.TestDBus"