Remove the destructor of MainView Remove m_loadingGitPath from MainView Make the invariants of MainView explicit Update the name of MainView attribute to follow the conventions Update the name of WebTab attributes to follow the conventions Use QObject cleaning for the destruction of WebView children
Review Request #100148 - Created Nov. 14, 2010 and submitted
Remove the destructor of MainView The destructor of MainView was redundant with the cleaning mechanism of QObject. It is removed to simplify the class. Remove m_loadingGitPath from MainView The attribute m_loadingGitPath is an invariant of runtime, it is not specific to MainView objects. The path has been changed to a constant of the implementation. Make the invariants of MainView explicit Enforce the invariant of MainView by making the pointer const. Update the name of MainView attribute to follow the conventions Update the name of WebTab attributes to follow the conventions Most classes of Rekonq uses m_ as a prefix for attribute, this patch update WebTab to follow this convention. Use QObject cleaning for the destruction of WebView children The destructor of QObject already destroy the children and disconnect the object. To reduce code complexity of WebView, we rely on this mechanism instead of doing manually. Move download handling from WebView to WebPage Handling download is a responsibility of WebPage, the connection to the implementation is better done in WebPage than in WebView. Add an assertion to ensure the consistency of WebView during development Update the name of WebView attribute to conform to the conventions Most classes of Rekonq uses m_ prefix for attribute name, this patches update WebView to follow those conventions.
This patch looks really good! (thanks!!) I have just one question about (but not really related to your job): during MainView first development, working on the new tab toolbutton, we couldn't reach the goal of showing it without "wasting" a MainWindow pointer on (the m_parentWindow one). Can this be removed some ways, eg calling the parent() function?