2012. november 24., szombat

CMake+Ninja is awesome on Windows

The AiBO+ project is multiplatform, except the cross-compilation of the apserver for AIBO. Recently, I made efforts to make the new version of the AiBO+ work on Windows before doing a release. What I experienced that the CMake+MinGW building is braindead slow. I remember that it was slow in the past, but it is now like completely unusable.

One of my colleagues recommended me the Ninja as a new build system using with CMake. I tried on Linux, but it did not work since I have a bit of hackish way to cross-build the AIBO specific binaries. On Windows, it does an awesome job to build my software parallel and utilize the 100 % of the CPU horsepower for complation. It is very easy to use:
1. Download the Ninja for Windows (ninja-120715-win.zip) from https://github.com/martine/ninja/downloads.
2. Extract the ninja.exe from the zip somewhere and add the location to the path.
3. Generate ninja based build files with CMake: e.g cmake . -G Ninja
4. Build the your project wih a simple ninja command.
5. Install the software with "ninja install" command.

Edit: There is some kind of issue with the dependency checking when updating the source tree by pulling changes from a git repository. Ninja does not detect the changes properly.

2012. november 18., vasárnap

Focus handling fixes for QwtPlot widget

I noticed that I don't receive focus in and out events for the QwtPlot and the keyboard focus is not grabbed properly.

What is my expectation:
- There is a QwtPlot widget without focus and if I click inside or outside the canvas area (e.g the axis area) with the left mouse button, I can grab a FocusIn event on the QwtPlot widget and the keyboard shortcuts work with the e.g QwtPlotZoomer.

Actual (out-of-box) outcome:
- Clicking on the canvas area, I don't receive FocusIn event for the QwtPlot widget (and I will never receive a FocusOut when clicking on other widgets) and the keyboard shortcuts do not work. I have to press on the canvas widget area to make the shortcuts work. I think this behavior can be confusing for the users.
- If I call the setFocusPolicy() on the QwtPlot, I receive FocusIn/FocusOut events for the QwtPlot widget only if I click outside the canvas area, but it does not work if I click on the canvas.

- What I must do to make everything work, call:

setFocus(); // set focus on QwtPlot widget -> makes focus in/out events work for QwtPlot
canvas()->setFocus(); // set focus on composite canvas -> keyboard shortcuts work even if the click happened outside the canvas area

... when I receive a mouse press/wheel or other related events on the QwtPlot widget.

I hope it helps for others.

2012. november 10., szombat

2012. november 8., csütörtök

Strange deadlock in KDE/Ubuntu Oneiric

I experience random deadlock during the startup process of my laptop. The  deadlock is related somehow to the gnome-terminal and the session restore. After deleting the content of the ~/.config/session-state before login.