void DolphinMainWindow::updateWindowTitle()
{
- setWindowTitle(m_activeViewContainer->caption());
+ const QString newTitle = m_activeViewContainer->caption();
+ if (windowTitle() != newTitle) {
+ setWindowTitle(newTitle);
+ }
}
void DolphinMainWindow::slotStorageTearDownFromPlacesRequested(const QString& mountPath)
const DolphinView* newActiveView = activeViewContainer()->view();
- if (newActiveView != oldActiveView) {
- disconnect(oldActiveView, &DolphinView::urlChanged,
- this, &DolphinTabPage::activeViewUrlChanged);
- disconnect(oldActiveView, &DolphinView::redirection,
- this, &DolphinTabPage::slotViewUrlRedirection);
- connect(newActiveView, &DolphinView::urlChanged,
- this, &DolphinTabPage::activeViewUrlChanged);
- connect(newActiveView, &DolphinView::redirection,
- this, &DolphinTabPage::slotViewUrlRedirection);
+ if (newActiveView == oldActiveView) {
+ return;
}
+ disconnect(oldActiveView, &DolphinView::urlChanged,
+ this, &DolphinTabPage::activeViewUrlChanged);
+ disconnect(oldActiveView, &DolphinView::redirection,
+ this, &DolphinTabPage::slotViewUrlRedirection);
+ connect(newActiveView, &DolphinView::urlChanged,
+ this, &DolphinTabPage::activeViewUrlChanged);
+ connect(newActiveView, &DolphinView::redirection,
+ this, &DolphinTabPage::slotViewUrlRedirection);
emit activeViewChanged(activeViewContainer());
emit activeViewUrlChanged(activeViewContainer()->url());
}