]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphintabpage.cpp
GIT_SILENT Sync po/docbooks with svn
[dolphin.git] / src / dolphintabpage.cpp
index 4a061e3ec4d23bc1f2c905d6b72c85150bb0e082..dbc55e7d62cdd2272594cb2e739c0e7c66562da7 100644 (file)
@@ -13,7 +13,6 @@
 #include <QGridLayout>
 #include <QStyle>
 #include <QVariantAnimation>
-#include <quuid.h>
 
 DolphinTabPage::DolphinTabPage(const QUrl &primaryUrl, const QUrl &secondaryUrl, QWidget *parent)
     : QWidget(parent)
@@ -276,6 +275,10 @@ QByteArray DolphinTabPage::saveState() const
     stream << m_primaryViewActive;
     stream << m_splitter->saveState();
 
+    if (!m_customLabel.isEmpty()) {
+        stream << m_customLabel;
+    }
+
     return state;
 }
 
@@ -329,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)
@@ -343,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 = QString(name);
+    m_customLabel = label;
 }
 
-QString DolphinTabPage::title()
+QString DolphinTabPage::customLabel() const
 {
-    return m_title;
+    return m_customLabel;
 }
 
 void DolphinTabPage::slotAnimationFinished()