Subscribe to Planet KDE feed
Planet KDE -
Updated: 9 min 36 sec ago

KDE on Android: CI, CD & SDK

Thu, 2018/06/21 - 11:50pm

I guess we all agree that one of the biggest stoppers to get a contribution out is the ability to get the system ready to start working on the contribution. Today I want to talk a bit about generating Android binaries from our machine.

In the KDE Edu sprint we had the blatant realisation that it’s very frustrating to keep pushing the project while not being swift at delivering fresh packages of our applications in different systems. We looked into windows, flatpak, snap and, personally, I looked into Android once again.

Nowadays, KDE developers develop the applications on their systems and then create the binaries on their systems as well. Usually it’s a team effort where possibly just one person in the team will be familiar with Android and have the development combo in place: Android SDK, Android NDK, Qt binaries and often several KDE Frameworks precompiled. Not fun and a fairly complex premise.

Let’s fix that.

Going back to the initial premise of delivering KDE Edu binaries, the first thing we need is a continuous distribution system for Android, much like we already had for

Our applications will be bundling some KDE Frameworks, we need to know which work, to make sure they don’t break to some extent, much like what is already doing.
And last but not least, while at it, we need to create a system that makes it simple for developers to do the same that our automatic systems are doing.

Docker to the rescue

We needed a way to pull everything we will need into a system: SDK, NDK, Qt binaries, few build dependencies. For this we created the following image: sdasdad

With this image one can create binaries for his application locally.

We have also deployed it in to build some KDE Frameworks. Note that we are lacking some dependencies on Android so our offer is limited in comparison to traditional GNU/Linux. Also we are not running tests, it’s something we could look into but I’m not yet sure how useful that would be.

I want to develop

Here you have a wiki that explains how to use the docker image to build your KDE application.

I want to test

I set up an F-Droid repository that offers the binaries listed in the binary-factory conveniently, so that when there is a new version we will get the update.


All of this ties directly to the runtime integration I mentioned already in this blog post.

LabPlot 2.5 released

Thu, 2018/06/21 - 6:32pm

It took much more time to finalize the release than we planned in the beginning after the 2.4 release was done. But we hope the number of features we implemented for 2.5 and their impact on the workflows supported by LabPlot can justify this delay. The source code and the installers for Windows and for Mac OS X can be found on our download page, as usual.

In this release we again increased the number of data sources and added the support for the import of data from SQL databases. The user can import either from single tables or import the result of a custom SQL queries.

Import from a table

Import the result of a custom SQL query

Starting with 2.5 we can import © OriginLab Origin projects files. It goes without saying that the first release having this feature cannot handle the complete feature set of Origin. In this release we concentrated on the import of Origin’s data containers – workbooks and matrix books and 2D-plots. A new dialog for the project import was added that provides a preview of the content of the selected project file and where the user can select which objects to import:

Import Project Dialog

Similar to the import of Origin projects, we support the import of native LabPlot projects. With this, complete or partial merging of different projects becomes possible. More information on this feature can be found here.

Another major new feature is the support of live data. We dedicated a blog recently to this topic. Though it is possible to read live data from files, pipes and different types of sockets (local, TCP, UDP), the support for sockets is experimental in this release and will be made more stable in the next release.

Among other smaller improvements in the area of data import we want to mention the new ability of LabPlot’s main window to react on drag&drop events. Now, if the user drags a file and drops it on LabPlot, the import dialog is immediately opened and the user can specify how to import the file. Similar for project files – drag&drop of LabPlot and Origin project files loads the project.

More work was also invested in the auto-detection of data types during the import. Some additional options in the import dialog were added where the user can specify the locale and the format for date/date-time values to be used during the import.

We implemented couple of nice features for faster creation of plots and curves:

This was described in more details in the dedicated blog post for UX improvements. There are couple of other smaller changes that will improve the general user experience like the syntax highlighting for LaTeX code in text labels, tool tips for the supported mathematical functions and constants in text fields for mathematical expressions and the animated zooming in worksheet views.

Similar to the previous releases, we continue working on the data analysis functions in LabPlot. In 2.5 we greatly improved data fitting and added some logic to automatically guess the parameters for fit models specified by the user, for fitting with weights, etc. We refer to the blog which describes the new features in more detail.

Theming that was added in LabPlot 2.4 was further extended and improved. Now, also plot legends and text labels respect the color palettes defined in a theme and it is possible to apply a theme to the whole worksheet and to all its children and not to single plots only. We added a new application options for the default theme that has to be used for new worksheets. With this option the user can select and theme that will be applied on default of every new worksheet and its children.

On the plotting side, among several smaller fixes and performance improvements we now automatically switch to the scientific representation for numbers bigger than 10^4 on the axis tick labels. Furthermore, we added the possibility to add new text labels to the plots. With this, in addition to the already and always available text label for the plot title the user has the possibility to add more text information to the plot.

The command line interface was extended and we added the options to start the application in the presenter mode and to specify the name of the (LabPlot or Origin) project file to open it directly upon start.

The list of the supported mathematical functions was extended. Users compiling with GSL 2.4 can use Hermite polynomials in LabPlot. Users compiling with libcerf will benefit from many different complex error functions.

Though the primary development and testing happens on Linux mostly, we invested more into Windows and Max OS X builds and provide a better support for these platforms now. Also, with this release we ship for the first time a version of Cantor on Windows and Max OS X to provide the support for common open source computer algebra systems in LabPlot as introduced in 2.3 also on these platforms. This feature is experimental on these platforms at the moment but it will get more attention in future from us and we hope to be on par soon with what we have for Linux versions.

All in all, a lot of new features and improvements this time! This release took quite a lot of our time and required a lot of effort to finalize everything. It was not always easy but now when everything is done we can relax a bit. But only a bit :-). This year we have two GSoC-students working on really cool projects that will enable LabPlot to read data from MQTT and from web services. Besides this, couple of other features are already in progress and we hope to bring another release this year.

Qt Creator 4.7 Beta2 released

Thu, 2018/06/21 - 12:10pm

We are happy to announce the release of Qt Creator 4.7 Beta2!

It is roughly 2 weeks after the Beta1 release, and 2 weeks before our planned release candidate, so we want to give you the opportunity to fetch an updated work-in-progress snapshot in between.
If you haven’t yet read about the improvements and new features that are coming with 4.7 (or if you have forgotten), I would like to point you to the blog post for the first beta.

