summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.4.0' into 5.4Frederik Gladhorn2014-11-213-329/+63
|\ | | | | | | Change-Id: I95f235a66ce2e9b1fa435c0f911c6f7e811755f0
| * Correct the signature and access rights for the protected constructorLars Knoll2014-11-191-1/+1
| | | | | | | | | | Change-Id: Ic43398a82777f3b1a95a36f60ebc4338d60c29ec Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Android: Fix QSlider appearanceBogDan Vatra2014-11-151-6/+5
| | | | | | | | | | | | Task-number: QTBUG-42672 Change-Id: I882c1f625ea659967a8db09246dc28d7aef93fdf Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| * Fix crash on Android L and list view items.BogDan Vatra2014-11-152-78/+42
| | | | | | | | | | | | | | | | | | | | | | This crash is visible on Android L. This patch removes the static_cast which caused the crash and it also fixed the list view item problem. I could not create separated patches because they depend too much on each other. Task-number: QTBUG-42673 Task-number: QTBUG-41814 Change-Id: I5d3e9c2b73df8f0e87e815b785b1c64d65a3ffaf Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| * Set Android palette and fonts in QPA plugin.BogDan Vatra2014-11-142-244/+15
| | | | | | | | | | | | Task-number: QTBUG-40621 Change-Id: Ibe069d4f93ac317e4f1b9ef5fc6bc3edcfac8685 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Use single finger pan to scroll text edits on touch screens.Friedemann Kleint2014-11-201-2/+21
| | | | | | | | | | | | | | | | | | Change the number of pan points to 1 for these classes as a workaround until pan/tap gestures are fully fixed. Task-number: QTBUG-40461 Change-Id: I0d68726a545ee6148f3ab88f2ab7308b10464ecd Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | QWidgetTextControl: Suppress drag selection for OS-synthesized mouse events.Friedemann Kleint2014-11-203-1/+35
| | | | | | | | | | | | | | | | | | | | Add a convenience function to QApplicationPrivate returning the source of mouse events to be able to detect synthesized mouse events. Change-Id: I09f82ed917586cd3de8b4146fc6638d19d428163 Task-number: QTBUG-40461 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Text editors: Prevent autoscroll timer triggering from synth mouse eventsFriedemann Kleint2014-11-202-12/+16
| | | | | | | | | | | | | | | | | | | | The autoscrolling interferes with scrolling pan gestures and causes the scroll direction to be reversed when moving outside the window. Task-number: QTBUG-40461 Change-Id: I30ef848a346418929540c23730ab92f44e4565e2 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Fix rubberband position for tabbed mdi windowsPaul Olav Tvete2014-11-192-9/+16
| | | | | | | | | | | | | | | | | | | | | | Place the rubberband over the tabs instead of where the hidden subwindows happen to be. [ChangeLog][QtWidgets][QMdiArea] Fix rubberband position for tabbed mdi windows Task-number: QTBUG-42612 Change-Id: I41e81ab8b99ab9e0fa533fd4ed1b2a8141d19753 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Fix broken resource cleanup in QOpenGLWidgetLaszlo Agocs2014-11-171-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The context has to be made current. Otherwise we may fail to clean up or, what's worse, we may delete FBOs and textures in some random context. The latter was visible with ANGLE in the qopenglwidget example. When having two QOpenGLWidget instances, the context for the second happened to be the current one when destroying the first. This is now avoided by making sure the correct context is current when deleting the FBOs. Task-number: QTBUG-42696 Change-Id: I8c1eed7c13a869968cc67141e585d02c6bc6f279 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | QPanGestureRecognizer: Make the number of touch points a parameter.Friedemann Kleint2014-11-174-20/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | Prepare for determining the suitable number of touch points from the device type. For now, 2 points are used as before, which can be overridden by setting the environment variable QT_PAN_TOUCHPOINTS. Add member variable to QPanGesturePrivate which is set on gesture creation and later used for comparison. Task-number: QTBUG-40461 Change-Id: I6d9e35ca752375bc6a54435482ca0925195b8142 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | QFusionStyle: properly indent an if statementGiuseppe D'Angelo2014-11-141-1/+3
| | | | | | | | | | | | | | | | Fix the style trap that leads people into thinking that's an else-if, while it's a plain if. Change-Id: I62963f0d6270eadcbd8aede7bac60f83968cb0d4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | send touch update when more points begin after single touch is ignoredShawn Rutledge2014-11-132-3/+11
| | | | | | | | | | | | | | | | | | | | | | Otherwise, a widget can't detect pinches if the points don't start simultaneously unless it sets WA_TouchPadAcceptSingleTouchEvents. The use case is for a widget that doesn't actually want the single touch events, but only when there are two or more touchpoints. Task-number: QTBUG-42389 Change-Id: I5269d9acb93a0001c4fde02b1f7b9e0dfcc0032f Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | a widget's window is transient for its parent's top-level windowShawn Rutledge2014-11-131-2/+3
| | | | | | | | | | | | | | | | | | | | | | When a widget's parent's window is not a top-level window, it should find the top-level window before calling setTransientParent, to avoid a warning (since a71e285133087714034f3c84a758980c85b3801e). Task-number: QTBUG-42464 Change-Id: I732691b0d40aba226470332426775d1bd4381009 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Fix MinGW compiler warning in qwindowsxpstyle.cpp.Friedemann Kleint2014-11-131-1/+1
| | | | | | | | | | | | | | qwindowsxpstyle.cpp: In static member function 'static QRect QWindowsXPStylePrivate::scrollBarGripperBounds(QStyle::State, const QWidget*, XPThemeData*)':styles\qwindowsxpstyle.cpp:2542:45: warning: suggest parentheses around '&&' within '||' [-Wparentheses] Change-Id: I6a4b62057a612fa9234744e892950c959c513d15 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Prevent a crash when buffer() returns 0Andy Shaw2014-11-131-1/+2
| | | | | | | | | | | | | | | | | | | | If buffer() returns 0 then there is no bufferPixels available which will cause a crash later on when it tries to set that memory. If this function fails then all we can do is return, a warning will have already been outputted from buffer() itself indicating why. Change-Id: I5890b3c34536f7f3d17def0936970c0a694b005a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | QGraphicsTextItem: document that adjustSize can center/right align textGiuseppe D'Angelo2014-11-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Unlike QTextEdit, there's no implicit width for a QGraphicsTextItem, meaning any rich text that is supposed to be centered or right aligned will not be unless the user explicitly sets the width. There's also another possibility: calling adjustSize() manually. Document that. Task-number: QTBUG-312 Change-Id: I83023269f4c63643e8224887efe2143dd1bb1908 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | QGraphicsItem: document that setOpacity(0) almost makes the item invisibleGiuseppe D'Angelo2014-11-111-2/+11
| | | | | | | | | | | | | | | | | | This particular "feature" leaked into QtQuick1 back in the day. Still it was never documented in QGraphicsView. Task-number: QTBUG-18267 Change-Id: Ib5fb446015176f6e9b4095f6ec9030258cbd1ad4 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | Document unified title and toolbar limitations.Morten Johan Sørvig2014-11-111-0/+7
| | | | | | | | | | | | Change-Id: Ib64a4586c186001730895e6771b01bb213d53b9f Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Compile fix for QT_NO_TEXTHTMLPARSER in QtWidgetsJulien Brianceau2014-11-111-0/+2
|/ | | | | Change-Id: If67c851cf45ca53ac4af56d4dc36db24ea896ba1 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Compile fix for QT_NO_DOCKWIDGET in QtWidgetsJulien Brianceau2014-11-081-1/+1
| | | | | Change-Id: I4567e4d0e5738c1de74661a325895f9eaa1d06c4 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* QGraphicsItem: clarify the documentation about caching modes and update()Giuseppe D'Angelo2014-11-071-2/+20
| | | | | | | | | | | | | | | | It is possible that Qt calls paint() several times for an item that has caching enabled, even without any explicit call to update(). There are various reasons why that is possible (memory pressure, item gets transformed, etc.); the important part is that 1) the user must not rely into "caching enabled" = "1 paint() call" 2) the user must always draw the same content from within paint(), unless update() was called before that call to paint(). Task-number: QTBUG-18410 Change-Id: I2c8d77e6e11aaceffc9a21003dd3f4cc46edd582 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Windows: fix unreadable white text for focused combo boxesJ-P Nurmi2014-11-051-1/+5
| | | | | | Task-number: QTBUG-42390 Change-Id: Ia52c7ac3d2e3ca155692c8f020a565054716c86b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QMenu check for null result from QPlatformMenu::menuItemForTagDyami Caliri2014-11-051-2/+4
| | | | | | | | | QMenu needs to check result of QPlatformMenu::menuItemForTag to avoid a crash dereferencing a null pointer. Task-number: QTBUG-42327 Change-Id: Ie54a94caec7a5d756c459741df182fbe4e38bec0 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* New Qt logoAlessandro Portale2014-11-051-0/+0
| | | | | | | | | | | | | This patch replaces the old Qt logo with the new, flatter one. The PNGs were optimized via: optipng -o7 -strip "all" Task-number: QTBUG-41685 Change-Id: I51983a45144373bf7aee31a32990ecbb2582f488 Reviewed-by: Robert Loehning <robert.loehning@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix too many resizes and move events for native widgetsJørgen Lind2014-11-044-20/+50
| | | | | | | | | | | | | | | When the QWidgetWindow receives a resize or move event, it should check with the widget if its crect already has this geometry. if not then send the resize or move event Ideally events should be sent whenever the QWidgetWindow receives them. QTBUG-42383 is created for this problem Task-number: QTBUG-29937 Task-number: QTBUG-38768 Task-number: QTBUG-30744 Change-Id: I1e9a5d25de29a98885edece927ba14d7a763eb01 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix tab icon vertical alignmentMarko Kangas2014-11-041-1/+1
| | | | | | | | | | | | Fixes case if custom icon size is given and height is more than width. Check of minimum valid height was compared wrongly to width and caused invalid vertical alignment. After fix vertical alignment is correct aligned to vertical center with the tab text. Change-Id: I6c4a710b15e91225edeabb629bfea7049ab2f42a Task-number: QTBUG-42143 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com>
* QFileDialog: prevent section collapsing in the main selection areaGiuseppe D'Angelo2014-11-033-1/+7
| | | | | | | | | | | | | | | | | | In the non-native QFileDialog, a QSplitter separates the two central views (the list view of "places" and the tree view for navigating the file system). Unfortunately, that splitter allows sections to be collapsed, resulting in a weird status where the user doesn't understand what has just happened and thinks that (s)he may have broken something. Worse, that gets actually saved into the application settings, so the splitter may stay collapsed forever. Instead, let's simply prevent sections from being collapsible. Task-number: QTBUG-19467 Change-Id: I11ff7c55a5535680a3edce5f4e70c9338291b94f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Regenerate qfiledialog_embedded.uiGiuseppe D'Angelo2014-11-031-96/+108
| | | | | | | | The old designer generator inserted stray spaces etc.; save it again with the new designer to fix those. Change-Id: I3890dd942970d9da71582ccb70b75d59888304bf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Doc: corrected wrong equivalent of obsolete QGraphicsItem::rotateNico Vertriest2014-11-031-1/+1
| | | | | | Task-number: QTBUG-39027 Change-Id: Icb5998a4e28edbc6952bc79d970c5ce6dbe57d69 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* QMacStyle: More tweaks for editable QComboBoxGabriel de Dietrich2014-11-021-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | Note that at one point we need to use Cocoa to render the combo box, but only if we're dealing with Qt Quick controls. Also worth noticing, there's currently a bug in Cocoa when rendering inactive combob boxes. We faithfully reproduce it in Qt for now. We'll fix it when Apple does. Finally, we need to start constraininig the combo boxes height. Cocoa has not supported variable height combo boxes for years, and will even spit the following warning if we try to do something smart. This application is trying to draw a very large combo box, 28 points tall. Vertically resizable combo boxes are not supported, but it happens that 10.4 and previous drew something that looked kind of sort of okay. The art in 10.5 does not break up in a way that supports that drawing. This application should be revised to stop using large combo boxes. This warning will appear once per app launch. Task-number: QTBUG-40833 Task-number: QTBUG-42067 Change-Id: I6512a6a581d446a28585db22fe4dbeac09499321 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cleanup: Remove some obsolete code supporting a pre-4.3 formatLars Knoll2014-10-314-32/+16
| | | | | | | | Loading a dock window state saved by a Qt 4.2 app is not something we need to support anymore. Change-Id: I9ee6e2c742b31114081852e7236cfc8696b9b270 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* QWindowsStyle: fix CE_ComboBoxLabel text colorJ-P Nurmi2014-10-301-0/+14
| | | | | | | | | | | CE_ComboBoxLabel was relying on a font color / painter pen set by CC_ComboBox. This change ensures that CE_ComboBoxLabel has correct color when CC_ComboBox and CE_ComboBoxLabel are drawn independently. Change-Id: Id548d831fdde5885bc7c157d55de6235ef3f0a56 Task-number: QTBUG-41702 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QMacStyle: Several fixes for QtQuick Controls on YosemiteGabriel de Dietrich2014-10-302-15/+12
| | | | | | | | | Some offsets differ between QWidgets and Controls. Therefore, we need drawNSViewInRect() to know about the origin of the call. Change-Id: I3bd165f94731f2b37423d86ed5d3c302a17d5ef5 Task-number: QTBUG-42067 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QMacStyle: Fix QCombobox offsets in YosemiteGabriel de Dietrich2014-10-301-3/+6
| | | | | | Task-number: QTBUG-40833 Change-Id: Id3c3f4fd4f5c72cba844bf23f2e79ce0ea2b4a95 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: Handle Qt::WA_MacAlwaysShowToolWindowShawn Rutledge2014-10-291-0/+2
| | | | | | | | | | | Forward the flag to QWindow by setting the _q_macAlwaysShowToolWindowproperty on the window in QWidgetPrivate::create_sys(). Test for the property when creating the window. Task-number: QTBUG-29816 Done-with: Morten Sørvig Change-Id: Id810dda98d02deb0902192cce1783d8b16b04d04 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Oswald Buddenhagen2014-10-296-4/+14
|\
| * Merge remote-tracking branch 'origin/5.3' into 5.4Oswald Buddenhagen2014-10-286-4/+14
| |\ | | | | | | | | | Change-Id: I224e44a9df314b9a99d33148b6cf400fcbc9de8e
| | * Doc: Don't show a description for omitted SH_ComboBox_UseNativePopup enum itemAlexander Volkov2014-10-282-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | \omitvalue does not allow a description of an enum item, so move the description as a comment to the enum declaration. Change-Id: I4192b16e41b704cbad66c0eeafcb141087d2ba65 Reviewed-by: Martin Smith <martin.smith@digia.com>
| | * OS X: Fix broken 2x menu icon when style sheet is appliedMihailNaydenov2014-10-281-2/+2
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-41623 Change-Id: I4e0640a7739d0ce4f8758dd5d8d17882a6947467 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | * Compile fix for QT_NO_IM in QtWidgetsSteffen Imhof2014-10-283-1/+10
| | | | | | | | | | | | | | | | | | | | | Added some #ifdef guards around usages of composeMode(). Change-Id: If2f2d3cae21b270933b38ea67dcc885f5871785f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * Move animation-related header out of QT_NO_IM #ifndef.Steffen Imhof2014-10-281-1/+1
| | | | | | | | | | | | | | | Change-Id: I7f0bfed4ff9a608575cf6795016b2fa134fd273f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Fix QWidget::scroll during paintingAllan Sandfeld Jensen2014-10-291-1/+1
|/ / | | | | | | | | | | | | | | | | | | Calling scroll during painting fails in cases where the scroll is attempted accelerated. This is easily fixed by not using accelerated scrolling during painting. Task-number: QTBUG-41615 Change-Id: I38d2428d5679c242f13d53793a3dc3b8e01b538f Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | Doc: Fix method names for QFileSystemModelAlexander Volkov2014-10-281-1/+1
| | | | | | | | | | | | | | | | | | There are no methods called name() and path(), replace them by fileName() and filePath(). Task-number: QTBUG-41881 Change-Id: I001a8ead197327fac69e69d94230587ddb1a4692 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* | Check geometry correctly when replaying popup mouse events.Friedemann Kleint2014-10-281-8/+13
| | | | | | | | | | | | | | Task-number: QTBUG-41869 Task-number: QTBUG-39313 Change-Id: I2b59f5db6f0ae4007b1a3b58a79eed958e662272 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | QMacStyle: Remove code depending depending on OS X 10.6 and olderGabriel de Dietrich2014-10-272-121/+36
| | | | | | | | | | | | | | Snow Leopard is unsupported from 5.4.0. Change-Id: I0c49a8353d5dc38169ab9679a986c35ab2df8d2f Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | QMacStyle: Refactor painter offset into drawNSViewInRect()Gabriel de Dietrich2014-10-272-39/+40
| | | | | | | | | | Change-Id: I05067ee400f0b776b0f0418ee1c5fbd45126c29e Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | QGtkStyle: fix segfault after re-creating QAppJ-P Nurmi2014-10-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QGtkStylePrivate::setupGtkWidget() cannot use a local static variable for the container, but it must insert it to the GTK widget map together with all other GTK widgets. The container is destructed as a GtkWindow child in the Qt post routine QGtkStylePrivate::destroyWidgetMap(). Task-number: QTBUG-41145 Change-Id: If1fda372ed1227edc779fa4951cbd6fbf6038499 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | QSwipeGestureRecognizer: Prevent cancel in startup-phase.Friedemann Kleint2014-10-272-10/+23
| | | | | | | | | | | | | | | | | | | | Replace the boolean 'started' member by an enumeration which indicates the startup phase. While in that phase, do not cancel when pressed points are detected for fewer than 3 touch points. Task-number: QTBUG-15768 Change-Id: Ic57b19e3002392fb632f551f615d80ada9831d34 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Doc: Include QtWidgets instead of QtGuiAlexander Volkov2014-10-271-1/+1
| | | | | | | | | | Change-Id: Ib7f3183efd446abb7cc191f33128b4e230ee372c Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>