Jason McDonald
Qt
Posted by Jason McDonald
 in Qt
 on Tuesday, January 19, 2010 @ 11:13

Qt 4.6.1 is now available. Qt 4.6.1 is a patch release, providing bug fixes, performance improvements and documentation fixes. With over 90 entries in the change log, the download and upgrade is well worth the effort.

As usual, you can get all the packages from the Qt Download Page and you can read the latest documentation at http://qt.nokia.com/doc/4.6/index.html.

For those using the public git repository, a “v4.6.1″ tag will appear soon.

As always, your feedback on Qt is appreciated. If you have any comments or bug reports, we’d love to hear from you.
Please file your bug reports at: http://bugreports.qt.nokia.com. If you want to contribute to Qt, all the information you need to get started can be found at: http://qt.gitorious.org.

Eike Ziller
Qt
QtCreator
Posted by Eike Ziller
 in Qt, QtCreator
 on Tuesday, January 19, 2010 @ 11:13

Since new Qt 4.6.1 and Qt SDK 2010.01 packages have been released just today, we want to take this opportunity to also make an updated version of Qt Creator available.
This is a pure bug fix release, so don’t expect great new features in this version (these are secretly developed on the master branch on qt.gitorious.org ;) ), but definitely expect great improvements in various areas.

Most notably, debugging on Mac OS Snow Leopard has received some badly missing love, as well as several more general debugging improvements. Also, the C++ editor has been tweaked a lot, see the more complete list of changes.

Download the Qt Creator 1.3.1 package now!

Harald Fernengel
Qt
 in Qt
 on Tuesday, January 19, 2010 @ 11:09

We’re happy to announce that Qt for Maemo 5 entered Beta status - this means that all APIs are feature complete and have been reviewed by multiple people. For us, this means that an intense phase of bug hunting and testing is starting. For you, it means that you can now finally develop without us changing class names or behavior all the time (*) :)

Lots of changes went into Qt since the last Technical Preview:

How do I get it?

Short story: Add Maemo’s “extras-devel” repository and type “fakeroot apt-get install libqt4-maemo5-dev”. Qt will be installed to “/opt/qt4-maemo5″. The long story can be found on the wiki.

The source code repository is at http://qt.gitorious.org/qt/x11-maemo. Check out “README.maemo5″ for build instructions.

How to contact us?

You can reach us via the “qt-maemo-feedback” mailing list (see Mailing List instructions), or on the “#qt-maemo” IRC channel on irc.freenode.net. For bug reports, you can use our bug tracking system at http://bugreports.qt.nokia.com/. Please set the bug’s component to “Maemo 5″.

How to debug

The current Maemo 5 SDK still contains gdb 6.8, which is unstable when debugging Qt applications. gdb 7 is scheduled for the next release, in the meantime, you can find a custom package at http://chaos.troll.no/~harald/gdb7/. gdb 7.0 is installed as “gdb7″ (note the “7″ suffix) to /usr/local/bin, so it won’t clash with the existing gdb. Once gdb 7 support lands in the official SDK, you can safely uninstall our package.

How about QtDeclarative?

QtDeclarative is available for Maemo 5 (”fakeroot apt-get install libqt4-maemo5-declarative-dev”), but is still considered a technology preview.

How about Qt Creator or MADDE?

Unfortunately, neither full Qt Creator nor MADDE support is available for this Beta. Currently, the ScratchBox based SDK is the only supported development environment.

Curtain Call

A big thank you goes to the Qt and KDE communities for all the patches, reports and discussions. A big hand also for Kevin Ottens for his Virtual Machine which accelerates Qt and KDE for Maemo development quite a bit.

(*) read/only QComboBox might change into a value picker button

gunnar
Painting
Graphics Dojo
OpenGL
Posted by gunnar
 in Painting, Graphics Dojo, OpenGL
 on Monday, January 18, 2010 @ 10:00

Previously in this topic:

