<table><tr><td style="">tcanabrava created this revision.<br />Restricted Application added a project: Konsole.<br />Restricted Application added a subscriber: konsole-devel.<br />tcanabrava requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D13891">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This fixes quite a few bugs and open space for a massive cleanup.<br />
Because the symbols where not exported we recompiled the same object<br />
three times, one for the private library, one for the desktop<br />
application and another for the KPart, all of those having a static<br />
object inside of the same compilation unit - but linked in three<br />
different objects.</p>

<p>This added a static data in three different objects, the object that<br />
was supposed to be a singleton (!) - The result: KonsoleSettings::self()<br />
in mainwindow.cpp had one pointer, in TerminalDisplay had another,<br />
making the singleton useless.</p>

<p>Having just one singleton fixes a major misdesign in Konsole:<br />
There's a call-chain starting from main.cpp that goes thru all objects<br />
changing every setting needed, and most of the calls are just forwarding<br />
calls to another object.</p>

<p>With this fixed we can remove this call-chain, and do a<br />
connect(KonsoleSettings::self(), &KonsoleSettings::settingsChanged(),</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">...) inside of the object that needs to react to the changed setting</pre></div>

<p>making the code much smaller and easier to figure out what's going<br />
on.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R319 Konsole</div></div></div><br /><div><strong>BRANCH</strong><div><div>fixKConfigSingleton</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D13891">https://phabricator.kde.org/D13891</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/CMakeLists.txt<br />
src/settings/KonsoleSettings.kcfgc</div></div></div><br /><div><strong>To: </strong>tcanabrava<br /><strong>Cc: </strong>konsole-devel, herrold, ngraham, maximilianocuria, hindenburg<br /></div>