Language Selection

English French German Italian Portuguese Spanish

Kde Planet

Syndicate content Planet KDE
Planet KDE
Updated: 10 hours 41 min ago

Second Beta out for Krita 4.4.0

16 hours 28 min ago

Today, we’re releasing Krita 4.4.0 beta 2: we found a number of regressions and release blocking bugs.

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 download.kde.org

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. If you see the “Windows protected your PC” screen, press “More Info”, then select “Run anyway”.

The full release notes bring you all the details!

Bugs fixed since beta 1
  • Disable the DDS file format.
  • Fix crash when loading a file with reference images (BUG:426839)
  • Fix lightness strength option for smudge engine (BUG:426874)
  • Fix Cutoff Pattern option BUG:426874
  • Android: Vector/references don’t get rendered (BUG:422312)
  • Fix updates of color picker’s preview (BUG:426867)
  • Windows: add .lnk files for starting Krita in minimal and animation mode
  • Fix crash when undoing Rectangle Selection and doing redo after
  • Fix a crash when moving local selection mask (BUG:426816)
  • Fix shortcut for Polygonal Selection Tool (BUG:426916)
  • Fix update of color preview in MyPaint Color Selector on mouse click
  • SeExpr: assert isDirty on the correct preset instance (BUG:426911)
  • Fix snapping decorations in Create Path Tool (BUG:426514)
  • Android: Use Storage Access Framework for all file operations (BUG:424541, BUG:423670)
  • Android: show recent files on Welcome widget
  • Android: Fix problem with loading/saving file layer
  • Android: Fix saving for files with no extension
  • Android: Fix saving with selections
  • Bugfix: usage logging could not be saved to a file on Android (BUG:427043)
Download Windows

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.

Linux

(If, for some reason, Firefox thinks it needs to load this as text: to download, right-click on the link.)

OSX

Note: the gmic-qt is not available on OSX.

Android/ChromeOS Beta

This time, the Android releases are made from the release tarball, so there are translations. We consider Krita on ChromeOS and Android still beta. There are many things that don’t work and other things that are impossible without a real keyboard.

Source code md5sum

For all downloads:

Key The Linux appimage and the source .tar.gz and .tar.xz tarballs are signed. You can retrieve the public key over https here: 0x58b9596c722ea3bd.asc. The signatures are here (filenames ending in .sig).-->

Support Krita

Krita is a free and open source project. Please consider supporting the project with donations or by buying training videos! With your support, we can keep the core team working on Krita full-time.

The post Second Beta out for Krita 4.4.0 appeared first on Krita.

Teaching Comparing Strings in Python the Hard Way

Monday 28th of September 2020 10:39:44 PM
Wait, is that actually related to KDE?

If you read between the lines…

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.

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.

An Evil Plan and Lessons Learned

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 ord and chr functions, so he was aware that letters are internally stored as numbers.

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.

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 < n2: return -1 elif n1 == n2: return 0 # ... def orderStrings(s1, s2): # ...

Intuitively, he started by typing “if s1 < 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.

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.

  • we cannot use a simple “for c in s” loop, because we have to iterate both strings at the same time
  • we have to abort the loop/return early if the decision is final
  • 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)
  • he had to fix the error that made the program abort when comparing “Andrea” with “Andreas” due to missing boundary checks
  • and finally, he needed to fix a wrong result when comparing two identical strings

Here is his final function (reformatted and variables renamed for brevity, his version was a bit messy).

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 >= len(s1) or pos >= len(s2): if len(s1) < len(s2): return -1 elif len(s1) > len(s2): return 1 else: return 0 c1 = ord(s1[pos]) c2 = ord(s2[pos]) if c1 > 90: c1 -= 32 if c2 > 90: c2 -= 32 if c1 < c2: return -1 elif c1 > c2: return 1 else: pos += 1

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.

Lessons learned:

  • using an index variable to iterate through sequences
  • using arithmetic on the ASCII codes to transform letters
  • missing boundary checks can “crash” your program
  • making sure you handle every case of inputs possible

Exercise solved, well done!

Kate in the Windows Store - Current Status

Monday 28th of September 2020 08:40:00 PM
One year in the store

Kate is now in the Windows Store since a bit over one year, our initial submission went online on September 12, 2019.

The submitted installers are always taken 1:1 from our very lovely Binary Factory. They just get some test drive if they behave well and then are submitted like described here with the KDE e.V. account.

Therefore the most work was done by all the people that created and keep the Craft tooling & Binary Factory working! Thanks a lot to our awesome system administrators, Hannah and all other involved people ;=)

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.

Over 60,000 installations, nice!

Since the initial submission to the store, Kate has now been installed 60,346 times. That means roughly 5,000 new installations per month!

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. Chocolatey, but have there only 8,796 downloads since ever, this is really awesome.

Perhaps we are even more often installed via direct downloads from the Binary Factory installers as linked on our Get Kate 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.

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.

If you are interested in our stuff, please help out to improve it. For example code contributions are easier than ever since we moved to our new and shiny KDE GitLab instance.

Reviews?

Now, after a lot of self-praise, let’s take a look at our reviews in the Windows Store.

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.

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.

How users praise us!

Here some examples of reviews that should make our contributors happy to read (without any names & 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):

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

What is cooking on KDE websites this month (September)?

Monday 28th of September 2020 02:30:35 PM

This month a few cool things happened on KDE websites.

  • The wiki instance we use, there migrated to MediaWiki 3.34 the latest LTS version, this bring a few improvement in the translations module and fix the problem that translated pages couldn’t be moved arround. The commenting plugin was sadly discountinued in this version and instead the Echo extension was added and provide a way to ping people.

  • Another improvement related to the wikis is the creation of a small module allowing user to authentificate with the Identity replacment. The source code can be found here. This bring us a steep closer to the replacment of the identity.kde.org.

  • This month, a completely rewritten backend for Season of KDE was merged. This was a part of the work Anuj did during GSoc this year. It is not yet deployed into production, but I host a demo and you can try it. The new features are the possibility for mentor to comment on proposal, the mentees can now use markdown when writing a proposal. The new system is also using Symfony, one of the biggest PHP framework, now and is integrated in MyKDE too, so that mentors and mentees get a badge after completing SoK. The admin interface was also consiberably improved. Great work Anuj!

