Add loadUrl functionality to MainWindow, and use it from Application
Review Request #102065 - Created July 23, 2011 and discarded
For my GSoC project of sessions management, I need to be able to load URLs in specific windows. The use case is basically this -- I drag a tab from an inactive session, and drop it into an active session. So the URL of the inactive session should get loaded into specifically that window which corresponds to the active session. So I moved the loadUrl functionality to MainWindow. But I kept Application::loadUrl, it just passes on the task to the appropriate window's loadUrl method.
Tested. Works correctly.
I don't like this change a lot, because the loadUrl method was not thought to be in one mainwindow: the multithreaded part, "replied" in each window, or the url sanity checks to be done twice. I probably prefer your first suggestion here: adding a MainWindow pointer to the original loadUrl slot, that becomes void Application::loadUrl(const KUrl &url, const Rekonq::OpenType& type = Rekonq::CurrentTab, MainWindow *w = 0); It seems easier and cleaner to me. Waiting for comments.