aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/browsertab.cpp1
-rw-r--r--src/tabbrowsinghistory.cpp5
-rw-r--r--src/tabbrowsinghistory.hpp1
3 files changed, 7 insertions, 0 deletions
diff --git a/src/browsertab.cpp b/src/browsertab.cpp
index ef3bb48..1682069 100644
--- a/src/browsertab.cpp
+++ b/src/browsertab.cpp
@@ -883,6 +883,7 @@ void BrowserTab::on_redirected(QUrl uri, bool is_permanent)
redirection_count += 1;
this->current_location = uri;
this->setUrlBarText(uri.toString(QUrl::FullyEncoded));
+ this->history.replaceUrl(this->current_history_index.row(), uri);
}
else
{
diff --git a/src/tabbrowsinghistory.cpp b/src/tabbrowsinghistory.cpp
index 5f2cba4..5cb03ae 100644
--- a/src/tabbrowsinghistory.cpp
+++ b/src/tabbrowsinghistory.cpp
@@ -30,6 +30,11 @@ QModelIndex TabBrowsingHistory::pushUrl(QModelIndex const & position, const QUrl
return this->createIndex(this->history.size() - 1, 0);
}
+void TabBrowsingHistory::replaceUrl(size_t const position, QUrl const & url)
+{
+ this->history.replace(position, url);
+}
+
QUrl TabBrowsingHistory::get(const QModelIndex &index) const
{
if(not index.isValid())
diff --git a/src/tabbrowsinghistory.hpp b/src/tabbrowsinghistory.hpp
index 8adee30..c1e20e7 100644
--- a/src/tabbrowsinghistory.hpp
+++ b/src/tabbrowsinghistory.hpp
@@ -17,6 +17,7 @@ public:
bool canGoForward() const;
QModelIndex pushUrl(QModelIndex const & position, QUrl const & url);
+ void replaceUrl(size_t const position, QUrl const & url);
QUrl get(QModelIndex const & index) const;