From 51d7b7070b2f2d05c86342554caafc189cfbc912 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Thu, 12 Jan 2017 14:39:22 +0100 Subject: Minor bugfixes Window title bar doesn't append anything to the tab title if config is blank Profile menu moved to the right --- src/mainwindow.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ccf75f3..fef3bcc 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2,6 +2,7 @@ #include "ui_mainwindow.h" #include "settings.h" #include +#include #include #include #include "browser.h" @@ -34,8 +35,10 @@ MainWindow::MainWindow(Browser *instance, QUrl defaultUrl, QWidget *parent) : browserMenu->addAction(tr("Quit"), qApp, SLOT(quit()), QKeySequence(tr("Ctrl+Q"))); // Profile menu - profileMenu = new QMenu(profile->storageName()); - ui->menuBar->addMenu(profileMenu); + QMenuBar *rightBar = new QMenuBar(ui->menuBar); + profileMenu = new QMenu(tr("Profile: ") + profile->storageName()); + rightBar->addMenu(profileMenu); + ui->menuBar->setCornerWidget(rightBar); profileMenu->addAction(tr("Edit profile"), this, SLOT(createProfileDialog())); profileMenu->addAction(tr("Load profile")); @@ -108,7 +111,7 @@ void MainWindow::handleUrlUpdated(const QUrl &url) void MainWindow::handleTitleUpdated(const QString &title) { Settings settings; - setWindowTitle(title + settings.value("window/title", "qtwebenginebrowser").toString()); + setWindowTitle(title + settings.value("window/title").toString()); } void MainWindow::createProfileDialog() -- cgit v1.2.1