summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Ensure transient parents are top level widgets.Friedemann Kleint2014-07-181-1/+1
| | | | | | | | | | | When a dialog was parented on a native child widget, its window handle was used as a transient parent. This confused QPlatformWindow::initialGeometry() among other things. Use top level window as is in Qt 4. Task-number: QTBUG-40195 Change-Id: Ic82adc276175f92adde825fb2551274351e41f30 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* make QtWidgets claim style pluginsOswald Buddenhagen2014-07-161-0/+1
| | | | | Change-Id: Ibb3fea65d59c2a43cd024fd34abfe558956bec69 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QSplitter: Exclude top level widgets from child event handling.Friedemann Kleint2014-07-151-2/+4
| | | | | | | | | Prevent the splitter from adding them to the layout or showing them. Task-number: QTBUG-40132 Change-Id: Ife2be0bbd7e489570ef41f6f72a034b356c65f18 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Document QApplication::cursorFlashTime() can return -1İsmail Dönmez2014-07-071-0/+3
| | | | | | | | | On Windows QApplication::cursorFlashTime() can return -1 if keyboard blinking is disabled. Add documentation for that case. Change-Id: I1e5d683573e55b045e2d9bd9804daf4be579fd02 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix typo in QGraphicsView documentation.Mitch Curtis2014-07-071-1/+1
| | | | | Change-Id: Ib750a78e86b8af87d091705a1107ca1eccf32389 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Fix QTimer with negative interval in QWidgetLineControl::setCursorBlinkPeriodİsmail Dönmez2014-07-061-1/+1
| | | | | | | | | When keyboard blink is disabled, msec will be negative (-2 in my case). In that case if (msec) will evaluate to true and create a QTimer with a negative interval. Fix is to check for msec > 0. Change-Id: I5c8d82c3cdaf26a961c986f4164805aacfe3ae37 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Improve QListWidget documentation.Mitch Curtis2014-07-041-1/+8
| | | | | | | | | Mention that removeItemWidget() isn't sufficient to remove a row. List related functions so that it's easy to see the relation between them. Change-Id: Ia1d467390f00976e2276d50df35dd555f7992a9a Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Cocoa: Handle Qt::WA_ShowWithoutActivatingMorten Johan Sørvig2014-07-021-0/+4
| | | | | | | | | | | | Forward the flag to QWindow by setting the _q_showWithoutActivating property on the window in QWidgetPrivate::create_sys(). Implement by refusing to become the key window or first responder during QCocoaWindow::setVisible(). Task-number: QTBUG-19194 Change-Id: I8446927ec510d7226a5a7b51b7be49d2f9bfd098 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: Fix Qt-in-namespace build.Tim Blechmann2014-07-021-1/+2
| | | | | | | | Wrap cocoa classes in namespace macros. Task-number: QTBUG-39382 Change-Id: Id840e666105afca21760fcb529b5765e0a534120 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QMacStyle: Fix focus frame rendering in YosemiteGabriel de Dietrich2014-07-021-5/+14
| | | | | | | | | | | | Using the HITheme API would result in the frame's right edge to be missing. Instead, we use the recommended technique to draw the focus ring around a custom NSCell. (See https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/ControlCell/Articles/ManipulateCellControl.html) Change-Id: I12d4834d353b5cbd5893bf070b14ad0d8bb75634 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Mac Style: Fix QLineEdit frame in 10.10Gabriel de Dietrich2014-06-301-11/+9
| | | | | | | | Also removes some dead code. Change-Id: Id590bd56641918a163f8bad251e3e0e750adfc6f Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Fix pixel noise in X11 systray icons that are not 22x22Allan Sandfeld Jensen2014-06-301-0/+6
| | | | | | | | | | | | | | If a system tray icon is set to a non default size by an X11 system tray, the area beyond 22x22 will not be painted, since the first paint is performed before the first resize, and the first resize does not trigger expose either. The bug can be seen in KDE if the system tray is not 22 pixel height. This patch triggers updates on resize to ensure we always repaint fully on resize. Change-Id: Ia81d2329a2c9faff220f07163ac38cafbd520ffc Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* QMac/FusionStyle: fix the background color for transient scrollbarsJ-P Nurmi2014-06-304-2/+13
| | | | | | Task-number: QTBUG-39922 Change-Id: I4b313296ae845bc9e116494aa66c577b432b4a67 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* qtoolbar: add missing header on OSX.Mike McQuaid2014-06-281-0/+4
| | | | | | | | | | | | | | | | | Without this you get: ``` widgets/qtoolbar.cpp:1047:5: error: incomplete type 'QPlatformNativeInterface' named in nested name specifier QPlatformNativeInterface::NativeResourceForIntegrationFunction function = ^~~~~~~~~~~~~~~~~~~~~~~~~~ qtbase/src/widgets/../../include/QtGui/../../src/gui/kernel/qguiapplication.h:57:7: note: forward declaration of 'QPlatformNativeInterface' class QPlatformNativeInterface; ``` Change-Id: I1301a8aa8b25eb12821e91125743be779e52db0f Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Mike McQuaid <mike@mikemcquaid.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QColorDialog: Do not update custom/standard color cells while picking.Friedemann Kleint2014-06-252-17/+33
| | | | | | | | | | | | | | | | Delay the updating of the custom/standard color cells to the mouse release of the color pick. This makes it possible to pre-select a custom color cell for assignment before the pick and prevents that from changing when its color is crossed by accident. Rename the existing method QColorDialogPrivate::setCurrentColor(QRgb) to setCurrentRgbColor() and move QColor::setCurrentColor() to QColorDialogPrivate, introducing an enumeration for specifying what to set. Task-number: QTBUG-39792 Change-Id: Ibfe96e345589346e8c72976a0335e901798f2766 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Add that the corner settings are saved/restored with the stateAndy Shaw2014-06-231-3/+6
| | | | | Change-Id: Iee4c04291001470518176d8b3a49c08b52a6336e Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QComboBox: update focus policy when setting a new line editLiang Qi2014-06-212-8/+17
| | | | | | | | | | On OS X, the focus policy of QComboBox is different when editable or not. Task-number: QTBUG-39650 Change-Id: I394564f8a1a6d462e86d2497fe8874e6107a8a58 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* Remove the widget from the stylesheet cache before polishingAndy Shaw2014-06-201-0/+1
| | | | | | | | | | If the widget exists in the style rules cache before it polishes for the first time then it should be removed from styleSheetCache too so that the latest set stylesheet is used for the polishing. Task-number: QTBUG-39427 Change-Id: Ic1e7988afe530f16ea9996bae56543ed554d6be9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Use QModelIndex to get the data from underlying modelFriedemann Kleint2014-06-191-2/+2
| | | | | | | Change-Id: Ibeb70079afd566c78289168540296b926f36d1af Initial-patch-by: Irfan Omair <irfan.omair@gmail.com> Task-number: QTBUG-27597 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Fix compilation in under -no-c++11 modeThiago Macieira2014-06-191-7/+10
| | | | | | | | | IndexSetter can't be passed to QObject::connect() since C++98 templates require global types (they can't be function-local). Change-Id: I099322f835661d4679140b7810b50dbeb0e4b9e0 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QFontComboBox sometimes became too wide because of wrong fixed sizeJan Arve Saether2014-06-141-1/+1
| | | | | | | | | | | | The fixed width should not be set on QFontComboBox itself, but on the popup. This regressed with commit bfb25c03523757d66974189e54dda97962206ef9, and caused assistants preferences dialog to become wider than the desktop. Change-Id: I2059794fc12d34837cdb7dfded80df57d102a6f0 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Revert "Suppress move/resize events if they are the result of call to ↵Friedemann Kleint2014-06-131-10/+2
| | | | | | | | | | | | | | | | move()/resize()." This reverts commit a1c5198387fdb7db44a02bb94c56187874e67304. The idea of detecting non-spontaneous events by comparing against the widget's crect has problems when sequences of programmatic resizes occur. In addition, QWindowSystemInterface's queueing of events is problematic for this. Task-number: QTBUG-39611 Task-number: QTBUG-32590 Change-Id: I4674d8d5d5d432d938f7226b5790543335665c1f Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Revert "Revert "Fixed duplicate QMoveEvent generated for each QWidget::move ↵Friedemann Kleint2014-06-131-1/+4
| | | | | | | | | | | | | | | | call"" This reverts commit c3e416296a1026d7ba99cf209f5e0720ff5050b1. The idea of detecting non-spontaneous events by comparing against the widget's crect has problems when sequences of programmatic resizes occur. In addition, QWindowSystemInterface's queueing of events is problematic for this. Task-number: QTBUG-39611 Task-number: QTBUG-32590 Change-Id: I9ff8049add147be23e064a513e8645ae04577c6c Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Doc: correct the format of Q_PLUGIN_METADATA macro in sample codesZhang Xingtao2014-06-121-1/+1
| | | | | Change-Id: I464a0c0a590b0b90cf0fe7ccd448ee9bf704bd4f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Merge "Merge remote-tracking branch 'origin/stable' into 5.3" into ↵Sergio Ahumada2014-06-113-11/+13
|\ | | | | | | refs/staging/5.3
| * Merge remote-tracking branch 'origin/stable' into 5.3Sergio Ahumada2014-06-113-11/+13
| |\ | | | | | | | | | Change-Id: I147a75ac74bd7b19dbeb99e1ec2836cc5bfc2806
| | * Fix failing qtdeclarativetextedit auto-testSimon Hausmann2014-06-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit c3baa7c1dc8c29bfe60e8e5c676c606d4f699005 the qtdeclarativetextedit tests in the qtquick1 module started failing. This was due to commit 852abfca6f4c349dce9b895956922f96d82df579 from 4.8 not being forward-ported from Qt 4 to Qt 5, hence the comment in c3baa7c1dc8c29bfe60e8e5c676c606d4f699005 about the missing mousePressEvent line. It was intentionally removed and instead used further down, which is what this patch adds and therefore acts as forward-port of 852abfca6f4c349dce9b895956922f96d82df579. Change-Id: I55978c961002382c1f228bf796c469c10686ba9f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| | * Suppress move/resize events if they are the result of call to move()/resize().Friedemann Kleint2014-06-061-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidget::resize() or QWidget::move() set the new size/position values and send events. The spontaneous events generated by the platform should be ignored in that case. Task-number: QTBUG-30744 Task-number: QTBUG-38768 Task-number: QTBUG-32590 Change-Id: I9c0ae38842ed76a8a88ca64fdc9bbe106b2766b7 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
| | * Revert "Fixed duplicate QMoveEvent generated for each QWidget::move call"Friedemann Kleint2014-06-061-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A better fix is to check whether the widget already has the requested geometry when receiving the spontaneous event from the platform in QWidgetWindow and to suppress that. This reverts commit 72259baa76a0f1faa1983c720621676e9c15e15f. Task-number: QTBUG-32590 Change-Id: I4d7a9b4c340c2d6a427727ecb8de50c3d199f7a9 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
| | * Fix selection by dragging after double click in QWidgetTextControl.Friedemann Kleint2014-06-061-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove return in mouseMove depending on variable mousePressed which is not present in Qt 4. The variable was true in Qt versions before 5.3 due to an additional mouse press event received before a double click. Task-number: QTBUG-39023 Task-number: QTBUG-25831 Change-Id: I57ed9284961195c71df9e9b9d697b1cfbad7c228 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | | QWidget: fix documentation for isEnabledTo(0)David Faure2014-06-111-1/+7
|/ / | | | | | | | | | | | | | | It is NOT always the same as isEnabled(). Added a unittest to prove it. Change-Id: I7717126835923e8c091249bfcdf81767c44fb5f7 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Doc: Updated Layout examples.Jerome Pasion2014-06-102-1/+10
| | | | | | | | | | | | | | | | | | | | | | -added links to and from the overviews. -added information on how to run the example. -updated copyright. Task-number: QTBUG-33597 Change-Id: Ib049cb94f136caa6916878959ae830248bd236b5 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
* | Fix typo in QGraphicsTextItem::defaultTextColor() documentation.Mitch Curtis2014-06-101-1/+1
| | | | | | | | | | Change-Id: I6e255483d63a3024d9cbfe09a12f33d7fddf36c0 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Remove unnecessary comma in QStackedWidget doc.Mitch Curtis2014-06-101-1/+1
|/ | | | | Change-Id: Iaa6102ea90c695eb2d81cc5d4fbd00dafc7783f5 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QApp: Method to check for native style usage.Christoph Schleifenbaum2014-06-052-0/+28
| | | | | | | | | | | | Adds QApplicationPrivate::usesNativeStyle to check whether the QApplication is using the native platform style. This can be needed internally to decided whether to let the platform plugins do stuff or do it interally, style dependent. E.g. letting the platform plugin popup a QMenu vs. letting the style draw one. Change-Id: Ibb5e11a4d9d1d2824685ff146786a9354ceef43c Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Do not clear default button in QMessageBox::setDetailedText().Friedemann Kleint2014-06-041-0/+2
| | | | | | | | | | Store the value of QMessageBoxPrivate::autoAddOkButton temporarily when automatically adding the "Show Details..." button. Task-number: QTBUG-39334 Change-Id: I173c83893548ee83b3d8ea2743f87686c32657e7 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* QDialogButtonBox does not need TabFocusJan Arve Saether2014-05-311-3/+0
| | | | | | | | | | | | It will now share the same behavior as QGroupBox, which has NoFocus if its not checkable. This doesn't lure AT clients to stop and read its content (this is the case for android accessibility) (designer seems to generate a tooltip for each QDialogButtonBox, which will be read as the name). Change-Id: I6cfacdd9c01299521222c773634df1e36971d982 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Move native subwidgets in QWidget::scroll().Friedemann Kleint2014-05-282-6/+6
| | | | | | Task-number: QTBUG-38999 Change-Id: Ie22dcf61895bbfc575eaae4d1929516a8749de39 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* WinRT: Fix compile warningsMaurice Kalinowski2014-05-261-0/+3
| | | | | Change-Id: If223dd73b9558a0f5144be38f19a61316f8c807b Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Account for the sort indicator being placed above the text on VistaAndy Shaw2014-05-263-9/+23
| | | | | | | | | | | In WindowsVista style and later the sort indicator is placed above the text as opposed to alongside it. Therefore the extra space given is moved to the common style allowing styles that have it placed differently to easily ensure it is not included. Task-number: QTBUG-19915 Change-Id: Ic21fcc1d95f4c3cc2eb9c465e1c8afb9b805389a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix loss of precision warningsFrederik Gladhorn2014-05-261-1/+1
| | | | | | | | Found by http://www.viva64.com/en/b/0251 Change-Id: I2a0c3dba74fef07c3119c9e57b343a8253ee7daa Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Trigger repaint of window when toggling unified toolbar on or off.Jake Petroules2014-05-221-0/+1
| | | | | Change-Id: I5204e5c65ae3cf84459cc62f587ecccd855e02f8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Fix broken QPlainTextDocumentLayout after removing charsAxel Rasmussen2014-05-211-2/+3
| | | | | | | | | | | | This fixes an issue where, if characters were removed from several blocks in a single edit, the document layout would end up being corrupted since the document layout manager wouldn't re-layout the proper number of text blocks. Task-number: QTBUG-30051 Change-Id: Idf3a6f567120e6a5dbebf1f65f685d374219328a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* QMacStyle: Always draw status bar in active state if the window is main.Jake Petroules2014-05-171-2/+2
| | | | | | | | On OS X, most controls are drawn active or inactive based on their window's main state, NOT its key ("active" in Qt) state. Change-Id: If447d0a537bc594978f7202e7888ceacb54ec8fa Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Accessibility: Update ComboBox text on arrow keysFrederik Gladhorn2014-05-161-6/+6
| | | | | | | | | | Use ValueChanged to notify of changes in the ComboBox. On Linux we need to update name and then send selection-changed for Orca. Task-number: QTBUG-36814 Change-Id: Icdd34adddeac532476a6dd910d1e8bd33bcd590b Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Avoid setting unnecessary parameters in QOpenGLWidgetLaszlo Agocs2014-05-161-6/+0
| | | | | | | | | | | | | | QOpenGLFramebufferObject sets the texture parameters already, do not set them again. Especially not GL_REPEAT, which is wrong and breaks on devices that do not support REPEAT on NPOT textures. What QOpenGLFramebufferObject does is just fine (it sets NEAREST/ NEAREST and CLAMP_TO_EDGE). This is important for WebEngine where the QWidget-based web view is using QOpenGLWidget. Change-Id: I264d30118ce7adf50f68f2c7b9a5599a406b4362 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Ensure the QMenu is polished before creating the native windowMartin Gräßlin2014-05-091-0/+1
| | | | | | | | | | | | | | | | Call ::ensurePolished from QMenu::exec before the native window gets created. This ensures that the style handles the menu before its too late. E.g. a style which wants to create RGBA menus needs to add the appropriate flag before the native window gets created. Without this change the style cannot change to RGBA as the native window has already been created and changing the format used by QWindow is not possible after QWindow::create was called. Change-Id: Ic861037a438b4cb74c59a00be0ef2d633db538ed Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Avoid drawing when the QOpenGLWidget isn't mappedJocelyn Turcotte2014-05-081-1/+1
| | | | | | | | | | | | | | Do as QGLWidget::updateGL does and avoid calling paintGL in updateGL when we we don't have a valid QSurface to draw on. We currently end up calling makeCurrent on the context with a null QSurface in that case, which is the equivalend of doneCurrent, and causes QOpenGLContext::currentContext to return null later when paintGL is called on the subclass. Change-Id: I712ee59274855457b0e4de3757754f56b3528955 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Remove trailing whitespace.Jake Petroules2014-05-081-1/+1
| | | | | Change-Id: Id487c8951d7f258c57fa71fd35a60ddb8c5a3fb2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix visual index lookup in QTreeViewPrivate::adjustViewOptionsForIndex().Friedemann Kleint2014-05-061-10/+3
| | | | | | | | | Determine the visual index by looking up the column of the QModelIndex in the logicalIndices array instead of looping. Task-number: QTBUG-37813 Change-Id: I5c3c73c67537877b03cdc2c36a52041d99f7f49d Reviewed-by: David Faure <david.faure@kdab.com>