summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Optimize vector normalize for vectors of length 1Rhys Weatherley2009-04-155-39/+63
| | | | | | If the square of the length is very close to 1, then avoid the qSqrt(). Reviewed-by: trustme
* Add the QQuaternion::nlerp() function as a counterpart to slerp()Rhys Weatherley2009-04-152-0/+41
| | | | | | | | nlerp() implements "normalized linear interpolation", which is faster than slerp() and gives approximate results that are good enough for some applications. Reviewed-by: trustme
* Rename QQuaternion::interpolate() to slerp()Rhys Weatherley2009-04-152-2/+2
| | | | | | slerp() is the more common-place name in the 3D community. Reviewed-by: trustme
* Remove the int constructors from the vector classesRhys Weatherley2009-04-158-37/+0
| | | | | | | | The int constructors existed to make fixed-point conversions faster in certain circumstances. With the removal of fixed-point support, they are no longer required. Reviewed-by: trustme
* GTK: Fix line edit background color with custom brushJens Bache-Wiig2009-04-151-1/+1
| | | | | | | We should allways use the brush and not the color if possible. Task-number: 240842 Reviewed-by: nrc
* QFileDialog : Fix filters that doesn't work if whitespaces at the endAlexis Menard2009-04-151-6/+10
| | | | | | | | The fix is basically remove the whitespaces at the end otherwise the reg exp will be wrong. Task-number: 240789 Reviewed-by: jasplin
* Fixed painting issues with draggable tabsJens Bache-Wiig2009-04-153-75/+57
| | | | | | | | | | | This fixes a few of the remaining glitches tabbar animations have: * We no longer grab tabs but paint them through QStyle. This makes tabs work and animate correctly when they are outside the visible region. * Buttons now correctly follow tabs when dropped * Gtkstyle recieved some polish to make it look more native. Task-number: 247694, 251166 Reviewed-by: nrc
* Prevent crash in qt_scrollRectInImage.Samuel Rødal2009-04-151-2/+5
| | | | | | | | Clip both against the source and target device rectangles. Task-number: 247937 Reviewed-by: Trond BT: yes
* Update the item if the text has changed but the boundingRect is theAlexis Menard2009-04-151-0/+1
| | | | | | | | | | | | same. updateBoudingRect update the item only if the boundingRect change but if we have 123 as an initial text and then we set 321 as the new text, then nothing happen because the rect is the same. In case the boundingRect change then we call update 2 times but the item is already dirty so the second call will just return. BT:yes Reviewed-by: Andreas
* BT: Namespace compile fixes for Cocoa.Norwegian Rock Cat2009-04-153-6/+15
| | | | It worked in 4.5.0, so it should work in 4.5.1 too.
* BT: Fix Cocoa bug w/OpenGL widgets in dock widgets would disappear.Norwegian Rock Cat2009-04-151-0/+21
| | | | | | | | | | | | The NSOpenGLContext seems to be tied to the window. So if the view changes from one window to another, the OpenGL context needs to be cleared. We can do this by hooking into the viewWillChangeWindow and viewDidChangeWindow events and clear and reset the drawable respectively. We also found out that QCocoaOpenGLView was not being used at all, so just remove it to get rid of any confusion. Task-number: 250066 Reviewed-by: Trond
* BT: Fix a crash on certain theme changes in GNOMEJens Bache-Wiig2009-04-151-0/+1
| | | | | | | | | | We did not update initGtkWidgets on theme changes which could lead to crashes as the contents of the widget hash depend on certain properties in the style. A simple way to reproduce this would be to change between the redmond gtk theme and cleanlooks. Task-number: 251115 Reviewed-by: paul
* The submenu of a multicolumn menu have an incorrect positionThierry Bastian2009-04-151-2/+2
| | | | | | | | The submenu would always appear to the side of the menu instead of its right. Task-number: 250673 Reviewed-by: ogoffart
* Make QIcon update after palette changesJens Bache-Wiig2009-04-151-0/+2
| | | | | | | | We have to add the palette cacheKey to ensure that the icon is properly regenerated after a system palette change. Task-number: 250542 Reviewed-by: nrc
* Tiny optimization to QImage::setColorTable()Gunnar Sletta2009-04-151-2/+6
| | | | Task: 250730
* Clean up and fix bug in merge conflict for 21099dac.Andreas Aardal Hanssen2009-04-151-10/+12
| | | | | | | | Make use of QPolygonF::translated and QPainterPath::translated to ensure all mapToParent functions follow the exact same pattern. This makes it clear that the functions do the same and do it the same way. Reviewed-by: bnilsen
* Merge commit 'origin/4.5'Olivier Goffart2009-04-1539-294/+339
|\ | | | | | | | | Conflicts: src/gui/graphicsview/qgraphicsitem.cpp
| * Fixes QSortFilterProxyModel not reporting child if the model need to fetchMoreOlivier Goffart2009-04-151-0/+3
| | | | | | | | | | | | | | | | QSortFilterProxyModel::hasChildren need to construct the mapping. And when it tries to construct the mapping, it needs to fetch the childs, so there is none. Task-number: 250023 Reviewed-by: Marius Bugge Monsen
| * Fixes warning about potential use of uninitialized valueOlivier Goffart2009-04-151-14/+12
| | | | | | | | Reviewed-by: bnilsen
| * BT: Fix a regression to 4.4 in Graphics View's handling of child clippersAndreas Aardal Hanssen2009-04-151-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regression caused by optimizations in QGraphicsItem and QGraphicsScene. The changes in QGraphicsItem fix bugs in QGraphicsItem::mapToParent functions, which did the translation before applying the transformation, instead of the other way (transform, then translate). This bug caused almost all mapToParent and mapRectToParent functions to behave wrongly. Unfortunately the new helper functions in QGraphicsScene for discovering items made use of these functions, which introduced a regression. Fixing these functions also fixes item discovery. The other part of this change fixes a regression caused by c1909321, which luckily happened after 4.5.0 and never saw the light of day. The fix is to also invalidate the cached clip path even if there is no scene, which is necessary if you build your scene graph outside the scene, and finish off by adding the root item to the scene. Task-number: 250680 Reviewed-by: Alexis
| * Don't crash or loop infinitely when we retrieving the accessible accel.Jan-Arve Sæther2009-04-151-3/+10
| | | | | | | | | | | | | | | | qt_accHotKey() was pretty buggy; it could both crash or spin forever in some cases. Task-number: 221731 Reviewed-by: alexis
| * Fix typo in documentation.Jason McDonald2009-04-151-1/+1
| | | | | | | | | | | | Error was introduced in change 52f87de53328c661049acf09d5fedc1850aa9bfa. Reviewed-by: Trust Me
| * QGraphicsItem: When an item is deleted and eventfilters installedAlexis Menard2009-04-141-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | The problem here is that we are filling the sceneEventFilters map when we install evenfilter but we never remove the references of an item if it has been removed from the scene or deleted. The deletion can keep stale pointers into the map and a crash can happen. BT:yes Task-number:250272 Reviewed-by: bnilsen Reviewed-by: andreas
| * QGraphicsView: Rubber Band drag mode not updated correctly when scrolling ↵Alexis Menard2009-04-141-20/+20
| | | | | | | | | | | | | | | | | | | | | | [regression] The problem was that we didn't update the new region when we paint the rubber band and we scroll at the same time BT:yes Task-number: 245766 Reviewed-by: bnilsen Reviewed-by: andreas
| * Fix warning: "__LP64__" is not defined"Thiago Macieira2009-04-141-1/+1
| | | | | | | | Reviewed-by: Norwegian Rock Cat
| * Fix a bug where a widget would not always get the correct Cursor in CocoaNorwegian Rock Cat2009-04-144-0/+61
| | | | | | | | | | | | | | | | | | | | Cocoa has a different way of dealing with cursors than our heavy handed approach that we used in Carbon. We simply need to re-implement the proper function in NSView and set up the rectangles for the cursor correctly. We also need to expose an QCursor2NSCursor type functions since the current QCursor::handle() is useless for doing this and we shouldn't change that. With this change things seem to work much more like the native stuff for both Carbon and Cocoa.
| * fix potential crashMaurice Kalinowski2009-04-141-1/+1
| | | | | | | | | | | | | | Reviewed-by: Thomas Hartmann need to check for valid menuBar, otherwise dereferencing will horribly fail.
| * Fixes: QTreeView font change regression if there is an application stylesheetOlivier Goffart2009-04-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The way font propagation work has changed since 4.4: When there is a stylesheet enabled, font does not propagate. So when settings a font to the QAbstractItemView, the viewport font will not change, and hence no QEvent::FontChange on it. So catch the QEvent::FontChange in QAbstractItemView::event in addition to QAbstractItemView::viewportEvent. (we seems to use the view's font everywhere anyway) Task-number: 250754 Reviewed-by: Jens Bache-Wiig
| * Fix crash in QTreeViewOlivier Goffart2009-04-141-0/+1
| | | | | | | | | | | | | | Discovered in Kopete trunk BT: yes Reviewed-by: Thierry
| * Adding note about setting properties to QPrinterMorten Engvoldsen2009-04-141-0/+4
| | | | | | | | | | | | | | Setting properties on an invalid printer is not supported. Use isValid() to check if it valid. Rev-by: Trond Kjernåsen Rev-by: Geir Vattekar
| * Remove scale applied to cosmetic pens when antialiasing is enabled (X11).Samuel Rødal2009-04-141-1/+4
| | | | | | | | | | | | | | | | The pen width should not be scaled for cosmetic pens. Task-number: 247083 Reviewed-by: Trond BT: yes
| * Cocoa: dialogs are sometimes not shown if triggered from outside the appRichard Moe Gustavsen2009-04-141-0/+3
| | | | | | | | | | | | | | | | | | | | NSPanels are set to hide when the application becomes inactive by default. This is not what we wan't for normal dialogs in Qt. This patch makes this setting explicit, in case the window we're about to create is a dialog. Task-number: 250869 Reviewed-by: Trenton Schulz
| * Don't crash in XP style if the painter is inactive.Gunnar Sletta2009-04-141-2/+2
| |
| * Fix docs of QPainter::initFrom.Gunnar Sletta2009-04-141-2/+2
| |
| * Remove duplicate defines in the mac accessibility module.Morten Sørvig2009-04-141-122/+0
| | | | | | | | | | | | This was causing compile warnings. Reviewed-by: nrc
| * BT: Compilefix for Windows CE and namespacesThomas Hartmann2009-04-081-4/+6
| | | | | | | | | | | | RevBy: Mauricek Details: functions needs to be declared outside of the namespace
| * Merge branch '4.5' of http://git.scm.dev.nokia.troll.no/qt/qt into 4.5Thomas Hartmann2009-04-081-0/+4
| |\
| | * BT: Fix a painting glitch in gtk combo boxJens Bache-Wiig2009-04-081-0/+4
| | | | | | | | | | | | | | | | | | | | | This improves the look of combo box with gtk style which is somewhat a regression from 4.5.0 since we did not style this part before. Reviewed-by: nrc
| * | Fixes: No navigation with alt for the native menubar (Windows CE)Thomas Hartmann2009-04-081-0/+3
| |/ | | | | | | | | | | RevBy: Mauricek AutoTest: tst_QMenuBar::check_altPress() Details: We do not allow alt navigation with the windows mobile style
| * BT: Fix up comments in new Cocoa files.Norwegian Rock Cat2009-04-089-119/+163
| | | | | | | | | | | | It seems that Vim or Xcode or whatever I was using to paste these in messed up and added an extra space. Now we should be consistent with the .cpp files and I found a file that we missed too.
| * BT: Fix infinite recursion potential from change acff913a6287ad50b0ac782Norwegian Rock Cat2009-04-081-4/+5
| | | | | | | | | | | | | | | | It seems there is a potential for recursion because calling keyDown: can bubble up to the window which will start the process all over again. keyDown: will actually call qt_dispatchKeyEvent(), we may as well short it out here. All the previous cases I tried continue to work and we don't crash Creator if you are really impatient hitting keys.
| * Revert "Bt: Fix regression in the Embedded dialogs example"Andreas Aardal Hanssen2009-04-081-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 35c26d696cbff269d551c012a212c09692dd6f6b. The change to QComboBox introduces a behavior change; whereas before the view container would always get its palette set as a response to QEvent::PaletteChange, it would now miss this event and rely on regular palette propagation to get the right contens. The difference in behavior is that QWidget::setPalette() also resolves the palette mask, and after 35c26d69 this would no longer happen. The bug in the embedded dialogs demo is caused by the embedded dialogs demo. See upcoming commit. Reviewed-by: Alexis Reviewed-by: Jens Bache-Wiig <jbache@trolltech.com>
| * Bt: Fix regression in the Embedded dialogs exampleJens Bache-Wiig2009-04-071-11/+13
| | | | | | | | | | | | | | | | | | | | We had to revert an earlier fix since it obviously did not work correctly. However since we do not really need to propagate the palette on the viewContainer _before_ it is created, we can simply avoid the issue alltogether as it would happen because we implicitly added a child widget during the polish of the combo box. Reviewed-by: nrc
| * BT: Prevent a crash in Designer when quiting when in the filter edit.Norwegian Rock Cat2009-04-072-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Gah, my original change (f5ef0eb1a6543abdd29e07c23de7fa1128f6d623) had its heart in the right place, but it seems that it can cause crashes on closing where we refuse to give up the first responder and we end up with a dangling pointer. This lets that case happen (when we have no focus widget and are setting a nil first responder, there's no reason to stop that, but it refuses to do that when we do have a focus widget. Hopefully we don't get in a situation where our focus widget gets out of sync. Reviewed-by: Prasanth Ullattil
| * fix tap-and-hold checkbox problem for Windows CEJoerg Bornemann2009-04-073-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Symptom: checkboxes didn't get checked if you press, hold for some seconds and then release the mouse or stylus. In QAbstractButton we reacted on the contextMenuEvent that gets sent if the system recognizes the context menu gesture (tap and hold) and did call setDown(false). This change has been done because buttons in tool bars stayed in the down state when displaying the context menu with this gesture. I've now moved the handling of this to qtoolbar.cpp. Task-number: 246619 Reviewed-by: thartman
| * Merge branch '4.5' of git@scm.dev-nokia.troll.no:qt/qt into 4.5Thomas Hartmann2009-04-074-36/+42
| |\
| | * Drag cursor is not updated when modifier keys are pressed/released inPrasanth Ullattil2009-04-072-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | the Cocoa Builds. The drag move events were compressed based only on the position of the cursor. It has to be based on both position and the "drag operation" in native event. Reviewed-by: nrc
| | * BT: QFileDialog: A folder with a name containing diacritic is disabled on ↵Richard Moe Gustavsen2009-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mac OS X - cocoa The filename as NSString that we get from Cocoa does not have the correct file system encoding. This means that certain characters are implemented differently than what e.g. QFile::encoded returns. This fix normalizes the string from cocoa before using it. Task-number: 249928 Reviewed-by: Trenton Schulz
| | * BT: Send the keyevent after we send the shortcutoverride in menuNorwegian Rock Cat2009-04-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In our Cocoa menu we check if we need to send the key event to the qwidget before the menu has a chance at it, because logically in Qt, the key event should go to the widget and not the menubar first (a bit different than what happens on the mac). The way to determine this is to send a shortcut override event and see if it accepts it. If it does, that means we should just send it the key event. Previously we were sending the shortcut override, but not following through on the key event because we thought (however foolishly). That returning "YES" but not setting an action would somehow forward the event (it doesn't). There still seems to be some problems if you have a Dvorak-QWERTY+CWD layout, but this probably needs to be dealt with at the key mapper level. Reviewed-by: Prasanth Ullattil
| | * Adjust commentsNorwegian Rock Cat2009-04-071-33/+34
| | | | | | | | | | | | Someone messed up the whitespace on this comment.