diff --git a/src/modules/backends/web/qtwebengine/QtWebEngineWebWidget.cpp b/src/modules/backends/web/qtwebengine/QtWebEngineWebWidget.cpp index d9e3cce38b..ed8718f09f 100644 --- a/src/modules/backends/web/qtwebengine/QtWebEngineWebWidget.cpp +++ b/src/modules/backends/web/qtwebengine/QtWebEngineWebWidget.cpp @@ -287,13 +287,22 @@ void QtWebEngineWebWidget::triggerAction(int identifier, const QVariantMap ¶ break; case ActionsManager::ClearTabHistoryAction: - setUrl(QUrl(QLatin1String("about:blank"))); - + { + setUrl(QUrl(QLatin1String("about:start"))); m_page->history()->clear(); - notifyNavigationActionsChanged(); + QObject *context = new QObject(this); + connect(this, &QtWebEngineWebWidget::loadingStateChanged, + context, [this, context](WebWidget::LoadingState state){ + if (state == FinishedLoadingState) { + m_page->history()->clear(); + delete context; + emit loadingStateChanged(FinishedLoadingState); + } + }); break; + } case ActionsManager::MuteTabMediaAction: m_page->setAudioMuted(!m_page->isAudioMuted());