Get Qt Creator 4.7 Beta2

The opensource version is available on the Qt download page, and you find commercially licensed packages on the Qt Account Portal. Qt Creator 4.7 Beta2 is also available under Preview > Qt Creator 4.7.0-beta2 in the online installer. Please post issues in our bug tracker. You can also find us on IRC on #qt-creator on, and on the Qt Creator mailing list.

The post Qt Creator 4.7 Beta2 released appeared first on Qt Blog.

CMake 3.12 Update on FreeBSD

Thu, 2018/06/21 - 10:55am

CMake 3.12 has reached rc1. That means we’re testing the update on FreeBSD, and building lots and lots of packages. And, as I’ve written previously, every CMake update triggers a bunch of interesting software findings.

As a motto, I’ve got “use it, aggressively improve it” on my website (you can hire me for odd CMake and C++ jobs, too). So hitting compile issues makes me turn to fixing software outside of KDE.

  • Spring is a 3D RTS engine, with only a minor CMakeLists fix — CMake 3.12 is strict about file(GLOB) and the FOLLOW_SYMLINKS keyword, which is documented only for file(GLOB_RECURSE). Since CMake 3.5, probably much earlier, that keyword has been ignored, and now it’s an error (this is considered a regression).
  • Coin3D is a 3D toolkit, which in the version currently available on FreeBSD, doesn’t even use CMake. It hit a bunch of Clang6 compatibility issues, and after some investigation it turns out they had all been fixed already in later releases; I put in a little time to improve FreeBSD compatibility for the next release.

What I found interesting in those two was once again the variety in CMake styles — “Modern CMake Style” still needs to catch on in many places, and the wider ecosystem. Mantis bug-tracker! Mercurial! I remember being a big Mercurial fan years ago when doing KDE-Solaris and complaining how obtuse git is. (It’s still obtuse, but I’m used to it now).

There’s another four dozen ports that have fallout from this update; amusingly Kitware’s VTK 5 and VTK 6 are among them — although a first glance tells me that’s C++ problems and not CMake problems, actually. (Generally, using NULL in places where you want to write 0; older macro definitions of NULL would re-write to something that could successfully be cast to 0, but clang6 in C++17 mode, the default, uses nullptr which doesn’t cast).

The day Kate Gregory enjoyed Qt

Thu, 2018/06/21 - 9:40am

At my company we use C++ for everything, from creating microservices to website backends and as a generator for website frontends, I mean, we do a lot of c++. And because of that we always need more c++ people, but sometimes it’s hard to find developers, but it’s easy to find php / python / javascript ones. Because of that we hired Kate Gregory’s famous c++ course – “Teaching the Teacher” to train current C++ developers to teach C++. (now, that’s a lot of ‘C++’ in a simple sentence, I know. bear with me.)

For those that doens’t know, Kate Gregory is somebody that uses, advocates our beloved language even before I was born, and talks all over the world about C++ and also do trainings for companies, And so I enlisted to be her student.

It was a really pleasant course going thru how to proplery explain C++ for people that know how to program but don’t know how to C++, and for that I’m grateful. But then when I commented out about Qt in the middle of the class she rolled her eyes, that made me feel a bit uneasy so I talked to her on why the eye-roll. “Qt is not c++”, and I tougth this was already settled down for years, so I asked her if she would be open to see some simple c++ code written in Qt and tell me what she thinks of it. “Well, Yes. but people already tried and it was not good”.

Then I tried, and when you are showing Qt to people that are interested in the language there’s a few things that you should not try to talk about:

  • Don’t talk about Qt Creator, it’s common that they have a favorite editor, and Qt is unrelated to Qt Creator
  • Don’t talk about Designer, drag’n drop is not a feature for algorithm-minded people.
  • Don’t talk about QtWidgets, it’s a nice feature to have and everybody knows that Qt has it, talk about something else.
  • Don’t talk about qmake, tha’s irrelevant, every IDE has a way of building software, and if they don’t use a IDE they know how to use a Makefile or similar.

What I actually talked about, to remove some misconceptions about “Qt is for Widgets, Qt is Not C++”

  • moc is uneeded, you can create complete Qt applications without it.
    • you don’t need to use moc-like code if you don’t inherit from QObject
    • if you inherit you need to use moc-like code, but that can be done with:
      • moc, easiest way.
      • hand written if you feel like it (but why?)
      • use Verdigris a header library that generates moc-style code.
  • Create something that’s unrelated to a Widget, use QNetwork, Threads or somerthing.

I’v created the following source codes, all compile without moc, all are clean c++ code for people that don’t belive Qt can be compiled with a plain compiler, all of them are *way* easier to read and write than anything that the STL can provide, and I’v showed them to Kate. (wordpress don’t let me update cpp files so I renamed it to txt)

After looking at them Kate said “You are actually the first person to show me Qt code that’s nice to look, this is actually pleasant.”

First Beta Release of Krita 4.1

Thu, 2018/06/21 - 7:52am

Three months after the release of Krita 4.0, we’re releasing the first (and probably only) beta of Krita 4.1, a new feature release! This release includes the following major new features:

  • A new reference images tool that replaces the old reference images docker.
  • You can now save and load sessions: the set of images and views on images you were working on
  • You can create multi-monitor workspace layouts
  • An improved workflow for working with animation frames
  • An improved animation timeline display
  • Krita can now handle larger animation by buffering rendered frames to disk
  • The color picker now has a mixing option
  • Improved vanishing point assistant — and assistants can be painted with custom colors
  • Krita’s scripting module can now be built with Python 2
  • The first part of Ivan Yossi’s Google Summer of Code work on improving the performance of brush masks through vectorization is included as well!

And there’s more. Read the full release notes to discover what’s new in Krita 4.1! With this beta release, the release notes are still work in progress, though.

Download Windows

Note for Windows users: if you encounter crashes, please follow these instructions to use the debug symbols so we can figure out where Krita crashes.


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

When it is updated, you can also use the Krita Lime PPA to install Krita 4.1.0-beta.2 on Ubuntu and derivatives. We are working on an updated snap.


Note: the touch docker, gmic-qt and python plugins are not available on OSX.

Source code md5sum

For all downloads:


The Linux appimage and the source tarball are signed. You can retrieve the public key over https here:
. 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 or the artbook! With your support, we can keep the core team working on Krita full-time.

