diff options
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 5c3048c..66d0092 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -182,12 +182,11 @@ void MainWindow::newTab(const QUrl &url) MainWindow *MainWindow::newWindow(const QUrl &url) { Browser *instance = static_cast<Browser*>(qApp->instance()); - MainWindow *window = instance->createWindow(); - window->setProfile(m_profile); - if(!url.isEmpty()) { - window->newTab(url); - } - return window; + Browser::SessionParam params; + params.profile = m_profile->storageName(); + params.newWindow = true; + params.urls.append(url); + return instance->createSession(params); } void MainWindow::focusAddress() |