diff options
| author | ambar chakravartty <[email protected]> | 2025-01-30 17:29:32 +0530 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2025-02-06 14:32:35 +0000 |
| commit | 0bf31bd847d28485d3a2115b0ce9e794654a053b (patch) | |
| tree | 29526ec4606c5fb54f6c68970a23568cd49bfcf1 /src/dolphintabpage.cpp | |
| parent | c4528f6d74336d4e7e21cf3619cc96a7fcbba475 (diff) | |
changes saveState() and restoreState() to restore renamed tabs (if any)
Diffstat (limited to 'src/dolphintabpage.cpp')
| -rw-r--r-- | src/dolphintabpage.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/dolphintabpage.cpp b/src/dolphintabpage.cpp index 833e14f1c..7199bcbf3 100644 --- a/src/dolphintabpage.cpp +++ b/src/dolphintabpage.cpp @@ -13,7 +13,6 @@ #include <QGridLayout> #include <QStyle> #include <QVariantAnimation> - DolphinTabPage::DolphinTabPage(const QUrl &primaryUrl, const QUrl &secondaryUrl, QWidget *parent) : QWidget(parent) , m_expandingContainer{nullptr} @@ -275,6 +274,10 @@ QByteArray DolphinTabPage::saveState() const stream << m_primaryViewActive; stream << m_splitter->saveState(); + if (!m_title.isEmpty()) { + stream << m_title; + } + return state; } @@ -328,6 +331,12 @@ void DolphinTabPage::restoreState(const QByteArray &state) QByteArray splitterState; stream >> splitterState; m_splitter->restoreState(splitterState); + + if (!stream.atEnd()) { + QString tabTitle; + stream >> tabTitle; + setTitle(tabTitle); + } } void DolphinTabPage::setActive(bool active) |
