Tag Archive: Qt


Braindump 0.8.0

A bit overdue, the first release of Braindump is available. It has been a while since I announced the project of making a tool that gather allow to dump your thoughts into an electronic form. For those who have forget (which is probably most of you), Braindump is a collection of whiteboards on which you can put your notes, whether text notes, or drawing. It is entirely based on KOffice technologies. Which made Braindump quick and easy to develop, and it makes it very small, around 8000 lines of code.

I have been delaying that release because I wanted to make a video of Braindump in action, and have been too lazy to make one until now. On that video I first create new whiteboards, then I demonstrate how to add shapes, manipulate them, and finally the different layout:



I you look at Braindump development history, you will notice that over the past six months the development has been really slow, there are a few reasons to that, the first one is that most of the development is done by other people than me in the KOffice repository, the second one is that I feel that Braindump is already doing exactly what I want, with a few glitches, but as a geek I tend to live happily with those…

That said there is a couple of features I want:

  • Search (and replace)
  • Tagging, but then someone else (yeah again) is doing the work for me in KOffice
  • Auto-growing text shape
  • A solution to this problem: (almost) each time I create a new whiteboard, the first thing I do is to add a text shape. So I wonder about either having always a permanent text shape in the background, or always add a text shape when creating a white board.

I am also starting to be curious about ownCloud, since personally I find it to be the right direction of cloud computing, so I would probably be interested in the possibility of storing whiteboards on an ownCloud server. Lets see how it evolves.

If you have other ideas, do not hesitate to mention them, who knows, if I find them interesting, I might go on and implement them !

Download Braindump 0.8.0, this release will work only with KOffice 2.1.x, from now on I will work on porting Braindump to the upcoming KOffice 2.2.

When an exception is thrown and not catched in a Qt application, it get catched by Qt’s event loop, and the following message is displayed in the console:

Qt has caught an exception thrown from an event handler. Throwing exceptions from an event handler is not supported in Qt. You must reimplement QApplication::notify() and catch all exceptions there. terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc

In other situations, std::bad_alloc is replaced by the name of the exception. The problem is that if you now want to know where it happens in your program, the backtrace points to where the exception is rethrown by Qt’s event loop, which is not where the error happens.

I first had this problem a few days ago when implementing multi-layers support in EXR, since the exception name was specific to OpenEXR, I just grepped the code and deduce where the error occurred. But this is not very convenient when the error is generic, like std::bad_alloc which can be thrown just anywhere. And as it turned out by Qt itself in ‘qBadAlloc()’. The solution suggested by Maelcum on IRC is simply to set a breakpoint in the function __cxa_throw, which is a function of the C++ standard library that is actually doing the job when the keyword throw is used (at least with the GNU stdlib++, no idea if it is valid with other standard library implementation). And then you get a backtrace that point to the problem.

I thought I would share this tip in case, in some day, you find yourself with an uncaught exception in a Qt application.

Powered by WordPress. Theme: MyMotion by Cyrille Berger as a modification of Motion by 85ideas.