summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Fix updating of screens in QDesktopWidget.Friedemann Kleint2013-07-263-12/+35
| | | | | | | Task-number: QTBUG-32567 Change-Id: Ib7442aed518427aa995cfc365ade6e6ffaf9c428 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Make *ItemBoundingRect modes work with custom shapes.Mitch Curtis2013-07-161-1/+1
| | | | | | | | | | | | | | | | Currently, calling QGraphicsScene::items(QPointF(0, 0), Qt::IntersectsItemBoundingRect) or QGraphicsScene::items(QPointF(0, 0), Qt::ContainsItemBoundingRect) will exclude items whose shape does not contain QPointF(0, 0). This is because QGraphicsSceneIndexPointIntersector::intersect() also checks if the point is contained within the shape, instead of just checking if it is contained within the bounding rect. Task-number: QTBUG-19036 Change-Id: Ie701af2a5694d40cf9b3c9c19adbb09a53a4e398 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* Mac OS: Fix a crash in tst_qgraphicsproxywidget.Friedemann Kleint2013-07-161-0/+3
| | | | | Change-Id: Ie93d77f00ee1e6a04ac20794e4d2d1e63cbdb636 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* Display sizegrip on QMdiSubWindows, even on 10.7 and laterGabriel de Dietrich2013-07-122-5/+19
| | | | | | | | | We don't have 4-edge window resizing, so we need QSizeGrip to be functional again in this case. Task-number: QTBUG-32228 Change-Id: Ib66bc662f8bf0b521427755570bc1cd65fb28446 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Consider virtual screen when determining dock widget visibility.Friedemann Kleint2013-07-121-2/+11
| | | | | | | Task-number: QTBUG-32260 Change-Id: I8b28e3869a6e3b1ed12a311dfa0100979098fc4b Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Check if widget inherits from QTextEdit when drawing the frameAndy Shaw2013-07-111-2/+3
| | | | | | | | | There can be cases where the accessibility plugin is not available so rather than have an incorrect style in those cases we check if the widget inherits QTextEdit. Change-Id: Ia514ce61f24ef016f56c6dce103f90f699b4048a Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fix typo in setGraphicsEffect() occurrences.Mitch Curtis2013-07-112-2/+2
| | | | | Change-Id: Iaca926ab47670616b55b0ab7ab735710237a5df8 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Windows/ActiveQt: Pass native parent handle property from widget to widget ↵Friedemann Kleint2013-07-111-0/+8
| | | | | | | | | | | window. Task-number: QTBUG-31672 Task-number: QTBUG-32343 Change-Id: I6b1eca13248da06db739b1a8356a0259f7f4ae6c Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* QComboBox - optimize (improve stupid code at enter-key)Thorbjørn Martsum2013-07-101-3/+2
| | | | | | | | There is no need to do a search for an item if we already have the correct index. Change-Id: Iac0e7df7573b71b82aa491acb8e289fe02fb3285 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Search toplevel when setting the active window from focus window.Friedemann Kleint2013-07-101-0/+2
| | | | | | | | Task-number: QTBUG-32177 Task-number: QTBUG-32180 Change-Id: I44bea8c15636d788d85d6cbfa737aca5901c532c Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Clean up evaluation license logicTor Arne Vestbø2013-07-051-1/+1
| | | | | | | | | | | | | | | | | | Instead of storing the application type as a uint, we use the enum provided by QCoreApplicationPrivate. The former resulted in a few cases of wrong logic where the values got mixed up, such as always printing the QtCore console warning, even for GUI applications. The qt_eval_is_supported function has been refactored to return enums instead of magic values, to make the logic easier to read. The same goes for qt_eval_days_left, which now only concerns itself with the number of days left. qt_eval_is_expired() has been added to use for easy checking of expiration date. Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: Ia0e85b2103f790a7e02e0d6e567a477b3145fcb9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Set correct cell when selecting custom color cell with arrow keysJ-P Nurmi2013-07-033-1/+12
| | | | | | | | | | Correct cell is now set when selecting a custom color cell with arrow keys so that the custom coor is actually added to the selected cell (as with mouse events). Task-number: QTBUG-32054 Change-Id: Ic271a0be76070b4f5364954b2dfe464964c1380b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix rotation of text in vertical QDockWidget titlebars in QFusionStyle.Parker Coates2013-07-021-0/+4
| | | | | | | | | | Presumably this was just an omission when QFusionStyle was first written. These three lines were taken directly from the equivalent portion of QWindowsStyle and seem to work as expected. Task-number: QTBUG-31904 Change-Id: I2f288d3cf2bfa3fe4f7f4a71e2726a172ec8e1b3 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fix dropshadow and blur graphics effects.Gunnar Sletta2013-07-021-4/+0
| | | | | | | | | | | The effects are making assumptions about implementation details of the paint engine, which had changed between Qt 4 and Qt 5. The engines no longer implement the pixmap filters and so the assumption made here was wrong and should be removed. Task-number: QTBUG-29945 Change-Id: I146d8c8cc12842a323bd613288003afcf89a47c7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Remove unused variables (as found by ICC)Thiago Macieira2013-07-011-4/+0
| | | | | | | qgraphicsscene.cpp(1814): warning #177: variable "v1" was declared but never referenced Change-Id: I8f14bb47f00ec0c56b2fe0794a71edfc872b3daa Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Deal with unused functions, as found by the Intel compilerThiago Macieira2013-07-013-28/+0
| | | | | | | | | | | | | | | | | | | | Use Q_DECL_UNUSED for the one that is possibly unused (we have two overloads so that one gets selected): qglobal.cpp(2069): warning #177: function "<unnamed>::fromstrerror_helper(int, const QByteArray &)" was declared but never referenced Remove functions really not used: qbezier.cpp(153): warning #177: function "findInflections" was declared but never referenced qbezier.cpp(534): warning #177: function "splitBezierAt" was declared but never referenced qpathclipper.cpp(1039): warning #177: function "midPoint" was declared but never referenced qpainter.cpp(119): warning #177: function "check_gradient" was declared but never referenced qdockarealayout.cpp(2580): warning #177: function "qMin(int, int, int)" was declared but never referenced qmainwindowlayout.cpp(1019): warning #177: function "validateDockWidgetArea" was declared but never referenced qgraphicsanchorlayout_p.cpp(670): warning #177: function "checkAdd" was declared but never referenced qcups.cpp(481): warning #177: function "paperSize2String" was declared but never referenced complexwidgets.cpp(373): warning #177: function "removeInvisibleWidgetsFromList" was declared but never referenced Change-Id: I1e5558e206b04edea381442030dc69536198d966 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fix the cursor position of an empty QLineEdit with a placeholder textJ-P Nurmi2013-06-291-3/+3
| | | | | | Task-number: QTBUG-32061 Change-Id: I43b689d8d7bc3c93036de48518f7a0f9f2aa33cf Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Fix system tray icon on X11.Friedemann Kleint2013-06-281-4/+4
| | | | | | | | | | | Observe Qt::BypassWindowManagerHint in XCB and use it for the tray. Remove the call to XSync(), which sometimes was causing the window to appear in the wrong place for a short time. Task-number: QTBUG-31762 Change-Id: I7b4fc5e42b8c8bb9d03b1575be99d6d1c727be37 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-06-273-19/+59
|\ | | | | | | refs/staging/stable
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-253-19/+59
| |\ | | | | | | | | | Change-Id: I4c0ae2ac1c10d4d50c03625c802d981b7850ed6f
| | * Widgets: Set qt_button_down for each press.Friedemann Kleint2013-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Do not rely on release events. Task-number: QTBUG-31333 Change-Id: I09a056fed8892715c04ca78a42ae191e5a9a3b42 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| | * Fix missing shortcuts for WindowContainersJørgen Lind2013-06-212-18/+58
| | | | | | | | | | | | | | | Change-Id: Iee2d97e1ff2b1f0c56b1dde4f3ce22a427fbe554 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | | QMacStyle: fix auto-default button animationJ-P Nurmi2013-06-262-8/+17
|/ / | | | | | | | | | | | | | | | | Make sure to stop any previously active (auto-default button) animation when the auto-default button changes. Task-number: QTBUG-31668 Change-Id: Iaa9bfa485b11e49cd7f765d0e54b4e6391ad2f6d Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-06-255-8/+11
|\ \ | | | | | | | | | refs/staging/stable
| * | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-205-8/+11
| |\| | | | | | | | | | Change-Id: I94bb158562ae6b80a87b40139d7302ea7b9b9aa8
| | * Cocoa color dialog cannot be modal, but should show anywayShawn Rutledge2013-06-151-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Silently failing doesn't seem the right way to handle this. Updated docs for DontUseNativeDialog option: it's not just for the Mac anymore. Ensure that the Qt dialog and Mac panel will never be shown at the same time. Change-Id: Ia9e80754df6c7622d9039c8dd050ac4de771a030 Task-number: QTBUG-29161 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| | * Widgets: Do not create QWindow in createTLExtra().Friedemann Kleint2013-06-142-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidget::setWindowIcon() and similar call createTLExtra() which creates a QWindow without setting the native attributes on the parent, which can cause crashes when setParent_sys() decides to delete the window. Task-number: QTBUG-31672 Change-Id: I4c40ee12741be88b2281df90329ffb698d4009eb Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| | * Fix another type of crash when dragging QDockWidget in and outShawn Rutledge2013-06-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDockWidgetPrivate::mouseMoveEvent calls q->move() which can result in a call to QDockWidgetPrivate::endDrag(), which will delete the state struct. Therefore mouseMoveEvent needs to check whether it's null or not before accessing it. Task-number: QTBUG-31672 Change-Id: I91a31620f16a80b31b65b2742e7937ae8960f0fd Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| | * Fix crash for pressing Ctrl+C in a message boxKai Koehne2013-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression introduced with e34dccc9e Task-number: QTBUG-31635 Change-Id: I7c991f3b98f5c51e5fb3c12db04d3ace7be87010 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | | Fix QWidget::isActiveWindow for window containers.Gunnar Sletta2013-06-251-0/+13
|/ / | | | | | | | | Change-Id: If0e8b83d7dc84b66f4ce5a5cd98affa4bd9b7424 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | hide placeholder text when QLineEdit has preedit textTasuku Suzuki2013-06-191-1/+1
| | | | | | | | | | | | Change-Id: Ica84e9ce715702b690906ef748970e16d9162c4b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Aurélien Gâteau <agateau@kde.org>
* | Doc: remove the duplicate for in QStyle documentationLiang Qi2013-06-191-1/+1
| | | | | | | | | | | | Task-number: QTBUG-31739 Change-Id: I72ad52da7d7e6899148a91d22266e79dd3184d4c Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | fix auto-enabling of windows styleOswald Buddenhagen2013-06-191-8/+8
| | | | | | | | | | | | | | | | it needs to come after the vista and xp style blocks. Change-Id: I66b5c1eff41b19a76802a77b6926552d7343b29c Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | remove pointless positive QT_FOO_STYLE definesOswald Buddenhagen2013-06-191-3/+0
| | | | | | | | | | | | | | | | they are not used. only the negative QT_NO_FOO_STYLE defines are used. Change-Id: Ic39081240c78cf66bd50c300b4aad04abca6f38c Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | don't claim that mac style needs windows styleOswald Buddenhagen2013-06-191-6/+0
| | | | | | | | | | | | | | | | we have commonstyle for that for a while now. Change-Id: I1ab3c86af994fc9cc7aaf65d28a2428b5e02be99 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | If a QWidget is ignored for auto-quit, ignore its corresponding QWindow.Stephen Kelly2013-06-191-1/+3
| | | | | | | | | | | | | | | | Unit test by Friedemann Kleint <Friedemann.Kleint@digia.com> Task-number: QTBUG-31569 Change-Id: I526d33d4f88a41f6ac349098476bc45af6c841b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Fix QSpinBox clipping issue on Mac when frame=falseJens Bache-Wiig2013-06-191-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | This was a regression from 5.0. Since we still require a minimum height to be present in order for the spin buttons to draw correctly, we require the same height from a spinbox without a frame as one with a frame. task-number: QTBUG-31538 Change-Id: I999f59a29e826e8e621faebffce9cccd9bedb8ca Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | QMacStyle: enable scroll style changes for non-QScrollBarsJ-P Nurmi2013-06-172-3/+17
| | | | | | | | | | | | Task-number: QTBUG-31537 Change-Id: Iee2148609df5cb2c121da4088bcd79f26c2eedc4 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Remove use of 'register' from Qt.Stephen Kelly2013-06-174-16/+16
| | | | | | | | | | | | | | | | | | | | It is deprecated and clang is starting to warn about it. Patch mostly generated by clang itself, with some careful grep and sed for the platform-specific parts. Change-Id: I8058e6db0f1b41b33a9e8f17a712739159982450 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Recognize separator item in QMenu.Leonard Lee2013-06-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | The mouse over event on upper level menu separator should automatically close the sub menu listing. Manual test is not needed for this commit since it is easy to test it against common examples. Task-number: QTBUG-31664 Change-Id: I323d7ba206352a5d533584543b9a2ebf842b4dfc Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | QDockWidget: Keep position when undocking.Friedemann Kleint2013-06-121-0/+3
| | | | | | | | | | | | | | | | Initialize undockedGeometry to roughly the current position. Task-number: QTBUG-31044 Change-Id: I03cbe280d1215bb58ab721b60e29b45359cde76d Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | The SingleClickActivation setting was wired to the wrong platform settingRobert Griebl2013-06-101-1/+1
| | | | | | | | | | Change-Id: I24dacd6d6cbc22eaf29dc09a6f59bf4ee7d48f37 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-101-6/+5
|\| | | | | | | Change-Id: I89c251999ae2a82522b40471fd13f2e06b00ece8
| * Doc: Fixed typo in QDialog.Jerome Pasion2013-06-071-6/+5
| | | | | | | | | | | | Task-number: QTBUG-31493 Change-Id: I7bb7b249a0336dd949f8c74bcc22c0b7c39d0885 Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
* | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-05-313-31/+6
|\| | | | | | | Change-Id: I0a8fe79a80b7720f76e3c0b03cc2c9a769d4009b
| * Mac style: Remove yet another reference to widgetsGabriel de Dietrich2013-05-301-2/+2
| | | | | | | | | | | | Change-Id: I545cfe22c6307864cdb18093a37e09a8ad042347 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * QMenu: Remove last references to QMacWindowFaderGabriel de Dietrich2013-05-302-29/+4
| | | | | | | | | | | | | | | | | | It was never ported to Qt 5, and 10.7 has simple API for that. Task-number: QTBUG-31336 Change-Id: Ie00c4ed3af9cd098c9e63eba1c654f1801aa83aa Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Refer to setDragEnabled in QLineEdit's detailed description.Mitch Curtis2013-05-301-1/+2
| | | | | | | | | | | | | | | | | | It's currently not obvious how to drag text from a QLineEdit. Task-number: QTBUG-22413 Change-Id: I5b92ce5c7425a1cb8ee6f401c685424eb9396592 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Fix incorrect statement in QTreeWidgetItem docs.Mitch Curtis2013-05-301-2/+2
|/ | | | | | | | Task-number: QTBUG-25598 Change-Id: Ib90578081d4e52877ce4842ebbc824ef74179341 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Made sure items with preferred width of 0 could also stretchJan Arve Saether2013-05-271-1/+1
| | | | | | | | | | | | | | | | | | If no stretch factors were specified, we used the preferred size as a stretch factor. Obviously, that didn't work if the preferred size was actually 0. This patch works around this by actually setting the stretch factor to 1.0 if this is the case. This should work fine in most cases, except for the case where there are also other items with a preferred size close to 0. In this case, the item with preferred size 0 will just grow faster than an item with e.g. preferred size 0.1. Task-number: QTBUG-31217 Change-Id: I966455da0bdd00308591c7f7cfbc4e134d423e57 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>