And while at it, please consider mentoring for this year SoK program. It is a good opportunity to bring new blood in KDE. community.kde.org/SoK/Ideas/2021. So fill this page with ideas :D

  • The new developer documentation website also got a few updates and now contains a complete tutorial about how to write a Plasma Widget. Thanks to Zren for this contribution.

  • Elisa, everyone favorite music player, also got a new website developed by Anubhav Choudhary and Nikunj Goyal. You can check it out at elisa.kde.org.

  • Subtitle Composer, a subtitle editor, also got a new website developed by Thiago Sueto. You can check it out at subtitlecomposer.kde.org/.

  • The atelier website was also updated by Lays Rodrigues.

  • KDEMail.net now use the aether theme.

  • I send a proposal of using a fork of Blender Fund tool for KDE Fundraising in the community mailing list. You can check out the demo for KDE and Krita.

Full Stack Tracing Part 1

Monday 28th of September 2020 09:00:08 AM

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.

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 we’ve written about before, full stack tracing provides a simpler way to view activity up and down the entire software stack.)

Use cases

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:

  • Gain visibility into the software running below the level of your application and API calls
  • Measure timing and synchronization of events that happen across multiple applications
  • Optimize application startup time, locating startup script inefficiencies, and trimming down system boot time
  • Verify communication between a client and server process, or any other process pairs like publisher and subscriber, or application and watchdog
  • Detect background processes that interfere with an application
  • Pinpoint places in the system that consume excessive CPU cycles
  • Find problematic interactions between multiple device drivers or independently running software stacks
  • Correctly understand the behavior of a complex system before you make bug fixes or alterations
Battling slow boot time

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 Nvidia Tegra X1, 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.

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 QML profiler 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?

QML profiler showing long binding in action (similar issue, different app)

 

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.

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.

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.

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.

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.

QML binding shown with full stack tracing, highlighting SDA activity (similar issue, different app)

Until next time

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.

 

If you’d like to learn more about Debugging and Profiling, you might be interested in one of our training classes.  Visit this page to find out some of the areas and correlating tools with which we are used to working, and with which we can help you.

 

 

About KDAB

If you like this blog and want to read similar articles, consider subscribing via our RSS feed.

Subscribe to KDAB TV for similar informative short video content.

KDAB provides market leading software consulting and development services and training in Qt, C++ and 3D/OpenGL. Contact us.

The post Full Stack Tracing Part 1 appeared first on KDAB.

Qt Desktop Days 7-11 September

Monday 28th of September 2020 08:51:45 AM

We are happy to let you know that the very first edition of Qt Desktop Days 2020 was a great success! Having pulled together the event at very short notice, we were delighted at the enthusiastic response from contributors and attendees alike.

Over 500 registered attendees could enjoy five days of technical talks. The program shows the range and depth of offerings that kept people coming back.

Presentations

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.

After that, there was a series of varied topics that roughly fit into three tracks: QML, Testing and Widgets.

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.

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…

The whole show ended with a Q&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.

Talk Recordings

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 YouTube channel, and you’ll be the first to know when they’re out there.

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!

 

The post Qt Desktop Days 7-11 September appeared first on KDAB.

Week log O¹

Sunday 27th of September 2020 09:03:00 PM

 week report on O²

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

Highlights.

New version for light Bg's using extra noise generated from the 2 active colours.

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. 

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  

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. 

 

Finally Saturday I had the pleasure to participate in the QtCon brazil were I could use my native Portuguese :) sory guys ;). 

All the talks available here ...https://www.youtube.com/channel/UCpnk1I7ThHtKn4UYkuaO7Qg  I highly recommend ... most of them are in English so .. 

Cheers and see you all next week .)

Changelog: Nitrux 1.3.3

Sunday 27th of September 2020 06:34:59 AM

Today is the day! — Nitrux 1.3.3 is available to download

We are pleased to announce the launch of Nitrux 1.3.3. This new version brings together the latest software updates, bug fixes, performance improvements, and ready-to-use hardware support.

Nitrux 1.3.3 is available for immediate download.

What’s new
  • We’ve upgraded the kernel to version 5.6.0-1028.

  • We’ve updated KDE Plasma to version 5.19.5, KDE Frameworks to version 5.74.0, KDE Applications to version 20.08.1, and Qt 5.15.0.
  • We’ve reduced the size of the ISO file to 2.1GB from 3.1GB, for less bandwidth usage and faster download times.
  • We’ve removed the Nvidia proprietary driver from the ISO file due to a bug with laptops using Optimus.
    • Users that wish to use the Nvidia proprietary driver can do so by running the following commands post-installation.
    • The first command will install the driver, the driver settings program, and the PRIME command, the second will add our configuration of the Nvidia driver for X11.
    • sudo apt install -yy nvidia-driver-450 nvidia-settings nvidia-prime sudo apt install -yy --reinstall nx-desktop-settings-legacy
  • We’ve updated appimage-manager to version 0.1.2 (the command app).
  • We’ve fixed AppImages not being automatically integrated into the menu when downloading to a managed directory.
  • We’ve updated Firefox to version 81.0.
  • We’ve updated Kdenlive to version 20.08.1.
  • We’ve updated Inkscape to version 1.0.1.
  • We’ve updated GIMP to version 2.10.20.
  • We’ve updated LibreOffice to version 7.0.1.2.
  • We’ve updated LMMS to version 1.2.2.
  • We’ve removed w3m in favor of links2 as part of the CLI applications included by default.
  • We’ve updated the appearence of the Plasma OSD (volume, keyboard layouts, screen brightness) to be less blocky.

Known issues
  • When using the tiling windows feature (Khronkite), the system tray plasmoids will be treated as regular windows.
  • The Calamares-qml installer presents two issues that affect it’s usage when selecting the options “Replace” or “Install alongside.” Visit GitHub for more information.
    • Users have the option to not use Calamares-qml and instead use Calamares, to do so run the following commands in the Live session.
    • sudo apt update sudo apt purge --remove -yy calamares-qml calamares-qml-settings-nitrux sudo apt install -yy calamares calamares-settings-nitrux --no-install-recommends sudo -E calamares -d
  • The Regional Settings KCM does not display other languages than American English, this is a bug, and we have a bounty at Bountysource for anyone willing to fix it.
  • cgroupfs-mount needs to be started manually, followed by dockerd to initialize the Docker daemon to use Docker containers.
  • The Plasma (Wayland) session currently works better with Intel and AMD graphics cards. The session can work with Nvidia graphics cards, albeit with reduced performance.
