summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug with posting events from HandleCommandL on Symbian.Jason Barron2009-09-291-0/+1
| | | | | | | | | | | | | | Increase the loop level counter here because this is a system event entry point. Previously, posting a deferred delete event from this function (or triggering an action that posted this event) would end up with the event not being processed on time. The reason is that these events are only processed when the event loop that posted the event returns. Since the loop counter was not previously incremented, this "nested loop" was not detected so the event would only be processed when the main event loop returned which is typically at the end of the application. Reviewed-by: axis
* Merge branch '4.5' into 4.6Thiago Macieira2009-09-291-7/+4
|\ | | | | | | | | | | | | | | Conflicts: doc/src/platform-notes.qdoc src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp src/gui/graphicsview/qgraphicsitem.cpp tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
| * QGraphicsItem: cached embedded widget item is not repainted when widget is ↵Andreas Aardal Hanssen2009-09-291-16/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | updated When calling QGraphicsItem::update() on a cached item, the cache is meant to be invalidated. In the reported bug, the user had a fixed scene rect set for his scene, and removing an item caused the entire scene to be updated (marked as "all needs to be updated"). In this case, calling update() on the cached item did not cause the item's cache to be invalidated. The item's new appearance didn't show up until the next invalidation, which was the same call to update(), but this time without a preceeding full scene update. The fix is to always invalidate the cache, regardless. But only schedule a repaint of the item in some cases (e.g., in this case the whole scene was marked for update, in which case it's unnessary for this one item to schedule a repaint of itself). It's worth noting that in 4.6, removing an item be delete does not cause the whole scene to be updated, and because of that this error was not exposed. It's there nevertheless. Reviewed-by: bnilsen
* | Fix typo.Alexis Menard2009-09-291-2/+2
| | | | | | | | Reviewed-by: TrustMe
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6Jeremy Katz2009-09-296-14/+56
|\ \
| * | After some discussion we decided to remove hasConflicts() from the API.Jan-Arve Sæther2009-09-294-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | hasConflicts() does only make sense for a tool/editor of the layout, and how this function would help the tool is only guesswork at the moment. We keep the private API though, in order to let the autotests we inherited from Orbit pass.
| * | Add missing docs for QGraphicsAnchorJan-Arve Sæther2009-09-291-0/+18
| | |
| * | Add the -testability option to Qt applications.Petri Kiiskinen2009-09-292-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | If this option is given, Qt will load a plugin called "qttestability" and run an initialisation function from it. This allows one to just install the plugin in a non-debug device in order to enable testing. Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
* | | fix warnings about declarations shadowing class members (autotest reported)Jeremy Katz2009-09-296-47/+47
|/ / | | | | | | Reviewed-by: Olivier
* | Mac: Fix build failure on tigerRichard Moe Gustavsen2009-09-291-0/+11
| | | | | | | | | | | | | | | | I had to add inn some constants for dealing with pixel smooth scolling on mac when building on Tiger. This is done according to: http://developer.apple.com/legacy/mac/library/qa/qa2005/qa1453.html RevBy:prasanth
* | Update docs for softkeys to match new API and implementation.Jason Barron2009-09-291-16/+18
| | | | | | | | | | | | | | These docs were outdated and referred to API that no longer exists so we refresh them with some updated info. Reviewed-by: Sami Merila
* | Fix a bug in QPixmapCache when the cache is trimmed by QCache.Alexis Menard2009-09-295-36/+42
| | | | | | | | | | | | | | | | | | | | | | There was a bug in QPixmapCache when QCache trims the content, some keys were not invalidated. The ifdef for WinCE (that i removed) was a wrong fix, it let the auto-test pass but it doesn't fix the bug. The approach here is to add a QPixmapCacheEntry that release the key it owns when QCache deletes it : we are now sure that nothing happen in our back. Reviewed-by:paul Reviewed-by:trond
* | Add a more proper shutdown sequence for Symbian applications.Jason Barron2009-09-291-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously both EEikCmdExit and EAknSoftkeyExit were hard coded to call exit() which promptly exited the event loop without the chance to do any UI operations. With this patch, we handle the two cases differently and allow people to essentially make the right soft key a hide instead of an exit simply by reimplementing closeEvent() and ignoring the event. EAknSoftkeyExit is now a soft exit since this does not seem to be a mandatory exit in S60. By sending a QCloseEvent to QApplication this has the effect that all windows are closed (sent another QCloseEvent) and if one of them chooses to ignore this event, the application and UI are both kept alive. This is similar to how Qt behaves on other platforms. If all windows accept the close event (default), then the application will quit() as normal. This command is sent from the right soft key. EEikCmdExit is mapped similarly as before, but calls quit() instead of exit() to be aligned with other platforms. This will cause the aboutToQuit signal to be emitted which maps very well to Qt because UI interaction is not permitted from this signal and wouldn't work in S60 anyway because in the case of EEikCmdExit, the UI has already been torn down by the UI framework. This command is sent by the End key. We could take this one step further and intercept the key event and prevent it from going to the UI framework and tearing down the UI, but this is a little too evil IMHO. If people really want to intercept that event, they can do it by reimplementing the platform specific event filter. This is equivalent to how it would be done in S60 (reimplementing HandleWsEvent). Reviewed-by: axis Reviewed-by: mread
* | Fix some docs to follow the Qt style. (remove asterisks, proper indenting)Jan-Arve Sæther2009-09-291-44/+44
| | | | | | | | Note that this does *not* change the content of the docs.
* | Dont generate public docs for QSimplex.Jan-Arve Sæther2009-09-291-0/+4
| |
* | doc: add some more \since 4.6 tagsVolker Hilsheimer2009-09-287-8/+51
| |
* | QWheelEvent not working on Cocoa 64BitPrasanth Ullattil2009-09-281-3/+3
| | | | | | | | | | | | | | | | | | The patch which added support for smooth scrolling will work only on 32 bit builds. The new methods (e.g. deviceDeltaX) of the NSEvent were added with the float return type. This should be of CGFloat type instead, which is different from float on 64 bit builds. Reviewed-by: Trust Me
* | fixed a typo in the doc.Denis Dzyubenko2009-09-281-1/+1
| | | | | | | | Reviewed-by: trustme
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Sami Merilä2009-09-281-5/+15
|\ \
| * | Impossible to interact with the year on QCalendarWidget on GraphicsViewThierry Bastian2009-09-281-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that it is using mapToGlobal to translate a mouse position andthat doesn't work well when the widget is mebedded inside graphics view. Task-number: QT-2218 Reviewed-by: Bjoern Erik Nilsen
* | | Triggering softkey action for disbled widget causes a crash.Sami Merilä2009-09-282-2/+6
|/ / | | | | | | | | | | | | | | | | | | Softkey actions need to copy enable state from action widget to prevent crash when action is triggered and action widget is disabled. OPEN: dynamically setting enable state for softkey actions. Task-number: QT-2117 Reviewed-by: Jason Barron
* | Merge branch '4.6' of git@scm.dev-nokia.troll.no:qt/qt into 4.6Andreas Aardal Hanssen2009-09-281-0/+2
|\ \
| * | Fix qdoc errorsJason McDonald2009-09-281-0/+2
| | | | | | | | | | | | Reviewed-by: Trust Me
* | | Merge commit 'origin/4.5' into 4.6Andreas Aardal Hanssen2009-09-284-213/+8
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | Reviewed-by: Joao Conflicts: src/gui/graphicsview/qgraphicsview.cpp src/gui/widgets/qspinbox.cpp tests/auto/qgraphicsview/tst_qgraphicsview.cpp
| * QGraphicsItem with parent flag ItemClipsChildrenToShape not visibleAndreas Aardal Hanssen2009-09-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regression against Qt 4.4. Children of items with ItemClipsChildrenToShape would only be discovered if the view's expose region contained the outer bounding rect of all items, _if_ there was at least one item in the scene that enabled ItemIgnoresTransformations. The reason for this bug is that the presence of an untransformable item causes the item lookups to go through a different path (QGraphicsViewPrivate::itemsInArea()). This function had the bug that it didn't correctly discover children of clip-items. Because of this, in the provided test case you could "work around" the bug by either removing the clip flag, or the transformation flag. Task-number: QTBUG-4151 Reviewed-by: Alexis
| * Cocoa: Fix build cocoa port with namespaceRichard Moe Gustavsen2009-09-282-2/+3
| | | | | | | | | | | | This fix just fixes up coding bugs here and there Reviewed-by: Brad
| * Doc: fixed typo in QTabBar::tabRect() docsStian Sandvik Thomassen2009-09-281-1/+1
| |
| * Fixes a crash in QDoubleSpinBoxJoão Abecasis2009-09-251-210/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing dubious intermediate detection code that also had a buffer overflow. The results were inconsistent and not dependable on. Processing was inefficient and end value to user experience dubious. Test cases that abused the former behaviour were changed to consider input in an Intermediate where it was previously considered Invalid. With this change, user input will mostly be considered in an intermediate state, until it is effectively validated. Task-number: 255019 Reviewed-by: Anders Bakken
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Jason McDonald2009-09-289-13/+38
|\ \
| * | Deep copy QImage based on non-owned data so we can safely store themGunnar Sletta2009-09-281-2/+11
| | | | | | | | | | | | Reviewed-by: Samuel
| * | Make QSignalEvent and QWrappedEvent inner classes of QStateMachineKent Hansen2009-09-282-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Those two classes are specific to the state machine framework, but their names were so generic that we felt they were polluting the Q-namespace. They are now QStateMachine::SignalEvent and QStateMachine::WrappedEvent. Reviewed-by: Eskil Abrahamsen Blomfeldt
| * | Fixed unwanted recursion when calling openGLVersionFlags().Kim Motoyoshi Kalland2009-09-281-1/+2
| | | | | | | | | | | | Reviewed-by: Gunnar
| * | QEventLoop::ExcludeUserInputEvents should not allow the user to close the windowBradley T. Hughes2009-09-282-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These types of input events are not handled by the normal mouse and key event handlers on X11 and Windows. Add special cases for them to make sure that they are not delivered while ExcludeUserInputEvents is set. Task-number: QTBUG-4242 Reviewed-by: Simon Hausmann
| * | compile fix with namespacehjk2009-09-282-0/+9
| | | | | | | | | | | | Reviewed-by: sroedal
| * | Make sure the correct soft key is triggered.Jason Barron2009-09-281-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | In cases where there are both softkey actions as well as "normal" actions, we need to be sure to skip over the none softkey actions since they should not be a part of the softkey framework and the 'index' will be out of sync. Reviewed-by: Sami Merila
| * | doc: Fixed three /sa that should be \saThorbjørn Lindeijer2009-09-281-1/+1
| | |
* | | Fix qdoc error.Jason McDonald2009-09-281-1/+1
|/ / | | | | | | Reviewed-by: Trust Me
* | Fix qdoc errors.Jason McDonald2009-09-281-5/+6
| | | | | | | | Reviewed-by: Trust Me
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6Jeremy Katz2009-09-257-36/+178
|\ \
| * | Doc: Added a note about Phonon.David Boddie2009-09-251-0/+4
| | | | | | | | | | | | Reviewed-by: Trust Me
| * | Merge branch '4.6' of git@scm.dev.troll.no:qt/qt into 4.6Janne Anttila2009-09-253-27/+167
| |\ \
| | * | Use qDebug() instead of printf() when dumping the simplex matrix.Jan-Arve Sæther2009-09-251-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | printf() does not work very well on windows, since it will not send the output to OutputDebugString(). This allows us to catch the output even if the program is configured without "CONFIG += console".
| | * | Fix app showing a blank screen after switching to it using task switcherShane Kearns2009-09-251-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On S60, the widget backing store is dropped when app window is hidden in order to save memory. This has a side effect that the widgets are not redrawn when the backing store is recreated if they have static content. Fix is to invalidate the backing buffer after recreating it, and repaint the widget. Reviewed-by: Jason Barron
| | * | QGraphicsAnchorLayout: Fix bug where simplex would return wrong resultsEduardo M. Fleury2009-09-251-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jan-Arve found a bug where QSimplex would return bad results in some tight situations. The problem was triggered randomly but the chances of appearance were higher in problems with only one feasible solution, ie. problems what were in the boundary of feasibility. The QSimplex solver implements a two-phase simplex solver, the first phase is responsible for finding a _feasible_ solution for the problem (not the best one). The second phase starts with the basic feasible solution (just found) and changes until one that is _optimal_ is found. To implement that solution we need to add artificial variables to the original problem, before phase 1, and remove them, before starting phase 2. Unfortunately though, there was some randomness in the criteria used by the solver that would sometimes cause the removal of a good variable instead of an artificial one, between the phases. With one good variable missing, the solver would also miss an important restriction, without such, it would push the objective function too far, thus returning a "wrong" result. This commit adds a tie-breaker condition to the pivot row logic to ensure the artificial variables are removed before the "good" ones. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
| | * | QSimplex: Add class and methods documentationEduardo M. Fleury2009-09-251-5/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This private class is used by QGraphicsAnchorLayout as the linear programming solver engine. This method adds documentation to implementation, method and classes. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
| | * | QGraphicsAnchorLayoutPrivate: Avoiding graph simplification on empty layoutsJesus Sanchez-Palencia2009-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
| * | | Made QDir::tempPath and QDesktopServices::TempLocation consistent in S60Janne Anttila2009-09-251-4/+1
| |/ / | | | | | | | | | | | | Reviewed-by: TrustMe Autotest: Fixes qdesktopservices::storageLocation test
| * | Removed unused parameter from graphics scene index internal functionLeonardo Sobral Cunha2009-09-252-5/+6
| | | | | | | | | | | | Reviewed-by: trustme
* | | ifdefs to allow compilation with QT_NO_MAINWINDOW and QT_NO_TOOLBARJeremy Katz2009-09-251-0/+2
|/ / | | | | | | Reviewed-by: Paul
* | Add QGraphicsItem::stackBefore(), and fix Z ordering bugs.Andreas Aardal Hanssen2009-09-255-5/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we changed the sibling stacking order to be defined (4.5) instead of undefined (4.2, 4.3, 4.4), the need to control this stacking order arose. Before we could just say the order was random, but stable, and the only way people could rely on order was to set Z. Now, when the default order is defined as "insertion order", people start relying on this order, and incidentally they want more control. In QML, the need to have insertion order semantics is very evident as the order you define the elements in QML more strongly implies a graphical stacking order than the imperative order they get when added in C++. This change adds QGraphicsItem::stackBefore(const QGraphicsItem *), which works similarily to QWidget::stackUnder(). It moves the item in front of the sibling item passed as an argument. While implementing this function, and writing tests for how this function behaves in combination with Z values, I found that the code we had for updating siblingIndex was broken in the case where you remove an item from the middle of the children list. In this case newly added items would be assigned the same sibling index order as one that's already in the list. So in order to get the tests to pass I had to fix this bug as well.. The approach is to sort the children list by insertion order, so that we can fix up the sibling indexes. Performancewise this has little implications. If there are gaps in the sibling index list, which only occurs if you remove an item from the middle of the children list, will the sibling index list be adjusted / corrected before used (for example, by stackBehind()). Multiple calls to stackBehind will be fast, and the list is flagged for resorting (including Z order). Reviewed-by: jasplin