summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Haumann <dhaumann@kde.org>2016-09-02 12:16:06 (GMT)
committerDominik Haumann <dhaumann@kde.org>2016-09-02 12:18:45 (GMT)
commita0c5008315fcc8564b61ca6acc3df83850ad12fe (patch)
treef6795b3a11195b186a3158e5f1dadd0cd7303984
parentbebc8f1b868e97c7bbeaab826df85a8f33f78b05 (diff)
Attempt to fix removing hidden view spaces
Maybe a view space (or splitter) was deleted twice BUG: 367861
-rw-r--r--kate/kateviewmanager.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/kate/kateviewmanager.cpp b/kate/kateviewmanager.cpp
index b516b51..afbf95b 100644
--- a/kate/kateviewmanager.cpp
+++ b/kate/kateviewmanager.cpp
@@ -1045,10 +1045,10 @@ void KateViewManager::restoreViewConfiguration(const KConfigGroup &config)
void KateViewManager::removeHiddenViewSpaces()
{
// collect all empty view spaces
- QSet<KateViewSpace *> hiddenViewSpaces;
+ QVector<QPointer<KateViewSpace> > hiddenViewSpaces;
foreach (KateViewSpace *vs, m_viewSpaceList) {
if (vs->size().isEmpty()) {
- hiddenViewSpaces.insert(vs);
+ hiddenViewSpaces.push_back(vs);
}
}
@@ -1056,7 +1056,10 @@ void KateViewManager::removeHiddenViewSpaces()
const QList<QSplitter *> splitters = findChildren<QSplitter *>();
foreach (QSplitter * splitter, splitters) {
if (splitter->size().isEmpty()) {
- hiddenViewSpaces += findChildren<KateViewSpace *>().toSet();
+ const QList<KateViewSpace *> children = findChildren<KateViewSpace *>();
+ for (auto & child : children) {
+ hiddenViewSpaces.push_back(child);
+ }
}
}