Language Selection

English French German Italian Portuguese Spanish

Kde Planet

Syndicate content Planet KDE
Planet KDE
Updated: 21 hours 21 min ago

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.

Announcing KTechLab 0.50.0

Monday 21st of September 2020 12:15:00 AM

I’m happy to announce KTechLab release version 0.50.0. KTechLab is an IDE for microcontrollers and electronics. In this new release every user-visible functionality is the same as in previous releases, however, the codebase of KTechLab has been updated, so now it is a KF5/Qt5 application and it does not depend anymore on KDELibs4Support libraries.

This release should compile and run on systems where KDELibs4Support libraries are not available.

In its current state KTechLab’s codebase is ready for fixes and enhancements, as it only depends on modern libraries like KDE Frameworks 5 (KF5) and Qt5. As a side note, KF6 and Qt6 have been announced, and the first release of Qt6 has been scheduled to the end of 2020.

The release tarball of version 0.50.0 can be downloaded from KDE servers. Its checksums are:

SHA256Sum: cf0fe078f8afad7f3237a4e052dd2cace185d390a02f15ebe60cccabcbe8fdfe SHA1Sum: ff80879ae2e36aa795b469dca50a2b565f3ab52b MD5Sum: 5efe09b276fad08d74ead245a597797d Useful links related to KTechLab

KTechLab has a mailing list at KDE called ktechlab-devel: https://mail.kde.org/mailman/listinfo/ktechlab-devel

On IRC, developers are mostly reachable on freenode.net, on #ktechlab channel.

The source code of KTechLab is available in KDE Git, at https://invent.kde.org/sdk/ktechlab

Instructions for building and running KTechLab are available in the README file from the source code; online version of that file is available at https://invent.kde.org/sdk/ktechlab/-/blob/master/README ; The very short instructions are: run sh build-simple.sh and then sh run-simple.sh.

The notes from joining KDE: https://community.kde.org/Incubator/Projects/KTechLab

KTechLab bugs at KDE bugtracker: https://bugs.kde.org/buglist.cgi?quicksearch=ktechlab

Week report 0

Sunday 20th of September 2020 05:00:00 PM


Hello every one in the KDE planet and beyond, this is the progress weekly report on O².

So The week surprisingly started Monday and after the initial chock and accompanying usual work day at KDAB, I decided to do a little bit of progress on  O² style mock ups...

Started with progress bars in both radius variants tan bowth sizes variants as well and bowth color testing variants.

Its ok IMO but need to test and implementation in QML to be more sure about it. specially on the white variation it looks off.

 Tuesday was....  labels and drop boxes days, show in to way to layout labels for boxes and the acompaning multiple sizes colors and radius variations.

 

 

 

 

 

 

 

 

 

 

Wednesday was  first test/mock day with a spinner/ more on that Saturday..

Tuesday was the day I started to experiment with old desktop style check and radio boxes... WIP. they dont "Pop" much and it was intentional but need to balance it with the other elements... Another one that needs to be in QML

Friday was the day I worked on sound wave notifications for assistants... seamed like a great idea on my brain, but I'm not so sure i like it, after all this time (2 days is a very long time ) :faceplam emoicon

 

 

 

 

 

Finally yesterday i was supposed to work on the sound wave QML implementation but I got distracted by the implementation of a spiner/progess thingy... here playing with tension creation and release. only useful if we know the progress value.

Next week i will try to create a video for all of this... probably just screen-casting my work and inserting some side comments. kinda like this but maybe more fun

Finlay already said this the other day but,  have been posting  the progress every days on Instagram, (sorry for the blurriness)     https://www.instagram.com/pinheirokde/  in case you are interested in dally updates

cheers and see you all tomorrow next week...

  





How to Convert a Project to REUSE Compatible License Statements?

Sunday 20th of September 2020 09:02:51 AM

This blog post provides a step-by-step example about how the conversion of a project to REUSE compatible license statements is done in practice. For my setup, I have a readily configured kdesrc-build environment.

First, I get out the most recent source code if the project I want to convert. For this tutorial, I use KTurtle, which is a nice and small application from KDE Education with just about 200 files.

Then I obtain the latest version of licensedigger and compile it:

