Skip to main content

Digging in deeper with Ubuntu 7.04

I spent part of the weekend migrating the Qt-based qconf, used to help configure the kernel, from Qt3 to Qt4. A screen shot of the final result is below.

The move from Qt3 to Qt4 started when I tried to build the kernel on SLED 10, and I attempted to run 'make xconfig'. I'd already downloaded and built Qt 4.2.3 and I wanted to use it instead of Qt 3. I knew that Qt 4.2.2 was available to Ubuntu 7.04, and a version of Qt 4.2.1 is also available as part of Open Suse 10.2. With KDE 4 to be released sometime later this year and based on Qt4, I thought it might be a good idea to get a feel for how to port an application from Qt3 to Qt4. The astute reader will note that I performed this on Ubuntu, which is Gnome based. Why not just execute 'make gconfig' and use the Gnome-based configuration tool? To be different, I guess.

  • As mentioned earlier, Ubuntu 7.04 repositories now have Qt 4.2.3.
  • I installed and used KDBG to help debug some of the core dumps being produced while I was doing the migration.
  • I pretty much followed the directions for porting from Qt3 to Qt4. My greatest challenge was modifying the Makefile in scripts/kconfig so that it would properly compile and link the binary qconf.
  • A spanner thrown into the mix was the use of g++ 4.1.2. G++ would not compile some of the coding idioms in the Qt3 sources. Nothing major, but they needed to be cleaned up.
  • The Trolltech porting tool qt3to4 did not catch everything that needed to be converted to use the Qt3 support packaged. Specifically it did not modify QAction to Q3Action. I had to discover this after qt3to4 had finished and I started to compile the modified sources.
  • The number '0' (zero) is not a good value for an argument that is passed by reference. Specifically, 'Q3ListViewItem::setPixmap (int column, const QPixmap & pm)' core dumps when '0' is passed as the second argument under Qt4 and using the Qt3 support libraries. It works for plain old Qt3, simply because it's been in there since the beginning. I simply fixed the problem by adding 'QPixmap nullPixmap;' to the class definition, and passing nullPixmap as the second argument.
  • As you can see from the screen shot, qconf has a strong Gnome look-and-feel. Qt4 is supposed to better integrate with Gnome, along with Java 6u1. From my experiences with Qt4 and Java 6u1 on this version of Ubuntu, I'd have to say that Trolltech and Sun are pretty close to realizing that goal. Development of graphical applications on Linux in general and Ubuntu in particular is growing richer and deeper at an ever accelerating rate.
I've been in email contact with the original author of qconf, Roman Zippel. Roman did all the heavy lifting with the creation of qconf. All I've done so far is a minor migration. As soon as I get some of my 'fixes' better organized I'll send him the diffs as patches and let him decide if he wants to add it to the original sources.

One of the reasons I wanted to move to Qt4 is because I've got some ideas of my own about enhancing qconf. Before I do that I want to move completely to Qt4, removing all Qt3 support classes and libraries, making qconf a fully native Qt4 application.


The acid test came when I configured kernel with my version of qconf, built it, and rebooted Ubuntu 7.04 Alpha 5+ with my kernel. It's not the first time I've tuned and built a kernel for this box. It is the first time I've used mkinitramfs instead of mkinitrd to create my initrd image. But everything built and worked and right now my Ubuntu system is running on top of the kernel I tweaked and built. It was a lot of fun and satisfying when it all worked.


Popular posts from this blog

A Decade Long Religious Con Job

I rarely write inflammatory (what some might call trolling) titles to a post, but this building you see before you deserves it. I've been seeing this building next to I-4 just east of Altamonte/436 and Crane's Roost for nearly 12 years, and never knew who owned it. Today on a trip up to Lake Mary with my wife I saw it yet again. That's when I told her I wanted to stop by on the way back and poke around the property, and photograph any parts of it if I could.

What I discovered was this still unfinished eighteen story (I counted) white elephant, overgrown with weeds and yet still under slow-motion construction. It looks impressive with its exterior glass curtain walls, but that impression is quickly lost when you see the unfinished lower stories and look inside to the unfinished interior spaces.

A quick check via Google leads to an article written in 2010 by the Orlando Sentinel about the Majesty Tower. Based on what I read in the article it's owned by SuperChannel 55 WA…

Be Careful of Capital One Mailings

Capitol One ("What's in your wallet?") sent me a bit of deceptive snail mail today. I felt sure it was a credit card offer, and sure enough, it was. I open all credit card offers and shred them before putting them in the trash. Normally I just scan the front to make sure I don't miss anything; the Capital One offer made me stop for a moment and strike a bit of fear into my heart.

The letter's opening sentence read:
Our records as of December 30, 2009 indicate your Capital One Platinum MasterCard offer is currently valid and active.Not paying close attention during the first reading, I quickly developed this irrational worry that I was actually on the hook for something important, but I wasn't quite sure what. The letter listed "three ways to reply" at the bottom; via phone, the internet, and regular snail mail. I elected to call.

Once I reached the automated phone response system, the first entry offered was '1', to "activate my Capital …

cat-in-a-box channels greta garbo

So I'm sitting at my computer, when I start to notice a racket in back. I ignore it for a while until I hear a load "thump!", as if something had been dropped on the floor, followed by a lot of loud rattling. I turn around and see Lucy in the box just having a grand old time, rolling around and rattling that box a good one. I grab the GX1 and snap a few shots before she notices me and the camera, then leaps out and back into her chair (which used to be my chair before she decided it was her chair).

Just like caring for Katie my black Lab taught me about dogs, caring for Lucy is teaching me about cats. She finds me fascinating, as I do her. And she expresses great affection and love toward me without coaxing. I try to return the affection and love, but she is a cat, and she takes a bat at me on occasion, although I think that's just her being playful. She always has her claws in when she does that.

She sits next to me during the evening in her chair while I sit in mi…