]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphintabpage.cpp
Rewrite search integration
[dolphin.git] / src / dolphintabpage.cpp
index d269c4dee3669a411a49d704626b7dd8dad37366..dbc55e7d62cdd2272594cb2e739c0e7c66562da7 100644 (file)
@@ -275,6 +275,10 @@ QByteArray DolphinTabPage::saveState() const
     stream << m_primaryViewActive;
     stream << m_splitter->saveState();
 
+    if (!m_customLabel.isEmpty()) {
+        stream << m_customLabel;
+    }
+
     return state;
 }
 
@@ -328,6 +332,12 @@ void DolphinTabPage::restoreState(const QByteArray &state)
     QByteArray splitterState;
     stream >> splitterState;
     m_splitter->restoreState(splitterState);
+
+    if (!stream.atEnd()) {
+        QString tabTitle;
+        stream >> tabTitle;
+        setCustomLabel(tabTitle);
+    }
 }
 
 void DolphinTabPage::setActive(bool active)
@@ -342,14 +352,14 @@ void DolphinTabPage::setActive(bool active)
     activeViewContainer()->setActive(active);
 }
 
-void DolphinTabPage::setTitle(const QString &name)
+void DolphinTabPage::setCustomLabel(const QString &label)
 {
-    m_title = name;
+    m_customLabel = label;
 }
 
-QString DolphinTabPage::title()
+QString DolphinTabPage::customLabel() const
 {
-    return m_title;
+    return m_customLabel;
 }
 
 void DolphinTabPage::slotAnimationFinished()