In my previous post, The Cost of Convenience, we saw quite clearly that text drawing was a major bottleneck. Text drawing is quite common in GUI applications though, so we need a solution for that. If we break down what happens behind QPainter::drawText(), it is split into two distinct parts. Converting the string into a set of positioned glyphs, often refer to as “text layout” because it positions the glyphs, does text wrapping and adjustments for alignment. The second part is passing the glyphs to the paint engines to be rendered. When the text is the same all the time, the first part could be done once and the glyphs/positions just reused.

We have a class in Qt which allows you to cache the first part and only do the drawing for each frame. The class is QTextLayout. This is a low-level class, throwing asserts at you for the most trivial of mistakes. It also comes with a really inconvenient API, but it does reduce the most costly step of text drawing, which is the layout part. It is also only fair to mention that QTextLayout uses a lot more memory than just the glyph-array and positions array, as one could expect, so in a memory constrained setup, it should be used with caution. In 4.7, we plan to introduce an API for static text, which takes care of all the layout and stores only the required parts, reducing the overall memory footprint, but for now, QTextLayout is how you do it.

Going back to my virtual keyboard, updated Source Code, I’ve changed the “-buttonview” example to make use of QTextLayout. In the constructor, I build the layout:

    ButtonView() {
        QString content;
        for (int i='0'; i< ='Z'; ++i) {
            content += QLatin1Char(i);
            content += QChar(QChar::LineSeparator);
        }
        m_layout = new QTextLayout(content, font());
        QFontMetricsF fm(font());
        m_layout->beginLayout();
        for (int i=0; i<content .size() / 2; ++i) {
            QTextLine line = m_layout->createLine();
            line.setNumColumns(1);
            int x = (i) % 10;
            int y = (i) / 10;
            QSizeF s = fm.boundingRect(content.at(i*2)).size();
            line.setPosition(QPointF(x * 32, y * 32) + QPointF(16 + s.width() / 2, 16 + s.height() / 2));
        }
        m_layout->endLayout();
        m_layout->setCacheEnabled(true);
    }

</content>

If you look at the source code, there is more stuff going on in the constructor than I show above. This is because I extracted the text layout relevant parts only. So what we do is to build a string of the characters. Between each character I insert a LineSeparator. Without this, I wouldn’t be able to split the text into multiple QTextLine objects. From the content string, I construct the layout. For each character, I find its position in the grid and construct a QTextLine and move the line to its position. Each line is one column/character big. Finally I enabled caching on the layout. This is the step where we start caching the laid out text.

When it comes to the paint method, the code is rather straightforward. All the text is contained inside a single layout object so I can just call its draw function.

    void paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *) {

        // Draw background pixmaps...

        m_layout->draw(p, QPointF(0, 0));
    }

Now, lets have a look at what this gains us:

Text Layouts

The graph shows the number of milliseconds per frame including the blit. Measured on an N900 with composition disabled. Smaller is better!

If we compare the “-no-indexing -optimize-flags” to the one with “-no-indexing -optimize-flags -text-layout”, we see that there is a significant reduction per frame. It brings raster from 9.3 ms per frame down to 5.5, OpenGL drops from 16 ms per frame to 9.1 ms when using a text layout. A drop of about 4 ms is also visible in the X11 paint engine.

Needless to say, using the QTextLayout class introduces a huge benefit, but it requires a bit more setup to get there. In this implementation I merged all the text into a single object which also makes it impossible for me to move one item relative to the others, such as adding an offset when a button is pressed. I could have one QTextLayout for each item, which would have been roughly the same performance, but at a higher memory cost.

Until next time, take care!

PS: A small comment on the item cache / X11 numbers. The connection is asynchronous and Qt completes its job at about 2.7 ms pr frame. With “-sync” on the command line, which makes all X calls synchronous, raises the time to about 10 ms per frame. If I had put a QApp::syncX() into each frame, synchronizing once per frame which is essentially what GL and VG are doing, I would probably get a number that is in between these two. What this means is that the numbers for X11 in this test are actually quite a bit worse than the graphs show.

