summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qtSimon Hausmann2009-05-1924-33/+60
|\
| * Ignore GCC warning of unsafe floating point comparisons.Ariya Hidayat2009-05-191-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | Due to optimizations, there are few cases where comparing with a constant is needed, e.g. in operator*=. G++ will give us a warning for this. Since we know what we are doing, surpress the warning. The only drawback for this workaround is if somebody includes qtransform.h in his code and disable the float-equal warning since the warning will be activated again. Reviewed-by: Samuel Rødal
| * Replace all occurences of "heirarchy" with "hierarchy"Andre Haupt2009-05-181-1/+1
| | | | | | | | | | Signed-off-by: Andre Haupt <andre@bitwigglers.org> Reviewed-By: Thiago Macieira
| * Fix some typos in the documentation.Frederik Schwarzer2009-05-1822-28/+28
| | | | | | | | | | | | Usually, "the the" is not proper English Reviewed-By: Thiago Macieira
| * Prevent a crash with brushed metal windows and a qApp style sheetNorwegian Rock Cat2009-05-181-4/+17
| | | | | | | | | | | | | | | | | | | | My great metal hack simply needs to hack more and not do the "extra" assign since I'm doing this through a back door in set attribute. We probably should have had the brushed metal go via an actual QStyle subclass instead of through the attribute. Task-number: 253448 Reviewed-by: ogoffart
* | compile fixes with namespaceshjk2009-05-191-0/+4
| |
* | Merge commit 'origin/4.5'Olivier Goffart2009-05-189-27/+65
|\ \ | |/ | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp src/corelib/kernel/qobject_p.h src/network/access/qhttpnetworkconnection.cpp
| * QCss: font-family handle fallback font specsOlivier Goffart2009-05-181-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | if one specify more than one parameter in font-family, e.g., font-family: Verdana, Arial Qt should fallback on the second font if the first cannot be found. QFont::setFamily handle the case when the family name contains a comas, so we do not need to handle that specially in the css parser code. Task-number: 252311 Reviewed-by: Thomas Zander
| * QCalendarWidget::setDateTextFormat() reset the format is the date is invalidBenjamin Poulain2009-05-181-1/+1
| | | | | | | | | | | | | | | | | | According to the documentation, QCalendarWidget::setDateTextFormat() should reset the format if the date is not valid. New tests included for the formating of this widget. Task-number: 252943 Reviewed-by: Olivier
| * Fixed crash in QWizard running on old Windows systems.jasplin2009-05-183-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | When compiling the QWizard on a Windows system where QT_NO_STYLE_WINDOWSVISTA is not set and running the app on an old system that has no Vista support, the app would crash in the paint event of the Vista Back button. In this scenario, the Vista Back button is not needed (i.e. the regular Back button next to the Next button is used), so the fix is simply to avoid instanciating it altogether. Reviewed-by: janarve Task-number: 252662
| * Fix QSoundServer on Big-Endian machines.Tom Cooksey2009-05-181-7/+33
| | | | | | | | | | Task-number: 253619 Reviewed-by: Paul
| * Fixed a bug which implicitly closed perspective transformed poly lines.Trond Kjernåsen2009-05-181-3/+5
| | | | | | | | | | | | | | | | When the end point of a line in a path is clipped, only closed paths should have the closing line. Task-number: 253663 Reviewed-by: Samuel
| * Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5Geir Vattekar2009-05-1539-511/+626
| |\
| | * Cocoa: Window flickers when resized with a QTabWidgetRichard Moe Gustavsen2009-05-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Seems like we were not using the correct functions for setting the max/min size on a cocoa window. The version we used before included the unified toolbar, which is wrong. The new one does not. Task-number: 252642 Reviewed-by: Trenton Schulz
| * | Doc: Updated description of QMainWindow::unifiedTitleAndToolBarOnMacGeir Vattekar2009-05-151-4/+4
| | | | | | | | | | | | | | | | | | | | | to include info on Cocoa. Task-number: 252658 Reviewed-by: Trenton Schulz
* | | Fix compilation of the cssparser testOlivier Goffart2009-05-181-3/+3
| | | | | | | | | | | | | | | the Q_GUI_EXPORT macro have been removed, but we still need to export the classes for the test
* | | Fixed: No margin between the text and the shortcut in menu with stylesheetOlivier Goffart2009-05-181-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If padding, margin border are set on an menu item with stylesheet, no space appeared between the text and the shortcut. Fix that by adding the 12px space, same as in QCommonStyle equivalent function Note that this patch also remove unused code, since the variable with and height were not used. example to reproduce the bug: the following stylesheet on a mainwindow that contains a menu with one action with a shortcut QMenu::item { border: 1px solid red; } Task-number: 252610 Reveiwed-by: jbache
* | | Fixed regression introduced by fix for Task 177022.jasplin2009-05-181-3/+7
| | | | | | | | | | | | | | | | | | | | | The fix for Task 177022 broke the fix for Task 163334. This commit fixes the regression. Reviewed-by: janarve
* | | Add an extension to QPixmapCache to get rid of strings.Alexis Menard2009-05-187-78/+455
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit add a new API to add/find/remove pixmaps into QPixmapCache. This new extension is based on a key that the cache give you during the insertion. This key is internally a int which makes all operations in the cache much more faster that the string approach. Auto-tests has been extended as well and a benchmark has been added to compare both approach. I also depecrate the find method for the string API to have a method pointer based and not reference based like the Qt policy says. Reviewed-by: bnilsen Reviewed-by: andreas Followed-deeply-by: trond
* | | Graphics View Optimization: Use a simple style option by default.Bjoern Erik Nilsen2009-05-159-168/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QStyleOptionGraphicsItem extends QStyleOption with three values: 1) matrix, 2) levelOfDetail, 3) exposedRect, and they all involve expensive QTranform operations when calculated. We pass style option(s) to drawItems() and paint(), but the extended values are usually not in use. We can therefore gain quite some nice speedup by making them opt-in with the QGraphicsItem::ItemUsesExtendedStyleOption flag. Additionally, QStyleOptionGraphicsItem::levelOfDetail has been obsoleted, and a new function QStyleOptionGraphicsItem:: levelOfDetailFromTransform(const QTransform &) has been added. Me and Andreas don't consider this change to be too controversial even though it changes the behavior. Auto tests still pass. Reviewed-by: Andreas
* | | Merge branch '4.5'Thiago Macieira2009-05-149-55/+22
|\ \ \ | | |/ | |/| | | | | | | Conflicts: tools/macdeployqt/shared/shared.cpp
| * | QColor::toCmyk() does not convert the color if it is already in CMYKBenjamin Poulain2009-05-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | QColor::toCmyk() converted the color to RGB and then to CMYK. If the color was already in CMYK, this conversion change it. The color is now returned directly if it is in CMYK Reviewed-by: Ariya Task-number: 253625
| * | Fixed an issue with text drawing under Windows.Trond Kjernaasen2009-05-142-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some text drawn with OpenType fonts where cut off by a pixel or two under certain circumstances. This adds an additional 2 pixel pad margin to the glyph cache entries. The padding behaves slightly different when ClearType is enabled/disabled, hence the general 2 pixel padding. Task-number: 246196 Reviewed-by: Samuel
| * | Compile.Norwegian Rock Cat2009-05-141-1/+1
| | | | | | | | | | | | | | | | | | Need the proper types. Reviewed-by: Andy
| * | Fixed regression that prevented any widget from having focus when graphics ↵jasplin2009-05-141-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | view was disabled. A bug in Commit d5c018f7b014ab794e49d6e1f24e02233555847d prevented any widget from having focus when QT_NO_GRAPHICSVIEW was defined. This patch fixes the bug. Reviewed-by: bnilsen Task-number: 249589
| * | Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5Andy2009-05-143-28/+10
| |\ \
| | * | Fix QGraphicsItem::deviceTransform() to also work with normal items.Andreas Aardal Hanssen2009-05-143-28/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QGraphicsItem::deviceTransform() returns the item-to-device transform, provided with the device-to-scene transform, and combining it with the item's scene transform. This function is meant to handle items that enable ItemIgnoresTransformations, but it happened to not work properly for items that _don't_ enable that flag. Unfortunately this bug is hard to work around for users from the outside, as it requires you to check if the item or any ancestor enables ItemIgnoresTransformations. The fix also removes unnecessary branchs inside QGV so that we use the same function for all items. Reviewed-by: bnilsen
| * | | Prevent duplicate entries in the sidebar when the paths are the sameAndy2009-05-141-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | If two urls were added to the sidebar that only differed in how they referenced the added url (i.e. /foo/bar/. and /foo/bar) then only one entry should appear. Task-number: 253532 Reviewed-by: Alexis
| * | Sheets misbehaviour on Carbon - Mac OS XRichard Moe Gustavsen2009-05-141-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seems like some old legacy code was left behind when sheets behaved as application modal. This is not the case anymore, so this patch just removes the special case code for enforcing the old behaviour, and let carbon do the correct thing instead. Task-number: 252379 Reviewed-by: Trenton Schulz
| * | Fix broken wince build.Jason McDonald2009-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | The WinCE build was failing due to a spelling error in an #ifdef directive. Reviewed-by: Trust Me
* | | QColor::toCmyk() does not convert the color if it is already in CMYKBenjamin Poulain2009-05-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | QColor::toCmyk() converted the color to RGB and then to CMYK. If the color was already in CMYK, this conversion change it. The color is now returned directly if it is in CMYK Reviewed-by: Ariya Task-number: 253625
* | | Fix QSplitter::setHandleWidth to work with motif styleJens Bache-Wiig2009-05-141-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Motif style was incorrectly adjusting it's size in sizeFromConents. This is wrong and prevents the function from overriding the huge minimum size on the widget. PM_SplitterWidth already ensures the proper default size for the splitter. Task-number: 194542 Reviewed-by: ogoffart
* | | Fix missing update of edit geometry on QSpinBoxJens Bache-Wiig2009-05-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When showing or hiding spinbox buttons we did not update the child line edit geometry. This would on windows basically mean that the buttons would not show up as they were completely covered by the edit. Task-number: 235747 Reviewed-by: ogoffart
* | | Ensure style option for drawing blank area in scrollarea is initialized.Norwegian Rock Cat2009-05-141-3/+4
| | | | | | | | | | | | | | | | | | | | | Then you can actually influence it's palette. Task-number: 253495 Reviewed-by: Jens Bache-Wiig
* | | Remove snapback/maximum drag distance from QSliderJens Bache-Wiig2009-05-142-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature was only intended for QScrollBar and was incorrectly inherited by QSlider. The only supported platform that use this feature seems to be Windows so instead of doing a nasty qobject cast in the styling it makes more sense to remove the functionality from QSlider entirely. Task-number: 245681 Reviewed-by: ogoffart
* | | Fixes combobox menu separator on XPJens Bache-Wiig2009-05-141-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the delegate is somewhat abusing the ToolbarSeparator here, we should make sure we draw something for small heights as well. It seems microsoft requires us to allocate a few more pixels for the separator to actually be visible. Task-number: 249192 Reviewed-by: ogoffart
* | | Fix sending of double-click events after explicit grab-ungrab.Andreas Aardal Hanssen2009-05-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bug report came from the Declarative UI project as part of Kinetic. In FxFlickable the mouse is explicitly grabbed inside the mouse press event handler, and it's (explicitly) released in the release handler. When doing this, lastMouseGrabber is 0, and the double-click is delivered as a press. The fix is to not convert the double-click to a press if the receiver is the first and only mouse grabber (i.e., lastMouseGrabber is 0). The fix isn't entirely correct, as it can in theory allow an item to receive a double-click event as the first received event. This seems to only be possible in the case of using explicit mouse grabbing in combinations with the press and release event handlers so it's quite a corner case. Reviewed-by: Alexis
* | | Remove useless code and comment in QTreeViewOlivier Goffart2009-05-141-4/+0
| | | | | | | | | | | | | | | | | | In 8cd19116ae81c99fe28fbf91aa7f4c1c08163fe0 we changed viewItems to always contains the index to the columns 0, even if this columns is hidden. So this code and comment are now useless.
* | | Fix Toolbutton font with pseudo-statesOlivier Goffart2009-05-142-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | So now QToolButton:pressed {text-decoration: underline} will works The change in QCommonStyle is to make it consistant with the setFont few lines later. Reveiwed-by: jbache
* | | Fixes missing translations in QFileIconProviderJens Bache-Wiig2009-05-141-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | While lupdate ignores ifdefs, it cannot handle ifdefs inside the translate statement itself. Task-number: 188337 Reviewed-by: janarve
* | | Ensure that sheets are hidden if the parents are hidden in Carbon.Norwegian Rock Cat2009-05-131-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | Seems to work correctly in Cocoa, but we need to handle this special case in Carbon ourselves. Task-number: 253324 Reviewed-by: Richard Moe Gustavsen
* | | Merge branch '4.5'Thiago Macieira2009-05-131-0/+1
|\ \ \ | |/ / | | | | | | | | | Conflicts: tests/auto/qgraphicsview/tst_qgraphicsview.cpp
| * | Reset the 'connectedToScene' flag when changing the scene of a viewLeonardo Sobral Cunha2009-05-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QGraphicsScene::_q_emitUpdated() the slot QGrpahicsView::updateScene(QList<QRectF>) gets connected and a boolean (connectedToScene) is set to prevent double connections. The problem is that this boolean was not reset when the view gets a new scene. Task-number: 253415 Reviewed-by: andreas
* | | Fix warningOlivier Goffart2009-05-131-2/+1
| | | | | | | | | | | | Reviewed-by: Denis
* | | Merge commit 'origin/4.5'Olivier Goffart2009-05-136-10/+32
|\ \ \ | |/ /
| * | fix WinCE buildMaurice Kalinowski2009-05-131-0/+2
| | | | | | | | | | | | Reviewed-by: thartman
| * | Document a gotcha with QIcon::addFileNorwegian Rock Cat2009-05-121-0/+3
| | | | | | | | | | | | | | | | | | | | | addFile makes a QIcon not null, which may be a surprise if the path given is bad. Reviewed-by: Jens Bache-Wiig
| * | Fixed a memory leak that occured when loading system icons on Windows.Trond Kjernaasen2009-05-121-0/+1
| | | | | | | | | | | | | | | | | | | | | There was a qFree() call missing. Task-number: related to 253367 Reviewed-by: jbache
| * | Fix handling of gradients on pens in the emulation paint engine.Kim Motoyoshi Kalland2009-05-121-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The handling of gradients with object bounding mode on pens in the emulation paint engine has been changed to agree with the SVG standard, where pen widths are ignored when calculating bounding boxes. Instead of converting strokes to fills and then transforming the gradients based on the fills' bounding box, the gradients are now transformed first based on the bounding box of the stroke path. Reviewed-by: Trond
| * | Fixed bug with Qt::WidgetWithChildren shortcut context in QGraphicsWidget.jasplin2009-05-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | For a QGraphicsWidget w, a shortcut with Qt::WidgetWithChildren context would trigger even if w did not have focus (provided no other widgets in the view had focus). Reviewed-by: andreas Task-number: 250119