aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 706394e..6d1964a 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -143,6 +143,14 @@ void MainWindow::setUrlPreview(const QUrl &url)
}
}
+void MainWindow::viewPageSource()
+{
+ BrowserTab * tab = qobject_cast<BrowserTab*>(this->ui->browser_tabs->currentWidget());
+ if(tab != nullptr) {
+ tab->openSourceView();
+ }
+}
+
void MainWindow::on_browser_tabs_currentChanged(int index)
{
if(index >= 0) {
@@ -477,8 +485,5 @@ void MainWindow::on_actionManage_Certificates_triggered()
void MainWindow::on_actionShow_document_source_triggered()
{
- BrowserTab * tab = qobject_cast<BrowserTab*>(this->ui->browser_tabs->currentWidget());
- if(tab != nullptr) {
- tab->openSourceView();
- }
+ this->viewPageSource();
}