Simon
WebKit
Posted by Simon
 in WebKit
 on Friday, January 15, 2010 @ 17:49

Here’s the weekly summary of the Qt related changes that landed in WebKit trunk this week:

  • Daniel and Robert added support for the XSS auditor to the Qt DRT (33419).
  • Simon removed unnecessary memory allocations of QPainterPath from WebCore::Path (33466).
  • Zoltan continued to make the world a subclass of FastMallocBase.
  • Diego fixed support for user stylesheet locations in the Qt DRT (33617).
  • Andreas fixed the scrolling performance on pages with embedded widgets (33373).
  • Jocelyn reworked the qmake based build system to separate the generated files from the regular build, fixing longstanding dependency issues (33542).
  • Diego added a missing implementation of fileSystemPath() to the Qt build of KURL (33614).
  • Jakub fixed a bug with XSL stylesheet loading.
  • Ben fixed support for touch events in document.createEvent() (33605) as well as the detection of touch events as user gestures (33597).
  • Kim fixed support for touch event coordinates in zoomed and scrolled pages (32899).
  • Petri fixed an incorrect touch layout test (33465).
  • The Szeged hackers continue to rock our world by keeping the bot green green green!

That’s all for this week, folks :). If I have missed anything or you’d like to mention something in the next digest, please send me an email.

BTW, if you’d like to join the development, please subscribe to the webkit-dev and the webkit-qt mailing lists. You can also join our weekly meeting point on IRC in #qtwebkit on freenode every Monday at 15:00. There’s no fixed agenda, but instead there’s a good chance that most developers will be around, if you’re looking for code reviews, etc. in a particular area. See you there!

Kent
WebKit
Posted by Kent
 in WebKit
 on Friday, January 15, 2010 @ 13:06

Today it’s exactly one month since the press release stating that ECMA-262 5th edition (ES5) has been approved. (Yeah, that’s just a random coincidence.) What’s changed since the 3rd edition? Quoting the spec itself (actually, it’s only the “Final final final final draft” according to the PDF document title :) ):

The [fifth edition of ECMAScript] codifies de facto interpretations of the language specification that have become common among browser implementations and adds support for new features that have emerged since the publication of the third edition. Such features include accessor properties, reflective creation and inspection of objects, program control of property attributes, additional array manipulation functions, support for the JSON object encoding format, and a strict mode that provides enhanced error checking and program security.

Mark Caudill gives a good 10000-feet overview of the new features. John Resig goes into more detail about Objects and properties and strict mode and more.

Here’s my attempt at an overview of the ES5 implementation status in WebKit/JavaScriptCore (JSC).

Features implemented in JavaScriptCore

This is stuff that’s already in WebKit trunk. I’ve included links to relevant Bugzilla tasks in case you’d like more information (e.g. have a look at the patches).

  • Array extras”: Array.prototype.{indexOf,lastIndexOf,every,some,forEach,map,filter,reduce,reduceRight}:
    These have been in JSC for years. I’m not sure how conformant the implementations are, though.

Features not implemented in JavaScriptCore

  • Strict mode: I’m not aware of any work that’s been done to support strict mode yet. It involves making the parser/compiler recognize the “use strict” directive and adapting execution according to the rules given in annex C of the ES5 specification. (The annex lists 20 restrictions/exceptions that apply to strict mode.)

Want to get involved or track the status?

Have a look at the open ES5 tasks at bugs.webkit.org. For creating new tasks, use component “JavaScriptCore”, tag “ES5″ and (optionally) summary prefix “[ES5]”. In addition to implementing ES5 functionality or playing with it in your WebKit-based app, there are also opportunities to use that functionality within WebKit, such as in the test framework and the Web Inspector (whose front-end is written in JavaScript). For example, Object.getOwnPropertyNames() made it easy to resolve the long-standing issue of the Web Inspector console not auto-completing non-enumerable properties of built-in ECMA objects (https://bugs.webkit.org/show_bug.cgi?id=19119). And Object.getOwnPropertyDescriptor() could potentially be used to display detailed information about variables. I just love those new introspection capabilities! Finally it’s possible to do things directly in JavaScript that you could only do with native (engine-specific) APIs before.

Happy ES5 hacking!

No
WebKit
Graphics View
Graphics
Performance
Posted by No'am Rosenthal
 in WebKit, Graphics View, Graphics, Performance
 on Wednesday, January 13, 2010 @ 16:07

I’d like to share with the community a project I’m working on, while it’s still in its development phase (isn’t that what labs is for? :))
The goal of the project is to get CSS3 animations to a reasonable FPS performance, mainly on embedded hardware where it’s a pain.

