Activity log for bug #1435418

Date Who What changed Old value New value Message
2015-03-23 16:40:32 Chris Coulson bug added bug
2015-03-23 16:40:38 Chris Coulson oxide: importance Undecided Low
2015-03-23 16:40:40 Chris Coulson oxide: status New Triaged
2015-03-23 16:45:32 Chris Coulson description I've tried to rearrange code to make it clearer which code belongs in, say, WebViewAdapter in qt/core/glue and WebView in qt/core/browser, but the code split still isn't really all that clear (even to me). In addition to that, there's other problems: - There's a lot of implementation details exposed between the 2 directories, using private methods and friend statements which all seems a bit wrong. - Using the WebView case again, there may be a legitimate reason for another class in Oxide to do OxideQQuickWebViewPrivate::get() in order to access a subset of methods on OxideQQuickWebViewPrivate, but it also exposes the entire API surface of WebViewAdapter as its methods have to be public in order to be accessible from OxideQQuickWebView (unless we make them protected and use a friend statement). I think we should refactor it all to do this instead (using webview as an example): (sorry if this is not clear) class OxideQQuickWebView : public QQuickItem { public: ... <public API> ... private: QScopedPointer<OxideQQuickWebViewPrivate> d_ptr; }; class OxideQQuickWebViewPrivate : public oxide::qt::WebViewProxyClient { public: static OxideQQuickWebViewPrivate* get(OxideQQuickWebView* q); ... <methods available to other code in qt/quick/api> ... private: ... <implementation of WebViewProxyClient> ... QScopedPointer<oxide::qt::WebViewProxy> proxy_; }; WebViewProxy and WebViewProxyClient are abstract interfaces in qt/core/glue, although WebViewProxy has a static create() function. In qt/core/browser: WebView : public WebViewProxy { public: ... <methods available to code in qt/core/browser> ... private: ... <implementation of WebViewProxy> ... WebViewProxyClient* client_; }; I've tried to rearrange things to make it clear how code should be split between, say, WebViewAdapter in qt/core/glue and WebView in qt/core/browser, but the code split still isn't really all that clear (even to me). In addition to that, there's other problems: - There's a lot of implementation details exposed between the 2 directories, using private methods and friend statements which all seems a bit wrong. - Using the WebView case again, there may be a legitimate reason for another class in Oxide to do OxideQQuickWebViewPrivate::get() in order to access a subset of methods on OxideQQuickWebViewPrivate, but it also exposes the entire API surface of WebViewAdapter as its methods have to be public in order to be accessible from OxideQQuickWebView (unless we make them protected and use a friend statement). I think we should refactor it all to do this instead (using webview as an example): (sorry if this is not clear) class OxideQQuickWebView : public QQuickItem {  public:   ...   <public API>   ...  private:   QScopedPointer<OxideQQuickWebViewPrivate> d_ptr; }; class OxideQQuickWebViewPrivate : public oxide::qt::WebViewProxyClient {  public:   static OxideQQuickWebViewPrivate* get(OxideQQuickWebView* q);   ...   <methods available to other code in qt/quick/api>   ...  private:   ...   <implementation of WebViewProxyClient>   ...   QScopedPointer<oxide::qt::WebViewProxy> proxy_; }; WebViewProxy and WebViewProxyClient are abstract interfaces in qt/core/glue, although WebViewProxy has a static create() function. In qt/core/browser: WebView : public WebViewProxy {  public:   ...   <methods available to code in qt/core/browser>   ...  private:   ...   <implementation of WebViewProxy>   ...   WebViewProxyClient* client_; }; This fixes the above problems (we don't have to expose implementation details between qt/core/browser and qt/core/glue, the WebViewProxy instance is private to OxideQQuickWebViewPrivate and its API isn't exposed to classes that call OxideQQuickWebViewPrivate::get(), and developers don't need to spend time trying to figure out which directory to put code in to)
2015-04-09 23:21:45 Chris Coulson oxide: assignee Chris Coulson (chrisccoulson)
2015-04-09 23:21:46 Launchpad Janitor branch linked lp:oxide
2015-04-09 23:21:48 Chris Coulson oxide: milestone branch-1.7
2015-04-09 23:21:51 Chris Coulson oxide: status Triaged Fix Released
2015-05-19 16:42:47 Launchpad Janitor branch linked lp:~oxide-developers/oxide/packaging.vivid
2015-05-19 16:51:12 Launchpad Janitor branch linked lp:~oxide-developers/oxide/packaging.utopic
2015-05-19 17:04:53 Launchpad Janitor branch linked lp:~oxide-developers/oxide/packaging.trusty
2015-07-22 17:21:13 Launchpad Janitor branch linked lp:~oxide-developers/oxide/packaging.wily