kdesrc-build licensedigger

First I do a dry run to get an impression about how well the licenses are detected in KTurtle. But, well, it looks really bad:

$ /opt/kde/build/playground/sdk/licensedigger/licensedigger --dry kturtle/ Digging recursively all files in directory: "kturtle/" = LICENSE DETECTION OVERVIEW = "kturtle/CMakeLists.txt" --> "UNKNOWN-LICENSE" "kturtle/doc/CMakeLists.txt" --> "UNKNOWN-LICENSE" "kturtle/icons/CMakeLists.txt" --> "UNKNOWN-LICENSE" "kturtle/org.kde.kturtle.appdata.xml" --> "UNKNOWN-LICENSE" "kturtle/spec/assert_spec.rb" --> "UNKNOWN-LICENSE" "kturtle/spec/boolean_operator_spec.rb" --> "UNKNOWN-LICENSE" "kturtle/spec/empty_spec.rb" --> "UNKNOWN-LICENSE" "kturtle/spec/expression_spec.rb" --> "UNKNOWN-LICENSE" "kturtle/spec/for_spec.rb" --> "UNKNOWN-LICENSE" "kturtle/spec/if_else_spec.rb" --> "UNKNOWN-LICENSE" "kturtle/spec/kill_kturtle.rb" --> "UNKNOWN-LICENSE" "kturtle/spec/learn_spec.rb" --> "UNKNOWN-LICENSE" "kturtle/spec/math_spec.rb" --> "UNKNOWN-LICENSE" "kturtle/spec/number_spec.rb" --> "UNKNOWN-LICENSE" "kturtle/spec/repeat_spec.rb" --> "UNKNOWN-LICENSE" "kturtle/spec/scope_spec.rb" --> "UNKNOWN-LICENSE" "kturtle/spec/spec_helper.rb" --> "UNKNOWN-LICENSE" "kturtle/spec/start_kturtle.rb" --> "UNKNOWN-LICENSE" "kturtle/spec/string_spec.rb" --> "UNKNOWN-LICENSE" "kturtle/spec/variable_assignment_spec.rb" --> "UNKNOWN-LICENSE" "kturtle/src/CMakeLists.txt" --> "UNKNOWN-LICENSE" "kturtle/src/Messages.sh" --> "UNKNOWN-LICENSE" "kturtle/src/canvas.cpp" --> "UNKNOWN-LICENSE" "kturtle/src/canvas.h" --> "UNKNOWN-LICENSE" "kturtle/src/colorpicker.cpp" --> "UNKNOWN-LICENSE" "kturtle/src/colorpicker.h" --> "UNKNOWN-LICENSE" "kturtle/src/console.cpp" --> "UNKNOWN-LICENSE" "kturtle/src/console.h" --> "UNKNOWN-LICENSE" "kturtle/src/directiondialog.cpp" --> "UNKNOWN-LICENSE" "kturtle/src/directiondialog.h" --> "UNKNOWN-LICENSE" "kturtle/src/editor.cpp" --> "UNKNOWN-LICENSE" "kturtle/src/editor.h" --> "UNKNOWN-LICENSE" "kturtle/src/errordialog.cpp" --> "UNKNOWN-LICENSE" "kturtle/src/errordialog.h" --> "UNKNOWN-LICENSE" "kturtle/src/highlighter.cpp" --> "UNKNOWN-LICENSE" "kturtle/src/highlighter.h" --> "UNKNOWN-LICENSE" "kturtle/src/inspector.cpp" --> "UNKNOWN-LICENSE" "kturtle/src/inspector.h" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/dbus_adaptor_generator.sh" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/definitions.rb" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/echoer.cpp" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/echoer.h" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/errormsg.cpp" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/errormsg.h" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/executer.cpp" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/executer.h" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/generate.rb" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/interpreter.cpp" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/interpreter.h" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/org.kde.kturtle.Interpreter.xml" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/parser.cpp" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/parser.h" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/token.cpp" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/token.h" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/tokenizer.cpp" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/tokenizer.h" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/translator.cpp" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/translator.h" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/treenode.cpp" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/treenode.h" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/value.cpp" --> "UNKNOWN-LICENSE" "kturtle/src/interpreter/value.h" --> "UNKNOWN-LICENSE" "kturtle/src/interpreteradaptor.cpp" --> "UNKNOWN-LICENSE" "kturtle/src/interpreteradaptor.h" --> "UNKNOWN-LICENSE" "kturtle/src/main.cpp" --> "UNKNOWN-LICENSE" "kturtle/src/mainwindow.cpp" --> "UNKNOWN-LICENSE" "kturtle/src/mainwindow.h" --> "UNKNOWN-LICENSE" "kturtle/src/sprite.cpp" --> "UNKNOWN-LICENSE" "kturtle/src/sprite.h" --> "UNKNOWN-LICENSE" Undetected files: 69 (total: 69)

