aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-04-19 09:45:53 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-04-19 09:45:53 +0200
commit8036d3e88d6d744e54a5595c23652c7c028efa49 (patch)
treefb5ed3194c44674124ffd03260ceddd69ed53080 /src
parentLoad URL/Search page menu actions (diff)
downloadsmolbote-8036d3e88d6d744e54a5595c23652c7c028efa49.tar.xz
Removed MainWindow::titleChangedConnection
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow/mainwindow.cpp10
-rw-r--r--src/mainwindow/mainwindow.h2
2 files changed, 1 insertions, 11 deletions
diff --git a/src/mainwindow/mainwindow.cpp b/src/mainwindow/mainwindow.cpp
index c43e001..0052d13 100644
--- a/src/mainwindow/mainwindow.cpp
+++ b/src/mainwindow/mainwindow.cpp
@@ -36,8 +36,7 @@ MainWindow::MainWindow(std::shared_ptr<Configuration> &config, QWidget *parent)
// create UI
resize(config->value<int>("mainwindow.width").value(), config->value<int>("mainwindow.height").value());
- titleSuffix = QString::fromStdString(config->value<std::string>("mainwindow.title").value());
- setWindowTitle(tr("smolbote"));
+ setWindowTitle(QString::fromStdString(config->value<std::string>("mainwindow.title").value()));
if(config->value<bool>("mainwindow.maximized").value())
showMaximized();
else
@@ -63,7 +62,6 @@ MainWindow::MainWindow(std::shared_ptr<Configuration> &config, QWidget *parent)
// connect signlas
connect(mdiArea, &QMdiArea::subWindowActivated, this, [this, navigationToolBar](QMdiSubWindow *window) {
- disconnect(titleChangedConnection);
disconnect(addressBarConnection);
disconnect(navigationBarConnection);
disconnect(searchBoxConnection);
@@ -77,11 +75,6 @@ MainWindow::MainWindow(std::shared_ptr<Configuration> &config, QWidget *parent)
navigationToolBar->connectWebView(nullptr);
searchBox->setView(nullptr);
} else {
- setWindowTitle(w->windowTitle() + titleSuffix);
- titleChangedConnection = connect(w, &Window::windowTitleChanged, this, [this](const QString &title) {
- this->setWindowTitle(title + titleSuffix);
- });
-
addressBar->connectWebView(w->currentView());
addressBarConnection = connect(w, &Window::currentViewChanged, addressBar, &AddressBar::connectWebView);
navigationToolBar->connectWebView(w->currentView());
@@ -105,7 +98,6 @@ MainWindow::MainWindow(std::shared_ptr<Configuration> &config, QWidget *parent)
MainWindow::~MainWindow()
{
- disconnect(titleChangedConnection);
disconnect(addressBarConnection);
disconnect(navigationBarConnection);
disconnect(searchBoxConnection);
diff --git a/src/mainwindow/mainwindow.h b/src/mainwindow/mainwindow.h
index ee7d332..0d7939c 100644
--- a/src/mainwindow/mainwindow.h
+++ b/src/mainwindow/mainwindow.h
@@ -46,7 +46,6 @@ protected:
void closeEvent(QCloseEvent *event) override;
private:
- QString titleSuffix;
QMenu *toolsMenu = nullptr;
AddressBar *addressBar = nullptr;
SearchForm *searchBox = nullptr;
@@ -54,7 +53,6 @@ private:
std::shared_ptr<Configuration> m_config;
- QMetaObject::Connection titleChangedConnection;
QMetaObject::Connection addressBarConnection, navigationBarConnection;
QMetaObject::Connection searchBoxConnection;
QMetaObject::Connection statusBarConnection;