summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Mac: Fixes a crash in tst_QWidget::updateOnDestroyedSignalBjoern Erik Nilsen2009-04-291-0/+3
| | | | | | | | | | Addendum to change 9b674ddcea7c0ff7912f185474b7d98bc83bd39f. The problem was that QWidget::paintEngine() (pure virtual) was called while being in the destructor. The use-case itself (see above change) is very very corner case, but still, it shouldn't crash. Reviewed-by: bnilsen
* Fix documentation about native dialogsAlexis Menard2009-04-281-4/+3
| | | | | | It basically says that on KDE and GNOME the native dialogs are called. It fix a mistake about a regular instantiation on QFileDialog object on Windows.
* Fix regression in QSelectionModel::rowIntersectsSelectionOlivier Goffart2009-04-281-10/+10
| | | | | | | | | | and QSelectionModel::columnsIntersectsSelection The documentation says "if one is selected" inside the row/column, so we need to look over if we find one which is selected Task-number: 252069 Reviewed-by: Marius Bugge Monsen
* Don't send extra events when using the scroll wheel in CocoaNorwegian Rock Cat2009-04-281-2/+2
| | | | | | | | Argh! Copy and paste is evil, not only was the test was wrong, We sent the event twice and the second time we sent the wrong value. Task-number: 250668 Reviewed-by: Morten Sørvig
* Cocoa: qwidget auto test fails (windowMoveResize)Richard Moe Gustavsen2009-04-282-11/+31
| | | | | | | | | | | | The test fails because, in cocoa, when resizing a window to zero (either w or h), cocoa will also move the window up in the corner (!). So the fix is to issue an extra move back to it's true location after the resize. The faulty cocoa move is issued inside the resize callback, so we choose to not update the window location anymore from a pure resize callback. Task-number: 251895 Reviewed-by: Trenton Schulz
* Fixed showing messageboxes on small screens.Denis Dzyubenko2009-04-281-0/+3
| | | | | | | | On small screens use the whole screen width when adjusting the size of the messagebox. Task-number: 251925 Reviewed-by: Brad
* Fixed rendering of bitmap fonts on X11 with Xrender and fontconfig.Trond Kjernåsen2009-04-281-1/+3
| | | | | | | | It seems the Xrender PictStandardA1 mask format doesn't work with XLFD bitmap fonts wrapped in a fontconfig structure. Task-number: 252328 Reviewed-by: Samuel
* Fix a crash with a proxy model applied on the QFileDialog.Alexis Menard2009-04-281-1/+1
| | | | | | | | | | | | | | | The problem was located in _q_enterDirectory, this method take a QModelIndex that can be a model index from the treeview/listview (so it comes from the proxy that is applied) and from the side bar where there is always no proxy applied. Previously we were trying to convert from a proxy index to a source index the value that come from the sidebar which is already a source model index. Now, we just check if the model index is coming from the proxy and in that case we convert it otherwise this model index come from the source. Task-number: 252068 Reviewed-by: jasplin Reviewed-by: ogoffart
* When minimizing/restoring an item view it could jump to its currentlyThierry Bastian2009-04-281-1/+1
| | | | | | | selected item Task-number: 250446 Reviewed-by: ogoffart
* Fixes wrong QPaintEvent::region() in QGLWidget::paintEvent.Bjoern Erik Nilsen2009-04-273-2/+11
| | | | | | | | | | | | | | QGLWidget does not support partial updates unless the context is single buffered and auto-fill background is disabled. The problem was that QPaintEvent::region() returned the requested update region without taking into account the limitation of QGLWidget. If QGLWidget doesn't support partial updates, it means everything has to be updated, and QPaintEvent::region() must return the whole widget rect. Auto test included. Task-number: 241785 Reviewed-by: Trond
* QPixmapCache:Remove the old pixmap if you insert one with the same key.Alexis Menard2009-04-271-0/+5
| | | | | | | | | | | If you insert a new pixmap in the cache with a key that was already in the cache then we remove the old pixmap and add the new one. This avoid to fill the memory with garbage even if the cache has a protection to avoid running out of memory. This was discovered with QraphicsView and its cache. We don't need to keep old cached pixmaps for an item. Task-number: KDE Reviewed-by: Trond
* Doc - cleaning up some documentation for QFileDialog and obsoleteKavindra Devi Palaraja2009-04-271-134/+129
| | | | | | | | | | | documentation. getOpenFileNames() and getExistingDirectory() mentioned that the dir parameter was ignored. This is no longer the case. This bit was reviewed by nrc, the other fixes were just cleanups. Task-number: 252223 Reviewed-by: nrc
* Ensure that QFontDialog::getFont() works on Mac OS X.Norwegian Rock Cat2009-04-271-40/+27
| | | | | | | | | | It seems that running the font dialog modal means that the "fontChanged" action is not fired. Which means our font is never changed. Thankfully, since it's an app modal case, we can re-sync when the OK button is clicked. Task-number: 252000 Reviewed-by: Morten Sørvig
* 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-243-11/+16
| | | | | | | | | | | | | | | | | | 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
* Fix clipping bug in raster paint engineGunnar Sletta2009-04-241-0/+14
| | | | | | | | | If we have a rect-clip where we actually had spans (used for cleartype) and then reused that clipdata, we would never re-create the spans, which would mean that future drawing would be filtered based on the old clip Reviewed-by: Samuel
* 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
* Show filter extensions in the GTK file dialog if no name is providedJens Bache-Wiig2009-04-221-2/+2
| | | | | | | | | | | In the GTK+ file dialog filters are only represented by names such as "All files", while the actual extensions are hidden. You can create a filter without a name in Qt however so in this case we have to fall back to showing the file extensions instead. Task-number: 251928 Reviewed-by: rosch
* 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
* Prevent QTransform::type() from returning TxScale instead of TxProject.Samuel Rødal2009-04-221-2/+2
| | | | | | | | We have code that assumes that m33 = 1 if the type is TxScale. Instead of changing all that code it's better to just return TxProject as type when m33 is different from 1. Reviewed-by: Simon Hausmann
* QGtkStyle: Fix broken transparency on line edits in ClearlooksJens Bache-Wiig2009-04-221-2/+3
| | | | | | | | | This basically uses a workaround to hint to our gtk theme that we do not want it to fill our line edit backgrouns with the background brush. This was suggested by Benjamin berg. More information can be found here: https://bugzilla.mozilla.org/show_bug.cgi?id=405421 Reviewed-by: Tor Arne
* Fix QPrinter::pageRect() for Windows printers, when fullPage() is set.Trond Kjernåsen2009-04-221-1/+1
| | | | | | | | | When QPrinter::fullPage() was set, pageRect() returned the same as paperRect(). Under Windows, there is always a non-printable area that was not taken into account in the fullPage() case. Task-number: 248881 Reviewed-by: Kim
* Doc fixesJoão Abecasis2009-04-221-2/+3
| | | | Reviewed-by: Thiago
* Fix Transformed driver on 8-bit displaysPaul Olav Tvete2009-04-223-1/+5
| | | | | Task-number: 250971 Reviewed-by: Tom
* Fix crash in drawPixmap when painting on a null pixmapSamuel Rødal2009-04-221-3/+3
| | | | | | We need to check if the engine is null before we do the thread test. Reviewed-by: Thiago
* Fix double entries in the sidebar of QFileDialogAlexis Menard2009-04-221-0/+4
| | | | | | | | | The problem is QUrl == operator is case sensitive. On Windows we don't want double entries for C:\dev or c:\dev so i convert the url in lower case and compare them (on Windows only) to avoid duplicate entries. Task-number:226483 Reviewed-by:jasplin
* BT: Revert "Fixes: Don't fill the pixmap because we will copy the cache ↵Andreas Aardal Hanssen2009-04-211-1/+3
| | | | | | | | | | | | | | | into it." This reverts commit 0985805ab3c7de5b15c115a98afb15944b6d93b9. The Elastic Nodes example shows a black background for the cache pixmap if the call to fill isn't there. Alexis and I both agree that it makes no sense that we fill the pixmap with transparent pixels instead of just drawing with QPainter::CompositionMode_Source, but since this regression was introduced after 4.5.0 was released we must revert before we investigate further. Reviewed-by: Alexis
* BT: Fix update regression for cached QGraphicsItem (Elastic Nodes stuck)Andreas Aardal Hanssen2009-04-211-1/+13
| | | | | | | | | | | | | | | | | | | This fixes a bug in 4.5.0 where cached items that call update() after they have been moved or transformed failed to get a call to paint(), so the last cache image was used to draw. The easiest way to reproduce this bug is in the Elastic Nodes example. If you press, wait, then release, the nodes will consistently move to sunken state, then back to normal state. But if you click quickly while moving the mouse, the nodes will stay sunken. The bug was that the item was marked as dirty as a result of being moved, and when the mouse button was released, the node item's call to update() was discarded, as the item was "already dirty". The fix is to allow invalidation of the cache even if the item is marked as dirty. Reviewed-by: bnilsen
* BT: Make things work on 10.3Norwegian Rock Cat2009-04-211-1/+1
| | | | | | The #ifdef was typed wrong. Reviewed-by: Prasanth Ullattil
* We don't need to call two times itemChange when an item is deleted.Alexis Menard2009-04-211-6/+0
| | | | | | | | | Previously we were calling two times itemChange on the parent to give QGraphicsItem::ItemChildAddedChange. We don't need that. One is enough. BT : yes Task-number: BT Reviewed-by: Andreas
* Fix a problem where QPrintDialog/Unix didn't update print-to-file states.Trond Kjernåsen2009-04-211-1/+3
| | | | | | | | | Setting a QPrinter to print to e.g. a PDF file and then passing the QPrinter object to a QPrintDialog didn't update the printer combobox and filename lineedit states correctly. Task-number: 224728 Reviewed-by: Samuel
* Fix non-opaque text from widget palette being blitted, not blended.Samuel Rødal2009-04-211-1/+3
| | | | | | | | | | | | QPainter inherits some properties from the widget, among other font and pen. These are set in the painter's state in initFrom(), but in 4.5 we forgot to call QPaintEngineEx::penChanged() to let an extended paint engine know that the pen has changed. This caused the raster engine to believe it could blit non-opaque text, due to the fast_text flag not being correctly updated. Task-number: 251534 Reviewed-by: Paul
* There is no way to delete a invalid entry in the sidebar of QFileDialog.Alexis Menard2009-04-212-4/+30
| | | | | | | | | | | We can't remove an item in the sidebar if the bookmark is not valid (i.e. link to a non existing directory). ItemViews doesn't allow you to have disabled items and to select them at the same time, so i have implemented a delegate that paint in gray if the bookmark is invalid. So you can click on it and delete it. Task-number: 251341 Reviewed-by: jasplin
* Fix a bug in QFileDialog sidebar when the bookmark has an hidden parentAlexis Menard2009-04-212-1/+6
| | | | | | | | | | | If the bookmark in the sidebar has an hidden parent and the QFileDialog is set up to not show hidden files, then clicking on the bookmark move the current dir to root (like if the bookmark was invalid) instead of entering in the dir. The fix was to fetch the parent dir and the bookmark dir when the user select it in the sidebar. Task-number: 251321 Reviewed-by: jasplin
* Fix tabbar issues with Oxygen styleJens Bache-Wiig2009-04-201-32/+41
| | | | | | | | | | | | | | | | | Oxygen style was looking a bit broken when using 4.5 features such as close buttons and icons. This was because it re-implements the tabbartablabel primitive we needed to ensure spacing for the buttons. We had to modify the way we draw tabs slightly to make it more backward compatible so that oxygen get the same region as before and we ensure space for it in the CE_TabBarTab case instead. Note that the drawback to this approach is that the focus rect needs to be moved out of the tablabel and into the CE_TabBarTab case so it covers the entire tab which can potentially cause problems if people depend on the label to draw the focus rect. However the new case is also more consistent with how buttons draw their focus. Task-number: 251635 Reviewed-by: nrc
* 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
|
* This fix a bug on the QFileSystemModel with a custom icon providerAlexis Menard2009-04-202-2/+12
| | | | | | | | | | | We were calling the provider with invalid path, with the default one it fallback to all standard icons but with a custom one we call a public method with an invalid QFileInfo. It was happening on windows only for the My Drives view because in that case the parent path is null, my Drives is a logical view. Task-number: 251295 Reviewed-by: jasplin
* Properly support the "prefer antialias" font styleGunnar Sletta2009-04-201-3/+9
| | | | | | | | | | Since the introduction of the texture glyph cache we rendered these fonts as 8-bit gray masks which looked bad and cut off a few pixels for thin glyphs. Changed the preferred format of the font engine to be Raster_RGBMask. Task-number: 248141 Reviewed-by: Eskil B
* Get rid of compiler warning.jasplin2009-04-201-1/+1
| | | | Reviewed-by: TrustMe
* BT: Update text of About Qt dialogJason McDonald2009-04-201-0/+1
| | | | | | Add Copyright message as requested by Legal, and update .ts files again. Reviewed-by: Trust Me
* Ifdef out the QWS blend functions for less common bitdephts by defaultGunnar Sletta2009-04-201-45/+45
| | | | | | | | ARGB32_PM, RGB32, ARGB8565_PM and RGB16 are optimizied elsewhere and they are the most important formats. The implemenentation of several of these depths are also buggy, so one can question their relevance. Reviewed-by: Samuel
* Make the 32-bit ARGBPM on 16-bit RGB blend function fasterGunnar Sletta2009-04-201-101/+33
| | | | | | | The "optimized" version of this function was actually slower by quite a bit, so revert it to the old "trivial" code. Reviewed-by: Samuel
* Fix drawhelper pixel-writeback when dest has alpha.Gunnar Sletta2009-04-201-1/+1
| | | | | | | | The blending always happens in 32-bit premultiplied so the conversion back to dest-format needs to base itself on premlutiplied too. Task-number: 182246 Reviewed-by: Samuel
* Fix ARGB24PM->RGB16 for i386 GCCGunnar Sletta2009-04-201-20/+1
| | | | | | | | | | There was special code for gcc to run super-fast, but it was buggy and didn't blend properly. Kill this code for the benefit of the normal blend function. The performance on an Intel Quad Core 2 was not too different from the bytemul approach. Task-number: 246009 Reviewed-by: Trond