What we get from this output is that apparently no license header is detected. This suspiciously looks like that we find a new kind of license header texts, for which licensedigger was not trained yet. Thus, I arbitrarily open one of the failing files, let’s say “kturtle/src/sprite.h”, and have a look at the header. The stated license header itself looks quite sane and clearly translates to the SPDX identifier “GPL-2.0-or-later:

Copyright (C) 2003-2008 Cies Breijs This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Thus, I first try adding the missing license header text to the licensedigger database (see the licensedigger README.md file for more explanation) or the commit with which I did this, which is this commit. But well, and this is surprising, when testing the license header detection by running the unit tests with “make test”, the header still is not detected… This is surprising. It turns out that tabulators for indenting license header texts are not supported yet. This is easy to fix, which is done in a follow-up commit. But if you ever land in a similar problem, just create an issue and point me to the source file that makes headaches! (Such problems are really a rare exception though!)

Now I run licensedigger again and check if there are files remaining which not correctly detected license headers, which is the case for me and I repeat the above steps. Finally, I get to the point where all stated licenses (and we cannot convert unstated ones; recovering missing license statements is a complete different topic) are correctly detected.

Finally, I run license digger in its conversion mode. Note that you can also run licensedigger many times on an already converted codebase and nothing bad happens; I simply prefer to distinguish between dry and conversion runs.

