summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Fix highdpi CE_HeaderLabel pixmaps in fusion styleMorten Johan Sørvig2013-09-131-1/+4
| | | | | | | | | | Make sure enough pixels is sourced by multiplying the layout rect size with the pixmaps devicePixelRatio. Task-number: QTBUG-31477 Change-Id: I742603c09a65a520587da3eef9479ef7f0c87022 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Windows style: Support underlined mnemonics from Qt Quick ControlsGabriel de Dietrich2013-09-121-0/+6
| | | | | | | | We use the usual accessibility + private property combo pattern. Task-number: QTBUG-33030 Change-Id: I7fbb704c949ff2df163536534f6f46d2e226402d Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QMessageBox: implemented shortcut for selectAllShawn Rutledge2013-09-121-0/+9
| | | | | | | | | | The context menu all along has indicated that Ctrl-A selects all the text, so now that is actually implemented. Task-number: QTBUG-6731 Change-Id: I82dac3aea530e5a3fcd59217c4c0118025061c7d Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QMessageBox: shortcuts for selectAll, copy don't conflict with buttonsShawn Rutledge2013-09-121-1/+1
| | | | | | | | | | | | | You can hit a key with no modifier to select a dialog button that has the corresponding mnemonic, but it doesn't make sense to do that if the Control or Meta key is being held. Now you can hit Ctrl-A, Ctrl-C to select all the message detail text and copy it to the clipboard, even if the dialog has buttons with mnemonics like &Continue and Save &Again. But as before, Alt-C, plain C, Alt-A and plain A select the mnemonic buttons on the dialog. Change-Id: I40c052dbb7730bde444ac2de405724a3203d1472 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Move winId!=0 assertion from QWindow to QWidgetAndrew Knight2013-09-091-1/+4
| | | | | | | | | | | | | | | In "very basic platform plugins", the platform window ID can be null, which conflicts with QWidget's special treatment of 0 as a parented widget. Such is the case with EGLFS, which can return a null native window handle for winId on some EGL implementations. Move the assertion winId!=0 into the widget framework, as this assert is not relevant for non-widget applications. A large proportion of basic platform plugin users will see relief from this unnecessary assertion. Change-Id: I25c9d96550cd747c77c9516d773e9cdebf7440ab Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Doc: Fix copy+paste errors for QAbstractItemModelSze Howe Koh2013-09-081-2/+2
| | | | | Change-Id: Ia462544cc86870d9870ae1be3b4f9135c9efe45c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Forward QGraphicsView::mouseDoubleClickEventMarcel Krems2013-09-061-0/+7
| | | | | | | | | | Do the same as in mousePressEvent. Otherwise it is not possible to handle the event in one of the graphics views parents. Task-number: QTBUG-8061 Change-Id: I67c7635361a9ed595c513c28ea016e6253fa2101 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* Fix regression in QListViewJ-P Nurmi2013-09-031-4/+4
| | | | | | | | | | The fix was originally applied to Qt 4.8 (4c64464), but missed Qt 5 which had already been branched at that point of time. Task-number: QTBUG-33089 Task-number: QTBUG-21433 Change-Id: Ia3cd35d29dbdc70ba55b6f0840c4082e232c24ae Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Ensure the timer is killed when appropriate before starting a new oneAndy Shaw2013-09-031-2/+9
| | | | | | | | | | | When the mouse moves while the sloppy menu timer is still running then it would end up just creating a new one and the old one would continue to run. If the action that it is relevant for is different then it should restart the timer, otherwise it should just ignore the mouse move and let the other timer continue. Change-Id: Id03014fa05596bd6ede887fa917e21ca5a7690d8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Update QLineEdit::placeholderText property documentationGiuseppe D'Angelo2013-08-291-2/+1
| | | | | | | | | | eeb31ad10a1c1b26233f383de6d1b2b217cde08f changed the behavior and allowed the placeholder text to stay visible even if the lineedit has focus. Task-number: QTBUG-33237 Change-Id: I733331be1d3225eb28390b21eb9a7e4971bfdc31 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Activate Qt::WidgetWithChildrenShortcut shortcuts in MDI subwindowsGiuseppe D'Angelo2013-08-281-1/+1
| | | | | | | | | | If a MDI subwindow is focused and an ancestor has a QShortCut set with the Qt::WidgetWithChildrenShortcut flag, it should trigger, as MDI subwindows are not top-level widgets. Task-number: QTBUG-32788 Change-Id: I7ec76d493b827ae6678209a56015ab6b432c1ed9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Close menu on 2nd click on QMenuBar.Friedemann Kleint2013-08-271-0/+1
| | | | | | Task-number: QTBUG-32807 Change-Id: I0c3c25c6acf92bc30c1bcfc09003209b572ec777 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Style: Remove useless background paint for menu scrollerGabriel de Dietrich2013-08-221-1/+0
| | | | | | | | | This would also cause an extra paint in QQuickStyleItem, resulting in the frame being erased for those styles not having a frame width set (e.g., fusion and GTK). Change-Id: I7a9371c540cd31fd9f1400a51c4ec57582996dd2 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fix scrollbar appearance on Win8J-P Nurmi2013-08-221-22/+24
| | | | | | Task-number: QTBUG-26503 Change-Id: Id74821e005483d05450467fcaea672bbf35113bc Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QWidget: Apply window opacity set before show.Friedemann Kleint2013-08-211-0/+2
| | | | | | | Task-number: QTBUG-33078 Change-Id: Id9111f223a9dc58c88b072c52e36d42db450573a Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* update the viewport after changing the backgroundIrfan Omair2013-08-151-1/+1
| | | | | | | Task-number: QTBUG-4359 Change-Id: I218e6a8b3b64e1b518338efb18e8a7eb95ecf2c7 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* QHeaderView::paintSection(): fix visible index handlingJ-P Nurmi2013-08-152-3/+23
| | | | | | | | | | | Sections may be hidden => QStyleOptionHeader::position must reflect the state seen on the screen. Otherwise styles will give wrong visual results. Task-number: QTBUG-32203 Change-Id: I7ef86496be092bf6f52ec45f757b501f38c3a431 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix ShortcutOverrid for Qt QuickFrederik Gladhorn2013-08-131-1/+8
| | | | | | | | | | | | | | | | | The tryShortcutOverride function needs to be called with the focus object. The same logic is in QGuiApplication::notify. Applications with QGuiApplication would therefore handle ShortcutOverride correctly where QApplication would not allow the override. ChangeLog: Fixed ShortcutOverrid for QtQuickControls. Now it is possible to assign a shortcut such as "b" and still type "b" in text inputs. Task-number: QTBUG-32928 Change-Id: I4f4ab82fd11f45174a4483a01bbbe8143dfe0724 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* un-confuse lupdate: remove excess brace in dead codeOswald Buddenhagen2013-08-121-1/+0
| | | | | Change-Id: I7b81121b559f18446c4e546ad4f00cb4a592ca7f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Merge branch 'release' into stableSergio Ahumada2013-08-091-16/+16
|\ | | | | | | Change-Id: I5e94c4f01564df633c9925561ebb0b553bd31a2e
| * Doc: Corrected the example path in the tutorialVenu2013-08-021-16/+16
| | | | | | | | | | | | | | Task-number: QTBUG-32688 Change-Id: I12c264f29bc1d49322c60debdec3758859f62fa8 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | QComboBox: fix item activation via completerJ-P Nurmi2013-08-083-9/+30
| | | | | | | | | | | | | | | | Task-number: QTBUG-31146 Change-Id: I64291f397d80bf934152f63e629810540abf466e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | Fix QCompleter::activated(QModelIndex)J-P Nurmi2013-08-071-0/+1
| | | | | | | | | | | | | | | | | | When falling back to the completion prefix, make sure to also pass an invalid index to activated(). Change-Id: I6b282a01c95492466890632b77837bcc96eb038a Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | Mac Style: Fix 1-pixel text offset in combo boxGabriel de Dietrich2013-08-071-0/+2
| | | | | | | | | | Change-Id: Ie1bb2b300d6897659f4652c22884f1bd611cd3c4 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Fix double transform for items ignoring parent transformations.Andreas Aardal Hanssen2013-08-051-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the topmost untransformable's scene transform, which includes the item's position and local transformation, was used to determine the item's anchoring position. This position was then passed on to be multiplied by the item's transform again. This works fine for toplevel untransformable items that don't have any transform set at all, but those who do would have their transforms applied twice - one to determine the anchoring position, and again to transform the item itself. Since only translation transformations can affect the first operation (the anchoring pos), this bug only applies to items that set ItemIgnoresTransformations and use a local transform that includes translation. Task-number: QTBUG-21618 Change-Id: I772d52d59dfd9f242d0140632a87e9c68dfe0ea1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Fix typo in Model/View Programming documentation.Mitch Curtis2013-08-051-1/+1
| | | | | | | | | | Change-Id: I88f49a894a8c1e88a4cdb559fdc426f01e113f80 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Fix ignoring closeEvents on OSX for QtQuick.Daiwei Li2013-08-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The QCloseEvent's accepted state should not be inverted for the QWindowSystemInterfacePrivate::CloseEvent. To make Widgets work with this change, pass whether the close was accepted from close_helper to the QCloseEvent generated by QGuiApplication. Task-number: QTBUG-28965 Change-Id: If384b0355776b93df02dff2ab78b5647903200e7 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Josh Faust <jfaust@suitabletech.com>
* | Clear focus if the widget being deleted is the parent's focus child.Andy Shaw2013-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | If a widget is deleted as a result of a window activation changed then it is possible that the parent does not clear the focus because of the activation change. If the focus child is actually part of an embedded widget in the graphicsview then it needs to be handled explicitly in this case too. Change-Id: I3e7a2b963f175828de4c19283178560abca91235 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | Check if the widgetItem is valid before accessing widget() on itAndy Shaw2013-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | If a state was restored but not all the dockwidgets that were available before are available at the time of restoration then when dragging a dockwidget to where the unavailable one is expected to be would cause a crash. Change-Id: I829d93041b7950a3546ba4e6c3764b169f276315 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Remove duplicated call to QGraphicsSceneMouseEvent::setButtons.Marcel Krems2013-07-281-1/+0
| | | | | | | | | | | | | | | | Task-number: QTBUG-8061 Change-Id: I1326d6b3d6c6b7c3f6dc383aa5fe66d5e1f0b229 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | 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