From aac1d239aab0e80f10ae0548422c8706d412dbe1 Mon Sep 17 00:00:00 2001 From: keshavbhatt Date: Tue, 6 Apr 2021 03:58:47 +0530 Subject: restore window pos when notification popup cicked --- src/mainwindow.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 3408e8f..51aae77 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -270,7 +270,7 @@ void MainWindow::notify(QString title,QString message) if(windowState()==Qt::WindowMinimized || windowState()!=Qt::WindowActive){ activateWindow(); raise(); - show(); + showNormal(); } }); popup->adjustSize(); @@ -447,8 +447,6 @@ void MainWindow::createWebEngine() widgetSize.setHorizontalStretch(1); widgetSize.setVerticalStretch(1); - QtWebEngine::initialize(); - QWebEngineView *webEngine = new QWebEngineView(this); setCentralWidget(webEngine); webEngine->setSizePolicy(widgetSize); @@ -510,7 +508,7 @@ void MainWindow::createWebPage(bool offTheRecord) if(windowState()==Qt::WindowMinimized || windowState()!=Qt::WindowActive){ activateWindow(); raise(); - show(); + showNormal(); } }); profile->setNotificationPresenter([=] (std::unique_ptr notification) @@ -596,10 +594,11 @@ void MainWindow::checkLoadedCorrectly() webEngine->page()->runJavaScript( "document.getElementsByClassName('landing-title')[0].innerText", [this](const QVariant &result){ - qDebug()<<"Loaded correctly value:"< -1){ + qWarning()<<"doReload()"<