diff options
| author | Emmanuel Pescosta <[email protected]> | 2014-08-20 23:06:39 +0200 |
|---|---|---|
| committer | Emmanuel Pescosta <[email protected]> | 2014-08-20 23:06:39 +0200 |
| commit | 2d2d55f3df09614e6b7cf267771b52a04dcb5e28 (patch) | |
| tree | 50588d8f2628da5ec804656616ea2ed07e22e76b /src/dolphintabwidget.cpp | |
| parent | 4b758c386fb3957160af334230bacd96ed810d2c (diff) | |
Save the view states in addition to the view urls and splitter state in DolphinTabPage.
Also added version numbers to view and tab state.
REVIEW: 119792
Diffstat (limited to 'src/dolphintabwidget.cpp')
| -rw-r--r-- | src/dolphintabwidget.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/dolphintabwidget.cpp b/src/dolphintabwidget.cpp index 76d4b8d48..b1b2d858f 100644 --- a/src/dolphintabwidget.cpp +++ b/src/dolphintabwidget.cpp @@ -72,7 +72,7 @@ void DolphinTabWidget::saveProperties(KConfigGroup& group) const for (int i = 0; i < tabCount; ++i) { const DolphinTabPage* tabPage = tabPageAt(i); - group.writeEntry("Tab " % QString::number(i), tabPage->saveState()); + group.writeEntry("Tab Data " % QString::number(i), tabPage->saveState()); } } @@ -83,8 +83,15 @@ void DolphinTabWidget::readProperties(const KConfigGroup& group) if (i >= count()) { openNewActivatedTab(); } - const QByteArray state = group.readEntry("Tab " % QString::number(i), QByteArray()); - tabPageAt(i)->restoreState(state); + if (group.hasKey("Tab Data " % QString::number(i))) { + // Tab state created with Dolphin > 4.14.x + const QByteArray state = group.readEntry("Tab Data " % QString::number(i), QByteArray()); + tabPageAt(i)->restoreState(state); + } else { + // Tab state created with Dolphin <= 4.14.x + const QByteArray state = group.readEntry("Tab " % QString::number(i), QByteArray()); + tabPageAt(i)->restoreStateV1(state); + } } const int index = group.readEntry("Active Tab Index", 0); |
