Trolltech Home | Qt4-preview-feedback Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt4-preview-feedback Archive, March 2008
Bug in QGraphivsView example


Message 1 in thread

Hello

in the example (colliding mice) for QGraphicsView there is a bug.

Moving around the scene with the left mouse isn't working. The scene 
will bounce.

Ruth




------------------------------------------------------------------------------------------------------
Dipl.Ing. Ruth Lang
Zentrum für Angewandte Informatik   phone: +49 221 478-5589
Universität zu Köln                 fax:   +49 221 478-5590
Robert-Koch-Strasse 10              email: langr@xxxxxxxxxxxx
D - 50931 Köln                      http://vis.uni-koeln.de
---------------------------------------------------------------------------------------------------


To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx


Message 2 in thread

The naming of methods found in QAtomicInt / QAtomicPointer is unusually
complex for the Qt API. I understand the subbtleties of the various
methods, but adding on top of this some simpler namings like:

setValue(int)
increment()
decrement()

would be welcome.

Philippe

To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx


Message 3 in thread

Philippe wrote:
> The naming of methods found in QAtomicInt / QAtomicPointer is unusually
> complex for the Qt API. I understand the subbtleties of the various
> methods, but adding on top of this some simpler namings like:

Unfortunately, doing lock-free programming is a complex, and the API Qt 
provides needs to be up to the task.

> setValue(int)

For a non-atomic store, you can just use the assignment operator:

     QAtomicInt integer;
     integer = 5;

> increment()
> decrement()

Are these any different from fetchAndAddOrdered(1) or fetchAndAddOrdered(-1)? 
Would you expect them to return the old, new, or no value? We originally 
considered increment() and decrement(), but since we couldn't figure out what 
the API should be, we opted for ref() and deref() instead for implementing 
reference counting. The rest of the API uses the recognized and accepted names 
for the various operations.

-- 
 [ signature omitted ] 

Message 4 in thread

Ruth Lang wrote:
> Hello
> in the example (colliding mice) for QGraphicsView there is a bug.
> Moving around the scene with the left mouse isn't working. The scene
> will bounce.

Hi, Ruth. This bug was fixed just after the beta froze. It already works
fine again in the shapshots. Here's the change that fixed this regression:

--- qgraphicsview.cpp  2008/02/13 11:09:54.000000000
+++ qgraphicsview.cpp  2008/02/14 13:23:47.000000000

@@ -3186,7 +3186,7 @@
     }

     // Always replay on scroll.
-    if (d->sceneInteractionAllowed)
+    if (d->sceneInteractionAllowed && !d->handScrolling)
         d->replayLastMouseEvent();
 }

-- 
 [ signature omitted ]