See http://gitorious.org/~noamr/webkit/noamrs-webkit/commits/accel

The idea is to implement webkit’s GraphicsLayer concept, which allows platform-specific implementations of CSS transform and opacity animations, using the graphics-view and the Qt animation framework as a backend. This would only work for QGraphicsWebView and not for QWebView, as rendering a separate QGraphicsScene inside QWebView would probably not give us much performance benefit.

Preliminary results are very promising - The leaves demo, for example, runs 4 times faster on Maemo Fremantle than it does without the acceleration, and it looks graphically accurate.

The reason this gives us a performance benefit is mainly because of graphics-item caching: when a CSS animation occurs inside webkit, the item that’s being animated has to go through a re-layout and re-draw every so often, while with the accelerated approach we draw it once into a QPixmap (QGraphicsView takes care of that) and then it’s just a series of fast and furious pixmap blts. The hardware acceleration becomes relevant when the images are big and the blt itself becomes a bottleneck.

This project is not ready to go upstream, as it supports many delicate use-cases that need to be tested. But if you’re interested in participating (or to just comment!), this has so far been a fun project to hack on.

Instructions:

  1. Get the Git repo from git://gitorious.org/~noamr/webkit/noamrs-webkit.git, branch accel
  2. Build or get a relatively new version of Qt, possibly without building QtWebkit
  3. Build Webkit from the downloaded Git repo:
    export QTDIR=[my-qt-4.6-root]
    export PATH=$QTDIR/bin:$PATH
    ./WebKitTools/Scripts/build-webkit --qt
  4. Run ./WebKitBuild/Release/bin/QGVLauncher --accel: This will enable the necessary web-setting for composite-layer acceleration. You can also create a small QGraphicsWebView example yourself, as long as you enable the new settings flag: QWebSettings::AcceleratedCompositingEnabled
  5. Load a website with CSS transform/opacity animations: like this one or this one.
  6. Hack. Most of the code is in WebCore/platform/graphics/qt/GraphicsLayerQt.cpp, or you could just search for the term USE(ACCELERATED_COMPOSITING)
  7. Send merge requests through Gitorious or comments on Bugzilla

No’am

gunnar
Graphics View
Painting
Graphics Dojo
OpenGL
Posted by gunnar
 in Graphics View, Painting, Graphics Dojo, OpenGL
 on Monday, January 11, 2010 @ 09:25

Previous posts in this topic:

So, its time for my next post. Todays topic is how convenience relates to performance, specifically in the context of QGraphicsView. My goal is to illustrate that the way to achieve fast graphics is to pack your QPainter draw calls as tightly together as possible. The more stuff that happens in the middle, the slower it gets.

To illustrate this, I’ve implemented a virtual keyboard. Granted, its not a very common layout nor is it usable, but the rendering is the point here, not the functionality. The full source code is here and it looks like this:

Virtual Keyboard Image

I’ve implemented the keyboard using three different approaches. One using proxy widgets, one using graphics items and one where the entire view is one graphics item. In addition to that, I added a number of options to tweak various properties, such as whether or not the text is drawn. I measured this on an N900 rather than a desktop because the difference becomes more profound on a small device. On the desktop it is easy to be fooled because most things complete in a matter of micro seconds anyway. It is only when the entire application comes together one notices that things are not as smooth as in the prototype, but too much work has been invested into the current design that one loses out on the super-slick feeling application.

