summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | 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>
* | / Accessibility: Password QLineEdit should use * as text replacementFrederik Gladhorn2014-07-011-0/+2
|/ / | | | | | | | | Change-Id: Ie07e86f1b6dff3096cab462f918994efa07b2a87 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* | Enablers for QQuickWidget render() support.Paul Olav Tvete2014-06-302-3/+8
| | | | | | | | | | | | | | | | | | Add a QImage based fallback for renderToTexture widgets, and use that when rendering to something else than a QWidgetBackingStore. Change-Id: I415a3a27c4ecb4ddbac45181c5a568b01ac5cb7a Task-number: QTBUG-39562 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Accessibility: improve text attribute rangesFrederik Gladhorn2014-06-262-34/+33
| | | | | | | | | | | | | | | | | | Improve consistency and use QTextDocument functions to find ranges instead of coming up with our own scheme. This is important since QCursor's char format depends on block positions. Change-Id: I94eb137882dc6b5f7b01fa7693b4a536cc48d02a Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* | Silence warnings about not supporting setMask on platforms like eglfsLaszlo Agocs2014-06-261-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Showing warnings based on an (otherwise unused) WindowMasks platform capability is wrong. The default implementation of setMask() shows a warning anyway so it is safe to call it in any case. On top of this, platforms like eglfs may want to avoid showing any warnings, since they are completely useless for end users and pollute their debug output and Creator panes. The standard way is to provide an empty implementation for the function. This cannot work however if there are hardcoded warnings generated in the common widget code. Change-Id: I842a96b5b84c50b7caa59bdd48107785b21ab5af Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Fix crash when inserting the same instance widget more than onceJorgen Lind2014-06-261-0/+2
| | | | | | | | | | | | | | Task-number: QTBUG-39324 Change-Id: Ib1e0e107cd411311344aa5d85c3ca4c34211448b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Improve docs for QWidget::accessibleName/DescriptionFrederik Gladhorn2014-06-261-5/+21
| | | | | | | | | | Change-Id: Ie898c49ed10b9598a0482ecadb18bbadb586d7a9 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Propagate source/flags of QMouseEvent to QGraphicsSceneMouseEvent.Friedemann Kleint2014-06-255-1/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is useful to be able to detect synthesized mouse events in GraphicsView as well. [ChangeLog][QtWidgets][QGraphicsSceneMouseEvent] Accessors for Qt::MouseEventSource and Qt::MouseEventFlags were added to QGraphicsSceneMouseEvent to enable detection of synthesized mouse events. Task-number: QTBUG-39814 Change-Id: Ib5835fef1f484005f9b0fc86518ed32ea79cd80f Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Speed up the removal of items from a QGraphicsSceneDimitar Asenov2014-06-162-7/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using a linear index, all items in a scene are stored in a QList. While adding new items is a constant operation, removal requires a traversal through the entire list. This is especially problematic when the scene contains millions of items and many of them are removed, which requires a linear search for each item, resulting in a very slow operation. Moreover, this behavior is actually inconsistent with the current documentation which states for the linear index: "Adding, moving and removing items, however, is done in constant time." Instead of removing items from the list in the index, this patch just marks the list as invalid. The next time the list is required it will be rebuilt from scratch by traversing all items from the scene. This new behavior more accurately matches the documentation. Testing this change in a scene with over 1 million objects, resulted in a massive speed up, effectively eliminating the overhead of item removal. [ChangeLog][QtWidgets][QGraphicsScene] Speed up the removal of items when using the linear index. Change-Id: I95c7b90b9f1fe426018695b6429138530e6d2f3e Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵J-P Nurmi2014-06-0711-18/+62
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devJ-P Nurmi2014-06-0511-18/+62
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt.prf src/plugins/platforms/xcb/qxcbwindow.h src/tools/qdoc/qdocindexfiles.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I214f57b03bc2ff86cf3b7dfe2966168af93a5a67
| | * 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>
* | | Fix key navigation through cells with spans in QTableView.Mitch Curtis2014-06-061-1/+8
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When navigating with the directional keys or tab/backtab, there are certain situations where the cell that is edited is incorrect. For example, consider the table below. '^' represents the starting cell and the direction of navigation. 'c' represents the index that is arrived at as the currentIndex prior to this patch as reported by view.selectionModel()->currentIndex(). 'x' is the cell that should be edited: +---+---+---+---+ | | | e | | +---+---+---+---+ | | x | | +---+ +---+ | | c | | +---+---+---+---+ | | | ^ | | +---+---+---+---+ Before this patch, the cell that will actually be edited is c, rather than x, so after editing the cell and pressing enter, the previous contents of the cell will still be shown. With this patch, currentIndex() will be changed after every call to cursorMove(). Navigation into and out of cells is not affected because the visualCursor member in the QTableViewPrivate tracks the keyboard navigation entry point. If after the up navigation into the span, the user presses up, the cell entered is 'e', not the cell above 'x'. Task-number: QTBUG-29239 [ChangeLog][QtWidgets][QTableView][QTableWidget] currentIndex() now reflects the top left cell when in a span. Change-Id: I3dc3db46ebba340102860fc4ad98fcaf91484983 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Mac Style: Don't crash when rendering PE_IndicatorBranch without widgetGabriel de Dietrich2014-06-051-1/+2
| | | | | | | | | | Change-Id: I45784af3738807ab6753b67a5b103a65d4e28084 Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* | Fix internationalization of "txt File" in QFileDialogLasse Liehu2014-06-031-2/+4
| | | | | | | | | | | | | | | | Some languages (for example Finnish) need to customize punctuation and capitalization in this case. Change-Id: I9720626263f061adc7972bff18bcb59f2f2b382f Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Accessibility: Fix select state usageFrederik Gladhorn2014-05-312-3/+2
| | | | | | | | | | | | | | | | | | | | The selectable/selected states refer to items in a list and similar, do not interpret them as text selection states. Without this change NVDA for example announces text edits as selected which makes no sense and which it doesn't do for native text items. Change-Id: Ib1d109523bd4cc2b9b40ace8a8c3d7d3a7f9f25c Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Accessibility: Fix rect for QComboBox and QRadioButtonFrederik Gladhorn2014-05-304-0/+23
| | | | | | | | | | | | | | | | | | This is especially relevant on mobile devices where screen readers often send mouse clicks to the middle of the object. Task-number: QTBUG-39100 Change-Id: I5972f21dd12434601d86136215ab9b61248c9691 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Use accurate title/status bar gradient colors on OS X.Jake Petroules2014-05-261-11/+31
| | | | | | | | | | | | | | QMacStyle now uses proper system colors when drawing status bars. Change-Id: I618e485a2a68a484f7c8cb5635cd2bf529126c02 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-05-225-16/+12
|\| | | | | | | Change-Id: Ia36e93771066d8abcf8123dbe2362c5c9d9260fc
| * 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>
* | Turn setUnifiedTitleAndToolBarOnMac into a slot.Jake Petroules2014-05-211-3/+4
| | | | | | | | | | Change-Id: Ieb28960bf3fb9e70a6bcc6d47ff723f0ed4e1b63 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | qpa: Rename qwidgetwindow_qpa_p.h to qwidgetwindow_p.hTor Arne Vestbø2014-05-207-9/+9
| | | | | | | | | | Change-Id: I24835b86194653e89c0bacefd22ddbff06b6e97b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | qpa: Merge qapplication_qpa.cpp into qapplication.cppTor Arne Vestbø2014-05-203-505/+419
| | | | | | | | | | | | | | The variable 'appFont' was removed as it was not used. Change-Id: I8dfa8382b3f30b72490fd22b4e0a27e991318a9c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | Remove friends of QEvent.Friedemann Kleint2014-05-182-2/+2
| | | | | | | | | | | | | | | | Introduce function to set the spontaneous flag to QCoreApplicationPrivate to solve a few cases. Change-Id: I7c1f1f3644defe00deea9cecb244ca258afd5b94 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Remove friend class QETWidget.Friedemann Kleint2014-05-163-3/+0
| | | | | | | | | | | | | | The class no longer exists in Qt 5. Change-Id: Icd98c151f8e06910a3240d0bec6fff333a8ef3e3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | qpa: Merge qwidget_qpa.cpp into qwidget.cppTor Arne Vestbø2014-05-154-1125/+1033
| | | | | | | | | | Change-Id: I8424ec7290b366f4c76999a956fce1428fc56626 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | qpa: Merge qdesktopwidget_qpa.cpp into qdesktopwidget.cppTor Arne Vestbø2014-05-155-198/+146
| | | | | | | | | | Change-Id: I39316744b87d1fd588a99ab71edbd711ee8fae47 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Make QColorDialog build under QT_NO_REGULAREXPRESSIONGiuseppe D'Angelo2014-05-151-0/+8
| | | | | | | | | | | | | | | | Since we can't set a validator on the HTML-color lineedit, just make it readonly. Change-Id: Ibeaacbea00867cdb6ef33b6667f7ee3539b7f929 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-131-0/+1
|\| | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp Change-Id: Ibe75603dc8a51769db6550ea3f07bc8d19b0be85
| * 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>
* | Removed unused variable macItemVMargin in qmacstyle_mac.mm.Ivan Komissarov2014-05-131-1/+0
| | | | | | | | | | Change-Id: Ib888781238f6cc9407732431219e570299a47198 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | QMenu: Use Qt::QueuedConnection when connecting to native menu.Ivan Komissarov2014-05-131-2/+2
| | | | | | | | | | | | | | | | | | | | This fix allows to catch exeptions thrown in slots connected to QAction::triggered() signal via QApplication::notify(). Task-number: QTBUG-15197 Change-Id: I6f3e51ec39139ffb0a5f3a31b79f839c18089b26 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2014-05-1311-30/+31
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-1311-30/+31
| |\| | | | | | | | | | | | | | | | | | | Manually changed enum to LibGL in src/plugins/platforms/xcb/qglxintegration.cpp Change-Id: If34ee6cce3d1d51fb4bb1fdfa59c30389ea0d207
| | * 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>
| | * QFileDialog: Return empty QUrl from the static get..FileUrl() functions.Friedemann Kleint2014-05-061-3/+8
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-38672 Change-Id: Idf554cd93d1a79db7c82f3165bd128fb31ead3e5 Reviewed-by: David Faure <david.faure@kdab.com>