Merge pull request #158 from kiwix/stay-in-current-tab

don't open new tab
This commit is contained in:
Matthieu Gautier 2019-05-28 17:26:23 +02:00 committed by GitHub
commit 7e5d4708ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -256,7 +256,7 @@ void KiwixApp::createAction()
CREATE_ACTION_ICON(RandomArticleAction, "random", tr("Random Article"));
SET_SHORTCUT(RandomArticleAction, QKeySequence(Qt::CTRL+Qt::Key_R));
connect(mpa_actions[RandomArticleAction], &QAction::triggered,
this, [=]() { this->openRandomUrl(); });
this, [=]() { this->openRandomUrl(false); });
CREATE_ACTION_ICON(PrintAction, "print", tr("Print"));
SET_SHORTCUT(PrintAction, QKeySequence::Print);

View File

@ -138,7 +138,7 @@ void SearchBar::openTitle()
qurl.setScheme("zim");
qurl.setHost(zimId+".zim");
qurl.setPath("/" + QString::fromStdString(path));
QTimer::singleShot(0, [=](){KiwixApp::instance()->openUrl(qurl, true);});
QTimer::singleShot(0, [=](){KiwixApp::instance()->openUrl(qurl, false);});
clearFocus();
}