Planet
Video Tutorials Learning C++ (in German)
Multiple Keyboard Layouts and Shortcuts
KDE has a very handy feature to switch keyboard layouts on the fly. This is for instance useful if you use the German keyboard layout by default, and the US layout for programming. To enable keyboard layout switching, go into System Settings > Input Devices (category Hardware) > Keyboard item > Layouts tab:
Here, ‘[x] Configure layouts‘ is checked, enabling the list view. I added the German keyboard layout, and then the English (US) layout. Notice also, that the shortcut is set to ‘Ctrl+Alt+K‘. Clicking apply, a tiny little indicator appears in the panel:
Read MoreMulti-Line Text Editing in Kate
Right after the vim blog and the ‘what’s new in 4.11‘ blog we have another feature that was long requested and finally is available in 4.12: Multi-line editing in block selection mode.
Needless to say that it also supports undo/redo and pasting text. Kudos go to Andrey Matveyakin for implementing it!
Read MoreKate in 4.11
Kate Vim Progress
Hi all,
Just an eye-glazingly brief blog post about some of the stuff I’ve been working on in the Kate Vim emulation mode since my last blog. Once more, I’ll mostly be dumping them all as bullet points, Gräßlin-Style™, with some longer sections on the more important changes, but this time around I’ve added some nifty animated gifs which you can skip to should the full text prove too harrowing!
Read MoreIntel Threading Building Blocks Scalable Allocator & Valgrind
Hi,
if you ever use the TBB (Intel Threading Building Blocks) allocator to overwrite malloc/free/* and want to use Valgrind for leak checking and fail, here is the simple trick to get it working:
valgrind --soname-synonyms=somalloc=\*tbbmalloc\* <your-application-here>
I missed that hint in the Valgrind documentation for my first tries ;)
Btw., the scalable allocator from TBB is a really BIG improvement over the normal system allocator on current Linux & Windows machines if you allocate mostly fixed size small object, like what happens if you heavily use STL data structures like std::map/set that are implemented as trees and you have other stuff like DOM/AST like data structures (even in the single threaded case, for which it just saves a LOT of memory).
Read MoreRamblings about compilers…
In my job I work on binary and source level analysis software running on Linux and Windows. One of my tasks is to maintain the build farm and compile environment, therefore I am responsible for keeping care of the compilers and libraries we use (like the beloved Qt, congratulations for the nice 5.1 release, btw.).
For Linux, we normally use the GNU C/C++ compiler. That works out very well since years. We have hit compiler bugs only a few times and there was always already some patch-release out in the wild that fixed our issues. In addition the GCC developers brought a constant stream of improvements in the area of C and C++ standard compliance. I am more than happy with the GCC quality.
Read MoreQUndoStack versus Kate’s Undo System
I’m currently using QUndoStack in a project of mine. A QUndoStack contains a list of QUndoCommands which then can be executed with QUndoStack::undo() and QUndoStack:.redo().
Now I thought when deleting an instance of the class Node, I can just hock the creation of the respective UndoDeleteNode class (derived from QUndoCommand) into the destructor, like this:
class Node { public: // ... ~Node() { undoStack()->push(new UndoDeleteNode(this)); } };class UndoDeleteNode : public QUndoCommand { public: // ... void undo() { // create node again } void redo() { // delete node again } };</pr
Read More
Akademy 2013
How to convert pdf to svg
In a project I’m currently working on I need to display the result of TeX code. So I thought it would be nice and accurate to compile the TeX code to produce a pdf, and then use libpoppler-qt4 to draw the pdf. This works in principal, but there is a licensing problem: libpoppler is GPL, and I want to use it in a LGPL library.
So I searched the net and found dvipng, which converts a dvi file to png. It even supports transparent backgrounds. So I could convert the dvi file to png through QProcess+dvipng, and then display the png file. This works, but whenever you scale the canvas the result looks ugly since png is not a vector graphic.
Read More