clean code: remove useless code

This commit is contained in:
Xiao YiFang 2023-01-09 21:22:13 +08:00
parent 0d496ff236
commit daa1aa3a5f
2 changed files with 0 additions and 13 deletions

View file

@ -729,15 +729,8 @@ void ArticleView::tryMangleWebsiteClickedUrl( QUrl & url, Contexts & contexts )
}
}
void ArticleView::saveHistoryUserData()
{
ui.definition->setProperty("sx", ui.definition->page()->scrollPosition().x());
ui.definition->setProperty("sy", ui.definition->page()->scrollPosition().y());
}
void ArticleView::load( QUrl const & url )
{
saveHistoryUserData();
ui.definition->load( url );
}
@ -1614,7 +1607,6 @@ void ArticleView::back()
// empty page
if ( canGoBack() )
{
saveHistoryUserData();
currentActiveDictIds.clear();
historyMode = true;
ui.definition->back();
@ -1623,7 +1615,6 @@ void ArticleView::back()
void ArticleView::forward()
{
saveHistoryUserData();
currentActiveDictIds.clear();
historyMode = true;
ui.definition->forward();

View file

@ -396,10 +396,6 @@ private:
/// url to the appropriate "contexts" entry.
void tryMangleWebsiteClickedUrl( QUrl & url, Contexts & contexts );
/// Saves current article and scroll position for the current history item.
/// Should be used when leaving the page.
void saveHistoryUserData();
/// Loads a page at @p url into view.
void load( QUrl const & url );