When that is done, the last remaining steps are:

  1. Review the changes licensedigger did to your source files (I like to use the command line tool “tig” for this, but there are many options).
    1. I commit the changes to the source files to have a base-line for possible manual edits.
    2. For KTurtle I actually manually formatted the license headers after the conversion to remove the tabulators. Unfortunately, there is not tooling yet for auto-format license headers (patches welcome

Okular 20.08 — redesigned annotation tools

Sunday 20th of September 2020 08:27:51 AM

Last year I wrote about some enhancements made to Okular’s annotation tool and in one of those, Simone Gaiarin commented that he was working on redesigning the Annotation toolbar altogether. I was quite interested and was also thinking of ‘modernizing’ the tool — only, I had no idea how much work it would be.

The existing annotation tool works, but it had some quirks and had many advanced options which were documented pretty well in the Handbook but not obvious to an unscrupulous user. For instance, if the user would like to highlight some part of the text, she selects (single-clicks) the highlighter tool, applies it to a block of text. When another part of text is to be highlighted, you’d expect the highlighter tool to apply directly; but it didn’t ‘stick’ — tool was unselected after highlighting the first block of text. There is an easy way to make the annotation tool ‘stick’ — instead of single-click to select the tool, simply double-click, and it persists. Another instance is the ‘Strikeout’ annotation which is not displayed by default, but can be added to the tools list.

Simone, with lots of inputs, testing and reviews from David Hurka, Nate Graham and Albert Astals Cid et al., has pulled off a magnificent rewrite of Okular’s annotation toolbar. To get an idea of the amount of work went into this, see this phabricator task and this invent code review. The result of many months of hardwork is a truly modern, easy to explore-and-use annotation support. I am not aware of any other libre PDF reader with such good annotation features.

Annotation toolbar in Okular 20.08.

Starting from the left, default tools are: Highlight (brush icon), Underline (straight line) and Squiggle (wobbly line), Strike out, Insert text (Typewriter), Inline note, Popup note, Freehand drawing and Shapes (arrows, lines, rectangles etc.). The line thickness, colour, opacity and font of the tools can be customized easily from the drawer. Oh, and the selected annotation tool ‘sticks’ by default (see the ‘pin’ icon at the right end of toolbar).

Line width and colour of ‘Arrow’ tool.

When upgrading to okular-20.08 from a previous version, it will preserve the customized annotation tools created by the user and make those available under ‘Quick annotations’, and these can be quickly applied using Alt+n (Alt-1, Alt-2 etc.) short cuts. It did reset my custom shortcuts keys for navigation (I use Vim keys gg to go to the first page and G to go to the last page), which can be manually added back.

Custom tools (Quick annotations) can be applied with short cuts.

Here is the new toolbar in action.

KTechLab git master doesn't depend on deprecated Qt5/KF5 API anymore

Saturday 19th of September 2020 02:00:00 PM

KTechLab git master doesn’t depend anymore on deprecated Qt5/KF5 APIs. Thank you for everybody who made this possible!

Using only up-to-date APIs should help with long-term maintenance of KTechLab and probably it helps distributors of KTechLab, too.

This week in KDE: everything happened

Saturday 19th of September 2020 04:03:48 AM

This was a pretty huge week for KDE. Apparently people had a lot of pent-up work, because right after Akademy finished last week, the floodgates started opening! Amazing stuff has been landing left and right every day this week! Some highlights are touch support in Dolphin, user-configurable per-view sort ordering in Elisa, optional Systemd startup, tons of Okular scrolling improvements, and much, much, much more.

Oh and meet Plasma 5.20’s beautiful new wallpaper, Shell:

Big thanks to Lucas Andrade for this beautiful wallpaper!

New Features

Dolphin now has full touch support! (Steffen Hartlieb, Dolphin 20.12)

Elisa now lets you sort each view by whatever criteria you want, and defaults to sorting albums by year (Matthieu Gallien, Elisa 20.12)

Konsole now has a “focus follows mouse” feature for its split views that you can turn on to automatically focus the split view that the cursor passes over (Luc Dufresne, Konsole 20.12)

For those of you who liked Kate’s previous tab behavior–where it shows a limited number of tabs and automatically orders them according to recency of access in the sidebar–you can now use it again (Christoph Cullmann, Kate 20.12)

Spectacle now has command-line arguments to include or exclude window decorations or the cursor, overriding whatever is defined in the config file (Nazer Kalinowski, Spectacle 20.12)

Filelight now offers you an easy way to exclude a folder from further indexing (Efe Çiftci, Filelight 20.12):

Plasma now optionally uses Systemd for startup (when Systemd is available), which brings numerous benefits such as faster startup and load times, no more odd race conditions during startup causing weird bugs, better session cleanup on logout ending the possibility of logout hangs, better logging of what’s going on, the possibility of using slices and cgroups to improve responsiveness and clarity in system monitoring apps, and much more. It’s a very exciting change! This is currently optional and off by default, but it will eventually be turned on by default (only where available of course) once the remaining kinks are worked out. (David Edmundson, 5.21)

The System Settings Shortcuts page now also shows you which shortcuts have been changed from their defaults when using the “Highlight changed settings” feature (David Redondo, Plasma 5.21)

Bugfixes & Performance Improvements

When scrolling in Okular with a finger on the touchscreen or a mouse drag with the Browse tool, the view no longer “sticks” slightly for the first few pixels of movement (Kezi Olio, Okular 1.11.2)

Okular no longer crashes when trying to open malformed PDF documents with the same digital signature on multiple pages (Albert Astals Cid, Okular 1.11.2)

Middle-clicking on a tab in Kate now closes it again (Christoph Cullmann, Kate 20.08.2)

In Kate’s “Save modified documents” dialog, the Cancel button is now focused by default as it should be (Alexander Lohnau, Kate 20.12)

When annotating a document in Okular, the annotation tool’s tooltip no longer gets mistakenly painted over the document in certain circumstances (Pedro Arthur Pinheiro Rosa Duarte, Okular 20.12)

Partition Manager now correctly modifies the /etc/fstab file after you make changes (Andrius Štikonas, Partition Manager 4.2.0)

The Ctrl+d shortcut no longer unexpectedly moves selected desktop items to the trash (me: Nate Graham, Plasma 5.18.6 and 5.20)

Improved the graphics performance on Wayland (Gang Wu, Plasma 5.20)

It’s now possible to drag windows on Wayland from their empty areas, just like on X11 (Vlad Zahorodnii, Plasma 5.20)

Discover no longer crashes when you visit its Settings page immediately after launching the app (Arjen Hiemstra, Frameworks 5.75 or Plasma 5.20, whichever one you get first)

Running a VNC server inside a Plasma session no longer crashes the Plasma session (Fabian Vogt, Plasma 5.20)

On Wayland, Plasma no longer sometimes crashes when you hover the cursor over an auto-hide Panel (Andreas Haratzis, Plasma 5.20)

Open and Save dialogs can now open and save files containing double quotes in their names (Andreas Bontozoglou, Frameworks 5.75)

It’s once again possible to set custom shortcuts that use the Tab key (David Edmundson, Frameworks 5.75)

Updating icon themes installed using the Get New Icons window now works (Alexander Lohnau, Frameworks 5.75)

A mysterious file named “:foo” is no longer ever randomly created inside your home directory for no good reason (Ahmad Samir, Frameworks 5.75)

User Interface Improvements

Single-line text in Elisa’s list-style views is now vertically centered as expected (me: Nate Graham, Elisa 20.08.2)

Elisa’s playlist sidebar now turns into a collapsible drawer on mobile or with a very narrow window, which means it’s no longer ever accessible (Stef Lep, Elisa 20.12)

Okular’s recently-added smooth scrolling animated transitions now respect the global animation speed multiplier, which means that people who hate animations and have then turned off globally now don’t have to live with the animated scrolling effects in Okular any longer. We still plan to add an off switch in Okular itself for people who want to disable smooth scrolling in just Okular or are using Okular on non-Plasma platforms (me: Nate Graham, Okular 20.12)

Discover now provides feedback on Arch-based distros when there is a dependency problem preventing updates from being installed (Aleix Pol Gonzalez, Plasma 5.20)

KRunner now prioritizes apps higher than System Settings pages in the results view when there are matches for both (Harald Sitter, Plasma 5.20)

When you try to assign a shortcut on the System Settings Shortcuts page that’s already used, you’re now warned immediately rather than only when you click the “Apply” button (David Redondo, Plasma 5.20)

System Settings’ sidebar view now displays little arrows for list items which are top-level categories containing other items (me: Nate Graham, Plasma 5.20)

You can now middle-click on the Night Color applet to toggle the feature on and off (David Edmundson, Plasma 5.20)

The Battery applet now shows the brightness percentage (Eugene Popov, Plasma 5.20)

VPN-related notifications and network authentication dialogs now use clearer and more consistent terminology (me: Nate Graham, Plasma 5.21)

It’s now possible to configure a keyboard shortcut in Kate to paste the text that was last selected by the mouse (usually you middle-click to paste this text) (Jonathan Poelen, Frameworks 5.75)

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.

Submit a KSyntaxHighlighting Color Theme

Friday 18th of September 2020 07:50:00 PM
Color theme? What?

The KSyntaxHighlighting framework provides support for color themes.

These color themes specify all colors (text/background/selection/…) and font style roles (italic/bold/…) that are used for the highlighting. The definition happens in some easy to understand JSON file format.

Starting with the upcoming KDE Frameworks 5.75 release, all KTextEditor framework based application will support these color themes for their embedded editors.

This includes Kate & KWrite, but naturally a lot more, like for example KDevelop, Kile and RKWard.

Beside using the themes, all these applications will allow you to create own themes based on the bundled ones. The created themes will be stored in the new JSON format of KSyntaxHighlighting and can be used as is for e.g. submission to us.

How was it before Frameworks 5.75?

Before 5.75, KTextEditor already had support for color themes (or schemes). But we just shipped a very limited amount (as KConfig based bundled configs).

We only had Breeze & Solarized (as Light and Dark), a Vim Dark and a Printing theme.

There were no real additions of new themes in the past years, thought some are sprinkled around the internet.

How will 5.75 change that?

The 5.75 KSyntaxHighlighting framework release will at least feature all themes we had before and in addition:

  • Dracula
  • ayu Dark
  • ayu Light
  • ayu Mirage
  • gruvbox Dark
  • gruvbox Light

Beside this, Vim Dark got some overhaul to be more consistent with the real Vim theme it is based on.

This means we have now already doubled the number of themes an user can choose between on a default installation.

I think this is a nice improvement. Thanks to all people that did help to make this possible!

For preview renderings of all themes we offer, visit our color themes page. This page is auto-generated and will be periodically updated with the current state of the master branch of KSyntaxHighlighting.

For people just reading this post, here an preview of ayu Mirage:

/** * SPDX-FileCopyrightText: 2020 Christoph Cullmann <cullmann@kde.org> * SPDX-License-Identifier: MIT */ // BEGIN #include <string> #include <QString> // END /** * TODO: improve documentation * @param magicArgument some magic argument * @return magic return value */ int main(uint64_t magicArgument) { if (magicArgument > 1) { const std::string string = "source file: \"" __FILE__ "\""; const QString qString(QStringLiteral("test")); return qrand(); } /* BUG: bogus integer constant inside next line */ const double g = 1.1e12 * 0b01'01'01'01 - 43a + 0x11234 * 0234ULL - 'c' * 42; return g > 1.3f; } The future => We want more, please help out!

With the recent additions we already cover some more well known text editor color themes. But if you just search a bit around the internet or look what other text editors ship per default, we still lack a lot of well known ones.

For example even our GitLab instance provides the Monokai theme in the configuration for its web highlighting that we still lack.

Therefore, we are eager to get submissions for more MIT licensed color themes we can bundle with KSyntaxHighlighting.

All users of applications using this framework will enjoy to be able to choose between more themes with ease if you help us!

Therefore, take the chance and help us out, provide some more themes as merge request.

License must be MIT, this seems to be no problem for most themes out there, at least it seems most of the ones I stumbled over are MIT licensed.

If you need to have some template how such a submission shall look, here the requests that got merged for the ayu themes and the gruvbox themes.

We have some development issue open that tracks a bit what happend so far.

But please don’t just show there up to say “hey people, I want to have theme X”. This is not helpful ;=)

