summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
...
* Enable the depth and stencil buffers by default in QOpenGLWidgetJocelyn Turcotte2014-04-021-1/+1
| | | | | | | | | | | | | QGLWidget rendered to the default framebuffer, which had a depth and stencil buffer attached by default. Keep this behavior by adding the attachments to the FBO by default in QOpenGLWidget. Change-Id: I6f72a444eac3d8eabb7a539ad12216f1e5d2183d Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* When looking up the window hierarchy, stop at foreign windowsAlberto Mardegan2014-04-011-2/+9
| | | | | | | | | | | If the window being activated is an embedded window, the parent window will be a foreign window (usually not even belonging to the current process); we shouldn't attempt to focus it. Task-number: QTBUG-37984 Change-Id: I2ea03a86b30bbc43cde643e18e0e1d020e5f2c84 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Item views: respect selection mode when closing an editorJ-P Nurmi2014-04-011-2/+3
| | | | | | Task-number: QTBUG-31411 Change-Id: I1a52eb739e0bc2afa7227f006461916df8ecaf48 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Item views: respect focus policy when closing an editorJ-P Nurmi2014-04-013-11/+9
| | | | | | Task-number: QTBUG-31411 Change-Id: Ib0a72755c35a553653ea014672d59979a550b7ae Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Propagate textureChildSeen properlyLaszlo Agocs2014-03-311-1/+1
| | | | | | | even if setParent() is not called afterwards. Change-Id: Ie54e227c7adda2710fbd46176e9a15252aef2985 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Send touch update events to widget if there is a gesture pending for it.Friedemann Kleint2014-03-313-1/+12
| | | | | | | | | | | | Otherwise, touch update/end events were ignored and the gestures were never triggered (unless a native widget was used). Task-number: QTBUG-37759 Change-Id: I4b0145ffe535065e1458164b67bc8d9e33a4af97 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* If no screens, attempting to create a window results in clean exitShawn Rutledge2014-03-291-1/+6
| | | | | | | | | | | Asserting is only relevant for debug builds, and there were a couple of other places that a segfault would typically occur before the assert had a chance. Change-Id: I1abc82eb3ecfa91050117fab1525f4cbd82ff486 Task-number: QTBUG-37876 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Remove a duplicate code of else-if statementluyikei2014-03-291-3/+0
| | | | | | | | I found a useless else-if statement in qwidgettextcontrol.cpp. It is duplicating.Needless to say,it should be removed. Change-Id: Ic70b995196f7199e4aa5263a4937c1678b130357 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Do not rely on the list of standard font sizes for QFontDialog.Leonard Lee2014-03-281-8/+10
| | | | | | | | | | | | | QFontDialog should always show the correct size, even if the size is not available in the list of standard font sizes. Native font dialogs across common platforms show the correct size at all times. Inside init() function, the size list requires proper initialization since the initial value of size is zero. Task-number: QTBUG-10317 Change-Id: Idc9e922ac95f797ac98bbf6c885e52828c4c48fd Reviewed-by: Liang Qi <liang.qi@digia.com>
* Fix disappearing transient scrollbarsJ-P Nurmi2014-03-282-5/+19
| | | | | | | | | | | | | | | | | When a transient scrollbar is already at the end and user attempts to scroll further, the scrollbar is "flashed" to indicate that the scroll area is already scrolled to the end. This is done so that the scrollbar is first painted with a flag turned on to make it appear visible and then again with the flag turned off to make qstyle start fading it out. The previous code that relied on paint events to clear the flag was error prone, and caused the scrollbars to get stuck in an inconsistent state. This change makes sure that the flag gets cleared regardless of whether a paint event in each state is received or not. Task-number: QTBUG-37787 Change-Id: I907697c32cd4d55208a490804a221a5dd6bf7b0b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Pass events to QGestureManager from the main (GUI) thread only.Friedemann Kleint2014-03-281-9/+12
| | | | | | | Task-number: QTBUG-20946 Change-Id: I964452c1e97bd3d3a521e33abeb2f7d8cdbc89a9 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Streamline code in standard gesture recognizers.Friedemann Kleint2014-03-271-27/+8
| | | | | | | | | | Always initialize result variable, make static casts to QTouchEvent * local. Task-number: QTBUG-37759 Change-Id: Ib48034906afae8090a3be965a11f17d7d119bc5f Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Make QWidget::render() work correctly with all paint devicesLars Knoll2014-03-272-23/+8
| | | | | | | | | | | | | | | | | Make sure QWidget::render takes correct code paths with all kinds of paint devices. Correctly restore the inRenderWithPainter flag. The old code would not correctly restore the flag, likely leading to inconsistencies. Remove the unused last parameter in QWidgetPrivate::render. Remove the special handling for QPrinter in the same method. Task-number: QTBUG-26564 Change-Id: Iba43269b090abd8dd88c5225b75e1ee9239d58f9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* QPA: Fix QPlatformTheme::Palette enum value spellingGabriel de Dietrich2014-03-211-1/+1
| | | | | | | | | We keep the old value for source compatibility, but it should probably be removed at some point as the QPA API is semi-public only. Change-Id: I06e4c9ca1d8bb878411ad79ef409d60ce2d29f4a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Mac theming: Remove obsolete private color conversion functionsGabriel de Dietrich2014-03-211-12/+0
| | | | | Change-Id: I165eea19c8e50f981a9fa48c14f0d63c40951747 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Mac theming: Set background brush for menu paletteGabriel de Dietrich2014-03-211-5/+0
| | | | | | | | We also remove overriding the background when polishing the palette in QMacStyle. This is a leftover from pre-10.5 styling. Change-Id: Icaa6d9c864ab01783d83cc02192981136c417d24 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Set unified toolbar height accurately.Morten Johan Sørvig2014-03-203-8/+44
| | | | | | | | | | | | | | | Add registerContentBorderArea() to the Cocoa native interface which allows registering multiple "unified toolbar" areas for each window. Use this function in QToolBarLayout::setGeometry() to register the area for each TopToolBarArea toolbar. Task-number: QTBUG-36700 Change-Id: I52efcc5662556bb94f25f504be3710d0491f79b9 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
* Respect scrollbar position setting on MacJens Bache-Wiig2014-03-201-4/+4
| | | | | | | | | | | This was a regression from Qt 4.7. [ChangeLog][Widgets][QScrollArea] Respect scrollbar setting for click-position on Mac. Task-number: QTBUG-36314 Change-Id: I8bdb1aec9b308b0907f5db29d3519998bc843c18 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QFusionStyle: support transient scrollbarsJ-P Nurmi2014-03-202-32/+168
| | | | | | | | | | | | | | | | | | | | QFusionStyle doesn't make scrollbars transient by default, but the feature can be enabled with a proxy style: class MyProxyStyle : public QProxyStyle { public: int styleHint(StyleHint sh, const QStyleOption *opt = 0, const QWidget *w = 0, QStyleHintReturn *ret = 0) const { if (sh == QStyle::SH_ScrollBar_Transient) return 1; return QProxyStyle::styleHint(sh, opt, w, ret); } }; Change-Id: Ibf169e219ad920cbe7edb06e128e09ed4d8faf96 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QPushButton: draw label using the stylesheet's font.Mitch Curtis2014-03-201-0/+8
| | | | | | | | | | | The RenderRule for the stylesheet has the correct font information, it just wasn't being set on the painter that draws the label. Task-number: QTBUG-8990 Change-Id: I7cbaffc570421db04ebf3254cb6a21a68f7b868b Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QApplication: fix scroll phase handling for wheel eventsJ-P Nurmi2014-03-201-2/+2
| | | | | | | | Set scroll phase correctly for propagated wheel events, and do not let Qt::ScrollBegin/End steal focus when using Qt::WheelFocus policy. Change-Id: Ia38b64059d96a228c3b83c9b455db6e30dfb9a46 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Update year in About Qt dialogKai Koehne2014-03-201-1/+1
| | | | | | Change-Id: Ibbca2026c21394b68309cafe71e6d46065785f9b Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
* Fix QAbstractScrollArea to respect transiency per scrollbarJ-P Nurmi2014-03-201-25/+31
| | | | | | | | Do not query scrollarea's own style whether the scrollarea itself is a transient scrollbar, but query both scrollbar's style individually. Change-Id: I6397a29bc7b276a92c538cbb7fc0dd921595d093 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QOpenGLWidget retina support.Morten Johan Sørvig2014-03-201-1/+1
| | | | | | | Use device pixels where appropriate. Change-Id: Ia953e6da4034eecbfccf798701ec1b850eea9d5b Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Delete the OpenGL context before the window.Morten Johan Sørvig2014-03-201-4/+2
| | | | | | | | Fix a crash-on-exit on Mac, where deleting the context references the attached NSView. Change-Id: Iac38184dab7a406e4072452fd9a6b175e6968ade Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Use parent cursor for QLineEdit's clear button when not shown.Friedemann Kleint2014-03-202-3/+12
| | | | | | Task-number: QTBUG-37548 Change-Id: I8a4eb52f9a5a9551e53dab100f2337cf201d7401 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fixes: style runtime warnings when painting too small widgetsaavit2014-03-201-2/+2
| | | | | | | | | Trying to create a 0-size cache image would lead to trying to paint to a null image, giving runtime warnings. Task-number: QTBUG-37035 Change-Id: I0a7fdb19cc7548dea2770d6be4eb283f6b898ada Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QMenu: Enable sloppy submenu mouse navigationGabriel de Dietrich2014-03-193-5/+8
| | | | | | | | | | | | | Since we're in the 21st century, we set QCommonStyle to return true to the SH_Menu_SloppySubMenus style hint. This unlocks all the logic already available in QMenu. Task-number: QTBUG-20094 [ChangeLog][QtWidgets][QMenu] Enable sloppy submenu mouse navigation Change-Id: I134c87e348d98d1f46055e0bfef2b4a4a3d2993a Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QMenuPrivate: Make sloppyDelayTimer non-staticGabriel de Dietrich2014-03-192-11/+10
| | | | | | | | | | | Keeping the timer static would trigger warnings when enabling SH_Menu_SloppySubMenus in QCommonStyle in a forthcoming patch. This would happen if we opened a second level submenu quickly enough and get the mouse event handler to reset the timer its parent menu started. Change-Id: Ia768603b40b219f87138c60a595c65ef408761ae Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QMenu: Sloppy menu selection should allow hovering separatorsGabriel de Dietrich2014-03-191-0/+1
| | | | | | | | | | | Setting the current action to 0 clears the sloppy region and closes the submenu if we hover a separator on the way to the submenu popup. Now, we choose not to while the sloppy delay timer is running. Task-number: QTBUG-20094 Change-Id: I9d1b1358fe64c259dc47f35db8fc8f2b19a73153 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QNX: Fix QToolTipFabian Bumberger2014-03-191-2/+21
| | | | | | | | | The problem is that on QNX the window activation and focus events are delayed. QToolTip can not handle this and would hide the tool tip right after it is created. Change-Id: I6045d1d277b73508c24174d72a05e0baa4ae6e7f Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Handle key release events correctlyPaul Olav Tvete2014-03-181-1/+1
| | | | | | | | | Ignore key events that we don't actually handle. Task-number: QTBUG-35784 Change-Id: I196a4d0d199817a7dfd32fc98207ebfe3982050b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android input method improvementsPaul Olav Tvete2014-03-182-1/+9
| | | | | | | | | | | | | | Use the new inputmethod query API. and get rid of the hack where we would move the cursor back and forwards to make sure that the Android software keyboard noticed that the cursor had moved. The android plugin now uses absolute positions instead of position within the paragraph for all cursor handling (provided that the control supports the new API). Task-number: QTBUG-37511 Change-Id: I03463dbbcb4acbfa41e2eab06889d021d50da01f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* QGraphicsSimpleTextItem: Fix drawing the outline with pen, when setKonstantin Ritt2014-03-171-1/+1
| | | | | | | | | | | QTextLayout's setAdditionalFormats() is expected to invalidate the shaping results, so that the layouting must be done *after* the format range(s) gets applied. Task-number: QTBUG-33475 Change-Id: I6b948fc179da915545a98ac36f2c20163947ec9e Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QFileDialog: documentation clarifications about file type filteringShawn Rutledge2014-03-171-2/+14
| | | | | | | | | | *.* is not a portable file type filter. Anyway it's better to filter by mime types, because it's more inclusive now and may even get better in the future. Task-number: QTBUG-37393 Change-Id: Ide3c3dfc47cd4b4c55d842b73de5369a0596a546 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Remove unused static const variableUlf Hermann2014-03-171-4/+0
| | | | | | | clang on Mac OS complains about it. Change-Id: I7a385eb520c5098cf61a0d8c2e1de0731db2e1ae Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Fix high-dpi QGraphicsPixmapItem bounding rects.Morten Johan Sørvig2014-03-171-2/+2
| | | | | | | | | | | | | QGraphicsPixmapItem did not take the pixmaps devicePixelRatio into account when calculating the bounding rect. As a consequence, a 512x512@2x pixmap would get a 512x512 bounding size instead of the correct 256x256 bounding size. Task-number: QTBUG-37008 Change-Id: I266e418b7e5d92bf1d4c96bd9380a27708dc2b4a Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* Remove the _qt_filedialog_xxx hooksJ-P Nurmi2014-03-151-45/+4
| | | | | | | | | | These internal and obsolete hooks are no longer used. The correct way to provide platform dialogs in Qt 5.x is to implement a platform theme plugin, as was done for GTK+ 2.x. Change-Id: I3f1474fbf760130106b3c47173eaedd2f1a919bf Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* QWindowsXP/VistaStyle: Fix detection of item view delegate line edits.Friedemann Kleint2014-03-143-15/+16
| | | | | | | | | | | | | The old code tried to check the 2nd parent for inheritance from QAbstractItemView. This also triggers for line edits on a QDialog parented on the item view. Introduce convenience function that checks for top levels in the chain. Task-number: QTBUG-37504 Change-Id: I932f8efdb4764e9b1eea84c802bf7e8718338e1d Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Handle key release events correctlyPaul Olav Tvete2014-03-141-0/+2
| | | | | | | | Properly ignore key events that we don't actually handle. Task-number: QTBUG-35784 Change-Id: Ibd3e72c76367a1dc3b1f2d39538fcf8441082ff2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Don't block Key_Back in file dialogPaul Olav Tvete2014-03-142-7/+2
| | | | | | | | | | Update the 10 year old FIXME hack to allow Key_Back (which will close the dialog on Android). Also clean up nearby code that has been dead for seven years. Task-number: QTBUG-35784 Change-Id: I609858afb2caefe7025e421406288ae56717fea5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Vista Style: More menu item pixel fixes for QtQuick ControlsGabriel de Dietrich2014-03-141-2/+2
| | | | | | | | | | Includes a one-pixel fix for widgets, where the menu item text would be one pixel too far away from the vertical gutter. Task-number: QTBUG-37451 Change-Id: I2539233814a427c5bed66a5c07584717eb3df418 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Repaint widgets on screen change.Morten Johan Sørvig2014-03-142-0/+15
| | | | | | | | | | | | | | | | | Add a screenChanged handler slot to QWidgetWindow, which calls markDirty() on the backing store with the BufferInvalid and UpdateNow flags set. Update CocoaBackingStore to create a new buffer on window devicePixelRatio change. Use the QCocoaWindow::devicePixelRatio() implementation instead of a duplicate implementation in the backing store. The plan is to replace this implementation with one based on QUpdateWindowRequestEvent for Qt 5.4 Change-Id: I8e521c53df4ac90815613e730fe821996334721f Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* QGtkStyle: remove file dialog functionalityJ-P Nurmi2014-03-143-334/+2
| | | | | | | | | GTK+ 2.x file dialogs are now implemented in QGtk2PlatformTheme Change-Id: I2babd6a35e7abd606ec5d047abbefbe3f0fbb892 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* docs: QApplication::startDragDistance default value is 10Shawn Rutledge2014-03-141-1/+2
| | | | | | | | This comes from QPlatformTheme::defaultThemeHint(). Change-Id: I12a9add3af65e819a06b66d958acb8f21cfe0e13 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* correct send vs sent grammarDavid Fries2014-03-141-2/+2
| | | | | | | | Correct the tense of send vs sent in comments and documentation. Change-Id: I1c5ce9a7b1e49b8b0e8dcfde7d732e4c69acf73a Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* QQuickWidget: fix crash on exitPaul Olav Tvete2014-03-131-1/+12
| | | | | | | | | | Make sure that the correct context is current when freeing GL resources. Otherwise, on shutdown, QOpenGLVertexArrayObject would try to use the previously current context, which mmay already have been deleted. Task-number: QTBUG-37385 Change-Id: Ib2332f54636738a1a4b1041a7dcbffd0af00261d Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* QQuickWidget move/resize fixPaul Olav Tvete2014-03-131-2/+7
| | | | | | | | | | Make sure the alphamask in the backingstore is updated whenever the geometry of a QQuickWidget/QOpenGLWidget child changes. Task-number: QTBUG-37372 Change-Id: I70e94664bd7da774694645f604e1a7277fe563c7 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
* Doc: correction link, example and parameter issues qtbaseNico Vertriest2014-03-102-1/+3
| | | | | | | | | | | | | Moved codecs folder to qtbase/examples Corrected quote in dropsite.qdoc Replaced snippet statement by include statement Added doc for undocumented parameters Task-number: QTBUG-34749 Change-Id: If4de95b8d39e5680fd0f63f8d2b6685a4b0a8052 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Avoid using direct OpenGL calls in gui and widgetsLaszlo Agocs2014-03-101-7/+10
| | | | | Change-Id: I5d88a2e204ca23e178a4e3044b9cb13392c3e763 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>