mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
clean code: remove useless code
This commit is contained in:
parent
0d496ff236
commit
daa1aa3a5f
|
@ -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();
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Reference in a new issue