Notes
  • OpenGL acceleration is used by default. If you use Nitrux in a VM, open System Settings>Monitor>Compositor and select XRandr in addition to disabling desktop, effects like Blur for better performance.
  • To utilize 3D acceleration in a hypervisor like VirtualBox, please use the guest additions ISO from Oracle, do not use the Debian packages from the repositories. For VMware Workstation and VMware Player, please use the package open-vm-tools-desktop from the repositories.
  • The managed locations (and thus the default) for AppImages in Nitrux are /Applications and ~/Applications.
  • AppImages launched from the application menu will be launched using firejail for sandboxing by default.
  • The default user and password are nitrux.
  • Changing the theme using the Global Theme KCM does not alter the Kvantum theme; to properly change the Kvantum theme, use Kvantum Manager.
  • The Kvantum theme does not pick up the color-scheme that is selected using the Colors KCM since the Kvantum SVG theme engine does not work like that. When Kvantum is used, the color-scheme is complementary to the Kvantum theme, as the theme is already providing the colors for the UI widgets.
  • Applications such as Discover and the Maui apps use QML and not QtWidgets like System Settings, Ark, KCalc, etc. So they are not themed to the full extent that QtWidgets apps are because Kvantum does not support QML adequately.
  • We include two layouts for the desktop, one is the default top panel and bottom dock, and the other is a single bottom panel; Latte Dock uses both. To change between them, right-click the dock or the panel. Using the Global Theme KCM and checking “Use desktop layout from theme” does not change the layout.
  • The Flathub repository is not added by default. However, it can be easily added either using Plasma Discover by going to Settings>Add Source or using the terminal and entering the Flathub URL as described in the Flatpak quick setup guide.
  • Nitrux is exclusively a 64-bit Linux distribution; however, software like Steam (32-bit) can be installed using Flatpak, and Windows software can be run using Wine. See using Wine in Nitrux.
Report bugs

To report bugs, please use our bug tracker at GitHub.

The post Changelog: Nitrux 1.3.3 appeared first on Nitrux — #YourNextOS.

Maui Weekly Report 6

Saturday 26th of September 2020 04:57:08 PM

Today, we bring you a new report on the Maui Project progress.

Are you a developer and want to start developing cross-platform and convergent apps, targeting, among other things, the upcoming Linux Mobile devices?, Then join us on Telegram: https://t.me/mauiproject.

We are present on Twitter and Mastodon:

On the 26th of September, we will be giving a talk at QtCon Brasil 2020, where we will share our experience in building a convergent environment; you can join us and ask us any questions:

QtCon Brasil 2020 – Convergence

KDE Review

For the next stable release, we have submitted MauiKit and Index to KDE Review. Projects move into KDE Review when they are ready to start making beta or stable releases. It allows for the KDE community to check over for minimum standards.

The next projects to be submitted are going to be VVave and Pix. We expect, as an outcome of the review, to improve on many aspects suggested by the reviewers.

The documentation of MauiKit controls is still an ongoing task.

MauiKit

This week’s updates bring polished and refined components, more cohesive styling, better touch, and mouse inputs support in different navigation patterns, and code refactoring and clean up for better maintainability and performance.

Some of the highlights are:

Controls

The MauiKit controls premise is to be convergent, meaning: to have a responsive layout under-constrained or wide spaces, adaptable, feature-rich, and react to touch or mouse-based inputs accordingly. With this in mind, we keep on improving the core controls we ship with MauiKit.

The SettingsDialog, SettingSection and SettingSectionTemplate

The SettingsDialog layout is now more uniform, and its SettingsSection now uses a background color to differentiate items and target the right one more promptly. The SettingTemplate, which is used to contain each different setting option in the section, now has a setting property that allows to quickly store persistent values in configuration file dependent on the app; you just need to set a key and group to the setting value to be stored, and when the value is changed just save it with setting.setValue(newValue)

Maui.SettingTemplate { id: _autoScan label1.text: i18n("Auto Scan") label2.text: i18n("Scan all the music sources on startup to keep your collection updated.") setting.key: "ScanCollectionOnStartUp" setting.group: "Settings" setting.defaultValue: true Switch { checkable: true checked: _autoScan.setting.value() == "true" onToggled: _autoScan.setting.setValue(checked) } }

 

Pix and Nota settings dialog

The SettingSection can also now be collapsed.

ItemDelegate and Templates

A widely used set of controls are the templates, which provide a feature-rich and responsive experience out of the box. Most of the MauiKit template controls have received nice papercut fixes, from the ListItemTemplate and GridItemtemplate to the ListBrowser and GridView.

The ItemDelegate now draws borders to better hint about its boundaries; this is done if the item is marked as draggable, this helps to be aware of the relationship of the item with its context, for example, when performing a drag and drop or doing a lasso selection and action can be more precise.

Some quirks and bugs about the ItemDelegate implementation have been fixed, such as correct parenting and feedback on performed actions, so with a MauiKit ItemDelegate, you get a draggable item, with feedback as a response on performing actions on touch or mouse input devices, and a predefined styling.

Pix, Index, and VVave using the ListBrowser and ItemDelegate.

The ListItemTemplate layout information in a row, in the following order:

LisItemTemplate layout

Now the initial item Icon/Image can be changed to any item by using the iconComponent property. Before you can add even more items to it by appending them.

The GridItemTemplate image now correctly follows and masks the image in a fit or fill mode. Also, it sees a nice fix to the label displayed under the icon/image, which previously had a loop bug due to the wrong calculation of its best size.

The ListBrowser and GridView implementations are now cleaner and perform better with touch or mouse-based interactions. This view templates have some other nice features such as adaptable cellWidth, lasso selection, predefined styling for spacing and margins, etc.

Dialogs

The default action buttons’ borders are now styled as other borders.

The dialog title is now shown in the header for more consistency.

The AboutDialog now uses KAboutData to get information about the application, such as authors, name, version, licensing, and libraries.

https://nxos.org/wp-content/uploads/2020/09/Peek-2020-09-24-08-03.mp4

A bug causing the inline notification dialog to have a wrong size has been fixed.

VVave with inline notification

 

MauiApp

The main menu layout has been reordered, so the default About and Quit actions are always at the bottom.

Separator

A custom control for a separator has been added; this separator is composed of two lines, one darker and the other lighter, for better contrast.

Use a more cohesive look with the title in the title bar.

BackEnd

The backend utils for Mauikit have been cleaned up; this goes from the FileManagement utilities to the template data modeling and platform integration classes.

  • FMH functions have been moved from the header to an implementation file to clear all the unused warnings that were being generated.
  • Thumbnail previews for PDF and videos files were added thanks to KIO; this can be used by appending the prefix “thumbnail://”
  • A FileLoader class was added to the FileManagement utilities for asynchronous loading files; this is now being used to fetch files for Index, VVave, Pix, Shelf, Nota, and Cinema.
  • Android integration: removed old source code for contacts and moved to Communicator.
  • The MauiModel and MauiList have gained a few more useful methods to get the one or all items are out of the model.
  • The structure of the utility sources has been cleanup.
Apps

Currently, the Maui project maintains ten core applications to provide an essential experience: Index, VVave, Pix, Nota, Buho, Shelf, Station, Cinema, Communicator, and Sol, while some are at a stable state, some others are just recently entering a beta state.

This week’s progress includes many nice feature fixes to the current stable apps and upgrades to the beta ones.

Index
  • The file manager now has a more cohesive context menu for opening paths in split view and new tabs.
  • Now when making multiple selections and removing an item, the removed item is cleared from the selection bar instead of clearing all the selection.
https://nxos.org/wp-content/uploads/2020/09/Peek-2020-09-24-08-25.mp4
  • The search functionality is now working again.
  • Now we have PDF and video thumbnail previews.
  • Items can be dragged over the tabs to switching between them and also between splits.
  • The sidebar’s new-files counter badge is back. It lets you know when a bookmarked folder has new content.

New files counter badge

VVave
  • VVave code has been cleaned up and improved for better performance. Now when clicking Play all or Append all actions, the tracks are copied to the playlist much more quickly. The player interface has been improved, and code redundancy has been removed.
  • A new Playlist controller in C++ has been added.
  • The AlbumsView for Artists and Albums have been improved not to be overloaded with not needed elements, same for the folders and playlists views.
  • The Folders view now has a filter field and can be switched to a list for better recognize folder path URLs
  • Now VVave has mpris2 support for Linux.
Pix
  • Better time date formats in delegates in the list view.
  • Fix build for macOS and Windows
  • Larger items in list view
  • Images in the viewer do not longer jump to the next or previous when resizing the window
  • The image viewer logic has been improved, clearing out small issues with the navigation
Nota
  • The Documents view now will group documents in their directories for easier browsing.
Buho
  • The Books view has been redesigned and the booklet views too. It nows lists all the “chapters” in a horizontal orientation.
  • The Notes view now switches from a grid to a list depending on the available space.
  • The new floating button now performs the expected action depending on the current view.
  • The notes cards now pick the right color for text and background.
  • Unfinished features with graphical items have been removed.
Cinema

The video player now has more features and has entered a beta state.

  • Videos view for browsing the video collection.
  • Tags view to browse tagged files.
  • Contextual actions for the collection, like sharing, copying, tagging, etc.
  • Video thumbnail previews.
  • The player view now has support for playlists, with a responsive UI.
https://nxos.org/wp-content/uploads/2020/09/Peek-2020-09-25-07-37.mp4

Cinema responsive player view

Station
  • Correctly close inactive splits
  • Update application information
Sol
  • Tabs support.

Sol – Focus view and header

Shelf
  • Renamed from Library to Shelf
  • PDF thumbnail previews
  • Now using new MauiKit FileLoader

Shelf – documents view

 

What’s Next
  • Enable syncing of data and images on Pix, files in the Index file manager, and of contacts in Communicator.
  • Make Cinema and Sol initial beta release.

Our plans for 2021 are:

  • Fully utilize CMake.
  • Improve iOS support.
  • Improve data synchronization using NextCloud.
  • Improve performance.
  • Improve the UI cohesion on all supported platforms.
  • Move beta apps to stable.
  • Improve documentation.

The post Maui Weekly Report 6 appeared first on Nitrux — #YourNextOS.

This week in KDE: fixing up Plasma 5.20

Saturday 26th of September 2020 04:24:51 AM

We spent a lot of this week polishing up Plasma 5.20 and fixing bugs you’ve all found in the release. Thanks very much too all the people who have been testing it and reporting bugs! It’s very helpful. As a reminder, you can find distros shipping the beta here: https://community.kde.org/Plasma/Live_Images

New Features

Okular’s animated smooth scrolling feature can now be totally disabled in the app itself (me: Nate Graham)

Bugfixes & Performance Improvements

Kate’s File menu no longer ever loses menu items after closing a tab (Christoph Cullmann, Kate 20.08.2)

Okular’s editable forms are no longer mis-rendered when inertially scrolling (Kezi Olio, Okular 1.11.2)

When your scanner can almost but not quite fit a particular page size, Skanlite will now display the option to scan to that page size anyway (e.g. 215mm wide scan beds now give you the option to scan using the US Letter page size) (Kåre Särs, libksane 20.12)

The text of Elisa’s keyboard shortcuts are now translated properly (Nikunj Goyal, Elisa 20.12)

Clearing the clipboard history on Wayland no longer crashes Plasma (David Edmundson, Plasma 5.20)

Improved the Plasma SVG cache heuristics such that various things which might sometimes be invisible after upgrading Plasma now show up like they’re supposed to (Arjen Hiemstra, Plasma 5.20)

On Wayland, clicking on a Task Manager entry while that entry’s tooltip is visible no longer crashes Plasma (Vlad Zahorodnii, Plasma 5.20)

On Wayland, clicking on a Task Manager thumbnail now activates that window, as you would expect (Marco Martin, Plasma 5.20)

On Wayland, the window stacking order is now always correct (Vlad Zahorodnii, Plasma 5.20)

Auto-hidden panels now have an animated show/hide effect again (David Edmundson, Plasma 5.20)

The hover effect for titlebar buttons in GTK headerbar apps once again appears when it should (Mikhail Zolotukhin, Plasma 5.20

The names of the System Settings and Info Center apps are now translated properly (Alexander Potashev, Plasma 5.20)

The Plasma Emoji input window now always shows nice colorful emojis even if the distro’s fontconfig files are kind of messed up (Yunhe Guo, Plasma 5.20)

The little arrow in a System Settings list items for a top-level category will no longer appear if the category’s existence is obfuscated because it has only a single item, in which case System Settings automatically takes you to the child item (David Redondo, Plasma 5.20)

Shortcuts for switching to particular Activities now work again when set from the relevant System Settings page (David Edmundson, Plasma 5.20)

Plasma applet configuration windows now always display the correct sidebar appearance (David Redondo, Plasma 5.20)

On Wayland, context menus now always have shadows, as expected (Vlad Zahorodnii, Plasma 5.20)

Breeze buttons now display the correct colors when using certain non-default color schemes (Carson Black, Plasma 5.20)

Improved how KWin detects fully opaque windows, which will allow it to do less work by not rendering anything that’s entirely covered up by them (Aleix Pol Gonzalez, Plasma 5.21)

You’re no longer annoyingly asked whether you want to execute non-executable script files when you try to open them (Ahmad Samir, Frameworks 5.75)

It’s once again possible to enter shortcuts in the System Settings Shortcuts page that use the Alt Key when the Alt+something shortcut that you’re defining would otherwise trigger an action on the shortcut entry page itself! (David Edmundson, Frameworks 5.75)

Apps which show an “Are you sure you want to close multiple documents?” dialog when you quit while multiple documents are open will no longer do so if the app is quit as a part of the normal shutdown sequence when session saving is in use (Allen Sandfield Jensen, Frameworks 5.75)

User avatars in the Kickoff Application Launcher and the new System Settings Users page are no longer blurry (Carson Black, Frameworks 5.75)

Button icons on the login and lock screens are no longer mis-colored (Noah Davis, Frameworks 5.75)

User Interface Improvements

Pressing the Esc key in Gwenview while in full screen view now leaves full screen view the first time you press it, instead of first going back to browse mode (Michael Augaitis, Gwenview 20.12)

Elisa now has keyboard shortcuts to go back and forward by track while in the app itself (Ctrl+left arrow and Ctrl+right arrow) (Nikunj Goyal, Elisa 20.12)

Newly-generated thumbnail preview images will no longer longer embed mostly-transparent mimetype icons in the bottom-right corner, which were super confusing (Stefan Brüns, Dolphin 20.12)

Scrollbars in GTK apps using the Breeze GTK theme are now the correct width (Carson Black, Plasma 5.20)

After changing the charge limit on your battery, you’re only shown a message saying, “You may need to re-connect your charger” if it’s not already plugged in (Kai Uwe Broulik, Plasma 5.20)

System Settings and Info Center now have a “Report Bug…” menu item in their hamburger menus (David Redondo, Plasma 5.20)

The System Activity window (the thing that appears when you press Ctrl+Esc) now has correct margins (me: Nate Graham, Plasma 5.20)

KRunner’s settings page now uses more accurate text for its new positioning modes feature (me: Ne Graham, Plasma 5.20)

Info Center now has a fancy new Network Interfaces page (Carl Schwan, Plasma 5.21)

How You Can Help

Have a look at https://community.kde.org/Get_Involved to discover ways to be part of a project that really matters. Each contributor makes a huge difference in KDE; you are not a number or a cog in a machine! You don’t have to already be a programmer, either. I wasn’t when I got started. Try it, you’ll like it! We don’t bite!

Finally, consider making a tax-deductible donation to the KDE e.V. foundation.

Creating an Embedded Qt Quick Application in Visual Studio (1/2)

Thursday 24th of September 2020 03:21:16 PM

Cross-compilation of Qt projects is now supported in the Qt Visual Studio Tools. This is possible due to the integration of Qt/MSBuild and the Linux development VS workload. In this post we will show how to use this feature to create an embedded application with Qt Quick in Visual Studio.

Qt Visual Studio Tools 2.6 Released

Thursday 24th of September 2020 10:32:52 AM

We are happy to announce the release of the Qt Visual Studio Tools version 2.6.0. Installation packages are now available at the Visual Studio Marketplace.

Triggered

Wednesday 23rd of September 2020 01:56:00 PM

Somebody pointed me to a research article about how many app developers fail to comply with the GDPR and data requests in general.

The sender suggested that I could use it in marketing for Nextcloud.

I appreciate such help, obviously, and often such articles are interesting. This one - I read it for a while but honestly, while I think it is good this is researched and attention is paid for it, I neither find the results very surprising NOR that horrible.

What, a privacy advocate NOT deeply upset at bad privacy practices?

Sir, yes, sir. You see, while the letter of the law is important, I think that intentions also are extremely important. Let me explain.

Not all GDPR violations are made equal

If you or your small business develops an app or runs a website to sell a product and you simply and honestly try to do a decent job while being a decent person, the GDPR is a big burden. Yes, the GDPR is good, giving people important rights. But if you run a mailing list on your local pottery sales website, with no intention other than to inform your prospective customers and followers of what you're up to, it can be a burden to have people send you GDPR takedown and 'delete me' requests instead of just having them, you know - unsubscribe via the link under your newsletter!

The goal of the GDPR, and of my personal privacy concerns, isn't at all related to such a business. If anything, their additional hardship (and we at Nextcloud have this issue too) is at best a by product of the goal. That byproduct isn't all bad - we all make mistakes, and being more aware of privacy is good, even for small businesses. The GDPR has forced many small businesses to re-think how they deal with private data, and that isn't a bad thing at all. But it isn't the main benefit or goal of the GDPR in my eyes. There are big businesses who totally COULD do better but never bothered, and now the GDPR forces them to get their act together. While that's a real good thing, even THAT is not, in my opinion, what the GDPR is about.

Privacy violation as a business

You see, there are businesses who don't violate privacy of people by accident. Or even because it is convenient. There are businesses who do it as their core business model. You know who I'm talking about - Facebook, Google. To a lesser but still serious degree - Microsoft and yes, even Apple, though you can argue they are perhaps in the "side hustle" rather than "it's their primary revenue stream" category.

For these organizations, gathering your private data is their life blood. They exploit it in many ways - some sell it, which is in my opinion definitely among the most egregious 'options'. Others, like Google and Facebook, hoard but also aggressively protect your data - they don't want to leak it too much, they want to monetize it themselves! Of course, in the process of that, they often leak it anyway - think Cambridge Analytica - that was in no way an incident, hundreds of apps get your private data via Google, Facebook, Microsoft and others. But by and large, they want to keep that data to themselves so they can use it to offer services - targeted ads. Which in turn, of course, get abused sometimes too.

My issue with this business model, even without the outright sale of data, is two-fold.

Ads work better than you think

First, in principle - while people might feel ads don't effect them, there is a reason companies pay for them. They DO effect your behavior. Maybe not as much or in the way marketing departments think or hope, but the effect exists.

How bad is that? Depends, I guess. To some degree, it is of course entirely legitimate that companies have a way to present their product to people. But modern targeting does more, including allowing companies to charge specific people different prices, and of course a wide arrange of sometimes nasty psychological tricks is used. The example Facebook once gave to potential advertisers, of targeting an insecure youth "at their most vulnerable" with an ad is... rather disgusting.

This gets worse when we're not just talking about product ads but political ads, either from political countries or, of course, from foreign non-democratic adversaries trying to influence our freedoms in a rather direct and dangerous way. And again - this is more effective than most people realize or are willing to admit and has swayed elections already, making is all less free.

Centralization is bad

Second, there is simply a HUGE issue with all-our-eggs in one basket. Especial when that basket is in a foreign country and not protected by privacy and security laws compatible with those in your own country. Having a single point of failure, how well protected - is just not smart. Things WILL fail, always. Better have slightly more breaches that each are just a single provider, than one breach of all private data of everyone in a country...

And that's not even talking about the fact that this data helps these companies get incredibly huge and then allows them to suppress or kill competition (or just buy it) - think Amazon, Microsoft. These tech molochs are just plain bad because of many reasons. They are anti-competitive, which raises prices, decreases choice, and the much lower innovation-per-dollar they produce is of course a worse deal for society too. They are too easy to control by law enforcement and censorship, impacting our freedoms - even when they're not 'foreign' to you. Yes, it is harder to censor 50000 private servers than one Google server farm!

Triggered

 So, as you notice, this question triggered me. Not all privacy violations are equal. Intentions matter. As does market power. And the GDPR is not a golden bullet. It has downsides - compliance is often easier for big companies than small ones, a serious issue.

Luckily, our judicial system tends to look at the intentions behind law, and I would expect a judge to fine an organization heavier for truly bad business models than for honest mistakes. I hope I'm not too optimistic here.

From my side, I don't want to bang on people's head for mistakes. I want to attack and challenge bad business models and bad intentions. A local, small app maker who fails to respond quickly enough to GDPR requests - not my target. Facebook - yes.

And by the way. Maybe it doesn't need to be said to most of you, dear readers, but of course - our open source world is, I still believe, a huge part of solving this problem. KDE, openSUSE and other Linuxes and desktops - and of course Nextcloud, Mastodon, Matrix and other decentralized and distributed and self-hosted platforms. We have ways to go, but we're making progress!


As I concluded to the person who triggered me - I know, this is far too long a reply to what they said


But it triggered me ;-)


