diff options
| author | Kai Uwe Broulik <[email protected]> | 2021-11-29 13:31:46 +0100 |
|---|---|---|
| committer | Kai Uwe Broulik <[email protected]> | 2021-11-29 13:31:46 +0100 |
| commit | 04e3c227cb8f9194aba315370cdc84995bd65341 (patch) | |
| tree | 6322b7091963a8b294901b27c60f3840eb572b93 /src/dolphintabwidget.cpp | |
| parent | 3d49996615a094df8fc2cb613955abb740a0463a (diff) | |
| parent | ec8f757f9c7b5eafcacbd9671df283d3f20f8a19 (diff) | |
Merge branch 'release/21.12'
Diffstat (limited to 'src/dolphintabwidget.cpp')
| -rw-r--r-- | src/dolphintabwidget.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dolphintabwidget.cpp b/src/dolphintabwidget.cpp index 0e7012d3b..254e654a7 100644 --- a/src/dolphintabwidget.cpp +++ b/src/dolphintabwidget.cpp @@ -162,10 +162,17 @@ void DolphinTabWidget::openNewTab(const QUrl& primaryUrl, const QUrl& secondaryU this, &DolphinTabWidget::activeViewChanged); connect(tabPage, &DolphinTabPage::activeViewUrlChanged, this, &DolphinTabWidget::tabUrlChanged); + connect(tabPage->activeViewContainer(), &DolphinViewContainer::captionChanged, this, [this, tabPage]() { + const int tabIndex = indexOf(tabPage); + Q_ASSERT(tabIndex >= 0); + tabBar()->setTabText(tabIndex, tabName(tabPage)); + }); + int newTabIndex = -1; if (!GeneralSettings::openNewTabAfterLastTab()) { newTabIndex = currentIndex() + 1; } + insertTab(newTabIndex, tabPage, QIcon() /* loaded in tabInserted */, tabName(tabPage)); if (focusWidget) { |