New adventures – old challenges

Thu, 2018/06/21 - 7:13am

Times pass and we all change. I’ve realized that I’ve gone from mostly coding at work, to almost not coding at all (I reflect on this in the Under utveckling pod – Swedish only). I’ve also realized that what I do in automotive has a much wider application (see my fosdem talk on this). Thus, the conclusion is that the time has come to change context.

I’ve also spent a lot of time on promoting free and open source software. I’ve spoken at conferences, gone to hackathlons, spoken at the university, and arranged meetups. All this culminated in foss-north which I’ve been organizing for the past three years.

The conclusion from all of this is that there is an opportunity to focus on this full time. How can free and open source software be leveraged in various industries? How does one actually work with this? How does licensing work? and so on. To do so, I founded my own company – koderize – a while back and from now on I’m focusing fully on it.

Before joining Pelagicore back in 2010 I was solo consulting for a year. This was a great opportunity and I finally got to spend some time working directly with the former Trolls at what later became The Qt Company. However, I also came to realize that solo consulting makes me go slightly mad. Also, my wife complained that I talked to much every afternoon when she came home ;-)

Thus, I want colleagues. That is why myself and some great people that I’ve passed by during my years in this field are founding Kuro Studio (the web page is minimalist – i.e. empty).

The team we’re setting up complement each other and the sum of our experience covers the full full-stack. We can do team building, purchasing, processes, QA, agile, development, design, licensing, devops – even some hardware. The goal is to create an end-to-end product design team that can help out during any phase of product development, as well as organizational development.

At the end of the day I’m still passionate about what I have been doing the past 8 years. Cars excite me, and combining that with Qt and Linux makes me even more excited. That means that I’ll still be around in that field. As a matter of fact, my first assignment is in that area.

So, at the end of the day, time pass, we grow, but some things still stay the same. A bit thank you for everyone at Pelagicore – it was a great ride.

Qt Contributor Summit 2018

Wed, 2018/06/20 - 10:56pm

About two weeks ago i attended Qt Contributor Summit 2018, i did so wearing my KDAB hat, but given that KDE software is based heavily on Qt I think I'll give a quick summary of the most important topic that was handled at the Summit: Qt 6

  • Qt 6 is planned for a November 2020 release
  • Qt 5 releases will continue with the current cadence as of now with 5.15 being the last release (and also LTS)
  • The work branch for Qt 6 will be branched soon after Qt 5.12
  • Qt 6 has to be easy to migrate from Qt 5
  • Qt 6 will use C++17
  • Everything to be removed in Qt 6 should be marked as deprecated in 5.15 (ideally sooner)
  • What can be done in Qt 5 should be done to Qt 5
  • Qt 6 should be a "boring" release user feature wise, mostly cleanup and preparing for the future
  • Qt 6 should change things that break at compile time, those are easy to fix, silent runtime changes are scarier
  • Qt 6 will not use qmake as build system
  • The build system for Qt 6 is still not decided, but there's people working on a qbs build and noone working on any other alternative

On a community related note, Tero Kojo the Community Manager for The Qt Company is leaving and doesn't seem a replacement is on sight

Of course, note that these are all plans, and as such they may be outdated already since the last 10 days :D

0.2 Beta 1 Release of Elisa Music Player

Wed, 2018/06/20 - 8:45pm
0.2 Beta Release of Elisa Music Player

Elisa is a music player developed by the KDE community that strives to be simple and nice to use. We also recognize that we need a flexible product to account for the different workflows and use-cases of our users.

We focus on a very good integration with the Plasma desktop of the KDE community without compromising the support for other platforms (other Linux desktop environments, Windows and Android).

We are creating a reliable product that is a joy to use and respects our users privacy. As such, we will prefer to support online services where users are in control of their data.

New Features and Improvements

The main area of improvements are the following:

  • We have been fixing problems related to music import (different albums being merged, …) and general handling of music metadata ;
  • Improve cover images discovery (should fix most common cases) ;
  • Improve performance of the internal music database ;
  • Improve build time by factoring most c++ code in a dedicated library ;
  • Improvement of the player control bar with most controls related to playback being located here ;
  • Only load a music browsing view when it is used (faster and lighter on memory usage) ;
  • Add a browsing view by genres ;
  • Add a browsing view for the filesystem.
Screenshot_20180620_222734Current Elisa Interface Test of the future 0.2 version