Best reply over twitter, (twitter.com/jospoortvliet) or so, this awful Google platform makes commenting nearly impossible. And I know, the irony, replying on twitter, and I still have not moved away from blogger.com... Some day, some day. When I find time.

KTextEditor - Small Things Matter

Tuesday 22nd of September 2020 07:51:00 PM

Thanks to the feedback & patches provided by others, I found a bit more motivation to take a look at the small things that seems to be odd in KTextEditor.

Interesting enough, if you once notice a small detail (like a dead pixel on your display you suddenly find after years of use), it really sticks out like a sore thumb…

Here two small things that caught my interest this week.

KTextEditor border widget painting

If you have some theme like “Vim Dark” with border background color equal to the text background color, strange stuff happens.

See the following screenshot:

You can’t actually tell: Is this the folding marker column or is all my text indented by one or two spaces? There is no visual hint for this.

Funny enough, there is some visual hint to show that on the left side you might have some marks, if you turn that on in addition:

But then you see the next strange stuff: this separator is only painted until the last line of text is reached, strange, too. I think this behavior was like this since we implemented that parts of the rendering.

I never noticed that until I tried out to use the new nifty ayu theme as my daily theme (see the themes gallery).

Now, I scratched that itch in this merge request.

The current state with Vim Dark looks now like this (will be in Frameworks 5.75):

The separator got just moved between the border widget and the text and the painting got fixed to span the complete visible widget height.

I think this makes both for a better separation between border and text and for a visually better appearance.

Do you need to think about if the text is indented in this screenshot? I don’t think so.

Especially that the old separator got not even drawn for the region below the last line was kind of astonishing, I must confess, that slipped my mind for years until I focused once on that ;=)

You have noticed that the Vim Dark colors did change a bit compared to the above two screenshots? That’s thanks to Nibaldo González scratching an itch, making the colors more consistent with real Vim. Thanks for that!

Just take a look at that perfectly done merge request, you can judge the changes just by taking a look at the before/after screenshots. Awesome!

KTextEditor initial input lag

Have you ever noticed that for the first view you type something in, there is a small lag after some keystrokes? Depending on your machine, it might even be not that short. And after that initial lag, all is fine.

I noticed that lag already in the past but lost interest to take a look into it, as it just happens once for each start and use of e.g. Kate.

Now that I play around more with short KWrite open, test & close sessions for debugging other stuff, I got more interested again.

It was easy to trace back: on-the-fly spellchecking is the reason for this.

Once at the start, you will initially need to load both the spellchecking dictionary and the trigrams.

Over a lot of different layers, this is triggered after the first few characters are typed (or any other text manipulation).

Given it is non-trivial to remove this lag by moving this to a thread or by other complex solutions I thought about, I went for a quick’n’dirty fix: just do that once on startup if we have on-the-fly spellchecking enabled.

Some fractions of a second on startup more is much nicer UI wise than a short hang during your initial typing that kills your flow.

With this change, Frameworks 5.75 will have lag free input even directly after the startup of your KTextEditor based application.

And for people that have no on-the-fly spellchecking enabled, no extra penalty is there.

Done ;) For now…

I hope this small improvements make some people happy (or at least don’t annoy them).

If you happen to see such small issues and you can code, please think about contributing some patch to fix them.

Even fixing such small things can have a large impact on the usability and perception of our stuff.

Help is always welcome!

Improved QML Support in Qt for Python 6.0

Tuesday 22nd of September 2020 10:53:10 AM

Since the initial port of PySide to Qt5 (a.k.a PySide2), the interaction with QML was on the list of features we wanted to fully support in our set of bindings, due to the popularity of QML.

With the first official release 5.12, we had cover many use cases for the QML and Python interaction, but also we left out a couple of use cases that were really required by our community. Now that we are developing new features and improvements for Qt6, we wanted to address most of them.

Here you can find a summary of the features that we have done so far for the planned Qt for Python 6.0 release.

How to Build C++ Projects with the Address Sanitizer on Windows

Tuesday 22nd of September 2020 09:00:32 AM

Memory bugs are tricky. Leaks have a clear impact on performance, and quickly become hard to spot when heap allocated objects move too much. Memory access bugs, on the other hand, make your program crash right away, if you’re lucky. In less desirable cases, they may end up corrupting random objects on the heap, and only end up in a crash much later. Or even worse, leading to undetected undefined behaviours or wrong computations.

This is the reason why there are a number of standalone tools (e.g. valgrind, Dr.Memory), as well as compiler extensions (e.g. AddressSanitizer, MemorySanitizer, LeakSanitizer) to help with memory bug detection.

On Windows, and especially using Qt, things are a bit harder, as valgrind is not an option and Dr.Memory often crashes with Qt applications. Unless you use WSL, this only leaves compiler tools on the table.

