Changeset View
Changeset View
Standalone View
Standalone View
src/ExtendedCharTable.cpp
Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Line(s) | 66 | } else { | |||
---|---|---|---|---|---|
70 | 70 | | |||
71 | if (hash == initialHash) { | 71 | if (hash == initialHash) { | ||
72 | if (!triedCleaningSolution) { | 72 | if (!triedCleaningSolution) { | ||
73 | triedCleaningSolution = true; | 73 | triedCleaningSolution = true; | ||
74 | // All the hashes are full, go to all Screens and try to free any | 74 | // All the hashes are full, go to all Screens and try to free any | ||
75 | // This is slow but should happen very rarely | 75 | // This is slow but should happen very rarely | ||
76 | QSet<uint> usedExtendedChars; | 76 | QSet<uint> usedExtendedChars; | ||
77 | const SessionManager *sm = SessionManager::instance(); | 77 | const SessionManager *sm = SessionManager::instance(); | ||
78 | foreach (const Session *s, sm->sessions()) { | 78 | for (auto *session : sm->sessions()) { | ||
79 | foreach (const TerminalDisplay *td, s->views()) { | 79 | for (const auto *terminalDisplay : session->views()) { | ||
80 | usedExtendedChars += td->screenWindow()->screen()->usedExtendedChars(); | 80 | usedExtendedChars += terminalDisplay->screenWindow()->screen()->usedExtendedChars(); | ||
81 | } | 81 | } | ||
82 | } | 82 | } | ||
83 | 83 | | |||
84 | QHash<uint, uint *>::iterator it = _extendedCharTable.begin(); | 84 | QHash<uint, uint *>::iterator it = _extendedCharTable.begin(); | ||
85 | QHash<uint, uint *>::iterator itEnd = _extendedCharTable.end(); | 85 | QHash<uint, uint *>::iterator itEnd = _extendedCharTable.end(); | ||
86 | while (it != itEnd) { | 86 | while (it != itEnd) { | ||
87 | if (usedExtendedChars.contains(it.key())) { | 87 | if (usedExtendedChars.contains(it.key())) { | ||
88 | ++it; | 88 | ++it; | ||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |