]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphintabwidget.cpp
SVN_SILENT made messages (.desktop file) - always resolve ours
[dolphin.git] / src / dolphintabwidget.cpp
index ab2f42c62943b5b78e6ce07d5f444691be289d85..0cbe4529d6b49c4d12db753f35900287d1b621b8 100644 (file)
@@ -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("&&"));