Memory Sanitizers on Windows

First of all, what are our choices when it comes to using memory sanitizers on Windows?

There are two options:

  1. with Visual Studio’s cl compiler
  2. with LLVM’s clang/clang-cl compilers (also available through Visual Studio)
    • {x86,amd64}/Release builds only – AddressSanitizer only

So using AddressSanitizer (from now on ASAN) is the only viable option for memory bug detection with memory sanitizers on Windows. Also, since the support for the cl compiler is still incomplete, in this post we will be using clang.

Furthermore, we will be using Visual Studios’s bundled clang to make it possible to generate Visual Studio solutions. If you’re using your own clang installation, you should update the following paths accordingly. You can find Visual Studio 2019’s clang in the following directories:

  • For x86: %ProgramFiles(x86)%\Microsoft Visual Studio\2019\Professional\VC\Tools\Llvm\bin
  • For x64: %ProgramFiles(x86)%\Microsoft Visual Studio\2019\Professional\VC\Tools\Llvm\x64\bin

Note that you will need to add the right directory manually to the PATH when using the command line, as there is no vcvars script available for clang tools.

From now on I’m going to assume for all paths that we’re using Visual Studio 2019 Professional and we’re building 64 bit applications.

Compile an executable with the static C++ runtime (/MT)

If you build and link in one go, it is enough to compile with -fsanitize=address

clang-cl -fsanitize=address main.cpp

When doing compilation and linking in separate steps, we need an extra step to provide the ASAN runtime explicitly.

clang-cl -fsanitize=address -c main.cpp -o main.o # Call vcvars64 here so lld-link will be able to link all the default libraries lld-link main.o -libpath:"%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Professional\VC\Tools\Llvm\x64\lib\clang\10.0.0\lib\windows" ^ -wholearchive:clang_rt.asan-x86_64.lib -wholearchive:clang_rt.asan_cxx-x86_64.lib

The linker will implicitly link the program against the static CRT (/MT) and with the static version of clang’s ASAN runtime. Note the use of -wholearchive to force the compiler to include all the symbols from the library, avoiding optimizations.

If the program consumes a library which is also being sanitized, then said library (which should be linked against the dynamic CRT with /MD) should be linked against clang_rt.asan_dll_thunk-x86_64.lib. In this way, the library (or libraries) will use the shadow memory of the statically linked ASAN runtime in the executable.

Compile an executable with the dynamic C++ runtime (/MD)

Again, it is easy to compile and link in one go:

clang-cl -fsanitize=address /MD main.cpp

But now the executable should use a different ASAN runtime when linked:

clang-cl -fsanitize=address -c main.cpp -o main.o # Call vcvars64 here so all the default libraries are added to lld-link lld-link main.o -libpath:"%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Professional\VC\Tools\Llvm\x64\lib\clang\10.0.0\lib\windows" ^ clang_rt.asan_dynamic-x86_64.lib -wholearchive:clang_rt.asan_dynamic_runtime_thunk-x86_64.lib

Note that only clang_rt.asan_dynamic_runtime_thunk-x86_64.lib needs the -wholearchive flag here.

All the included dlls that are also sanitized (which should always be using the dynamic CRT) should be linked against the same ASAN runtime libraries as the executable.

Since clang_rt.asan_dynamic-x86_64.lib is an import lib pointing to clang_rt.asan_dynamic-x86_64.dll, when running a sanitized executable (or loading a sanitized lib) its folder should be in the PATH. You can find the dll alongside the .lib in %ProgramFiles(x86)%\Microsoft Visual Studio\2019\Professional\VC\Tools\Llvm\x64\lib\clang\10.0.0\lib\windows.

Using ASAN with CMake

If you want to use ninja or any other generator other than Visual Studio, just point CMake to your clang-cl installation and add the necessary flags to your targets. Adjust your flags for plain clang if you don’t need or don’t care about clang-cl.

add_executable(exec main.cpp) target_compile_options(exec PRIVATE -fsanitize=address) # /MD will be used implicitly target_link_directories(exec PRIVATE "${ENV:PROGRAMFILES(X86)}/Microsoft Visual Studio/2019/Professional/VC/Tools/Llvm/x64/lib/clang/10.0.0/lib/windows") target_link_libraries(exec PRIVATE clang_rt.asan_dynamic-x86_64 clang_rt.asan_dynamic_runtime_thunk-x86_64) target_link_options(exec PRIVATE /wholearchive:clang_rt.asan_dynamic_runtime_thunk-x86_64.lib)

CMake will always need to be invoked with -DCMAKE_BUILD_TYPE=Release otherwise the compilation will fail.

To generate a Visual Studio solution, you need to pass a few extra arguments to CMake:

  • Generate a Visual Studio solution: -G "Visual Studio 16 2019"
  • Choose between 32 or 64 bit target: -A {Win32,x64}
  • Use the clang toolkit: -T ClangCL

Or, if you are using Visual Studio Code just select the right entry from the kit list (e.g. Clang 10.0.0 for MSVC with Visual Studio Professional 2019 Release (amd64)).

Conclusions

Using tools to track down memory bugs helps saving time and effort, especially on complex projects. On Windows, the available tooling is limited, and a step by step documentation on how to use what’s available may be hard to come by. With this blog post, it will be hopefully easier for you to leverage the AddressSanitizer on Windows and keep memory bugs in your projects under control.

 

If you’d like to learn more about the tooling available for C++ developers working with Microsoft Windows on the desktop, you might be interested in our Debugging and Profiling C++ Applications on Windows training.

 

About KDAB

If you like this blog and want to read similar articles, consider subscribing via our RSS feed.

Subscribe to KDAB TV for similar informative short video content.

KDAB provides market leading software consulting and development services and training in Qt, C++ and 3D/OpenGL. Contact us.

The post How to Build C++ Projects with the Address Sanitizer on Windows appeared first on KDAB.

First beta out for Krita 4.4

Tuesday 22nd of September 2020 07:34:28 AM

The summer has come and gone since the 4.3 release, but we have not been sitting still. We had four Summer of Code Students this year, each of which completed their project. One of these projects has already made it into 4.4: The SeExpr fill layers! And that’s not the only new fill layer type… And fill layers now have on-canvas preview when you created them. And there’s a new plugin that helps when using Krita together with Godot. And there are new options for the brush engines and, of course, a ton of bugfixes! The full release notes bring you all the details!

So, today, we’re releasing Krita 4.4.0 beta 1: in two weeks we will release the final version. Please help improve Krita by testing this beta!

 

Download Windows

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.

Linux

