summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Fixed a crash with input methodsPierre Rossi2009-07-102-6/+3
| | | | | | | | | The inputContext's focusWidget was not reset when disabling input methods. Thanks to Benjamin P. Task-number: 257832 Reviewed-by: Denis
* Update QGroupBox on focusBenjamin Poulain2009-07-081-5/+1
| | | | | | | | We cannot assume the position of the decorations when a QGroupBox get the focus. Task-number: 257660 Reviewed-by: Thierry
* Document limitation in Cocoa cursor handling.Norwegian Rock Cat2009-07-071-0/+5
| | | | | | | | | | It seems there is a bug in AppKit which will automatically reset a cursor even when it is grabbed, but won't reset it when it's brought back into the window. The upshot of this is that doing a setCursor() inside of mouse handling behaves slightly different than on the other platforms (including Carbon). However, we are at the mercy of Cocoa here and I would rather have all the other things AppKit does right and live with this bug which they may fix some day.
* Fix typo in color calculation.Norwegian Rock Cat2009-07-071-3/+3
| | | | | | | | | Argh! It's divide by 256 not 265. The worst part was that I used the same values in Cocoa as well, so they were both "damaged." It should be good now. Task-number: 257499 Reviewed-by: Prasanth Ullattil
* Fix issue where a mainwindow would show two size grips in Cocoa.Norwegian Rock Cat2009-07-061-2/+5
| | | | | | | | | | | | | | | | | | | OK. this is a bit strange. It seems the topdata->resizer value is used to control whether or not we should show a resize handle based on a count (0 no, non-zero yes). Since we somehow decided that this value will never be larger than 15, we made it 4-bits wide. There's a "Qt/Mac" API, QWidgetPrivate::qt_mac_update_sizer(QWidget *, int = 0) which would adjust this value by the int passed in.. We use that in several places, not excluding the QStatusBar where we would pass 1 if we want to show, and -1 if we didn't. Now if you subtract -1 from zero when you are 4 bits wide, well, bad things happen. Therefore protect that (since if it's at zero we have succeeded, we don't want to show the resizer). This seems to work well. The private API is certainly an interesting way of solving the problem, but is easy to abuse (for example, this code will break if resizer = 1 and we are passed -2 in the function. Task-number: 257485 Reviewed-by: Prasanth Ullattil
* Implement QApplication::setOverrideCursor to use pure Cocoa callsNorwegian Rock Cat2009-07-061-1/+11
| | | | | | | | | | | Seems this was a victim of our cursor fixing. Cocoa does a lot for us with setting cursors. This meant that we didn't need to do as much meddling and as a result qt_mac_set_cursor does nothing in Cocoa. Unfortunately, this broke setOverrideCursor. Luckily Cocoa has a stack that works exactly like Qt, so we can just use that. Task-number: 257507 Reviewed-by: Prasanth Ullattil
* Remove unused function viewUnderTransparentForMouseView in QCocoaView.Prasanth Ullattil2009-07-022-57/+0
| | | | | | | After we implemented hitTest for QCocoaView, this function is no longer used. Reviewed-by: Norwegian Rock Cat
* Drag and drop events are not delivered correctly in CocoaPrasanth Ullattil2009-07-022-8/+43
| | | | | | | | | | | Drag and drop events should consider the WA_TransparentForMouseEvents attribute like the mouse events. If this attribute is set for a widget, the event has to be passed to right widget under mouse. The widget is identified by calling hitTest. In such cases the leave event has to be delivered to the widget which actually accepted the enter event. Task-number: 252088 Reviewed-by: Norwegian Rock Cat
* Implement hitTestNorwegian Rock Cat2009-07-022-54/+7
| | | | | | | | | | | | | | | Cocoa calls hitTest on our view to determine if the view should get the mouse press. We always said, "yes" and did all the logic ourselves. Turns out that we can say "no" if I'm transparent to mouse events and remove all that code where we do all the work ourselves. Big maintenance win! For the time being I've kept the "transparentViewForEvent" method since it might be useful for others, but no one is using it at the moment and we may just kill it soon. HitTest should handle this situation correctly.
* Fix a regression where dynamic tooltips wouldn't show up in Cocoa.Norwegian Rock Cat2009-07-022-4/+15
| | | | | | | | | | | | | | Tracking of mouse events was only enabled when enableMouseTracking or Hover or a tooltip had been set explictly on the item, but this meant that the dynamic QEvent::Tooltips would never get dispatched. So, in order to help out people that might use this feature, all QCocoaViews must pay the mouse move event tax *sigh*. I added comments in the proper places so that we DO the right thing for a release where we can force the change in behavior. Task-number: 257320 Reviewed-by: Denis
* Doc: clearifying docs - QProgressDialogMorten Engvoldsen2009-07-011-1/+1
| | | | | | Clearifying details on a warning about a function call (setValue()) Task-number: qtp 4.5Workarea
* Doc: correcting typoMorten Engvoldsen2009-07-012-2/+2
| | | | | | Correcting typos Task-number: 257225
* Document unified toolbar change with regard to full screen change.Norwegian Rock Cat2009-07-011-3/+4
|
* Fix Toolbars in unified toolbar looking bad Carbon w/Fullscreen changesNorwegian Rock Cat2009-06-301-2/+17
| | | | | | | | | | | | | | | There was a bug in the Carbon code when an item went in full-screen, than out with a unified toolbar. In those cases the toolbars would end up getting but into the mainwindow area. The reason this was happening was that we were calling transferChildren() after we had set up our toolbar. This cause problems because we end up pulling the QToolbars right out of the unified toolbar. The easiest way to solve this is to just update the status on it again. This should solve any issues. I also added some logic to avoid calling this too many times in that one case. Luckily, this seems to only affect Carbon. Task-number: 254462 Reviewed-by: Jens Bache-Wiig
* Doc: Fixed a doc bug in QPlainTextEdit class description.Geir Vattekar2009-06-301-7/+7
| | | | | Task-number: 256762 Reviewed-by: TrustMe
* Doc: About menu on the Mac gets the application name from Info.plist.Geir Vattekar2009-06-302-3/+6
| | | | | Task-number: 256818 Reviewed-by: Trenton Schulz
* QWidget::adjustSize() sends a spontaneous event - Mac OS X CocoaPrasanth Ullattil2009-06-302-2/+12
| | | | | | | | The windowDidResize notification now differentiates an internally triggered resize from a user triggered resize. Task-number: 256269 Reviewed-by: Norwegian Rock Cat
* Remove unused variablesAnders Bakken2009-06-291-2/+0
| | | | | | These variables are never used. Reviewed-by: TrustMe
* Always turn on shadows for Cocoa.Norwegian Rock Cat2009-06-291-2/+1
| | | | | | | | | | | | Frameless windows wouldn't get shadows in Cocoa, which they do in Carbon. You can argue over who is more correct, but the fact is they can't be inconsistent. Since Cocoa is the newcomer, I'm bending that. Though it would seem useful to have an ability to provide some developer control over the shadow. At the moment, the only thing we have to ensure is that we always turn on the shadow. Task-number: 254725 Reviewed-by: Denis
* Fix crash/artifacts on SuperHTom Cooksey2009-06-291-3/+3
| | | | | | | | | | | Add SuperH to the ever growing list of architectures which can't correctly dereference a short* which is not 16-bit aligned. Turning this into a white-list rather than a black list might make sense at some point, but as QT_ARCH_I386 isn't defined on windows, the white list looks even uglier at the moment. :-) Task-number: 257077 Reviewed-by: TrustMe
* Fix coverity warningJens Bache-Wiig2009-06-291-2/+1
| | | | | | | | Coverity was complaining because we were not checking the return value of find() but instead using the pixmap handle to check the result. This makes the call more consistent Reviewed-by: mgoetz
* Fix painting errors in QScrollArea on Mac (Carbon)Morten Sørvig2009-06-261-2/+2
| | | | | | | | | | | | | | | This is mainly a stop-gap solution for 4.5.x. It trades painting performance for correct painting. Commit 7988d05da changed the opaque test from q->testAttribute(Qt::WA_OpaquePaintEvent) to qt_widget_private(w)->isOpaque in qt_mac_update_widget_posisiton. This means we'll do optimized moves in more cases. Unfortunately it also causes painting errors in some cases (see the task). Revert the commit for now to put the 4.5 branch in a god shape. Task-number: 252295 Reviewed-by: nrc
* Fixed cap and join styles when printing to native Windows printers.Trond Kjernaasen2009-06-261-1/+19
| | | | | | | | Line and polygon strokes did not respect the join/cap styles set on a painter. Task-number: 256914 Reviewed-by: Samuel
* QColorDialog: Fix setting of alpha valuesMarkus Goetz2009-06-241-1/+1
| | | | | | | | | When alpha was changed and then another color was picked in the GUI still the old alpha remained (good) but it was not returned in the returned color (bad). Task-number: 256164 Reviewed-by: jasplin
* Compile.Norwegian Rock Cat2009-06-231-1/+1
| | | | Mismatch in preprocessor my previous commit.
* Recognize | as separator characterThorbjørn Lindeijer2009-06-231-0/+1
| | | | Reviewed-by: mae
* Remove some warnings in the Cocoa build.Norwegian Rock Cat2009-06-2313-48/+113
| | | | | | | | | | After discussing with some of the Objective-C people I have finally got a fair number of the warnings to disappear in both 10.5 and 10.6. I also took the opportunity to remove a bunch of other warnings. Reviewed by: Morten Sørvig
* Added QPen warning when setting dash pattern with non-positive entries.Samuel Rødal2009-06-231-2/+2
| | | | | Task-number: 256720 Reviewed-by: Trond
* Improve text drawing quality with CarbonSimon Hausmann2009-06-231-5/+0
| | | | | | | Re-enable fractional coordinates for text output, to produce the same output as regular Carbon/ATSUI applications. Reviewed-by: Norwegian Rock Cat <qt-info@nokia.com>
* Prevented QWizard from crashing upon removing a page after deleting a field ↵jasplin2009-06-222-0/+26
| | | | | | | | | | | | | object. QWizard crashed when removing a page after deleting an object that was already registered as a field for the page. This patch prevents such a crash by doing the necessary cleanup immediately when the object is deleted. QWizard::removePage() will then see a consistent state in this case. Reviewed-by: janarve Task-number: 255350
* Check for null pointer in QGraphicsProxyWidget::event() in case there is no ↵Marius Bugge Monsen2009-06-221-1/+1
| | | | | | | focusWidget(). Reviewed-by: Thierry Task-number: 255468
* Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5Marius Bugge Monsen2009-06-221-1/+4
|\
| * Moving a child widget right after show() does not work as expected.Bjørn Erik Nilsen2009-06-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that we did an accelerated move, i.e. scrolled the widget's contents in the backing store and repainted the old area. We cannot do this trick when the widget has been invalidated (show(), resize()). In this case the widget had never been painted, so we basically scrolled the content of its parent and the widget itself appeared as invisible. Auto-test included. Task-number: 255117 Reviewed-by: Paul
* | Check if the row larger or equal to the flowPositions vector to prevent out ↵Marius Bugge Monsen2009-06-221-1/+1
|/ | | | | | | | | of bounds access. This problem is encountered if a model doesn't report it's changes correctly. Reviewed-by: Thierry Task-number: 256617
* Fixed wrong painting when doing IntersectClip after setClipping(false).Samuel Rødal2009-06-222-11/+14
| | | | | | | | | | The documentation is a bit ambiguous on what the expected behavior here is, but the behavior was consistent across paint engines before 4.5. QPaintEngineEx introduced inconsistencies in the raster and OpenGL paint engines, so this patch reverts the behavior back to what it was in 4.4. Task-number: 256549 Reviewed-by: Trond
* QItemEditorFactory: made sure the ownership is taken on theThierry Bastian2009-06-181-2/+14
| | | | | | | | | | QItemEditorCreator The creators were not deleted i nthe destructor of QItemEditorFactory and they could not be safely used for more than one type. Task-number: 228255 Reviewed-by: jasplin
* Made QInputDialog::getText() return null QString when rejectedStian Sandvik Thomassen2009-06-181-3/+3
| | | | | | | | | | | | This reverts a behavior change introduced with Qt 4.5.0 where QInputDialog::getText() returned the line edit's text when the dialog was rejected. However, the behavior since Qt 4.0 has been to return a null QString when the dialog is rejected. Task-number: 256299 Reviewed-by: Andy Shaw
* Fixed bugs in QPainterPath::united().Samuel Rødal2009-06-171-27/+42
| | | | | | | | | | Change from a relative to an absolute fuzzy compare as was the case pre-4.4. With a relative fuzzy compare points that have an x or y coordinate of 0 will never be merged with points that are very close to 0, for example (1e-15, 0). Task-number: 251909 Reviewed-by: Trond
* Fixed segmentation fault caused by empty clip.Samuel Rødal2009-06-172-2/+2
| | | | | | | | Make sure not to use the broken QRect constructor, and do an early check on whether the clip rect is empty in QRasterizer::rasterizeLine(). Task-number: 254105 Reviewed-by: Trond
* ItemViews : Fixed a performance regression whne changing data in theThierry Bastian2009-06-171-1/+1
| | | | | | | | | | model This is a part of a bigger patch from 4.6 90cdbf8bd409652fd1e28adcd7f02fc1fae2c1c0 Task-number: 256183 Reviewed-by: ogoffart
* Fixed a bottleneck in itemviews that would ask for an update outsideThierry Bastian2009-06-171-2/+8
| | | | | | | | | | of the boundaries of the viewport. Now we catch this and don't call update. This was a performance regression against 4.4. Task-number: 256183 Reviewed-by: alexis
* Cleanup our usage of the term "Qt Software".Jason McDonald2009-06-161-3/+3
| | | | Reviewed-by: Trust Me
* Update license headers as requested by the marketing department.Jason McDonald2009-06-16979-1956/+1956
| | | | Reviewed-by: Trust Me
* Improved styling of expander arrows with Gtk+Jens Bache-Wiig2009-06-161-9/+6
| | | | | | | | | | | | | The current implementation was based on the GtkExpander widget. However we do not have such a widget and the primary use case is for expanders inside item views. Hence it makes sense to base it on gtktreeview instead. As I can not reproduce the crash with any recent versions of cleanice I will remove the workaround as well. omment and edit as applicable ]---| Task-number: 256146 Reviewed-by: Thorbjørn
* Prevented QCompleter popup from appearing briefly on Windows.jasplin2009-06-161-1/+5
| | | | | | | | | | | | It turns out that the fix 7bf4512659113f8cc78e72f1c84158ce4f70a526 caused the QCompleter popup from appearing for a split second on Windows. This is because the popup is shown as a toplevel window on this platform. On other platforms than Mac and Windows it doesn't seem to matter, but be on the safe side, the fix is modified to apply for Mac only. Reviewed-by: Daniel Molkentin Task-number: 255374
* Rename nsCursorForQCursor -> qt_mac_nsCursorForQCursor.Morten Sørvig2009-06-154-4/+4
| | | | Reviewed-by: Richard Moe Gustavsen
* Fixed problems with the event handling in QCompleter on Mac.jasplin2009-06-121-1/+1
| | | | | | | | | | On Mac, a new completer popup must initially have its show() method called rather than its hide() method. Otherwise the event handling done by the completer results in a bad state. On other platforms it doesn't matter. Reviewed-by: Richard Moe Gustavsen Task-number: 255374
* QGraphicsItem::setOpacity(0.0) does not trigger an update of child itemsLeonardo Sobral Cunha2009-06-121-1/+1
| | | | | | | | Forwarding the ignoreOpacity flag to children in QGraphicsItemPrivate::fullUpdateHelper. This is a complementary fix to task 252913, partly fixed in commit 2e3a5ea44... Reviewed-by: bnilsen BT: yes
* Copy-paste didn't work for application on non-first screen in multiscreen setup.Denis Dzyubenko2009-06-112-8/+14
| | | | | | | | | | | | We need to subscribe to xfixes selection notify events on all available screens. Also implemented delayed subscription to xfixes events since we don't really need clipboard change notifications unless the application explicitely asked for by (i.e. created a qclipboard object). Task-number: 255609 Reviewed-by: Bradley T. Hughes
* Doc fix: add a link to focus() and focusWidget() from QWidget::setFocus ↵Denis Dzyubenko2009-06-111-2/+2
| | | | | | documentation. Reviewed-by: TrustMe