Planet KDE Planet KDE Planet KDE 48 48 Thu, 01 Oct 2020 14:08:57 +0000 Plasma and the systemd startup Thu, 01 Oct 2020 09:00:41 +0000 <h1>About</h1> <p>Landing in master, plasma has an optional new startup method to launch and manage all our KDE/Plasma services via a systemd user instance rather than the current boot scripts. This will be available in Plasma 5.21.</p> <p>It is currently opt-in, off by default. I hope to make it the default where available after more testing and feedback, but it is important to stress that the current boot-up method will exist and be supported into the future. A lot of work was put into splitting and tidying so the actual amount of duplication in the end result is quite small and managable.</p> <p><a href=""><img src="//" alt="Our logos are weirldy similar...conspiracy?"></a></p> <h1>Motivation</h1> <h2>Overlapping requirements</h2> <p>We have to start a lot of things in a given order. Systemd naturally is designed for handling doing this.</p> <p>Whilst we already have a somewhat working system, it has issues. One classic problem is services that talk to other services needing to be both spawned but also fully initialised before the other can send a message. DBus activation solves a lot; but not quite enough.</p> <p>For example, we have the real world case of scripts run long before plasmashell trying to send notifications; we want DBus daemon to know our notification server it's activatable so that it will pause the dispatch of the message, but making it DBus activatable can't guarantee the dependencies are run in the correct order. This is currently solved with a <del>genius</del> horrific hack.</p> <p>But starting things up is only half the battle. We currently have a big issue with shutting things down. Whose responsibility is it to stop running services? A lot of things only exit because their wayland connection is swept away. When dealing with services that potentially restart during the session lifespan, this solution is far from trivial and the current situation is fundamentally broken.</p> <h2>Customisation / Sysadmin Familiarity</h2> <p>Most users and especially sysadmins already have to learn how to use their init system. Whether it's simply enabling a service on boot, or something much more complex users are exposed to it already. If not, there is good existing documentation and countless Stackoverflow posts to answer any question.</p> <p>We had a meeting akademy 2 years ago about use of systemd and it was the sysadmins from Limux who clearly knew far more than any programmer as to how it should all work. There is a lot more merit in using existing things than just sharing code.</p> <hr> <p>Another big motivating factor was the ability for customisation. The root of Plasma's startup is very hardcoded. What if you want to run krunner with a different environment variable set? or have a script run every time plasmashell restarts, or show a UI after kwin is loaded but before plasma shell to perform some user setup? You can edit the code, but that's not easy and you're very much on your own.</p> <p>Systemd provides that level of customisation; both at a distro or a user level out of the box. From our POV for free.</p> <h2>CGroups and resource limits</h2> <p>I've talked about use of <a href="">cgroups for applications</a> for better control of resources. Especially as more things become multi-process. </p> <p>CGroups and slices provide several benefits over what we can do currently. Because resources are always relative to within the parent slice, we are able to boost resources as well as limit things. This will allow us to bump kwin and such ever so slightly without needing elevated cap privileges.</p> <p>This also works the other way; cgroups have some extra scheduler features not otherwise available. We can not just set weigh to a process, but also absolute limits. This could be useful for file indexers and alike to minimise battery drainage or capture runaway processes. CGroups are where all the new kernel features are.</p> <p>Memory management is another factor, when we run out the kernel comes in and kills some processes.<br> We can tag some services as being safer to OOM kill than others with a lot more granularity than a single oomscore adjustment. We can provide expected memory usages for a service, we can put defaults levels on entire slices at once, and it's all easily customisable by the user if their opinions don't match our upstream defaults.</p> <h2>Logging</h2> <p>The current state of logging is a mess. One of two things happen. Either stderr from a service is lost, or logs go into one giant "xsession-errors" file. This file exists on a real file system slow expanding and expanding. It doesn't rotate, if it gets too big your home folder becomes full and things explode. Each time you log in, we override that log, so we lose any history.</p> <p>Systemd provides queryable logging with each unit, and each invocation of each unit being separate. It's already making my life a lot easier for the last bugs I've been working on. When people on bugzilla have this too, it'll make everything easier.</p> <h1>The road to get here</h1> <h2>Previous implementations</h2> <p>A plasma systemd boot has been <a href="">tried before</a> by Elias Probst. It worked well as a demo, and was used as inspiration for some parts. The key difference now is instead of trying to design around plasma, we're changing plasma to fit what we need and really put the focus on every last detail.</p> <h2>Refactor, Split, Refactor, Split, ...</h2> <p>Unintuitively the first start of a port to systemd was a complete rewrite of the legacy path.</p> <p>Plasma used to be managed by a tree of processes that would spawn, set up some environment variables, spawn the next part of the boot and continue running. We eventually get to ksmserver, which was a monolith that did many many things. It started several hardcoded processes like kwin, then all the autostart .desktop files, and then session restore. There were many reasons to break this up that I outlined when I started in <a href="">2018</a>.</p> <p>Since then we've been chopping a tiny part out every release. Each release would split out a tiny part at a time so we could always be on top of any regressions that happened. </p> <p>Once we'd refactored and rewrote some parts we could have a very clear and readable understanding of <a href=""> what actually happens in a plasma boot</a> and what is really dependent on what.</p> <p>The biggest problem that we have is many things rely on environment variables or even xrdb databases to be correct at the time of launching; several early parts of the boot (kcminit, kded phase0) will adjust these and the next parts may rely on these for correct theming. </p> <p>Another massive rewrite that landed (by Kai Uwe Broulik) was the detaching of kwin from ksmserver. kwin needs to know which session we're restoring so that restored windows can be placed at the right place; this previously came from an environment variable that means we needed ksmserver up and running to spawn kwin. We rewrote how that all works and gets communicated so the order can be agnostic but still without any features getting lost.</p> <h2>Final patchset</h2> <p>Eventually we got to a point where ksmserver is <em>only</em> dealing with X11 session management. We have another quite tiny binary (<code>plasma_session</code>) that <em>only</em> deals with starting services in a specific order. And everything else is completely separate standalone independent components. This has been released for a while. Even without the systemd boot, everything is in a much much cleaner better off state.</p> <p>The final patch to use systemd is then really quite boring and small. We just don't call the <code>plasma_session binary</code>, and instead try to start a systemd target; <code></code>.</p> <p>All our core services ship their own .service files which plasma-workpace requires for a full Plasma session.</p> <p><a href=""><img src="//" alt="This picture shows random circles and lines. I felt it helped break up the wall of text."></a></p> <h2>Autostart files</h2> <p>One of the key aspects of startup is handling autostart .desktop files in /etc/xdg/autostart or ~/.config/autostart. We need this to work as before.</p> <p>Benjamin Berg (of Red Hat and Gnome) came up with a very elegant solution using a <a href="">systemd generator</a>. It goes through all the .desktop files parsing them and generates an appropriate systemd service automagically.</p> <p>For application developers everything keeps working the same, but to an end user we can interact with them like native services. We get the best of both worlds.</p> <p>Despite being a shared implementation even KDE-specific things like X-KDE-AutostartCondition just work. Implementation wise the generator converts this into an ExecCondition= line which then calls into a plasma-shipped binary to check if it's allowed.</p> <h1>Current state</h1> <h2>Is it faster?</h2> <p>A lot of the prep work over the past few years to get to this state has made absolutely massive differences. The splitting found bugs dead code and potential optimisations that add up to magnitudes of difference.</p> <p>As for switching over to the systemd itself, it should be roughly the same. Ultimately we're triggering the exact same set of things in the exact same order with the exact same blocks if we've done our job properly. Sorry to disappoint!</p> <h2>Is it finished?</h2> <p>The fundamentals are definitely at a point that I think are stable and working; but we haven't enabled all of the potential extra features we have available. I would welcome people who are experiences to give feedback and help out.</p> <h1>Enabling</h1> <p>You must have latest master of Plasma, it is not in the 5.20 beta. </p> <p>Enable with:</p> <pre><code class="language-sh">kwriteconfig5 --file startkderc --group General --key systemdBoot true</code></pre> <p>As mentioned above there are checks that you have the systemd 246 or newer for the generator of existing autostart services to work.</p> <p>To confirm the boot worked correctly you can run</p> <pre><code class="language-sh">systemctl --user status plasma-plasmashell.service</code></pre> <p>It should show as active.</p> <p>This safety check of 246 can be skipped. You will lose auto-activation of apps using the classic .desktop file approach, but everything else still works. I won't mention how publicly to avoid false bug reports, but as a dev you can probably find out.</p> <h3>Dev setups - a caveat</h3> <p>If you build your own KDE and install into a non standard prefix, instead of getting Plasma from your distribution, there is one new hurdle. Systemd user sessions starts earlier than most people set their custom prefixes so naturally it can't find things in your new paths.</p> <p>There are multiple solutions, simplest is to re-run <code>./install-sessions</code> script in plasma-workspace which contains a workaround for systemd to find services.</p> <h1>Wrap Up</h1> <p>A lot of the work done to get to this stage has been extremely beneficial to all users regardless of whether they end up actually using this. We fixed and cleaned so much along the way.</p> <p>I strongly believe the benefits it offers are very real, and look forward to hearing feedback from users using it.<br> If you do have any issues please do reach out to me in the usual channels.</p> David Edmundson SoK 2021: Mentor Wanted! Wed, 30 Sep 2020 09:40:00 +0000 <p>The Season of KDE is a 3 weeks long program that provides an opportunity for people to do mentored projects for KDE.</p> <p>We are still looking for more mentors for SoK 2021. So please consider mentoring for this year season and adding ideas related to the project you are working on in the <a href="">Wiki page</a>. And joining the #kde-soc channel.</p> <p>Possible ideas includes but not limited to:</p> <ul> <li>Updating your application user documentation</li> <li>Write technical documentation for a framework</li> <li>Port your application to non-deprecated Qt and KF5 APIs</li> <li>Modernize some part of the code of an application</li> <li>Implement a new feature</li> <li>And a lot more, SoK is not limited to development :)</li> </ul> Carl Schwan Creating an Embedded Qt Quick Application in Visual Studio (2/2) Wed, 30 Sep 2020 08:15:21 +0000 <div class="hs-featured-image-wrapper"> <a href="" title="" class="hs-featured-image-link"> <img src="//" alt="Creating an Embedded Qt Quick Application in Visual Studio (2/2)" class="hs-featured-image" style="width:auto !important; max-width:50%; float:left; margin:0 15px 15px 0;"> </a> </div> <p>In <a href="">part 1 of this post</a> we showed how to create a multi-platform Qt Quick application project in Visual Studio targeting Windows and Embedded Linux. We will now show how to run the application on an embedded device. We will then continue developing the project into the full embedded application that we set out to create. Finally, we will use the VS debugger to remotely debug the application's C++ and QML code. </p> <img src="//;k=14&amp;;;bvt=rss" alt="" width="1" height="1" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important; "> Qt Dev Loop Second Beta out for Krita 4.4.0 Tue, 29 Sep 2020 09:11:58 +0000 <p>Today, we’re releasing Krita 4.4.0 beta 2: we found a number of regressions and release blocking bugs.</p> <p>This beta has Android builds too, since we fixed many issues with accessing files on Android: however, because we now add translations the APK files are too big for the Play Store, and you will have to download them from</p> <p><span style="color: #ff0000;"><strong>NOTE for Windows Users: Microsoft has changed the way applications signed with certificates are handled. Only Digicert certificates are automatically trusted, other certificates will only be trusted if enough people bypass smartscreen to run the signed application. Our builds are absolutely safe, so you can safely do that. </strong></span><span style="color: #ff0000;"><strong>If you see the “Windows protected your PC” screen, press “More Info”, then select “Run anyway”.<br> </strong></span></p> <p><a href="">The full release notes bring you all the details</a>!</p> <p><iframe src="//" width="560" height="315" frameborder="0" sandbox="allow-same-origin allow-scripts allow-popups" allowfullscreen="allowfullscreen" data-mce-fragment="1"></iframe></p> <h2>Bugs fixed since beta 1</h2> <ul> <li>Disable the DDS file format.</li> <li>Fix crash when loading a file with reference images (<a href="">BUG:426839</a>)</li> <li>Fix lightness strength option for smudge engine (<a href="">BUG:426874</a>)</li> <li>Fix Cutoff Pattern option <a href="">BUG:426874</a> </li> <li>Android: Vector/references don’t get rendered (<a href="">BUG:422312</a>)</li> <li>Fix updates of color picker’s preview (<a href="">BUG:426867</a>)</li> <li>Windows: add .lnk files for starting Krita in minimal and animation mode</li> <li>Fix crash when undoing Rectangle Selection and doing redo after</li> <li>Fix a crash when moving local selection mask (<a href="">BUG:426816</a>)</li> <li>Fix shortcut for Polygonal Selection Tool (<a href="">BUG:426916</a>)</li> <li>Fix update of color preview in MyPaint Color Selector on mouse click</li> <li>SeExpr: assert isDirty on the correct preset instance (<a href="">BUG:426911</a>)</li> <li>Fix snapping decorations in Create Path Tool (<a href="">BUG:426514</a>)</li> <li>Android: Use Storage Access Framework for all file operations (<a href="">BUG:424541</a>, <a href="">BUG:423670</a>)</li> <li>Android: show recent files on Welcome widget</li> <li>Android: Fix problem with loading/saving file layer</li> <li>Android: Fix saving for files with no extension</li> <li>Android: Fix saving with selections</li> <li>Bugfix: usage logging could not be saved to a file on Android (<a href="">BUG:427043</a>)</li> </ul> <h2>Download</h2> <h3>Windows</h3> <p>If you’re using the portable zip files, just open the zip file in Explorer and drag the folder somewhere convenient, then double-click on the krita icon in the folder. This will not impact an installed version of Krita, though it will share your settings and custom resources with your regular installed version of Krita. For reporting crashes, also get the debug symbols folder.</p> <ul> <li>64 bits Windows Installer: <a href="">krita-x64-4.4.0-beta2-setup.exe</a> </li> <li>Portable 64 bits Windows: <a href=""></a> </li> <li><a href="">Debug symbols. (Unpack in the Krita installation folder)</a></li> </ul> <ul> <li>32 bits Windows Installer: <a href="">krita-x86-4.4.0-beta2-setup.exe</a> </li> <li>Portable 32 bits Windows: <a href=""></a> </li> <li><a href="">Debug symbols. (Unpack in the Krita installation folder)</a></li> </ul> <h3>Linux</h3> <ul> <li>64 bits Linux: <a href="">krita-4.4.0-beta2-x86_64.appimage</a> </li> <li>64 bits Linux <a href="">G’Mic-Qt plugin appimage</a> </li> </ul> <p>(If, for some reason, Firefox thinks it needs to load this as text: to download, right-click on the link.)</p> <h3>OSX</h3> <ul> <li>OSX disk image: <a href="">krita-4.4.0-beta2.dmg</a> </li> </ul> <p>Note: the gmic-qt is not available on OSX.</p> <h3>Android/ChromeOS Beta</h3> <p>This time, the Android releases are made from the release tarball, so there are translations. We consider Krita on ChromeOS and Android still <strong><i>beta</i></strong>. There are many things that don’t work and other things that are impossible without a real keyboard.</p> <ul> <li><a href="">64 bits Intel CPU APK</a></li> <li><a href="">32 bits Intel CPU APK</a></li> <li><a href="">64 bits Arm CPU APK</a></li> <li><a href="">32 bits Arm CPU APK</a></li> </ul> <h3>Source code</h3> <ul> <li><a href="">krita-4.4.0-beta2.tar.gz</a></li> <li><a href="">krita-4.4.0-beta2.tar.xz</a></li> </ul> <h3>md5sum</h3> <p>For all downloads:</p> <ul> <li><a href="">md5sum.txt</a></li> </ul> <p><!-- <h3>Key</h3> The Linux appimage and the source .tar.gz and .tar.xz tarballs are signed. You can retrieve the public key over https here: <a href=""> 0x58b9596c722ea3bd.asc</a>. The signatures are <a href="">here</a> (filenames ending in .sig).--></p> <h2>Support Krita</h2> <p>Krita is a free and open source project. Please consider supporting the project with <a href="">donations</a> or by <a href="">buying training videos!</a> With your support, we can keep the core team working on Krita full-time.</p> <p>The post <a rel="nofollow" href="">Second Beta out for Krita 4.4.0</a> appeared first on <a rel="nofollow" href="">Krita</a>.</p> Krita News Teaching Comparing Strings in Python the Hard Way Mon, 28 Sep 2020 22:39:44 +0000 <h1> <h2>Wait, is that actually related to KDE?</h2> </h1><p><em>If you read between the lines…</em></p> <p>Some long-time subscribers may remember that I am teaching math to 10-18 year old students. The COVID-19 situation nearly made me quit and look for an alternative to earn my rent, but my love for the kids and teaching them was stronger. After a few months of shortage, we found ways to responsibly resume the meetings, either online or with safety measures.</p> <p>When schools were closed, some parents wondered what they could do to drag their offsprings away from computers; playing computer games seemed to be the new all-time favorite hobby. Of course, resistance was expected. Why not turn this interest into something useful? I didn’t expect that kids as young as eight are interested to learn how to create games. But why not? I learned from electronic magazines and books how computers, MS BASIC, and Z80 assembly worked when I was ten, and I am sure I would have been interested with eight, if my classmate had broken his leg two years earlier… But that’s not the story I want to tell.</p> <h2>An Evil Plan and Lessons Learned</h2> <p>Today I was again supporting a just-turned-thirteen year old in his journey to learn Python. Earlier, we had already mastered coordinate geometry to move colorful images with PyQt on key presses, so variables, arithmetics, and conditionals in Python are well understood. We also used lists of strings to write simple “guess the correct answer” games. To automatically label the answers with A, B, C, etc. I showed him <tt>ord</tt> and <tt>chr</tt> functions, so he was aware that letters are internally stored as numbers.</p> <p>But for me learning to code is not only about writing games. What I call “theory” is writing programs that solve seemingly uninteresting tasks. Showing him the specification and a partial implementation of a “orderNumbers” function, today’s exercise was to solve the same task for two strings.</p> <pre class="brush: plain; title: ; notranslate wp-block-syntaxhighlighter-code"> def orderNumbers(n1, n2): ''' Decide about the ordering of two numbers Result: -1, when n1 comes before n2, 0, when n1 is the same as n2, 1, when n1 comes after/behind n2 ''' if n1 &lt; n2: return -1 elif n1 == n2: return 0 # ... def orderStrings(s1, s2): # ... </pre> <p>Intuitively, he started by typing “if s1 &lt; s2:”, then he paused, and said: “No, this won’t work!”, and erased the faulty line. His understanding of strings is that they are a sequence of letters, each of them represented by a number, so his conclusion was that a single comparison cannot determine the ordering of complete words or names.</p> <p>I could have simply said “It works, Python is that easy!”, but I didn’t. My evil plan was to make him implement that function the hard way. And I got rewarded, because he had to solve every single challenge this task offers.</p> <ul> <li>we cannot use a simple “for c in s” loop, because we have to iterate both strings at the same time</li> <li>we have to abort the loop/return early if the decision is final</li> <li>he also found that “Andreas” incorrectly comes after “AXEL”, which forced us to understand the ASCII table to handle case conversion (I didn’t expect he finds this issue, but I am glad he did)</li> <li>he had to fix the error that made the program abort when comparing “Andrea” with “Andreas” due to missing boundary checks</li> <li>and finally, he needed to fix a wrong result when comparing two identical strings</li> </ul> <p>Here is his final function (reformatted and variables renamed for brevity, his version was a bit messy).</p> <pre class="brush: python; title: ; notranslate wp-block-syntaxhighlighter-code"> def orderStrings(s1, s2): ''' Decide about the ordering of two strings, ignoring case Result: -1, when s1 comes before s2, 0, when s1 is the same as s2, 1, when s1 comes after/behind s2 ''' pos = 0 while True: if pos &gt;= len(s1) or pos &gt;= len(s2): if len(s1) &lt; len(s2): return -1 elif len(s1) &gt; len(s2): return 1 else: return 0 c1 = ord(s1[pos]) c2 = ord(s2[pos]) if c1 &gt; 90: c1 -= 32 if c2 &gt; 90: c2 -= 32 if c1 &lt; c2: return -1 elif c1 &gt; c2: return 1 else: pos += 1 </pre> <p>Of course his case checks are not really correct; I will have to introduce him to Unicode and Python’s built-in ways to handle case-ignoring comparisons sometimes later.</p> <p>Lessons learned:</p> <ul> <li>using an index variable to iterate through sequences</li> <li>using arithmetic on the ASCII codes to transform letters</li> <li>missing boundary checks can “crash” your program</li> <li>making sure you handle every case of inputs possible</li> </ul> <p>Exercise solved, well done!</p> Christoph Feck Kate in the Windows Store - Current Status Mon, 28 Sep 2020 20:40:00 +0000 <h2 id="one-year-in-the-store">One year in the store</h2> <p>Kate is now in the <a href="">Windows Store</a> since a bit over one year, our initial submission went online on <a href="">September 12, 2019</a>.</p> <p>The submitted installers are always taken 1:1 from our very lovely <a href="">Binary Factory</a>. They just get some test drive if they behave well and then are submitted like described <a href="">here</a> with the <a href="">KDE e.V.</a> account.</p> <p>Therefore the most work was done by all the people that created and keep the <a href="">Craft</a> tooling &amp; <a href="">Binary Factory</a> working! Thanks a lot to our awesome system administrators, Hannah and all other involved people ;=)</p> <p>Hannah reminded me that it is time for an updated version of Kate, too, the last submission was the 20.04 release. Therefore at the moment the 20.08 release is in the submission queue and should arrive in the store in the next days. It will featuring all nifty new 20.08 features and some post 20.08 bug fixes.</p> <h2 id="over-60-000-installations-nice">Over 60,000 installations, nice!</h2> <p>Since the initial submission to the store, Kate has now been installed 60,346 times. That means roughly 5,000 new installations per month!</p> <p>This might pale compared to a lot of other projects out there, but given we are for example a lot longer available on Windows via e.g. <a href="">Chocolatey</a>, but have there only 8,796 downloads since ever, this is really awesome.</p> <p>Perhaps we are even more often installed via direct downloads from the Binary Factory installers as linked on our <a href="">Get Kate</a> page, but still, it is nice to see that there is actually interest in our software on Windows, and not just by a handful of people.</p> <p>I hope this interest in our text editor will expand in the future and might result in more contributors on Windows for both Kate and the overall KDE community.</p> <p>If you are interested in our stuff, please help out to improve it. For example <a href="">code contributions</a> are easier than ever since we moved to our new and shiny <a href="">KDE GitLab instance</a>.</p> <h2 id="reviews">Reviews?</h2> <p>Now, after a lot of self-praise, let’s take a look at our reviews in the Windows Store.</p> <p>The internal store web interface shows that we have overall 96 reviews since we are in the store and that the overall rating is 4.7 stars. The concrete results breakdown can be seen below.</p> <p align="center"> <img src="//"> </p> <p>For me, this is actually a very nice feedback. Unlike some comments we got on reddit and Co. after the initial publishing, no, we didn’t end up with just one star ratings in no time.</p> <h3 id="how-users-praise-us">How users praise us!</h3> <p>Here some examples of reviews that should make our contributors happy to read (without any names &amp; with some grave spelling mistakes that Kate’s spell checker underlined for me fixed, and no, I didn’t add that heart smiley Unicode char, that was there in that one review, it is a 1:1 copy):</p> <blockquote> <p>Wow! Finally. This superb, multifunctional and so very feature rich editor from Linux is now available on Windows! And as an app, so we get automatic updates along with other Windows apps! Sweet💖</p> <p>The perfect app to substitute the default notepad of Windows 10.</p> <p>A powerful text editor with viewer option and code editor</p> <p>I was a user of KDE plasma I thought before downloading this I thought there will be a new interface but the fonts tabs themes were all KDE Plasma THIS IS FAR MORE BETTER THAN NOTEPAD….</p> <p>Works flawlessly, easily replaces windows notepad, notepad++. Plus its free AND open source. Comes from KDE so that’s another great thing. Really loved the work from KDE into this product. Thanks Developers &amp; contributors</p> <p>It’s always my first choice for a text editor. I really appreciate KDE’s work</p> <p>The best editor, on any platform. It’s my favorite on any platform. First used it on Linux with KDE3, and been in love with it ever since. Highly recommended!</p> <p>This is a very powerful open-source editor (and works great on high-DPI monitors too).</p> <p>It feel in love with Kate on Kubuntu and now I use it everywhere! Thanks KDE for making great software</p> <p>This is Kate from KDE, now on Windows. HiDPI works (I’d say better than fractional scaling in Kubuntu, even), everything works, and it’s a nice editor.</p> <p>I love Kate Text Editor, been using it on Windows and Linux for a year or two now. I like having a reliable, simple-like-notepad, yet with multi-tabs, sessions, and plenty of additional features if I want them (coding, etc.), thanks to the team for keeping this excellent application up to date! Glad there’s a Windows Store (for better or worse) version to make it easier for Windows users / those confused by the web-site’s download setup, to get it, and for it to auto-update also.</p> </blockquote> <h3 id="do-areas-to-improve-exist-for-sure">Do areas to improve exist? For sure!</h3> <p>Yet, there is not just praise, naturally. Here some reviews that point to areas we shall improve:</p> <blockquote> <p>The application is very good and complete but the graphical user interface is not really polished for Windows which if it causes me conflict, fix that, keep it up.</p> <p>There are some rendering issues. I loved Kate on Linux. Also my system language settings are set to English, yet it displays in a different language.</p> <p>I’m used to KDE applications from Linux, and I’m very glad that it is now available on Windows as well. I really like these kind of oldschool editors compared to e.g. Visual Studio Code, because of their simple interface and exactly the right amount of features. The only thing I miss from Linux is the terminal-integration. Would be great to have KDevelop in the store as well!</p> <p>It is one of the best note editor that can be found in the Microsoft Store. But I think the size of the app is too big without any reason.</p> <p>Amazing app from KDE, but I have to admit it looks much better in Linux</p> <p>Very good. However, it does not save the changes we do the editor’s fonts and colors, which makes it unusable for me.</p> <p>A good editor, I uses it in Linux and now that I have to work in windows, I’m glad to find it here also. I dislike the Microsoft store version because I cannot set it as default editor for .java files making it very tiresome to use. Uninstalling it.</p> <p>This is a very clean port to Windows. It maintains its core-feature parity between Linux, Windows and Mac. That’s not such a bad thing, if you are looking strictly for a text editor. Where things start to distinguish are the lack of terminal support, and or plugins. When you have options like VS Code (Insiders) which have WSL coding options (remote WSL from Windows), I don’t see why I would go with Kate. But, I expect good things to come, as they work to include WSL, and get the feature parity back</p> <p>Perfect! Just a small issue: in 4K monitors the icon seems too small (this is not an issue if you install it normally by downloading the installer). Not sure where should I report this bug :\</p> <p>When using a dark theme, the icons keep dark as they are in light theme, there is no light icons to use with a dark theme</p> <p>The code highlight feature is great. It would be better if you could have embedded terminals like the Linux version.</p> <p>I was waiting for this day. KDE is awesome. I use KDE Neon everyday. KDE has a lots of features that Windows can’t offer. Kate is one of my favorite program since I found Kate. I just want a feature on Kate which is, like notepad++ when we close the program it automatically saves all tabs and files. So next time when we start the program. It starts like the last session and automatically loads everything for you. Thanks…</p> <p>One star deducted as Dark theme icons are black (should be white or at least not black) otherwise awesome quick editor. Thanks</p> </blockquote> <p>If somebody has time to work on any of the above issues, please consider to <a href="">contribute</a> improvements to our stuff. Some small stuff like improving the shipped icon or enhancing which file extensions we support was already done. Other stuff like better handling of dark/light mode for icons is still <a href="">work in progress</a> and any help wanted!</p> <h2 id="the-future">The Future?</h2> <p>I hope more people will join the effort to bring KDE software to Windows. As you can see above, it is appreciated by Windows users, if the port is done in a reasonable way.</p> <p>I think having more of our stuff there (and on any other platform) will help to keep our software relevant by broadening our user &amp; contributor base.</p> <p>Beside this, it improves the quality of our software, as alone having to compile it with a very different compiler and different underlying libraries often uncovers existing issues.</p> <p>Many fixes done for Windows will benefit other platforms, too, like e.g. the better deployability of our KDE Frameworks we worked on in the past. This was driven a lot by the needs of the Windows (and macOS) packaging that is very different to how Linux distributions deploy our stuff.</p> Kate News What is cooking on KDE websites this month (September)? Mon, 28 Sep 2020 14:30:35 +0000 <p>This month a few cool things happened to the KDE websites.</p> <ul> <li> <p>The wiki instance we use was migrated to MediaWiki 3.34 (latest LTS version), bringing a few improvements in the translations module and fixing the problem where translated pages couldn’t be moved around. The commenting plugin was sadly discountinued in this version and instead the Echo extension was added which provides a way to ping people.</p> </li> <li> <p>Another improvement related to the wikis is the creation of a small module allowing user to authenticate with the Identity replacement. The source code can be found <a href="">here</a>. This brings us a step closer to the replacement of</p> </li> <li> <p>This month, a completely rewritten backend for Season of KDE was merged. This was part of the work Anuj did during GSoc this year. It is not yet deployed into production, but I host a <a href="">demo</a> so you can try it. The new features allow for a mentor to comment on proposals, and mentees can now use markdown when writing a proposal. The new system now uses Symfony, one of the biggest PHP frameworks, and is integrated in MyKDE too, so mentors and mentees get a badge after completing SoK. The admin interface was also significantly improved. Great work Anuj!</p> </li> </ul> <p><img src="//" alt="Season homepage"> <img src="//" alt="Season admin"></p> <ul> <li> <p>And while at it, please consider mentoring for this year’s SoK program. It is a good opportunity to bring new blood to KDE. <a href=""></a>.</p> </li> <li> <p>The new developer documentation website also got a few updates and now contains a complete tutorial about how to write a <a href="">Plasma Widget</a>. Thanks to Zren for this contribution.</p> </li> <li> <p>Elisa, everyone’s favorite music player, also got a new website developed by Anubhav Choudhary and Nikunj Goyal. You can check it out at <a href=""></a>.</p> </li> <li> <p>Subtitle Composer, a subtitle editor, also got a new website developed by Thiago Sueto. You can check it out at <a href=""></a>.</p> </li> <li> <p>The <a href="">atelier website</a> was also updated by Lays Rodrigues.</p> </li> <li> <p><a href=""></a> now uses the Aether theme.</p> </li> <li> <p>I sent a proposal to use a fork of the Blender Fund tool for KDE Fundraising in the community mailing list. You can check out the demo for <a href="">KDE</a> and <a href="">Krita</a>.</p> </li> </ul> Carl Schwan Full Stack Tracing Part 1 Mon, 28 Sep 2020 09:00:08 +0000 <p>Full stack tracing is a tool that should be part of every software engineer’s toolkit. It’s the best way to investigate and solve certain classes of hard problems in optimization and debugging. Because of the power and capability it gives the developer, we’ll be writing a series of blogs about it: when to use it, how to get it set up, how to create traces, and how to interpret results. Our goal is to get you capable enough to use full stack tracing to solve your tough problems too.</p> <p>Firstly, what is it? Full stack tracing is tracing on the full software stack, from the operating system to the application. By collecting profiling information (timing, process, caller, API, and other info) from the kernel, drivers, software frameworks, application, and JavaScript environments, you’re able to see exactly how the individual components of a system are interacting. That opens up areas of investigation that are impossible to achieve with standard application profilers, kernel debug messages, or even strategically inserted printf() commands. One way to think of full stack tracing is like a developer’s MRI machine that allows you to look into a running system without disturbing it to determine what is happening inside. (And unlike other low-level traces that <a href="">we’ve written about before</a>, full stack tracing provides a simpler way to view activity up and down the entire software stack.)</p> <h2>Use cases</h2> <p>When do you need full stack tracing? Since it gives you visibility across a running system, it’s a great solution anytime you need to do things like:</p> <ul> <li>Gain visibility into the software running below the level of your application and API calls</li> <li>Measure timing and synchronization of events that happen across multiple applications</li> <li>Optimize application startup time, locating startup script inefficiencies, and trimming down system boot time</li> <li>Verify communication between a client and server process, or any other process pairs like publisher and subscriber, or application and watchdog</li> <li>Detect background processes that interfere with an application</li> <li>Pinpoint places in the system that consume excessive CPU cycles</li> <li>Find problematic interactions between multiple device drivers or independently running software stacks</li> <li>Correctly understand the behavior of a complex system before you make bug fixes or alterations</li> </ul> <h2>Battling slow boot time</h2> <p>To put all of this in context, let’s walk through an example where we used full stack tracing to solve a show-stopping problem for a client. In this case, it was an automotive customer creating an infotainment system with a rather complex software stack. The main application was created in Qt and ran on a <a href="">Nvidia Tegra X1</a>, which is an extremely powerful processor for an embedded system. The GPU rivals that of laptops with a quad core CPU. Because the software required integration from many partners, developers unfortunately realized very late during integration that despite all of the power, the infotainment system was taking over five seconds to show the application’s first screen. This was completely unacceptable, and we were asked to diagnose why it was taking so long.</p> <p>As much of the application was in QML, we first took a look at the code. While it certainly wasn’t crafted for speed – and they probably used far too much JavaScript code – this didn’t seem like the primary problem. We needed to determine if the boot issues were due to an overall sluggishness with too many pieces of software running, or if we could pinpoint the problems to one (or several) specific areas. Firing up the <a href="">QML profiler</a> highlighted something we didn’t expect: a trivial binding evaluation of a string to an image file in early startup took 180 milliseconds. What was happening underneath it that caused that binding to take so long?</p> <p></p><div id="attachment_25440" style="width: 1034px" class="wp-caption alignnone"> <a href=""><img aria-describedby="caption-attachment-25440" loading="lazy" class="wp-image-25440 size-large" src="//" alt="QML profiler trace of binding issue" width="1024" height="617" srcset=" 1024w, 300w, 1536w, 280w, 1609w, 600w, 560w" sizes="(max-width: 1024px) 100vw, 1024px"></a><p id="caption-attachment-25440" class="wp-caption-text">QML profiler showing long binding in action (similar issue, different app)</p> </div> <p> </p> <p>That’s a question that the QML profiler can’t answer. While you can make many educated guesses to figure out exactly what’s happening, it is this type of problem where full stack tracing is invaluable. It can tell you what Qt, C++, kernel, driver, or hardware interactions are happening underneath the QML so you can see where the time is being spent.</p> <p>By turning on full stack tracing for the kernel, syscalls, and C++, adding tracepoints within Qt, and rerunning the application, we were able to find that those long bindings were occurring because many libraries were being loaded for image plug-in formats. Since the application only used PNG files, we were able to eliminate a huge number of these unnecessary loads for other file plug-ins. That included the SVG plugin, which was especially heavy. Although the application was a Qt Quick app that didn’t use Qt Widgets, the SVG plugin was pulling in the relatively big Qt Widgets library, which was unneeded. (This is because the plugin was compiled with QtWidgets support enabled.) But while eliminating the plug-ins made a dramatic improvement, it still wasn’t fast enough, and it was taking far longer to boot than it should.</p> <p>Again, full stack tracing was able to show us that the disk I/O was a huge culprit and many applications were hammering the disk during startup. However, most of those applications accessing the disk were background tasks that weren’t critical to the startup procedure. Furthermore, most of the disk I/O was coming through a single call within syslog: the processes were emitting reams of debug output, going through syslog to write the data out to the flash drive. The CPU and GPU had more than enough horsepower to manage this, but the on-board flash was really cheap…and pretty slow.</p> <p>While it might have been better to remove unnecessary logging from those background tasks, that change would have required a lot of coordination and testing because many distinct software suppliers were involved. That would have introduced a good deal of risk to a project that was already perilously close to the production deadline. Instead, we settled for bumping up the main application’s priority. The increased priority let the GUI beat out those background tasks during boot up. The background tasks were able to harmlessly finish their work slightly later. This change was now able to bring the splash screen up within one second, meeting the customer requirements to everyone’s great relief.</p> <p>While full stack tracing was critical to the technical understanding of the problem, it was also necessary for the project management. With the high pressure of the impending deadline, engineers had to convincingly explain that the corrective actions being taken had a high degree of probable success. Full stack tracing indicated precisely what the problems were and exactly where in the software stack they were, avoiding any finger-pointing between suppliers.</p> <p></p><div id="attachment_25441" style="width: 1034px" class="wp-caption alignnone"> <a href=""><img aria-describedby="caption-attachment-25441" loading="lazy" class="wp-image-25441 size-large" src="//" alt="Full stack trace of QML binding issue" width="1024" height="245" srcset=" 1024w, 300w, 1536w, 1918w, 600w" sizes="(max-width: 1024px) 100vw, 1024px"></a><p id="caption-attachment-25441" class="wp-caption-text">QML binding shown with full stack tracing, highlighting SDA activity (similar issue, different app)</p> </div> <h2></h2> <h2>Until next time</h2> <p>Hopefully you’ll agree that full stack tracing could be a valuable skill to add to your repertoire. Stay tuned – our next blog will show you how to get it set up.</p> <p> </p> <p>If you’d like to learn more about Debugging and Profiling, you might be interested in one of <a href="">our training classes</a>.  Visit <a href="">this page</a> to find out some of the areas and correlating tools with which we are used to working, and with which we can help you.</p> <p> </p> <p> </p> <p></p><div class="panel panel-info"> <div class="panel-heading">About KDAB</div> <div class="panel-body"> <p>If you like this blog and want to read similar articles, consider subscribing via <a href="">our RSS feed</a>.</p> <p>Subscribe to <a href="">KDAB TV</a> for similar informative short video content. </p> <p>KDAB provides market leading software consulting and development <a href="">services</a> and <a href="">training</a> in Qt, C++ and 3D/OpenGL. <a href="">Contact us</a>.</p> </div> </div> <p>The post <a rel="nofollow" href="">Full Stack Tracing Part 1</a> appeared first on <a rel="nofollow" href="">KDAB</a>.</p> KDAB on Qt Qt Desktop Days 7-11 September Mon, 28 Sep 2020 08:51:45 +0000 <p><img loading="lazy" class="alignleft size-medium wp-image-25095" src="//" alt="" width="300" height="86" align="right" srcset=" 300w, 1024w, 1536w, 1170w, 858w, 1716w, 600w" sizes="(max-width: 300px) 100vw, 300px">We are happy to let you know that the very first edition of <a href="" target="_blank" rel="noopener noreferrer">Qt Desktop Days</a> 2020 was a great success! Having pulled together the event at very short notice, we were delighted at the enthusiastic response from <a href="">contributors</a> and attendees alike.</p> <p>Over <strong>500 registered</strong> attendees could enjoy five days of technical talks. The <a href="" target="_blank" rel="noopener noreferrer">program</a> shows the range and depth of offerings that kept people coming back.</p> <h3>Presentations</h3> <p>We started off the event week with an introduction from Kalle Dalheimer, KDAB’s CEO, followed by a Keynote on Qt 6 for the desktop from Giuseppe D’Angelo, an Approver of the Qt Project and a software engineer at KDAB. You can see this session already on our KDAB TV channel, here.</p> <div style="text-align: center; margin-bottom:15px;"><a href=""><img loading="lazy" src="//" alt="" width="300" height="172"></a></div> <p>After that, there was a series of varied topics that roughly fit into three tracks: QML, Testing and Widgets.</p> <p>A lot of attention was given to QML, ranging from how you migrate from widgets to QML, to showcasing QML or showcasing part of the QML design framework. There were two very interesting presentations about testing: one on behavior-driven testing and another on code coverage and how you drive your testing effort there, presented by our long time partner froglogic. We were introduced to KDDockWidgets, an advanced docking framework and a presentation from Bluescape showing how to add touch and pen input to an application.</p> <p>Two standalone sessions that come to mind were a fascinating account of the history of Qt and VLC (you likely know it best as Youtube) and a very interesting session from Microsoft presenting their Windows Subsystem for Linux, which included information on the new Windows insider program. More on all of that in the upcoming recordings…</p> <p>The whole show ended with a Q&amp;A session, where the audience could ask questions to a number of people on anything relating to Qt. Lots of very good and interesting questions, both for where we are today and what’s going to be in the future.</p> <h3>Talk Recordings</h3> <p>For those of you who missed the presentations this year – Stay tuned! We did record them all and will put them on YouTube as soon as we’re done with the post-production. Subscribe to our <a href="" target="_blank" rel="noopener noreferrer">YouTube channel</a>, and you’ll be the first to know when they’re out there.</p> <h4><strong>A big thank you to everyone involved. We really couldn’t have done it without you. Hope to see you all at Qt Desktop Days 2021!</strong></h4> <p><img loading="lazy" class="alignnone wp-image-25012" src="//" alt="" width="287" height="64" srcset=" 1829w, 300w, 1024w, 1536w, 600w" sizes="(max-width: 287px) 100vw, 287px"></p> <p> </p> <p>The post <a rel="nofollow" href="">Qt Desktop Days 7-11 September</a> appeared first on <a rel="nofollow" href="">KDAB</a>.</p> KDAB on Qt, Week log O¹ Sun, 27 Sep 2020 21:03:00 +0000 <p> week report on O²</p><p>In a nutshell, did some stuff, then done it again was happy with parts of it, and finaly ended the week on a positive note with a talk on QtCon brazil 2020</p><p>Highlights.</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="846" data-original-width="720" src="//"></a></div><p></p><p>New version for light Bg's using extra noise generated from the 2 active colours.</p><p>Made some progress in the internal rules for palette generation, as I have said on of my prime objectives is to be able to create extremely simple palettes with no more of 5-7 colours that area able to be translated in to fully working pallets. something I'm planing to start testing in qml next week. </p><p>In that note more work on the  QML components that test the mock-ups and animate the features, notice the progress bar deal with small values   <br></p><p></p><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="allowfullscreen" webkitallowfullscreen="webkitallowfullscreen" mozallowfullscreen="mozallowfullscreen" width="720" height="400" src="//" class="b-hbp-video b-uploaded" frameborder="0"></iframe></div><p>here you can see a zoomed version of the UI 2x notice the outline on the progress bar that changes the colour, flowing the edge of the progress all the way to the end. </p><p> </p><p>Finally Saturday I had the pleasure to participate in the QtCon brazil were I could use my native Portuguese :) sory guys ;). </p><p>All the talks available here ...  I highly recommend ... most of them are in English so ..  <br></p><p>Cheers and see you all next week .)<br></p> Nuno Pinheiro (pinheiro)