summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Document what QWidget::winId() returns on Mac OS X.Norwegian Rock Cat2009-04-271-0/+4
| | | | | | | | There are different types depending on Carbon and Cocoa, and it is probably helpful to point that out. Task-number: 251001 Reviewed-by: Kavindra
* Sometimes wrong clipping in QWidget::render() when passing a device orBjoern Erik Nilsen2009-04-241-4/+7
| | | | | | | | | | | | | | | | | | an untransformed painter When passing a painter to QWidget::render, we use the painter->paintEngine()->systemClip() as the "system viewport", i.e. all painting triggered by render() should be limited to this area. The only way to achieve this is by always ensuring the system clip is clipped to the same area (systemClip &= systemViewport). The problem however, was that we only did this for transformed painters. We must of course always do it when there's a systemViewport set, regardless of whether the painter is transformed or not. Auto test included. Task-number: 248852 Reviewed-by: Trond
* Drag and drop examples not working correctly in CocoaPrasanth Ullattil2009-04-243-27/+62
| | | | | | | | | | | In the updated examples, the drag operation is changed in the drop-event handler, which was not handled correctly in the Cocoa. This is now supported for drag and drop from same application. If the drop was to another application, the drag will return the result from the last drag-move event. Task-number: 252103 Reviewed-by: nrc
* Revert "Removed dead code."jasplin2009-04-231-0/+2
| | | | | This reverts commit 99d243860548d6be8a68dfd027c51530351d12cb. Needed because of commit b51dd5a7b328291c5dbda540ce228e7d867662cb.
* Revert "Fixed key sequence eating behavior for QShortcut and QAction."jasplin2009-04-234-50/+27
| | | | | | | | | | | This reverts commit 031adeaf42ddaef8d01338f6c59ba97170be5d53. The patch had some unforeseen side-effects for Creator. It may also affect other existing applications in a similar way. For now, this behavior (eating key sequences for disabled shortcuts) should be achieved using a local workaround in creator. Reviewed-by: mariusSO Task-number: 251246
* Disable MIT-SHM usage on BGR server layouts under X11.Trond Kjernåsen2009-04-231-6/+12
| | | | | | | | Since the raster engine always assumes RGB layout in a QImage, we can't support this out of the box. Task-number: 248720 Reviewed-by: Samuel
* Carbon/Cocoa: It is possible to resize a widget above its maximum sizeRichard Moe Gustavsen2009-04-232-39/+50
| | | | | | | | | | This is not strange since we never did anything to limit a resize within the max min boundries. This patch factores out the code that ensures this into a private function that is called both as a reaction to a resize event, but also if resize is done programatically. Task-number: 251893 Reviewed-by: Trenton Schulz
* Removed dead code.jasplin2009-04-231-2/+0
| | | | Reviewed-by: TrustMe
* Don't emit QApplication::focusChanged for no reasonThorbjørn Lindeijer2009-04-221-1/+1
| | | | | | | | | | | | | | | | The Qt::NoFocusReason is used when Qt temporarily moves the focus to the QMenuBar while switching from one widget to another. While this did not result in a QFocusEvent, it did result in emitting the QApplication::focusChanged signal. This in turn caused a slowness in Qt Creator, since it wanted to update the current context and find filter. The fix here makes sure the focusChanged signal is not emitted when the focus reason is Qt::NoFocusReason, since these focus changes are not interesting for the application. Reviewed-by: mae
* Doc fixesJoão Abecasis2009-04-221-2/+3
| | | | Reviewed-by: Thiago
* BT: Make things work on 10.3Norwegian Rock Cat2009-04-211-1/+1
| | | | | | The #ifdef was typed wrong. Reviewed-by: Prasanth Ullattil
* Fixed key sequence eating behavior for QShortcut and QAction.jasplin2009-04-204-27/+50
| | | | | | | | | | | | | | | | | | A disabled QShortcut should eat its key sequence even for complex sequences like "Ctrl-E 1". For example, a line edit with such a shortcut should not display 1 after typing "Ctrl-E" and then "1". The patch achieves this essentially by moving more of the decision making (of whether to eat the key secuence) from shortcutmap.cpp to qhortcut.cpp. Moreover, an invisible QAction should not eat any of its key sequences (primary nor alternates). In the example above, the line edit would display 1 when typing this sequence for an invisible action. The patch achieves this by temporarily unregistering all of the action's shortcuts while the action is invisible. Reviewed-by: mariusSO Task-number: 251246
* Fixed incorrect documentation.axis2009-04-201-3/+4
|
* BT: Fix a crash when using Q(File)Dialog::open() in QCocoa.Norwegian Rock Cat2009-04-201-1/+4
| | | | | | | | If we don't have a sheet, we need to recreate it in Cocoa. Unfortunately, we neglected to reassign the NSWindow pointer in that case, so the program would crash. Reviewed-by: Richard Moe Gustavsen
* Line edit displays garbage when pressing up or down arrow keys (Cocoa).Prasanth Ullattil2009-04-171-1/+4
| | | | | | | | | The unicode characters between 0xF700 & 0xF8FF are special function-key code characters used by the NSEvent. These characters have to be ignored when converting to a QString. Task-number:244486 Reviewed-by:nrc
* BT:Stop widgets disappearing in unified when clicking the toolbar buttonNorwegian Rock Cat2009-04-161-1/+12
| | | | | | | | | | | | | | The comment in the code pretty much says it all, so I'll repeat it: This is a workaround for NSToolbar. When a widget is hidden by clicking the toolbar button, Cocoa reparents the widgets to another window (but Qt doesn't know about it). When we start showing them, it reparents back, but at this point it's window is nil, but the window it's being brought into (the Qt one) is for sure created. This stops the hierarchy moving under our feet. Task-number: 251294 Reviewed-by: Prasanth Ullattil
* Remove some warningsNorwegian Rock Cat2009-04-161-2/+2
| | | | These aren't used in Carbon, so don't reference them.
* Fix a bug that made it hard to click the top items in a list widgetNorwegian Rock Cat2009-04-161-2/+2
| | | | | | | | | | Our "view under tranparent view" function was sound, but it didn't take into consideration that fact that views in the hierarchy could be hidden. This is most prominent when you have a QFocusFrame over a QAbstractScrollArea. Task-number: 251008 Reviewed-by: Morten Sørvig
* Fixed titlebar on X11 for fixed size windows with Qt::CustomizeWindowHintDenis Dzyubenko2009-04-161-1/+3
| | | | | Task-number: 250326 Reviewed-by: Brad
* QX11Embed crashes on 64-bit SolarisBradley T. Hughes2009-04-161-4/+3
| | | | | | | | The data passed to XChangeProperty should be long arrays, as this is what Xlib expects. Task-number: 244062 Reviewed-by: Rhys Weatherley
* BT: Namespace compile fixes for Cocoa.Norwegian Rock Cat2009-04-152-6/+9
| | | | 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
* 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.
* 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
* BT: Fix up comments in new Cocoa files.Norwegian Rock Cat2009-04-085-55/+55
| | | | | | 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: 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
* 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: Fix regression when tooltips dissappear suddenly in Unified toolbarNorwegian Rock Cat2009-04-073-2/+37
| | | | | | | | | | | | | | | | | | | QWidget::childAt() makes some assumptions about its children (they are all contained in its geometry). This does not hold up when using the unified toolbar because the toolbar ends up in the "non-client" area. So, when dispatching an enter/leave event in tooltip show, we end up dispatching to the wrong widgets and that results in the tooltip cleverly thinking that it needs to hide itself because we've left the widget that needs the tooltip. I've special cased this by just having a "native" mapFromParent() that is only called for on the mac, though there is nothing that is limiting this from being called on other platfroms. Also QWidget::mapFromParent() probably needs to be looked at at some point. Task-number: 248048 Reviewed-by: Richard Moe Gustavsen
* Fixes: Calling repaint() during a top-level resizeGunnar Sletta2009-04-071-10/+14
| | | | | | | | | RevBy: bnilsen Task: 249394 Details: When going through the backingstore a repaint in a toplevel resize should just discard the repaint() as it will repaint shortly after anyway. This is in line with the implementation of update().
* BT: Fix combobox background color regressionJens Bache-Wiig2009-04-061-2/+4
| | | | | | | | | There was a regression in the background color for QComboBox popups. This should resolve it. It essentially tells the system to stay off the system palette while QGtkStyle is used. We will introduce a cleaner style hint for this in 4.6. Reviewed-by: nrc
* BT: Fix a crash when running a widget window modal when it has no parentNorwegian Rock Cat2009-04-061-7/+5
| | | | | | | | We changed the logic for determining sheets, but it seems we forgot to take the parentWidget() into account. It's required for WindowModality to make any sense. Reviewed-by: Richard Moe Gustavsen
* Fix up color matching on 64-bit Cocoa.Norwegian Rock Cat2009-04-061-7/+38
| | | | | | | | | | | | | | | | It seems that GetThemeTextColor is not available at all for 64-bit versions of the operating system and there is no good equivalent. We were using a technique where we would create a small pixmap and then use HIThemeSetTextFillColor() with the proper enum. However, this function will silently set a black color if it doesn't know about the enum. So, we get black when we really shouldn't. It also seems to produce colors that are a bit different from the Carbon function. So, in the meantime, just hard code the values in. It might break if you are hacking the resources in Mac OS X, but we'll have to live with that until we get a real function. Task-number: 248918 Reviewed-by: Prasanth Ullattil
* QGtkStyle: Fix styling and palette issues related to combo boxJens Bache-Wiig2009-04-031-2/+5
| | | | | | | | | | | | | | | | | | | | | | Well actually this change is a bit bigger than just that. *We no longer override the palette you provide in polish so it should be a bit more frienly toward custom application changes. * Another issue was that we would generate the palette information when we got the style callback from gtkButton but then the line edits might not yet have been polished. Hence we now return from the callback and instead post the update for later. * We had to modify the PE_Frame entry to draw a raised menu when the custom combo box delegate was used. * We now simply ignore custom qtconfig palette entries when using GtkStyle since they only cause trouble with it. Task-number: 250142 Reviewed-by: nrc
* Do not loose WindowType flags when setting translucent background in X11Olivier Goffart2009-04-031-1/+1
| | | | | | | | This fixes KRunner on XMonad. The Qt::Dialog flag of the krunner dialog was lost when the Qt::WA_TranslucentBackground was set, leading to incorrect behaviour in some window manager (such as xmonad) Reviewed-by: Samuel
* Only set system style when it actually changesJens Bache-Wiig2009-04-021-1/+5
| | | | | | | | | | | This issue would cause Qt Creator and similar apps with proxy styles to loose their custom styling whenever any x11 system settings changed. This happened because we would re-read the settings and override the system style even if the system style did not actually change would be set on the application. We Task-number: 250199 Reviewed-by: ogoffart
* Marked QWidget::resetInputContext() function as obsolete.Denis Dzyubenko2009-04-011-4/+8
| | | | | | | | | Fixed the behavior of the function that was broken by me some time ago. But anyway this function is for convenience only since QInputContext that operates on the widget is available to the user directly. Reviewed-by: Prasanth Ullattil
* Removed obsolete internal function that focuses input context.Denis Dzyubenko2009-04-013-25/+0
| | | | Reviewed-by: TrustMe
* QComboBox with Qt::NoFocus triggers a crash.Prasanth Ullattil2009-04-011-3/+7
| | | | | | | | | The showPopup() from a combobox triggers a crash. This happens only for a combobox which dosen't accept focus and it has been recreated. This is due to some invalid widget pointer stored in the input context. Task-number: 249576 Reviewed-by: ddenis
* Don't send QFileOpenEvents for items on the command-lineNorwegian Rock Cat2009-03-302-4/+21
| | | | | | | | | | | | | | | | | | | | Cocoa actually has a nice feature that if you pass arguments on the command-line, Cocoa will pass those along as Open events later. This is probably how we should have handled things inside of Qt as it would have unified the file opening code. Unfortunately, we can't turn back time on this, so we need to prevent it because people probably aren't expecting it (i.e., they expect to do the parsing themselves, and not to get events later). This also means that we can send the event immediately instead of posting it, because the race that we had before no longer exists. We only do this check during launch time because that's the only time we may get bitten by it (people usually only parse the arguments once). Someday, people may actually WANT this functionality though. When that comes along, we should make it an application attribute. Task-number: 249553 Reviewed-by: Richard Moe Gustavsen
* QDesktopWidget::resized wasn't emitted properly on X11.Denis Dzyubenko2009-03-271-6/+15
| | | | | | | | | | When the size of one of the screen changes but the geometry of the whole desktop hasn't been changed the resized() signal wasn't emitted. The patch by Lubos Lunak also adds emitting of a signal whenever the screen is turned on or off. Task-number: 226048 Reviewed-by: Brad
* Creating a native window handle doesn't reset input context on X11.Denis Dzyubenko2009-03-271-1/+10
| | | | | | | | When the current focus widget enforces the creation of the native window handle we should reset the input context. Task-number: 249578 Reviewed-by: Brad
* Creating an instance of the QDesktopWidget breaks clipboard on X11.Denis Dzyubenko2009-03-271-2/+9
| | | | | | | | | | | On X11 when user manually creates a QDesktopWidget object it breaks notifications from the root window since we have several QDesktopWidgets that have the same native window id and the wid->qwidget mapper (QWidgetPrivate::mapper) goes crazy. So whenever we get x11 event from the root window we cannot find a qwidget that corresponds to the window id and discard these events. Reviewed-by: Brad
* Fix a bug where lineedits in a second page of a stack widget would not get ↵Norwegian Rock Cat2009-03-263-1/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | key events. We need to be more explicit in setting the first responder, and a bit more agressing about rejecting it when called with no responder. It seems that Cocoa has a tendency to reset the first responder when lots of widgets get hidden or shown. During this it will call "makeFirstResponder" on the window with a nil responder. Doing this will reset our what Cocoa thinks is the focus widget, but Qt will still show a focus widget. The way to solve it is to reject the make first responder if the responder is nil. I'm not sure if there will be far reaching implications for this, but it seems to be doing the right thing at the moment. We also need to share this code between QCocoaWindow and QCocoaPanel. Thanks to the dynamic nature of objective-C we have to have a copy of the code in both places. It's unfortunate. Finally, it's also important to have the QWidget let Cocoa know it has focus after it has been created. So, make sure that is in sync. Task-number: 249296 Reviewed-by: Prasanth Ullattil
* Doc - removed a trailing whitespaceKavindra Devi Palaraja2009-03-251-1/+1
| | | | | Task-number: None Reviewed-by: TrustMe
* Doc - removed mention of an internal function. Also gave theKavindra Devi Palaraja2009-03-251-973/+918
| | | | | | | | QApplication class and the QSessionManager class a documentation overhaul. Task-number: 249220 Reviewed-by: TrustMe
* Squashed commit of the following:David Boddie2009-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 57ce15b2984cb7ccc4ab0b5dc03812d525d52620 Author: David Boddie <dboddie@trolltech.com> Date: Tue Mar 24 16:55:41 2009 +0100 Removed internal, hidden documentation. Also fixed the language used, slightly. Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> commit 0a81cc2a6dfc98087de92e53d493bed56826642f Merge: 4bd3eca... dd7b1f1... Author: David Boddie <dboddie@trolltech.com> Date: Tue Mar 24 15:24:32 2009 +0100 Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5 commit 4bd3eca8855bb2564e146be4d0a3bba836d20122 Merge: dc789e3... 1d1c52c... Author: David Boddie <dboddie@trolltech.com> Date: Mon Mar 23 19:20:05 2009 +0100 Merge branch 'qt/4.5' of ../qt-45-documentation into 4.5 commit 1d1c52c60995058b61ee35e3970fecc1de3b85b6 Merge: 6c5de23... 381b6cc... Author: David Boddie <dboddie@trolltech.com> Date: Mon Mar 23 19:17:37 2009 +0100 Merge branch 'qt/4.5' of git://scm.dev.nokia.troll.no/qt/qt-45 into qt/4.5 commit 6c5de23611baef3c6be59b94ebd29d901056c2fc Author: David Boddie <dboddie@trolltech.com> Date: Thu Mar 19 18:26:11 2009 +0100 Fixes: Doc: Fixed typo. Reviewed-by: David Boddie <dboddie@trolltech.com> commit 5d710cc183699513b1582507dcb4cddefb91c8ad Author: David Boddie <dboddie@trolltech.com> Date: Thu Mar 19 18:24:31 2009 +0100 Fixes: Doc: Made it clearer what qDebug() actually does. Reviewed-by: David Boddie <dboddie@trolltech.com> commit 1fae0b3b34bf066e2356671a5c6187485b2b587d Author: David Boddie <dboddie@trolltech.com> Date: Thu Mar 19 17:53:09 2009 +0100 Fixes: Doc: Added a note about not modifying the text document in a paint event handler. Task-number: 246550 Reviewed-by: David Boddie <dboddie@trolltech.com> commit 29662d44de9b42d811e60a1b57d871335888373a Author: David Boddie <dboddie@trolltech.com> Date: Thu Mar 19 17:04:07 2009 +0100 Fixes: Doc: Fixed styling of code in this tutorial. Task-number: 247053 Reviewed-by: David Boddie <dboddie@trolltech.com> commit 630c11d6f9f20d5f99bc964efaf4b39daaeb32c4 Author: David Boddie <dboddie@trolltech.com> Date: Thu Mar 19 15:19:24 2009 +0100 Fixes: Doc: Note the use of just the name of a method rather than a complete signature. Task-number: 247857 Reviewed-by: David Boddie <dboddie@trolltech.com>
* Fixes a focusWidget when showing a toplevel that accepts keyboard input.Denis Dzyubenko2009-03-241-1/+3
| | | | | | | | | | When a toplevel window is the widget that can accept keyboard input, it doesn't get focus when shown. The fix is to check if the toplevel is activated and noone has focus, then give focus to the toplevel itself. Reviewed-by: Brad Task-number: 244607
* Handle monochrome CGColors as well.Norwegian Rock Cat2009-03-241-0/+2
| | | | | | | | It seems that snow leopard is storing some colors as grayscale. This means that we need to handle them or otherwise things go very black. It's an easy case to do as well, so just do it. Reviewed-by: Bradley T. Hughes
* Long live Qt 4.5!Lars Knoll2009-03-23155-0/+109156