(If, for some reason, Firefox thinks it needs to load this as text: to download, right-click on the link.)

OSX

Note: the gmic-qt is not available on OSX.

Android

This beta will not be available for Android. However, we are currently working on some significant fixes for saving and loading files on Android, and we hope to have these included in the final version of Krita 4.4 for Android, so sit tight!

Source code md5sum

For all downloads:

Key The Linux appimage and the source .tar.gz and .tar.xz tarballs are signed. You can retrieve the public key over https here: 0x58b9596c722ea3bd.asc. The signatures are here (filenames ending in .sig).-->

Support Krita

Krita is a free and open source project. Please consider supporting the project with donations or by buying training videos! With your support, we can keep the core team working on Krita full-time.

The post First beta out for Krita 4.4 appeared first on Krita.

Felgo in the QML Book

Monday 21st of September 2020 06:46:36 PM

Over the past year I’ve been bumping into the Felgo crew at various Qt events. They take Qt to the next level. It all started as a game development framework for Qt, but has turned into a powerful app development framework taking a lot of the rough corners of Qt, and extending the tooling with a powerful live reloader at the same time.

To showcase how the Felgo SDK fits into the bigger picture, and how much it actually helps creating apps, we agreed to extend the QML Book with a Felgo chapter. The chapter is built around a messaging app and showcases the whole UI creation from initial skeleton to working app.

We also cover a bunch of other things such as how to get started, the QML Live reloader, as well as some more advanced topics such as native dialogs, simplified networking and the JsonListModel.

Big thanks goes out to Felgo for supporting this work and helping to make QML Book better.

Plasma Beta Review Day

Monday 21st of September 2020 01:31:42 PM

Plasma 5.20 is now in beta, which gives us one month of intense testing, bugfixing and polishing.

During this time we need as many hands on deck as possible to help with finding regressions, triaging incoming reports and generally being on top of as much as possible.

In order to make this process more accessible, more systematic and hopefully more fun we are going to run an official "Plasma Beta Review Day"

Who?

Any user of plasma able to install the latest beta or run a live ISO with our beta on it who want to help.

When?

Thursday the 24th September; midday to midnight CEST, with people welcome to turn up and drop out whenever.

Where?

Join us in the webconferencing channel: https://meet.kde.org/b/dav-gmr-qzx The webserver we used for Akademy. There will be a room available.
You can join with a camera and a microphone or just in the classic text chat.

What will this consistent of?
  • Introductions to bugzilla for people who want support filing or triaging their first bugs
  • Being assigned short buglists to validate, de-duplicate, for those more experienced
  • Going through a defined list of all the new areas of Plasma to check for regressions
  • Devs being online so we can get debug info for issues you have so we can identify and fix things in real time
What should I prepare?

Ideally get yourself set up with a beta of the latest Plasma. Follow the links for:
https://community.kde.org/Plasma/Live_Images for an image running either master or Plasma 5.19.90

I hope to see you all soon!

Running PlasmaShell with Vulkan

Monday 21st of September 2020 08:00:48 AM
About QtQuick and RHI

QtQuick, in one word, is amazing.

QtQuick, in slightly more words, is a scene graph implementation. At a developer level we create abstract "Items" which might be some text or a rectangle etc or a picture. This in turn gets transformed into a tree of nodes with geometry, "materials" and transforms. In turn this gets translated into a big long stream of OpenGL instructions which we send to the graphic card.

Qt6 will see this officially change to sit on top of the "Render Hardware Interface" stack, that instead of always producing OpenGL, will support Vulkan, Metal and Direct3D natively. The super clever part about it is that custom shaders (low level fast drawing) are also abstracted; meaning we will write some GLSL and generate the relevant shader for each API without having to duplicate the work.

This blog series gives a lot more detail: https://www.qt.io/blog/qt-quick-on-vulkan-metal-direct3d.

Plasma code primarily interacts with Items and occasionally nodes, slightly above the level being abstracted.

Current State

Qt 5.15 ships with a tech preview of RHI and the Vulkan interface. I spent some time to set it up and explore what we need to do to get our side fully working. With some packages installed, a few plasma code fixes and some env vars set, I have a fully working Vulkan plasmashell.

Screenshot

Unsurprisingly it looks the same, so a screenshot is very unexciting. I enabled the Mesa overlay as some sort of proof.
The reason it shows 2fps is because plasmashell only updates when something has changed; in this case the textcursor blinking every 500ms.

Despite it being a preview it is in a damn good state! Things are usable, and really quite snappy, especially notification popups.

What needs work

Some things need work on our side, in particular:

  • All of our custom shaders need porting to the updated shader language.
  • Taskbar thumbnails use low level GL code that needs one extra layer of implementation.
  • Use of QtQuickWidget in systemsettings.

It means some elements are invisible or don't render with the full graphical effects, or in the last case, crash.

But in the whole scheme of things, everything is in a very encouraging state

What about KWin?

Whilst QtQuick is the cornerstone of plasmashell, systemsettings and so many applications, for historical reasons KWin made use of OpenGL before it was a mainstream part of Qt. Therefore this setup is mostly unrelated to KWin. Fortunately there's no reason these two have to be in sync.

Wrap up

This isn't usable for end users, and given it's only a tech preview upstream, this is not something we can ever expect to officially support within Plasma 5.

But we can start doing the prep work, also the current state is so promising I think we can deliver a native Vulkan experience to users on the first day of Plasma 6.

More in Tux Machines

Type Title Author Replies Last Postsort icon
Story Dell XPS 13 Developer Edition Gets 11th-Gen Intel Refresh, Ubuntu 20.04 LTS Rianne Schestowitz 6 30/09/2020 - 1:39am
Story Best Markdown Editors for Linux Roy Schestowitz 30/09/2020 - 1:31am
Story LibreOffice Reviews and Events Roy Schestowitz 1 29/09/2020 - 11:32pm
Story Security Leftovers Rianne Schestowitz 29/09/2020 - 11:25pm
Story today's howtos Roy Schestowitz 29/09/2020 - 11:23pm
Story Fedora 33 Beta now available Rianne Schestowitz 4 29/09/2020 - 11:19pm
Story Python Programming Rianne Schestowitz 29/09/2020 - 11:07pm
Story Linux Magazine's Latest Issue and 20th Birthday Roy Schestowitz 1 29/09/2020 - 10:45pm
Story Android Leftovers Rianne Schestowitz 29/09/2020 - 10:26pm
Story Lenovo Launches ThinkPad and ThinkStation PCs with Ubuntu 20.04 LTS Marius Nestor 14 29/09/2020 - 10:13pm