diff options
author | 2021-04-06 03:58:47 +0530 | |
---|---|---|
committer | 2021-04-06 03:58:47 +0530 | |
commit | aac1d239aab0e80f10ae0548422c8706d412dbe1 (patch) | |
tree | 170f22866d8964f457f457f36ea5be37ab5d7e11 /src/mainwindow.cpp | |
parent | baf9fe603c2fa82261d92ed0ec7c446e3c7d0c82 (diff) | |
download | whatsie-aac1d239aab0e80f10ae0548422c8706d412dbe1.tar.gz whatsie-aac1d239aab0e80f10ae0548422c8706d412dbe1.zip |
restore window pos when notification popup cicked
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
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<QWebEngineNotification> 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:"<<result.toString(); + qWarning()<<"Loaded correctly value:"<<result.toString(); if(result.toString().contains("Google Chrome",Qt::CaseInsensitive)){ //contains ug message apply quirk if(correctlyLoaderRetries > -1){ + qWarning()<<"doReload()"<<correctlyLoaderRetries; doReload(); correctlyLoaderRetries--; }else{ |