lorn
Qt
Qtopia
Posted by lorn
 in Qt, Qtopia
 on Wednesday, September 28, 2005 @ 04:39

Yes, even Qt Embedded has it’s undocumented secrets. While digging through my memory, I remembered that I had once found something secret deep in the dark crevasses of Qt Embedded 2’s sources. Well, as secret as open source can get, anyway. I have modified Opie to show this off. It took a whoppin’ two lines of code to bring this out. Those of you familiar with Opie will see what’s new. Here’s a screenshot.

What do you think?

Marius
Qt
KDE
Posted by Marius
 in Qt, KDE
 on Tuesday, September 27, 2005 @ 14:59

Matt Smith is running A Qt Blog of hand-aggregated Qt and KDE news links with synopses.

Comments Off
Marius
Qt
Posted by Marius
 in Qt
 on Thursday, September 22, 2005 @ 16:35

We want Qt to play nicely with the rest of the C++ programmer’s toolbox, including Boost and standard idiom; and for the most part, it does. The one rough patch is our use of the preprocessor, particularly where it interacts with things like Boost.Signals. We have a plan to improve the situation, and we’re looking for input. I’ve given the history, motivation, and some possible answers in this blog post.

harald
Qt
KDE
Posted by harald
 in Qt, KDE
 on Friday, September 16, 2005 @ 13:44

and welcome QTestLib. If you follow the Qt 4.1 snapshots, you might have noticed that QTestLib appeared as part of Qt. To ease transition, there’s a small updater tool (qtestlib/updater) that updates old autotests to use the new library.

Especially after being adopted by KDE, QTestLib got quite some feedback. Unhandled exceptions are now added to the test output and error reporting will stop after 2000 warning messages to prevent hanging tests from overflowing your harddrive. There were some API cleanups, especially the testdata creation was simplified a lot:

void MyTest::myFunc_data()
{
    QTest::addColumn<qstring>("aString");
    QTest::addColumn<int>("someInt");

    QTest::newRow("someTag") < < "someData" << 41;
    QTest::newRow("otherTag") << "moreData" << 42;
}

Note that the QtTestTable parameter is gone. With a “using namespace QTest” declaration, it’s even less to type :)

jacek
Qt
Posted by jacek
 in Qt
 on Wednesday, September 07, 2005 @ 12:09

Did you know that there are characters you cannot store in an XML document in any way? You cannot store #x7 as plain character data:

[2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]

You cannot store it as a character reference:

“Characters referred to using character references MUST match the production for Char.”

You cannot even store it in a CDATA section:

[20] CData ::= (Char* - (Char* ‘]]>’ Char*))

Well, this is actually a lie. Character data is defined as:

[14] CharData ::= [^< &]* - ([^<&]* ']]>‘ [^< &]*)

i.e. any sequence of characters that does not contain ‘< ', '&' and "]>>”. What does “any sequence” mean?

“Legal characters are tab, carriage return, line feed, and the legal characters of Unicode and ISO/IEC 10646. … Consequently, XML processors MUST accept any character in the range specified for Char.”

So while not explicitly illegal, #x7 is not guaranteed to be accepted by XML parsers. And, indeed, libxml’s xmllint dies on it with an “internal error” (erm…?).

What all this means is that if you blindly store QStrings in QDomText nodes, chances are you will end up with a document that’s a bit… weird. It’s not non-well-formed, because it does not violate any well-formedness constraints. But it’s not guaranteed to be readable to XML parsers either.

So what can you do? Well, here’s what I’m thinking about: a static function

QDomImplementation::setInvalidDataPolicy()

which allows the programmer to specify one of three actions to take:

  • Do nothing, risking a weird XML document.
  • Silently drop invalid characters.
  • Return null nodes from the factory functions in QDomDocument.

The first action is obviously bad. The second action is also bad - if there is a #x7 in the data, it’s probably there for a reason and it’s likely to be missed. The third action is just ugly, since Qt doesn’t throw exceptions and you end up having to check for a null node every time you use a factory function.

Go figure. :p

lorn
Uncategorized
Posted by lorn
 in Uncategorized
 on Sunday, September 04, 2005 @ 21:02

Along with that new earthling comes sleep deprivation! But since I live in a state of constant sleep deprivation anyway, living with anywhere from 4 to 6 hours a night, I am getting along better than my partner. Who has the duty of feeding every 2-4 hours, which I can only be support person to. Although he has tried without success to latch onto my shoulder, his shirt or anything else near his face.
Ness is finally getting a few hours sleep between feedings, and Skyler has at least one 4 hour peroid of the day when he is unusually alert. He is beginning to gaze at things, especially red optic mouse lights and the cool blue light on the dvd player.
He really enjoys music already. The look on his face when hearing music for the first time is awesome. He likes my guitar playing too. :)
I bet he will even recognize the qt 4 dance song he heard so much when he was inside his space pod.

Comments Off
Simon
KDE
Posted by Simon
 in KDE
 on Friday, September 02, 2005 @ 22:16

I’ve been thinking a bit about our (KDE’s) xmlgui framework lately and had some very interesting discussions with David here at the KDE conference in Malaga about it. I identify the following main problems with the current way of creating menus/toolbars using xmlgui:

  • Uebercomplex API (clients, builders, factories, some graphically simple things require lots of code…)
  • Bad namings in the xml format
  • Two-stage gui merging/creation with ui_standards.rc
  • No graphical tool for designing menus/toolbars

My current state of thinking about these is that I would like to move away from the custom xml format and standardize on Qt Designer as the tool of choice for designing toolbars, mainwindows and actions. Perhaps in combination with a little KDE plugin that could offer our set of standard actions as well as a template layout for menus/toolbars following KDE’s HIG this may solve three of the mentioned problems in one shot.

A solution for the API, a concept that still permits GUI merging to some extend will require some more research and experimenting. David had a very good idea based on action grouping that may serve as the base for that.

lorn
Uncategorized
Posted by lorn
 in Uncategorized
 on Friday, September 02, 2005 @ 06:45

Skyler Caelan Robert Potter was born at 04:25, on 31, August, 2005. He weighed 3,930 grams (8 lbs 9 oz), and was 54 cm (22 in) long.
Here’s what he looks like.
Skyler