QGraphicsProxyWidget

Since we’re implementing a series of clickable buttons, a natural and convenient starting point is to use an existing button class, such as the QPushButton. It already implements the logic for mouse/keyboard interaction and has signals for clicking and all sorts of other useful functionality. To get widgets into QGraphicsView, we use a QGraphicsProxyWidget. To make the test “fair”, I actually use a plain QWidget which just paints a pixmap and a draws a text. Had I gone through the styling API, these numbers would have been even worse.

ProxyWidget Results
Milliseconds spent per frame including blit to screen when using QGraphicsProxyWidgets. Low is better!

If we look at the plain “-proxywidgets” run, the fastest engine was the raster engine, running at 26ms per frame. If I wanted to slide this keyboard onto screen, I have 16ms available if I want it running at 60 FPS and 33ms available if I want to do it at 30 FPS. When each frame takes 26ms, I can barely do 30, but with only a little bit of slack, so if another process is soaking up CPU time, that number is also a bit difficult to reach. So, not very good. (BTW, the exact numbers in the graphs are listed as a comment in the top of the .cpp file I linked above).

The first thing I noticed with this approach was that the each button now had a gray background. This is of course the widget background. A QWidget embedded in QGraphicsView will be treated as a top-level and will therefore draw its background. I added an option “-no-widget-background” which sets the Qt::WA_NoBackground on the widget. This brings the rendering speed with raster down to 22ms. 4ms saved per frame, just by setting a flag, not too bad, but still pretty far from being awsome.

I’ve mentioned before that text drawing is not as fast as we would like it, so just to compare how it looks without text, I added a “-no-text” option to the test. This brings the raster results down to 13ms. That is pretty nice and below the 16ms threshold required to achieve 60 FPS, but only with a small margin. And I’m not drawing any text! Before I give up with this approach, I’ll enable item caching. By setting ItemCoordinateCache on each button, I cache both the background pixmap and the text in one single pixmap. This brings the raster results down to 8.5ms, and its starting to look acceptable. But at a very high memory cost… In my original usecase I had one shared pixmap for all the button backgrounds, but now I have one per button.

You may notice that there was a vast difference between item caching and the proxy widget drawing the pixmap. One thing that adds to the proxy widget cost is that the QPainter is recreated and initialized for each button in the buttons paint event. Also, as I mentioned in my previous post, An Overview, you may remember that I said that each widget has a system clip and that there is an overhead involved with calling the paintEvent. For items in QGraphicsView, there is already a painter, and I don’t need a clip, nor do I need any of the other stuff that goes on behind the scenes there. When we enable item coordinate caching, we don’t leave graphics view world and we don’t enter the widget world. This crossing is expensive, so by not going into the widget world, we save a lot.

So, if there is a lesson to be learned it is that QGraphicsProxyWidget should be used with extreme caution. If you really need it, use very few of them.

QGraphicsWidget

If proxy widgets are too slow to be usable in this scenario, then the next best thing is to use a QGraphicsWidget. This is a subclass of both QObject and QGraphicsItem, which gives me signals, slots and properties, but its not a QWidget and therefore still fairly lightweight. The numbers are as follows:

GraphicsWidgets Results
Milliseconds spent per frame including blit to screen when using QGraphicsWidgets. Lower is better!

Compared to the proxy widgets approach we’re starting out quite a bit better, with raster at 13 ms per frame, OpenGL at 20ms and X11 at 22ms. Below this line is a new line: “-no-indexing -optimize-flags”. QGraphicsView will by default put all the items in a view into a BSP tree for fast lookup, this is beneficial when the scene contains many items and you often need to find items that intersect with a small portion of the scene. In the testcase we’re always doing a full update, so there is no benefit from the index, so it can be disabled by calling scene->setItemIndexMethod(QGraphicsScene::NoIndex). Having a BSP is the default behaviour because graphics view was initially intended to be a static scene for many items. The most common usecase today is a few (a few hundred at max) items which tend to move a lot. For this reason, it is always a good idea to try to disable the BSP and see if it makes a difference in performance. If it helps, then leave it off.

