Consistency? No, not much around here. But I do have a great application that solves a fundamental problem — spell checking. And what gift could be better to give to your loved one on this day.
Finally a new release out. Most changes for version 0.56 are under the hood, making the the code structure cleaner and more manageable. Other noteworthy changes are KDE 4 support turned on as default, better icon integration, improved pop-up handling and an updated default install path ("/usr/local").
All good stuff, but there are two hacks that I would especially like to bring up. The first is Kxkb integration over D-Bus as getKeyboardInputLayout and the accompanying event notifications are broken in Qt. What this means is that Kisa will now poll the keyboard layout whenever a new word is entered instead of waiting for the event notification. Obviously one needs to have Kxkb running. It suprisingly easy to do D-Bus calls, just do a:
QDBusInterface kxkb("org.kde.kxkb", "/kxkb", "org.kde.KXKB");
QDBusReplyreply = kxkb.call("getCurrentLayout");
The other hack makes use of the INSTALL_ROOT variable. Even though it is being deprecated in favor of DISTDIR by the GNU Make crowd, it still shows up everywhere in the qmake generated makfiles. Problem is that Qt forgot to give a easy way to set it in the .pro file. Currently, it has to be passed on the command line when invoking make or set as an environment variable. Well, not anymore if you're using Kisa. Here is one way to do it in the toplevel project file:
isEmpty(INSTALL_ROOT) {
INSTALL_ROOT = /usr/local
}
INSTALL_ROOT = $$replace(INSTALL_ROOT, "/", "\/")
QMAKE = $$[QMAKE]
isEmpty(QMAKE) {
QMAKE = qmake
}
system("cd src/; $$QMAKE src.pro")
system("cd src/lib/; $$QMAKE lib.pro")
CMD = "find -iname '$$MAKEFILE*' | xargs sed -i 's/INSTALL_PROGRAM.*=.*/&\nINSTALL_ROOT = $$INSTALL_ROOT/'"
system($$CMD)
Note though that there are several problems with this approach. It will only work on a project that has a top level .pro file as we are generating makefiles on the lower level project files. It will also not work if passing -recursive to qmake. However, the advantage of having an easy way to set INSTALL_ROOT outweighs these shortcomings by a long shot. Full changelog is here.
Enjoy!
Edit: Got a task opened by Qt.
0 comments:
Post a Comment