<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 12/30/2013 02:08 PM, Hugo Pereira Da
Costa wrote:<br>
</div>
<blockquote cite="mid:52C1705F.2090607@free.fr" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">On 12/30/2013 12:42 PM, David Faure
wrote:<br>
</div>
<blockquote cite="mid:4858492.kaVvuYtpJH@asterix" type="cite">
<pre wrap="">On Sunday 29 December 2013 20:07:38 Christoph Cullmann wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
if I play around with Kate on KF5, it laggs like hell the whole time.
I tried to profile, but guess I am stuck a bit.
#10 0x00007ffff3fbeaa0 in KConfig::reparseConfiguration (this=0x688130) at
/home/cullmann/local/kf5/src/frameworks/kconfig/src/core/kconfig.cpp:633
#11 0x00007fffe5bad6b7 in KStyle::styleHint (this=0x658da0,
hint=QStyle::SH_Widget_ShareActivation, option=0x0, widget=0x9f2050,
returnData=0x0) at
</pre>
</blockquote>
<pre wrap="">Yep, every call to styleHint() calls reparseConfiguration(), which is crazy.
This really needs to be redone:
commit d2dad4199d03d492480c170deb786fa9e533b5bf
Author: Àlex Fiestas <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:afiestas@kde.org"><afiestas@kde.org></a>
Date: Mon Dec 16 16:49:30 2013 +0100
[KStyle] Reparse the configuration each time styleHint is called
This is probably super expensive and it should only be done once it
is actually needed but it is the easy thing to do for now until we
hook some DBus into the style (or we find another solution).</pre>
</blockquote>
Concerning hooking some dbus into the style, oxygen (that in kf5
derives from kstyle, as opposed to KDE 4.x) already do so for
oxygen's own config change:<br>
<br>
<meta name="qrichtext" content="1">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;
-qt-user-state:0;"><!--StartFragment--> // use DBus connection
to update on oxygen configuration change</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;
-qt-user-state:0;"> QDBusConnection dbus =
QDBusConnection::sessionBus();</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;
-qt-user-state:0;"> dbus.connect( QString(),</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;
-qt-user-state:0;"> QStringLiteral( "/OxygenStyle" ),</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;
-qt-user-state:0;"> QStringLiteral( "org.kde.Oxygen.Style" ),</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;
-qt-user-state:0;"> QStringLiteral( "reparseConfiguration" ),
this, SLOT(oxygenConfigurationChanged()) );</p>
<p style="-qt-paragraph-type:empty; margin-top:0px;
margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px;"><br>
(in constructor)<br>
</p>
<p style="-qt-paragraph-type:empty; margin-top:0px;
margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px;"><br>
Could something similar be done in kstyle constructor's ? <br>
(though I have no clue about which signal things should connect
to).<br>
</p>
</blockquote>
And also, I don't understand why this is necessary at all ?
Should'nt the reparseConfiguration be done 'upstream'
(ksharedConfig) automatically on e.g. file change ? <br>
<br>
<blockquote cite="mid:52C1705F.2090607@free.fr" type="cite">
<p style="-qt-paragraph-type:empty; margin-top:0px;
margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px;"> </p>
<p style="-qt-paragraph-type:empty; margin-top:0px;
margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px;"><br>
</p>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<style type="text/css">
p, li { white-space: pre-wrap; }
</style><br>
<blockquote cite="mid:4858492.kaVvuYtpJH@asterix" type="cite">
<pre wrap="">
CCMAIL: <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:hugo@oxygen-icons.org">hugo@oxygen-icons.org</a>
diff --git a/tier4/frameworkintegration/src/kstyle/kstyle.cpp
b/tier4/frameworkintegration/src/kstyle/kstyle.cpp
index a2a4a7f..490ed51 100644
--- a/tier4/frameworkintegration/src/kstyle/kstyle.cpp
+++ b/tier4/frameworkintegration/src/kstyle/kstyle.cpp
@@ -334,6 +334,7 @@ QIcon KStyle::standardIcon(StandardPixmap standardIcon,
const QStyleOption */*op
int KStyle::styleHint (StyleHint hint, const QStyleOption* option, const
QWidget* widget, QStyleHintReturn* returnData) const
{
+ KSharedConfig::openConfig()->reparseConfiguration();
switch (hint)
{
case SH_ItemView_ActivateItemOnSingleClick:
</pre>
</blockquote>
<br>
<br>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<style type="text/css">
p, li { white-space: pre-wrap; }
</style> <br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kde-frameworks-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Kde-frameworks-devel@kde.org">Kde-frameworks-devel@kde.org</a>
<a class="moz-txt-link-freetext" href="https://mail.kde.org/mailman/listinfo/kde-frameworks-devel">https://mail.kde.org/mailman/listinfo/kde-frameworks-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>