sitter updated this revision to Diff 53953. sitter added a comment.
competing api design on commentsclient::getfrombug2 this has some more cruft but looks nicer from a usage POV IMO it's basically lambda chaining originating in a signal... instead of return a kjob the getter returns an APIReply. APIReply is a templated, not-moc'd QObject which wraps an APIJob. it's a QObject so we can easily place it as a chield under the "context" object (i.e. the bugzillamanager instance). the api getter sets a constructor function which knows how to marshal kjob data into the intended return type, returns the reply to the consumer and the consumer sets a handler which will get the marshalled concrete data from the constructor. the APIReply then connects to the kjob as per usual. when the job finishes an internal lambda is called which calls the constructor to get the concrete type and then calls the handler with that while that looks lovely I am not sure this actually is going to work. specifically with how exception handling works this would currently issue the exception in the slot and that is not safe to do AFAIK REPOSITORY R871 DrKonqi CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D19612?vs=53889&id=53953 BRANCH webservice REVISION DETAIL https://phabricator.kde.org/D19612 AFFECTED FILES CMakeLists.txt src/CMakeLists.txt src/bugzillaintegration/bugzillalib.cpp src/bugzillaintegration/bugzillalib.h src/bugzillaintegration/duplicatefinderjob.cpp src/bugzillaintegration/duplicatefinderjob.h src/bugzillaintegration/libbugzilla/CMakeLists.txt src/bugzillaintegration/libbugzilla/attachment.cpp src/bugzillaintegration/libbugzilla/attachment.h src/bugzillaintegration/libbugzilla/autotests/CMakeLists.txt src/bugzillaintegration/libbugzilla/autotests/bugtest.cpp src/bugzillaintegration/libbugzilla/autotests/bugzillatest.cpp src/bugzillaintegration/libbugzilla/autotests/connectiontest.cpp src/bugzillaintegration/libbugzilla/autotests/data/bugs.dragonplayer.json src/bugzillaintegration/libbugzilla/autotests/data/error.http src/bugzillaintegration/libbugzilla/autotests/data/hi.http src/bugzillaintegration/libbugzilla/autotests/data/product.dragonplayer.json src/bugzillaintegration/libbugzilla/autotests/data/put.http src/bugzillaintegration/libbugzilla/autotests/producttest.cpp src/bugzillaintegration/libbugzilla/bug.cpp src/bugzillaintegration/libbugzilla/bug.h src/bugzillaintegration/libbugzilla/bugzilla.cpp src/bugzillaintegration/libbugzilla/bugzilla.h src/bugzillaintegration/libbugzilla/comment.cpp src/bugzillaintegration/libbugzilla/comment.h src/bugzillaintegration/libbugzilla/connection.cpp src/bugzillaintegration/libbugzilla/connection.h src/bugzillaintegration/libbugzilla/product.cpp src/bugzillaintegration/libbugzilla/product.h src/bugzillaintegration/parsebugbacktraces.cpp src/bugzillaintegration/parsebugbacktraces.h src/bugzillaintegration/productmapping.cpp src/bugzillaintegration/productmapping.h src/bugzillaintegration/reportassistantpages_base.cpp src/bugzillaintegration/reportassistantpages_bugzilla.cpp src/bugzillaintegration/reportassistantpages_bugzilla.h src/bugzillaintegration/reportassistantpages_bugzilla_duplicates.cpp src/bugzillaintegration/reportassistantpages_bugzilla_duplicates.h src/bugzillaintegration/reportinterface.cpp src/bugzillaintegration/reportinterface.h src/drkonqi.cpp To: sitter Cc: plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart