From 54f425f4013938d1736aad220bb6a48703bfeae7 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Mon, 28 May 2018 11:54:11 +0200 Subject: Show profile name in window title --- src/mainwindow/window.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/mainwindow/window.cpp') diff --git a/src/mainwindow/window.cpp b/src/mainwindow/window.cpp index e3d5516..3d7d037 100644 --- a/src/mainwindow/window.cpp +++ b/src/mainwindow/window.cpp @@ -121,6 +121,11 @@ Window::~Window() delete tabWidget; } +void Window::setWindowTitle(const QString &title) +{ + QMdiSubWindow::setWindowTitle(QString("%1 :%2").arg(title, profile->name())); +} + WebView *Window::currentView() { return qobject_cast(tabWidget->currentWidget()); @@ -134,6 +139,7 @@ WebView *Window::view(int index) const void Window::setProfile(WebProfile *profile) { Q_ASSERT_X(profile != nullptr, "Window::setProfile", "Tried to set null profile"); + this->profile = profile; for(int i = 0; i < tabWidget->count(); ++i) { auto *view = qobject_cast(tabWidget->widget(i)); const auto url = view->url(); -- cgit v1.2.1