mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-19 00:11:21 +00:00
Forward port of SVN commit 1147596: Skip redirection URLs when going back or forward in history (otherwise going
back won't be possible for the user, as a redirection will occur again). CCBUG: 212293 svn path=/trunk/KDE/kdebase/apps/; revision=1147597
This commit is contained in:
parent
c5157d36ba
commit
42ba5dfd4b
|
@ -830,7 +830,15 @@ void DolphinMainWindow::replaceLocation()
|
|||
void DolphinMainWindow::goBack()
|
||||
{
|
||||
clearStatusBar();
|
||||
m_activeViewContainer->urlNavigator()->goBack();
|
||||
|
||||
KUrlNavigator* urlNavigator = m_activeViewContainer->urlNavigator();
|
||||
urlNavigator->goBack();
|
||||
|
||||
if (urlNavigator->locationState().isEmpty()) {
|
||||
// An empty location state indicates a redirection URL,
|
||||
// which must be skipped too
|
||||
urlNavigator->goBack();
|
||||
}
|
||||
}
|
||||
|
||||
void DolphinMainWindow::goForward()
|
||||
|
|
|
@ -433,7 +433,13 @@ void DolphinViewContainer::redirect(const KUrl& oldUrl, const KUrl& newUrl)
|
|||
Q_UNUSED(oldUrl);
|
||||
const bool block = m_urlNavigator->signalsBlocked();
|
||||
m_urlNavigator->blockSignals(true);
|
||||
|
||||
// Assure that the location state is reset for redirection URLs. This
|
||||
// allows to skip redirection URLs when going back or forward in the
|
||||
// URL history.
|
||||
m_urlNavigator->saveLocationState(QByteArray());
|
||||
m_urlNavigator->setLocationUrl(newUrl);
|
||||
|
||||
m_urlNavigator->blockSignals(block);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue