D13891: Fix KConfig
Tomaz Canabrava
noreply at phabricator.kde.org
Wed Jul 4 21:17:51 BST 2018
tcanabrava created this revision.
Restricted Application added a project: Konsole.
Restricted Application added a subscriber: konsole-devel.
tcanabrava requested review of this revision.
REVISION SUMMARY
This fixes quite a few bugs and open space for a massive cleanup.
Because the symbols where not exported we recompiled the same object
three times, one for the private library, one for the desktop
application and another for the KPart, all of those having a static
object inside of the same compilation unit - but linked in three
different objects.
This added a static data in three different objects, the object that
was supposed to be a singleton (!) - The result: KonsoleSettings::self()
in mainwindow.cpp had one pointer, in TerminalDisplay had another,
making the singleton useless.
Having just one singleton fixes a major misdesign in Konsole:
There's a call-chain starting from main.cpp that goes thru all objects
changing every setting needed, and most of the calls are just forwarding
calls to another object.
With this fixed we can remove this call-chain, and do a
connect(KonsoleSettings::self(), &KonsoleSettings::settingsChanged(),
...) inside of the object that needs to react to the changed setting
making the code much smaller and easier to figure out what's going
on.
REPOSITORY
R319 Konsole
BRANCH
fixKConfigSingleton
REVISION DETAIL
https://phabricator.kde.org/D13891
AFFECTED FILES
src/CMakeLists.txt
src/settings/KonsoleSettings.kcfgc
To: tcanabrava
Cc: konsole-devel, herrold, ngraham, maximilianocuria, hindenburg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20180704/2cfcb9d9/attachment.html>
More information about the konsole-devel
mailing list