I also know that the items play nice, meaning that they don’t change the clip, translate the painter, change the composition mode or modify any other state that would propagate to other items. This means I can safely set the DontSavePainterState optimization flag. Actually, based on an old habit, I set all possible optimization flags. I only consider unsetting them if my drawing code starts to look weird, at which point I would rather fix the drawing code and keep the flags set. By disabling indexing and enabling optimization shaves off 2ms per frame in for all rendering backends, so that is definitely worth it.

If I don’t do text, the performance is about twice as fast. Again we see that text drawing is a huge cost. We’re working on an API to fix this and we’ll have more information for you when we do. You may notice that enabling item caching drops the performance a bit compared to the “-no-text” case. There isn’t much overhead inside QGraphcisView for this path. A likely reason for the decrease is that reading from multiple memory sources (multiple pixmaps) results in a lot of cache misses, compared to the straight approach which draws the same pixmap over and over.

ButtonView Item

In my previous post I briefly mentioned that there is a slight overhead involved with the use of a QGraphicsItem too. Prior to calling the paint function, the painter is transformed to the coordinate system of the item and the painter state is saved. If the item draws a big polygon, this setup cost can be ignored, but when drawing just a pixmap and a few pixels of text, then it may be worth considering. In the spirit of “The more direct the painting code is, the faster it gets”, I implemented the keyboard as a single item. The numbers are as follows:

ButtonView Results
Milliseconds per frame including blit to screen when using a single item. Lower is better!

Raster is now down to 10ms, which is 1ms better than the QGraphicsWidget approach when all optimizations were enabled, so even though graphics items are cheaper than widgets, they still cost a bit. The keyboard is now rendered in a tight loop, and the major difference in performance here is caused by the fact that items in the scene have a transform associated with them. Prior to calling paint() a transform is set to match the painter to the items local coordinate system. This causes a state change in the paint engine. For each button we’re drawing a 32×32 pixmap which means alpha blending 1024 pixels, followed by doing text layout and drawing a single character. Even then do we save about 10% time by not having a QPainter::translate() in the midst, so bear that in mind. By enabling the optimization flags and disabling the index, raster drops a bit more, so having those are still a good idea.

You may have noticed that there is one dataset that is named “cheat” for OpenGL. I was reluctant to include this, because its using a private API that is not, and I really mean NOT, subject to binary compatibility rules. You cannot call this from your application. We’re going to add a public API for this in the future, hopefully 4.7, so until its there, wait. In the interest of showing what we are thinking internally, I thought I would show it.

OpenGL is really great for accelerating graphics, but its way of working does not map optimally to how Qt works. GL is really good at taking a few large datasets of triangles and rendering them, but its not so good at drawing loads of small things. Small things like button backgrounds, icons, single text items, etc. However, all the buttons backgrounds are the same pixmaps, so what if I could tell QPainter to draw the same pixmap in multiple places at once? In GL this would correspond to setting up a texture and one vertex and texture coordinate array and drawing some 40 pixmaps in one go. This fits much better with how GL is made to work. The result is that drawing the buttons drop from 5.2ms to 3.9ms, so another piece of juice squeezed out. Naturally, the more times the pixmap is drawn and the smaller the pixmap gets, the more benefit you get from batching commands like this.

There is a second option to OpenGL for the button view case, which is the “-ordered”. This was done after Tom brought to my attention that the testcase would do a shader program update for each painter call. In the default buttonview implementation we do:

                    for (int i=0; i < m_rects.size(); ++i) {
                        p->drawPixmap(m_rects.at(i), *theButtonPixmap);
                        p->drawText(m_rects.at(i), Qt::AlignCenter, m_texts.at(i));
                    }

