X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/5a9567730d37126a66d5723fd22c215f184d1f7f..5d9ad8d24fd495e861d5c9c88d5a5cb292365b22:/src/dolphintabwidget.cpp diff --git a/src/dolphintabwidget.cpp b/src/dolphintabwidget.cpp index ab2f42c62..0cbe4529d 100644 --- a/src/dolphintabwidget.cpp +++ b/src/dolphintabwidget.cpp @@ -226,7 +226,8 @@ void DolphinTabWidget::closeTab(const int index) Q_ASSERT(index < count()); if (count() < 2) { - // Never close the last tab. + // Close Dolphin when closing the last tab. + parentWidget()->close(); return; } @@ -359,7 +360,7 @@ QString DolphinTabWidget::tabName(DolphinTabPage* tabPage) const if (!tabPage) { return QString(); } - QString name = tabPage->activeViewContainer()->getCaption(); + QString name = tabPage->activeViewContainer()->caption(); // Make sure that a '&' inside the directory name is displayed correctly // and not misinterpreted as a keyboard shortcut in QTabBar::setTabText() return name.replace('&', QLatin1String("&&"));