Just searching for “popular text editor color themes” or something like that already gives a good idea which themes people yearn for. We don’t need some more pointers.

What is helpful is to show up with a MIT licensed theme as a merge request, as seen above.

Hope to see more themes submitted, scratch your own itch, but please contribute the stuff back to us upstream!

Qt Creator 4.13.1 released

Thursday 17th of September 2020 09:20:37 AM

We are happy to announce the release of Qt Creator 4.13.1 !

FreeBSD Instant-workstation 2020

Wednesday 16th of September 2020 10:00:00 PM

A little over a year ago I published an instant-workstation script for FreeBSD. The idea is to have an installed FreeBSD system, then run a shell script that uses only base-system utilities and installs and configures a workstation setup for you.

Instant Workstation script screenshot

The script lives on GitHub and has had some pull requests submitted and issues filed over the course of a year. I’ve gone and implemented them, so the script is slightly longer and more involved now.

  • Support for more operating environments has landed
  • Support for application installations has landed (this covers basically my own application needs: I tick all the boxes and go to the races, but the support in general is there if someone wants to add, say, Haskell development to the mix)
  • VMWare support was submitted
  • SDDM / polkit configuration has been introduced so you can shutdown / reboot from inside the KDE Plasma environment via the Leave menu. (That’s a tip from Shurik, slightly adjusted to be less overall-permissive, following the polkit manual)

The script is updated intermittently when new PRs come in, or when I have to reinstall a machine and things do not behave the way I think they should. If you want a quick live KDE Plasma experience with FreeBSD, head on over to FuryBSD which does live ISO images with a variety of environments.

In case you are interested in dayly updates

Wednesday 16th of September 2020 09:43:00 PM

 I been posting then on Instagram and Twitter 

https://www.instagram.com/p/CFNMjTMhu4E/?igshid=u3szn5uau64y

@pinheirokde in both cases

Small videos are posted there of what I did  with my 2 hour a day budget...