Because pixmaps use one shader pipeline and text drawing uses another, the pipeline needs to be switched and reset all the time, which renders at 16m per frame. To see if it makes a difference, I added a second alternative rendering, “-ordered”, where I do all the pixmaps first, then all the text:

                    for (int i=0; i < m_rects.size(); ++i)
                        p->drawPixmap(m_rects.at(i), *theButtonPixmap);
                    for (int i=0; i&lt;m_rects.size(); ++i)
                        p->drawText(m_rects.at(i), Qt::AlignCenter, m_texts.at(i));

This prevents the shader pipeline updates and bring the rendering time per frame down to 13ms, so definitely worth it.

Summing Up

Virtual Keyboard Combined Results
Milliseconds per frame including blit to screen for proxy widgets, graphics widgets and a single widget. Lower is better!

OpenGL comes out rather bad in this testcase, which I was a bit disappointed to see, but it did send Tom into an optimization frenzy, so we’re hoping to remove some of the constant overhead. It should also be said that when using the OpenGL graphics system, we enable multisampling by default, which increases rendering time on the N900 by around 30%. A plain QGLWidget would thus perform slightly better. Another aspect to OpenGL is that it uses a dedicated low-power chip, so even though it for this particular usecase runs at half the speed, it also uses a lot less battery, so it may still be the right choice. OpenGL will also scale significantly better than raster and X11 as the pixmaps get bigger or if the content of the button is slightly more advanced, say like a horizontal gradient.

The best numbers are definitely in the button view case, where all the content is rendered as one item, which is what I wanted to highlight with this blog. The button view item also opens up for other optimizations such as batching. We don’t have that many batching functions in QPainter today, its only drawRects(), drawLines() and drawPoints(), but we’re considering to add more, we are just not sure on how the API’s would look yet.

The bottom line is still that how Qt is used defines how well it performs. On one hand there may be an easy and convenient way to get the job done which performs quite sub-optimally. On the other hand there may be a more involved implementation which performs very well. I’m not trying to suggest that you do one or the other, there are a lot of good reasons for picking either one. But I hope that I’ve illustrated that some features come at a cost and that this is kept in mind along with what the target is when designs evaluated and chosen.

I’ll round off with a question. If you were to implement a particle effect when you press a button, which approach would you choose, having seen the numbers above?

Simon
Qt
WebKit
Posted by Simon
 in Qt, WebKit
 on Sunday, January 10, 2010 @ 10:03

I’d like to give you a brief summary of the commits that were landed in the Qt parts of WebKit in the first week this year:

  • Lots of improvements on the DRT testing tool: Enter key fixes (Jakub), Drag and Drop support (Yael) and Zoom support (Kim, Diego, Afonso). All of these changes improve the layout test coverage. :)
  • Jakub added support for sliders to RenderThemeQt.
  • Andreas fixed a crash with input methods on startup.
  • Kim fixed the semantics of touch events to match the iPhone and Android behaviour better.
  • Luiz and Kenneth landed more code that’ll make it possible in the future to handle list popups in the application.
  • Norbert landed a workaround for an RVCT bug that makes the trunk build again on Symbian.
  • Yael continued work on the network state notifier implementation (using Qt Bearer Management).
alexis.menard
Itemviews
Performance
Posted by alexis.menard
 in Itemviews, Performance
 on Friday, January 08, 2010 @ 15:34

Back in Qt 4.4, QFileDialog was rewritten in order to help with performance issues. In addition to that a new model was designed to read the hard drive content: QFileSystemModel. The main advantage of QFileSystemModel is its thread: the model is populated asynchronously by a gatherer thread. The benefit is that the GUI is not stuck while the gatherer is reading the file system (except one case). In 4.4.x, 4.5.x, 4.6.x the focus was to mature QFileSystemModel to make it fast and stable. I think now it has reached this status and QDirModel can be easily replaced by QFileSystemModel as it provides the same features and more.

So in 4.7, QDirModel will be obsoleted and QFileSystemModel will be used in our examples. At the same time QCompleter will gain the support of QFileSystemModel. The commit is 319b0262418d74cc416a7dd1f620b54ba45bad22 and you can find it in our trunk.



© 2008 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners.