Skip to content

Commit a64a0dc

Browse files
committed
Plugins::WebBrowser: add CFrmWebView::sigCloseRequested
1 parent 66e7e3c commit a64a0dc

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

App/Client/mainwindow.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,15 +1393,12 @@ void MainWindow::slotShortCut()
13931393
if(m_Parameter.GetReceiveShortCut())
13941394
{
13951395
setFocusPolicy(Qt::WheelFocus);
1396+
ui->actionFull_screen_F->setShortcuts(QKeySequence::FullScreen);
13961397
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
1397-
ui->actionFull_screen_F->setShortcut(
1398-
QKeySequence(QKeyCombination(Qt::CTRL, Qt::Key_R),
1399-
QKeyCombination(Qt::Key_F)));
14001398
ui->actionScreenshot->setShortcut(
14011399
QKeySequence(QKeyCombination(Qt::CTRL, Qt::Key_R),
14021400
QKeyCombination(Qt::Key_S)));
14031401
#else
1404-
ui->actionFull_screen_F->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_R, Qt::Key_F));
14051402
ui->actionScreenshot->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_R, Qt::Key_S));
14061403
#endif
14071404
} else {

Plugins/WebBrowser/FrmWebBrowser.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ CFrmWebBrowser::CFrmWebBrowser(CParameterWebBrowser *pPara, bool bMenuBar, QWidg
153153
QIcon::fromTheme("emblem-downloads"), tr("Download Manager"));
154154
m_pDownload->setCheckable(true);
155155
m_pDownload->setStatusTip(m_pDownload->text());
156-
m_pDownload->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_D));
156+
m_pDownload->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_D));
157157
check = connect(m_pDownload, &QAction::toggled,
158158
this, [&](bool checked){
159159
if(checked)
@@ -519,6 +519,7 @@ int CFrmWebBrowser::InitMenu(QMenu *pMenu)
519519
});
520520
m_pStop->setEnabled(false);
521521
m_pStop->setShortcuts(QKeySequence::Cancel);
522+
m_pStop->setStatusTip(m_pStop->text());
522523

523524
pMenu->addSeparator();
524525
pMenu->addAction(m_pAddPage);
@@ -669,6 +670,10 @@ int CFrmWebBrowser::InitMenu(QMenu *pMenu)
669670
Q_ASSERT(check);
670671
m_pInspector->setCheckable(true);
671672
m_pInspector->setEnabled(false);
673+
m_pInspector->setShortcuts({
674+
QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_I),
675+
QKeySequence(Qt::Key_F12)
676+
});
672677
}
673678

674679
EnableAction(false);
@@ -834,6 +839,11 @@ void CFrmWebBrowser::slotInspector(bool checked)
834839
m_pInspector->setChecked(true);
835840
});
836841
Q_ASSERT(check);
842+
check = connect(dev, &CFrmWebView::sigCloseRequested,
843+
this, [this]() {
844+
m_pInspector->setChecked(false);
845+
});
846+
Q_ASSERT(check);
837847
}
838848
}
839849
if(dev) {

0 commit comments

Comments
 (0)