The release is available from elisa-0.1.80.tar.xz and also in the form of a Windows setup (generated using Craft and You can also test by using the nightly flatpak builds from KDE.

Please report any issues to the KDE bugtracker.

Celebrating 10 Years with KDE

Wed, 2018/06/20 - 12:58pm

Of course I am using KDE software much longer. My first Linux distribution, SuSE 6.2 (the precursor to openSUSE), came with KDE 1.1.1 and was already released 19 years ago. But this post is not celebrating the years I am using KDE software.

Exactly ten years ago, dear Albert committed my first contribution to KDE. A simple patch for a problem that looked obvious to fix, but waiting for someone to actually do the work. Not really understanding the consequences, it marks the start of my journey within the amazing KDE community.

Bug Triaging and Quality

In the following ten years, I contributed to or resolved thousands of bugs in kdelibs, systemsettings, and various other KDE software. Much of the passion to triage and tackle bugs do I owe Darío Andrés, the original author of our bug triaging guide. I have not heard from him later, but hope he does well.

Long before we had a continuous build service, I used to build nearly all KDE software with a self-written script, monitoring its output for build errors and newly introduced compiler warnings. Someone surely remembers my constant mails about failing builds and other issues I felt responsible for as part of the quality assurance in the KDE team.

Theming and Decorations

Besides tackling wierd crashes, I was also active in UI polishing, freeing our code from hard-coded spacings, colors, font or icon sizes, using my own Qt widget style Skulpture and a specially crafted color scheme as a testbed. Not that dark themes and HiDPI displays were common ten years ago; I just always liked the full control of the user over his software. After all, UI stands for User Interface.

The Skulpture style came with its own simple KWin window decoration. For those not satisfied with its look, I ported and improved the Dekorator theming engine, and even created a version of Emerald (the Compiz/Beryl decorator) for KDE4, called Smaragd, which has recently been ported to Plasma 5. Once installed, it gives Plasma 5 users access to over thousand window decoration themes.

Applications Porting and Releasing

Apropos porting: Hopefully my porting status page was useful for contributors to decide where to help, and for users to decide when to switch. Besides tracking porting progress, I helped porting small utilities, such as KCalc, KCharSelect, KCron, KMag, and KRuler, but also bigger applications, such as KmPlot, KolourPaint, and KTurtle. You might notice a slight bias towards math and graphics applications ��

The longer you are part of a community, the more responsibilites you are going to accept. Being the maintainer of a few KF5 frameworks is not exactly exciting. But a year ago, I got the opportunity to help Albert with KDE Applications releases, learning about the release process, including tagging, packaging tarballs, and posting announcements. Creating a release is a nice way to see all the fruits of the work of many contributors coming together.

So what am I going to do in the next ten years? If you had asked me that question ten years ago, I could not have given you an answer, and I am glad I cannot give you answer today. What is so special about the KDE community is that it constantly gives you new problems to tackle, and I hope I will be able to report in ten years which of them we mastered.

Clazy and LibClang for the Rescue

Wed, 2018/06/20 - 8:14am

After my last post I downloaded clang, compiled clazy and got in contact with Sergio Martins – the main Clazy developer asking for some tips on how to start, as everyone should know LLVM is a compiler infrastructure that’s changing the world with quite a few projects, like Emscripten, Cling LLDB and the most well known tool: Clang

Every c++ developer of today’s world should praise Clang as it’s library and server mode are being used in Qt Creator, CLion and others for correctly parsing C++ code. I have *never* touched this kind of code, and I’m fearfull for my life. But knowing that Appending to temporaries is a worse solution than creating a static std::initializer_list gives me no other option, also, I’m bored.

Following Sergio’s advice I dumped the AST of the offending code and the AST of the good code:

clang++ -fsyntax-only -Xclang -ast-dump -fno-color-diagnostics qt_test_good.cpp > good.tree clang++ -fsyntax-only -Xclang -ast-dump -fno-color-diagnostics qt_test_bad.cpp > bad.tree

The codes this time are a bit different than the ones I’v showed all yesterday as I’m only interested in The offending line, so I removed all for loops and all possible distraction that I had.

// bad code int main() { QVector<int>() << 1 << 2 << 3 << 4 << 5; } // good code int main() { QVector<int> {1, 2, 3, 4, 5}; }

And started to analyze the AST – For those who are not techically savy, AST stands for Abstract Syntax Tree and it describes what the program should do. and the good code, the small, one liner, good code dumped an AST of about 70.000 lines. *OH NOES!* I screamed, it’s impossible to actually understand that, that’s soo much stuff going on that I don’t even know where to start.

Then I looked at the function main and managed to strip out around 69.950 lines of code, Now this is actually userfull: `-CompoundStmt 0x55dec0933910 <col:12, line:6:1> |-ExprWithCleanups 0x55dec09338c0 <line:4:5, col:47> 'QVector':'QVector' | `-CXXBindTemporaryExpr 0x55dec09338a0 <col:5, col:47> 'QVector':'QVector' (CXXTemporary 0x55dec0933898) | `-CXXTemporaryObjectExpr 0x55dec0933858 <col:5, col:47> 'QVector':'QVector' 'void (std::initializer_list)' list std::initializer_list | `-CXXStdInitializerListExpr 0x55dec0933750 <col:17, col:47> 'std::initializer_list':'std::initializer_list' | `-MaterializeTemporaryExpr 0x55dec0933738 <col:17, col:47> 'const int [10]' xvalue | `-InitListExpr 0x55dec09336a8 <col:17, col:47> 'const int [10]' | |-IntegerLiteral 0x55dec09239a8 'int' 1 | |-IntegerLiteral 0x55dec09239c8 'int' 2 | |-IntegerLiteral 0x55dec09239e8 'int' 3 | |-IntegerLiteral 0x55dec0923a08 'int' 4 | |-IntegerLiteral 0x55dec0923a28 'int' 5 `-ReturnStmt 0x55dec09338f8 <line:5:5, /usr/include/stdlib.h:92:22> `-IntegerLiteral 0x55dec09338d8 'int' 0

This is Tiny, and somewhat simple to understand what’s going on. I have no idea about the CompoundStmt, CXXTemporaryObjectExpr, InitListExpr and so on but I don’t care about that now, I’m only interested in trying to figure out the tree.

And here the Bad code: see something strange?


`-FunctionDecl 0x55c00766a5f8 <main.cpp:3:1, line:6:1> line:3:5 main 'int ()' `-CompoundStmt 0x55c00767a098 <col:12, line:6:1> |-ExprWithCleanups 0x55c00767a048 <line:4:5, col:68> 'QVector<int>':'QVector<int>' lvalue | `-CXXOperatorCallExpr 0x55c00767a000 <col:5, col:68> 'QVector<int>':'QVector<int>' lvalue | |-ImplicitCastExpr 0x55c007679fe8 <col:65> 'QVector<int> &(*)(int &&)' <FunctionToPointerDecay> | | `-DeclRefExpr 0x55c007679fc0 <col:65> 'QVector<int> &(int &&)' lvalue CXXMethod 0x55c007677858 'operator<<' 'QVector<int> &(int &&)' | |-CXXOperatorCallExpr 0x55c007679f40 <col:5, col:63> 'QVector<int>':'QVector<int>' lvalue | | |-ImplicitCastExpr 0x55c007679f28 <col:60> 'QVector<int> &(*)(int &&)' <FunctionToPointerDecay> | | | `-DeclRefExpr 0x55c007679f00 <col:60> 'QVector<int> &(int &&)' lvalue CXXMethod 0x55c007677858 'operator<<' 'QVector<int> &(int &&)' | | |-CXXOperatorCallExpr 0x55c007679e80 <col:5, col:58> 'QVector<int>':'QVector<int>' lvalue | | | |-ImplicitCastExpr 0x55c007679e68 <col:55> 'QVector<int> &(*)(int &&)' <FunctionToPointerDecay> | | | | `-DeclRefExpr 0x55c007679e40 <col:55> 'QVector<int> &(int &&)' lvalue CXXMethod 0x55c007677858 'operator<<' 'QVector<int> &(int &&)' | | | |-CXXOperatorCallExpr 0x55c007679dc0 <col:5, col:53> 'QVector<int>':'QVector<int>' lvalue | | | | |-ImplicitCastExpr 0x55c007679da8 <col:50> 'QVector<int> &(*)(int &&)' <FunctionToPointerDecay> | | | | | `-DeclRefExpr 0x55c007679d80 <col:50> 'QVector<int> &(int &&)' lvalue CXXMethod 0x55c007677858 'operator<<' 'QVector<int> &(int &&)' | | | | |-CXXOperatorCallExpr 0x55c007679d00 <col:5, col:48> 'QVector<int>':'QVector<int>' lvalue | | | | | |-ImplicitCastExpr 0x55c007679ce8 <col:45> 'QVector<int> &(*)(int &&)' <FunctionToPointerDecay> | | | | | | `-DeclRefExpr 0x55c007679cc0 <col:45> 'QVector<int> &(int &&)' lvalue CXXMethod 0x55c007677858 'operator<<' 'QVector<int> &(int &&)' | | | | | |-CXXOperatorCallExpr 0x55c007679c40 <col:5, col:43> 'QVector<int>':'QVector<int>' lvalue | | | | | | |-ImplicitCastExpr 0x55c007679c28 <col:40> 'QVector<int> &(*)(int &&)' <FunctionToPointerDecay> | | | | | | | `-DeclRefExpr 0x55c007679c00 <col:40> 'QVector<int> &(int &&)' lvalue CXXMethod 0x55c007677858 'operator<<' 'QVector<int> &(int &&)' | | | | | | |-CXXOperatorCallExpr 0x55c007679b80 <col:5, col:38> 'QVector<int>':'QVector<int>' lvalue | | | | | | | |-ImplicitCastExpr 0x55c007679b68 <col:35> 'QVector<int> &(*)(int &&)' <FunctionToPointerDecay> | | | | | | | | `-DeclRefExpr 0x55c007679b40 <col:35> 'QVector<int> &(int &&)' lvalue CXXMethod 0x55c007677858 'operator<<' 'QVector<int> &(int &&)' | | | | | | | |-CXXOperatorCallExpr 0x55c007679ac0 <col:5, col:33> 'QVector<int>':'QVector<int>' lvalue | | | | | | | | |-ImplicitCastExpr 0x55c007679aa8 <col:30> 'QVector<int> &(*)(int &&)' <FunctionToPointerDecay> | | | | | | | | | `-DeclRefExpr 0x55c007679a80 <col:30> 'QVector<int> &(int &&)' lvalue CXXMethod 0x55c007677858 'operator<<' 'QVector<int> &(int &&)' | | | | | | | | |-CXXOperatorCallExpr 0x55c007679a00 <col:5, col:28> 'QVector<int>':'QVector<int>' lvalue | | | | | | | | | |-ImplicitCastExpr 0x55c0076799e8 <col:25> 'QVector<int> &(*)(int &&)' <FunctionToPointerDecay> | | | | | | | | | | `-DeclRefExpr 0x55c0076799c0 <col:25> 'QVector<int> &(int &&)' lvalue CXXMethod 0x55c007677858 'operator<<' 'QVector<int> &(int &&)' | | | | | | | | | |-CXXOperatorCallExpr 0x55c007679940 <col:5, col:23> 'QVector<int>':'QVector<int>' lvalue | | | | | | | | | | |-ImplicitCastExpr 0x55c007679928 <col:20> 'QVector<int> &(*)(int &&)' <FunctionToPointerDecay> | | | | | | | | | | | `-DeclRefExpr 0x55c0076798a8 <col:20> 'QVector<int> &(int &&)' lvalue CXXMethod 0x55c007677858 'operator<<' 'QVector<int> &(int &&)' | | | | | | | | | | |-CXXBindTemporaryExpr 0x55c007679828 <col:5, col:18> 'QVector<int>':'QVector<int>' (CXXTemporary 0x55c007679820) | | | | | | | | | | | `-CXXTemporaryObjectExpr 0x55c0076797e8 <col:5, col:18> 'QVector<int>':'QVector<int>' 'void () noexcept' | | | | | | | | | | `-MaterializeTemporaryExpr 0x55c007679868 <col:23> 'int':'int' xvalue | | | | | | | | | | `-IntegerLiteral 0x55c007679848 <col:23> 'int' 1 | | | | | | | | | `-MaterializeTemporaryExpr 0x55c0076799a8 <col:28> 'int':'int' xvalue | | | | | | | | | `-IntegerLiteral 0x55c007679988 <col:28> 'int' 2 | | | | | | | | `-MaterializeTemporaryExpr 0x55c007679a68 <col:33> 'int':'int' xvalue | | | | | | | | `-IntegerLiteral 0x55c007679a48 <col:33> 'int' 3 | | | | | | | `-MaterializeTemporaryExpr 0x55c007679b28 <col:38> 'int':'int' xvalue | | | | | | | `-IntegerLiteral 0x55c007679b08 <col:38> 'int' 4 | | | | | | `-MaterializeTemporaryExpr 0x55c007679be8 <col:43> 'int':'int' xvalue | | | | | | `-IntegerLiteral 0x55c007679bc8 <col:43> 'int' 5 | | | | | `-MaterializeTemporaryExpr 0x55c007679ca8 <col:48> 'int':'int' xvalue | | | | | `-IntegerLiteral 0x55c007679c88 <col:48> 'int' 6 | | | | `-MaterializeTemporaryExpr 0x55c007679d68 <col:53> 'int':'int' xvalue | | | | `-IntegerLiteral 0x55c007679d48 <col:53> 'int' 7 | | | `-MaterializeTemporaryExpr 0x55c007679e28 <col:58> 'int':'int' xvalue | | | `-IntegerLiteral 0x55c007679e08 <col:58> 'int' 8 | | `-MaterializeTemporaryExpr 0x55c007679ee8 <col:63> 'int':'int' xvalue | | `-IntegerLiteral 0x55c007679ec8 <col:63> 'int' 9 | `-MaterializeTemporaryExpr 0x55c007679fa8 <col:68> 'int':'int' xvalue | `-IntegerLiteral 0x55c007679f88 <col:68> 'int' 10 `-ReturnStmt 0x55c00767a080 <line:5:5, /usr/include/stdlib.h:92:22> `-IntegerLiteral 0x55c00767a060 <col:22> 'int' 0 g++ -Wl,-O1 -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o testeQt main.o -lQt5Gui -lQt5Core -lGL -lpthread

I mean, I’m no genious but I can clearly see the difference (that’s different than understand, I’m still trying that second part.)

but I can see that those lines

| `-CXXOperatorCallExpr 0x55c00767a000 <col:5, col:68> 'QVector<int>':'QVector<int>' lvalue | |-ImplicitCastExpr 0x55c007679fe8 <col:65> 'QVector<int> &(*)(int &&)' <FunctionToPointerDecay> | | `-DeclRefExpr 0x55c007679fc0 <col:65> 'QVector<int> &(int &&)' lvalue CXXMethod 0x55c007677858 'operator<<' 'QVector<int> &(int &&)'

repeat for each number that I append into the vector untill I find a

-CXXBindTemporaryExpr 0x55c007679828 <col:5, col:18> ‘QVector<int>’:’QVector<int>’ (CXXTemporary 0x55c007679820)

Hours reading the documentation, talking to Sergio, crying and hacking into clazy I have a (somewhat buggy and experimental) check that will warn you if you are appending to a temporary using operator-shift-left. I plan to send this to review this week and as soon as it’s 100% I’ll run in the entire KDE codebase.

GSoC 2018 – Coding Period (May 28th to June 18th): First Evaluation and Progress with LVM VG

Tue, 2018/06/19 - 4:08pm


The first evaluation was done and I successfully passed! &#55357;&#56898;


I got some problems during the last weeks of Google Summer of Code which made me deal with some challenges. One of these challenges was caused by a HD physical problem. I haven’t made a backup of some work and had to rework again in some parts of my code. As I already knew how to proceed, it was faster than the first time.

I had to understand how the device loading process is made in Calamares to load a preview of the new LVM VG during its creation in Partition Page. I need to list it as a new storage device in this page and deal with the revert process. I’ve implemented some basic fixes and tried to improve it.

There were some problems when reverting pending operations, especially when you got an old LVM VG configured in your system. This problem was related to kpmcore scanDevice procedure. SfdiskBackend::scanDevice method is responsible to load a device based on its partition node, but it only was considering disk devices and ignoring logical devices.

LVM VGs were only loaded using SfdiskBackend::scanDevices method, which loads all the devices found in your system. Calamares uses scanDevice during revert process, to update the devices references according with the original ones. So, when some old VG was previously configured, the revert process tries to call scanDevice and was getting only a nullptr reference, causing an unexpected segfault.

I fixed this method to load the specified VG, but my solution needs to know all the physical devices contained in your system to do it, as you can see in this commit:

As you can imagine, it can take a significant time of processing in some cases, because it will load all the devices every time when you need to load a specific VG. I need to improve it, using some other procedure, but I’m worried about the loading of LVM PVs, that will require to load each device which the PV is associated.

About my progress in Calamares during this time, you can take a look in some commits in my PR:

Well, it’s being a great experience, but I need to improve some things in my work and in its processes, especially with the communication, I’m learning about how to be a more communicative person in open source projects. I’m getting a great knowledge! &#55357;&#56898;

Qt 5.11.1 Released

Tue, 2018/06/19 - 11:38am

I am pleased to announce that Qt 5.11.1 is released today. As a patch release Qt 5.11.1 does not add any new functionality, but provides important bug fixes and other improvements.

New Qt 5.11.1 is first patch release for Qt 5.11 series. There are fixes for over 150 bugs and it contains more than 700 changes compared to Qt 5.11.0. For details of the most important changes, please check the Change files of Qt 5.11.1. And don’t worry if some fix is missing from new Qt5.11.1 release; we are planning to release Qt 5.11.2 at the beginning of September.

Qt 5.11.1 can be updated by using the maintenance tool of the online installer. For new installations, please download latest online installer from Qt Account portal or from Download page. Offline packages are available for commercial users in the Qt Account portal and at the Download page for open-source users. You can also try out the Commercial evaluation option from the Download page.

The post Qt 5.11.1 Released appeared first on Qt Blog.

Speeding up Cornercases

Tue, 2018/06/19 - 8:30am

I’m a speed freak. I don’t belive that “early optimization is the root of all evil”, if we do not optmize our software we may as well run everything in debug mode as it’s much easier for a developer to understand what’s going on. But we live in the real world and things should be snappy, and fast.

I’m really annoyed to find *some* stuff that I always tougth it’s slow but I never had the desire to actually measure it, now I did. I runned the code six times to have sane results., all code is configured to compile with g++ and  -02

First code:

int main() {          long count = 0;          for (int i = 0; i < 100000000; i++) {                 auto list = QList<int>{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};                 count += list.size();          }          return EXIT_SUCCESS; } testeQt|: time ./testeQt ./testeQt 6.15s user 0.01s system 99% cpu 6.169 total testeQt|: time ./testeQt ./testeQt 6.22s user 0.01s system 99% cpu 6.235 total testeQt|: time ./testeQt ./testeQt 8.19s user 0.03s system 96% cpu 8.487 total

Second Code:

int main() {          long count = 0;          for (int i = 0; i < 100000000; i++) {                 auto list = QList<int>() << 1 << 2 << 3 << 4 << 5 << 6 << 7 << 8 << 9 << 10;                 count += list.size();          }          return EXIT_SUCCESS; }

Second Code:

testeQt|: time ./testeQt ./testeQt 13.94s user 0.01s system 98% cpu 14.106 total testeQt|: time ./testeQt ./testeQt 15.38s user 0.02s system 98% cpu 15.591 total testeQt|: time ./testeQt ./testeQt 14.27s user 0.01s system 99% cpu 14.328 total

Bottom Line: Stop using QVector / QList () with operator << for a fixed amount of items. It’s painfully slow compared to a initializer_list.

Cracking the HDD

Mon, 2018/06/18 - 5:31pm

I’ve learned that IBM Travelstar 40GB drives use glass platters. I learned this the fun way, by bending one in a vice, with a big set of pliers. It went snap, tinkle — a different sound from other drives. And after that the bendy drive was usable as a maraca!

So why was I bending drives in the first place?

Well, I volunteer some of my time at a local second-hand place called Stichting Overal. It is an “idealistic” organisation that uses the revenue from second-hand sales to support various projects (generally small-scale development, like funding the construction of sanitation in schools). Like most second-hand stores, there’s clothes and ancient kitchen appliances and books and used bicycles .. and also an IT corner.

I help out Tom, a local school kid who has run the IT corner for some time. From time to time a PC or monitors or random IT crap is dropped off for re-use, and we apply triage. Yes, that is a lovely 486DX2, but it is still going into the bin. For various reasons, there’s a mismatch between supply and demand of hard drives: we end up with piles of small ATA-33 drives, and very few 80GB-or-more SATA drives.

Machines that show up and not immediately consigned to the bin are thoroughly cleaned (’cause, eww). Some machines are cannibalized for parts for others. Working, usable hard drives are wiped, and then re-triaged. Since we don’t want to leak whatever data is on the drives (even after wiping, and customers aren’t always all that careful about what they bring in either), leftover drives are destroyed.

So that’s why I was contorting a laptop drive. Here’s a Christmas ornament I have made out of a desktop 3.5″ drive.

Machines that get through this gauntlet are dd’ed with zeroes, then installed with some flavor of GNU/Linux. Even if there’s a valid Windows license attached to the machine, getting that installed correctly and legally is way more effort for us than doing something we know is right (and Free). Lately it’s been Fedora 27 with rpmfusion, and a KDE Plasma 5 desktop (I didn’t do the choosing, so this was a pleasant surprise). Frankly, I’m not convinced we’re doing a really good job in delivering the Linux desktop PC experience to the buyers, since there’s no Linux / Fedora documentation included (now I write that down, I realise we should probably check if there’s licensing obligations we need to follow up on). What it kinda needs is an OEM installer to do some post-sale configuration like setting up a user (I can think of at least one).

Giving Atelier some Love

Mon, 2018/06/18 - 12:25pm

I work for atelier together with Chris, Lays and Patrick for quite a while, but I was basically being the “guardian angel” of the project being invocked when anything happened or when they did not know how to proceed (are you a guardian angel of a project? we have many that need that)

For instance I’v done the skeleton for the plugin system, the buildsystem and some of the modules in the interface, but nothing major as I really lacked the time and also lacked a printer.

Now I got my first 3d printer, and for the first time in two years I can actually test the program that I’m helping to build for so long, and peeps, I can confirm that we have a working 3d printer host in KDE, and it’s really good.

It has some quircks, obviously, but it’s really good.


What a mesh!

Mon, 2018/06/18 - 10:00am

With all the advances being made in Qt 3D, we wanted to create some new examples showing some of what it can do. To get us started, we decided to use an existing learning framework, so we followed the open source Tower Defence course, which you can find at CGCookie. Being a game, it allows an interactive view of everything at work, which is very useful.

We found it to be so diverse, that we are now implementing Parts 2 and 3 of the game into Qt 3D. However you don’t have to wait for that, you can start now by following the steps we took.

The setup

These instructions will help you setup for Qt 5.11.0 .

To start, turn to your QtCreator and create a new Qt Console Application, set to run on your Qt 5.11.0 kit.

A Qt Console Application doesn’t come with too much ‘plumbing’. A lot of the other options will attempt to give you starting files that aren’t required or in some cases, the wrong type entirely.

Let’s edit it to fit our needs by opening up the .pro file and adding the following:

First remove the QT += core and QT -= gui lines if they are present.

QT += 3dcore 3drender 3dinput 3dquick 3dquickextras qml quick

Then, if the lines CONFIG += c++11 console and CONFIG -= app_bundle are present, remove them too. Now back on the main.cpp file we need to edit our “includes” from the Qt 3D library.

Replace the #include QCoreApplication with #include QGuiApplication and add these lines:

#include <Qt3DQuick/QQmlAspectEngine> #include <Qt3DQuickExtras/Qt3DQuickWindow> #include <QtQml>

Within the main block we now have to edit QCoreApplication a(argc, argv); to mirror our include change. So change it to:

QGuiApplication a(argc, argv);

Before the first build / run we should add something to look at. Adding the following block of code before the return statement will provide us with a window:

Qt3DExtras::Quick::Qt3DQuickWindow view; view.setSource(QUrl("qrc:/main.qml"));;

Commenting out the line referring to main.qml will allow you to build and run what you have already. If everything has gone to plan, you will get a white window appear. Now you can uncomment the line and continue onwards!

QRC creation

Okay, let’s get rid of the boring white scene and get something in there. Right-click the ‘Sources’ folder and select ‘Add New…’. From here select the Qt > QML File (Qt Quick 2) option. We’ve gone and named it main so that after clicking next till the end you should now have a main.qml and a main.cpp.

This QML file is now going to hold our scene, but to do that we need some resources. We will achieve this by adding a Qt Resource File, just as we did for main.qml – assuming you have an obj with accompanying textures placed in an assets folder within the project.

So this time right-click on the project folder and select ‘Add New…’. From the Qt menu, select ‘Qt Resource File’ and name it something fitting. When this opens it will look noticeably different to the qml and cpp files. At the bottom you will see the self-descriptive; Add, Remove and Remove Missing Files buttons. Click the ‘Add’ button and select ‘Add Prefix’. Now remove everything from the Prefix: text input just leaving the ‘/‘. Click the ‘Add’ button again, this time selecting the ‘Add Files’ option.

Navigate to your obj and texture files and add them all to the qrc, save and close it. If everything went to plan, a ‘Resources’ folder will now be visible in the Projects window on the left.

Follow this again and add main.qml to the qrc in the same way.

One last thing we need before playing with the scene is a skymap. With the files placed in your assets folder, go ahead and add the skymap to the qrc file.

We use three dds files for our skymaps, irradiance, radiance and specular. If you are trying this on a Mac, you will have to uncompress them or they will not work. Keep the names similar to their compressed version. For example we simply added ‘-16f’ to the filename. So our files would be ‘wobbly_bridge_4k_cube_irradiance’ vs ‘wobbly_bridge_4k-16f_cube_irradiance’ respectively.
The necessities

Back to the QML file now, rename the Item { } to be an Entity { } and give it the id: scene. Entity is not recognised because we are missing some imports. Hitting F1 with Entity selected shows us that we need to import Qt3D.Core 2.0, so add this to the imports at the top of the file.

There are certain components that a 3D scene must have, a camera and Render settings being two of those. For this example, we’ll throw in a camera controller too so we can move around the scene.

components: [ RenderSettings { activeFrameGraph: ForwardRenderer { camera: mainCamera clearColor: Qt.rgba(0.1, 0.1, 0.1, 1.0) } }, // Event Source will be set by the Qt3DQuickWindow InputSettings { } ] Camera { id: mainCamera position: Qt.vector3d(30, 30, 30) viewCenter: Qt.vector3d(0, 0, 0) } FirstPersonCameraController { camera: mainCamera linearSpeed: 10 lookSpeed: 50 }

Here we see that Camera is not recognised, so let’s get the missing import.

If you select Camera and hit F1 to find the import, you will in fact be shown the import for the non-Qt3D Camera. The one you will want is: import Qt3D.Render 2.9
The sky is the limit

Let’s put that skymap to use now. Back in the main.cpp file, we need to add code to check if we’re on MAC or not. If you remember, this was due to MAC not supporting compressed files and needing its own versions. After the QGuiApplication line, put in the following:

#if defined(Q_OS_MAC) const QString envmapFormat = QLatin1String("-16f"); #else const QString envmapFormat = QLatin1String(""); #endif

Then after the Qt3DExtras line, add the following:

auto context = view.engine()->qmlEngine()->rootContext(); context->setContextProperty(QLatin1String("_envmapFormat"), envmapFormat);

If you try to build at this point, you will notice various imports missing. One for FirstPersonCameraController, one for InputSettings and TexturedMetalRoughtMaterial. Hitting F1 on FirstPersonCameraController will give you import Qt3D.Extras 2.0 and F1 on InputSettings will give you import Qt3D.Input 2.0 but then later you’ll hit a snag. TexturedMetalRoughtMaterial may not turn up any documentation but we’ll be kind enough to give you the answer… edit the Qt3D.Extras 2.0 to be 2.9 instead. If this now works you will get a dark grey window.

Barrel of laughs

The final part will be our mesh, we chose a barrel, and the skymap for it to reflect (although this might not be visible).

In main.qml after the InputSettings{}, throw in the following:

EnvironmentLight { id: envLight irradiance: TextureLoader { source: "qrc:/path/to/your/file" + _envmapFormat + "" minificationFilter: Texture.LinearMipMapLinear magnificationFilter: Texture.Linear wrapMode { x: WrapMode.ClampToEdge y: WrapMode.ClampToEdge } generateMipMaps: false } specular: TextureLoader { source: "qrc:/path/to/your/file" + _envmapFormat + "" minificationFilter: Texture.LinearMipMapLinear magnificationFilter: Texture.Linear wrapMode { x: WrapMode.ClampToEdge y: WrapMode.ClampToEdge } generateMipMaps: false } }

You can hit build now to check it’s working, but the scene will still be pretty boring. Throw in your obj to get some eye candy. Here is the code we used after EnvironmentLight:

Mesh { source: "qrc:/your/model.obj" }, Transform { translation: Qt.vector3d(4, 0, 2) }, TexturedMetalRoughMaterial { baseColor: TextureLoader { format: Texture.SRGB8_Alpha8 source: "qrc:/path/to/your/Base_Color.png" } metalness: TextureLoader { source: "qrc:/path/to/your/Metallic.png" } roughness: TextureLoader { source: "qrc:/path/to/your/Roughness.png" } normal: TextureLoader { source: "qrc:/path/to/your/Normal_OpenGL.png" } ambientOcclusion: TextureLoader { source: "qrc:/path/to/your/Mixed_AO.png" } }

Finally, hit build and then run.

Rendered Barrel

The barrel viewed at the end of What A Mesh pt1

The post What a mesh! appeared first on KDAB.

Last week in Kube

Mon, 2018/06/18 - 8:51am

Perhaps if Windows wasn’t such a PITA there would be more progress &#55357;&#56841;

  • The Conversation view received some vim-style keyboard bindings (because who uses a mouse anyways).
  • The INBOX is now automatically selected when Kube is started, so we show something useful immediately.
  • Progress on Kube for Windows. Everything builds, but there are still a couple of remaining issues to sort out.
  • Ported from QGpgME to plain old GpgME. This was a necessary measure to build Kube on Windows, but also generally reduced complexity while removing the dependency on two large libraries that do nothing but wrapping the C interface.
  • Ported away from readline to cpp-linenoise, which is a much simpler and much more portable replacement for readline.
  • Rémi implemented the first steps for range queries, which will allow us to retrieve only the events that we require for to e.g. render a week in the calendar.
  • The storage layer got another round of fixes, fixing a race condition that could happen when initially creating the database for the first time (Blogpost on how to use LMDB).
  • The IMAP resource no longer repeatedly tries to upload messages that don’t conform to the protocol (Not that we should ever end up in that situation, but bugs…).
  • The CalDAV/CardDAV backends are now fully functional and support change-replay to the server (Rémi).
  • The CalDAV backend gained support for tasks.
  • Icons are now shipped and loaded from a resource file after running into too many problems otherwise on Windows.
  • A ton of other fixes for windows compatiblity.
  • A bunch of mail rendering fixes (also related to autocrypt among others).
  • Work on date range queries for efficient retrieval of events has been started.

Kube Commits, Sink Commits

Previous updates

More information on the Kolab Now blog!

“Kube is a modern communication and collaboration client built with QtQuick on top of a high performance, low resource usage core. It provides online and offline access to all your mail, contacts, calendars, notes, todo’s and more. With a strong focus on usability, the team works with designers and UX experts from the ground up, to build a product that is not only visually appealing but also a joy to use.”

For more info, head over to:

GSoC 2018: Week 4 & 5

Mon, 2018/06/18 - 6:29am

The last 2 weeks were mainly dedicatd for reviews and testing and thanks to my mentors, I passed the first evaluation with good work till now. Some significant changes were made on discussion with my mentors during the last 2 weeks in the code and some new features. Added E3, F3, D6, E6, F6 keys …

Giving Konsole some love

Sun, 2018/06/17 - 4:16pm

I started to hack in Konsole, and first I was afraid, I was petrified. You know, touching those hardcore apps that are the center of the KDE Software Collection.

I started touching it mostly because some easy to fix bugs weren’t fixed, and as every cool user knows, this is free software. So I could pay for someone to fix my bugs,  or I could download the source code and try to figure out what the hell was wrong with it. I choosed the second approach.

If you have something for me to improve in konsole please poke-me, as I have landed around 25 commits this past week and I plan to continue that.

I would also like to thank my employer for letting me stay late hacking in KDE related software.