summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Remove a boolean trap in QLayout::replaceWidgetGiuseppe D'Angelo2013-11-102-9/+19
| | | | | | | | | | Use some flags instead. Task-number: QTBUG-34668 Change-Id: I9a75253c8eb98164c594bb6bb06c1a16c9609537 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QKeySequenceEdit: give nested line edit an objectNameMarc Mutz2013-11-101-0/+1
| | | | | | | People request this, and other widgets do this, too (say, QSpinBox). Change-Id: I275537fb82b805b0dcb8edba87b8e234985f8d1f Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QKeySequenceEdit: make setKeySequence a slotMarc Mutz2013-11-101-1/+1
| | | | | | | | | There's a signal keySequenceChanged(QKeySequence), so the setter should be a slot, too. Change-Id: I6591bad071444ffa252a2fdb9ccaf28e8629f59c Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Document the BC break of viewportSizeHint() in itemviewsGiuseppe D'Angelo2013-11-097-5/+29
| | | | | | | | | | | | Since users were not supposed to use this feature at all, just live with the BC break, but document it. In order to prevent possible problems in the future, introduce dummy overrides in QAbstractItemView and QListView as well. Also, fix the visibility of the overrides (it's protected, not public). Task-number: QTBUG-34667 Change-Id: Ib4554ae5e1e7d3ce4ea8e8703e1fea9e2231edb0 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Android native message dialogBogDan Vatra2013-11-096-7/+93
| | | | | Change-Id: Ief8c3ce3b8683c6960f046245844c1835a327d51 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Move QTreeView::accessibleTree2Index to the private classGiuseppe D'Angelo2013-11-083-11/+17
| | | | | | | It's not needed to expose that symbol. Change-Id: I65b752a41d80eb0779969fa3887c081b4c2c88db Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* QHeaderView - remove confusing boolThorbjørn Martsum2013-11-082-7/+2
| | | | | | | | | | It is probably better not to have a default boolean in QHeaderView::setResizeContentsPrecision Task-number: QTBUG-34665 Change-Id: I0bb2c35abc1d5713bb3ee65df3af86c04f175a38 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix QFileDialog::getSaveFilename() with a given default nameShawn Rutledge2013-11-081-9/+10
| | | | | | | | | | The QFileDialogOptions::initiallySelectedFiles were overridden, and the given filename was also not properly converted to a local file URL. Task-number: QTBUG-34408 Task-number: QTBUG-34446 Change-Id: I51d05b954a5393d10db9232945ba05bda7068e73 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Revert "Fix setVisible() of QWidget has no effect in QTreeWidgetItem"Friedemann Kleint2013-11-081-2/+1
| | | | | | | | | | | | It introduces QTBUG-34653 (Qt Designer widget box no longer repainted after collapsing items or using the filter). This reverts commit 04de24c6449422d29a0d4760375aa94f59222fa3. Task-number: QTBUG-13522 Task-number: QTBUG-34653 Change-Id: Ieb9766e7f15acea901fce4ad7142aa72557b9957 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Prevent a crash in QLayout::replaceWidgetGiuseppe D'Angelo2013-11-081-1/+5
| | | | | | | | Item might be null. Change-Id: Ia432a35cb1a6bb02ee056ff8ad44a9f35bdbc146 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix potential BC break in QColorDialog.Friedemann Kleint2013-11-083-47/+61
| | | | | | | | | | | Replace newly reimplemented virtuals in d928dbbc919f5f39af9ce5c69eb8e9ffa9da71d3 . Task-number: QTBUG-34663 Task-number: QTBUG-14332 Change-Id: Idb2cc2ec237c96f7157470728bb79ff3efc504d0 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix potential BC break in QTabBar.Friedemann Kleint2013-11-082-18/+6
| | | | | | | | | Move code from mouseDoubleClickEvent() to event(). Introduced by 252bad7c589e03d3e12df02354b00a84d8e3159a . Task-number: QTBUG-34670 Change-Id: I98ed24f26977220cf03524cfe001524364473982 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Dialogs: provide the StandardButton->ButtonRole mapping in QPAShawn Rutledge2013-11-071-40/+3
| | | | | | | | | | | | | As the QPlatformMessageDialogHelper will be implemented repeatedly, it's useful to have this mapping in one place for reuse. Also, since we do not guarantee that either accepted() or rejected() will be emitted for every possible button on a QtQuick MessageDialog, it's useful for the QtQuick.Dialogs module to have access to this mapping to interpret individual button presses and emit the role-specific signals such as yes(), apply(), help(), etc. Change-Id: I7be753080794adabb784df9b95ac04aa1c29151c Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Doc: Updated url variable in qdocconf files.Jerome Pasion2013-11-061-1/+1
| | | | | | | | | | | | | | In 5.2, the HTML output is in a flatter structure and when they are hosted in qt-project.org/doc, the documentation will be found at http://qt-project.org/doc/qt-$QT_VER The url variable is used by projects outside of Qt 5 which need to link to Qt 5 documentation, such as Qt Creator. Task-number: QTBUG-34584 Change-Id: Ifa55fcd9e402b0e184a41e316340e46aeb7101de Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Fix placeholder text in QTextBrowserJ-P Nurmi2013-11-051-7/+8
| | | | | | Task-number: QTBUG-34051 Change-Id: Ief55cda861ef293a5fdeb2e5fa287b835c729894 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Remove Q_INIT_RESOURCE_EXTERNTor Arne Vestbø2013-11-051-3/+0
| | | | | | | | | | | It's not providing any convenience over using Q_INIT_RESOURCE, which does its own extern, were never documented, and was added back in 2010 without any commit message justifying its existence. Change-Id: I1ca9a042d3f4fca34007d28b140661c50064f11b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* qdoc: Eliminate qobject_cast() collisionMartin Smith2013-11-051-0/+2
| | | | | | | | | | | | | | | | | | Two template functions for qboject_cast() are defined in qwidget.h that confuse qdoc because qdoc doesn't handle template functions correctly. In this case, the documentation for all qobject_cast() functions appears in qobject.cpp where it is declared to be related to QObject. This fix surrounds the template functions in qwidget.h with #ifndef Q_QDOC ... #endif, since qdoc doesn't need to see them. This fix unmasks a linking bug QTBUG-34564, which will be fixed separately. Task-number: QTBUG-34505 Change-Id: I97fd32cc563bfa4a232819c097f41be56adf0114 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Disable clear button in read-only QLineEdit.Friedemann Kleint2013-11-053-0/+13
| | | | | | Task-number: QTBUG-34315 Change-Id: I6c318879aee907c080e871a541da4ba5eadd71ed Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QLineEdit: Fix potential crash when removing the clear button.Friedemann Kleint2013-11-053-5/+4
| | | | | | | | Remove it from the side actions list. Task-number: QTBUG-34315 Change-Id: I70063351193b504f8656e903896d155ac74f73a6 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Make error messages a bit better.Stephen Kelly2013-11-051-1/+1
| | | | | | Change-Id: I83b5852abfbb3437c03516bc4b36eff385ddb983 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Doc: Fix broken linksSze Howe Koh2013-11-052-3/+3
| | | | | | | | Task-number: QTBUG-33360 Change-Id: Ic944cb2f575c35ebad64852ef5fc44a50ac03571 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Android: Differ between ShowMaximized and ShowFullScreenEskil Abrahamsen Blomfeldt2013-11-011-0/+2
| | | | | | | | | | | | The default is now ShowMaximized which behaves as it did before, i.e. each window will fill the screen but the status bar will be visible. Calling showFullScreen() explicitly will now hide the status bar to maximize the amount of screen real estate occupied by the application. Task-number: QTBUG-33135 Change-Id: If0d0a2ab72f8026e76818290e2b953dbc0dec156 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* QWindowPrivate: add virtual function 'clearFocusObject'Richard Moe Gustavsen2013-10-311-0/+7
| | | | | | | | | | | | | | | | | | | | | | | On mobile platforms, a line edit should only have keyboard focus when the virtual keyboard is open. As it stands, the only way to clear focus when the user hides the keyboard, is to deactivate the whole window. This is a bit too much, since Qt still expects the window in front to be active/focused. What we need is a way to remove focus from the current focus object without disturbing the state of the window. QWindow has a virtual function 'focusObject' from before. We now add a virtual function 'clearFocusObject' to QWindowPrivate that can be overridden by QWidgetWindowPrivate and QQuickWindowPrivate. That way we can remove focus from current focus object when the virtual keyboard is closed from the platform plugins. Change-Id: Ica4ec76f8a69cd6107236a8000ff8bd742e988b5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* use private linkage where possibleOswald Buddenhagen2013-10-311-1/+1
| | | | | | Change-Id: Ie8eaa71bee87654c21218a23efd7e9d65b71f022 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix setVisible() of QWidget has no effect in QTreeWidgetItemChengyong Xie2013-10-311-1/+2
| | | | | | | | | | Check if the item is hidden before show the item(QWidget) Task-number: QTBUG-13522 Change-Id: I1c605d5cb8a80f340e9b7601612d3760f51cb4a7 Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: David Faure <david.faure@kdab.com>
* QFileDialog: document the consequences of being "widgetless"Shawn Rutledge2013-10-311-1/+9
| | | | | | | | | After 37ca2224eca671200a2710f57f970d2993e62aa5 it's an exposed behavior change that the widgets and related paraphernalia don't exist. Task-number: QTBUG-34100 Change-Id: Ie0ebcb8c5c5668b6c12c5447f25bfbfd893dec6c Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix QSpinBox size calculation problem with empty stylesheetsCaroline Chao2013-10-301-1/+1
| | | | | | | Task-number: QTBUG-34305 Change-Id: I3e89dc66446e9f5e9e1810be367830b9df98ab0b Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Doc: Fix miscellaneous typosSze Howe Koh2013-10-303-3/+3
| | | | | | Change-Id: Iaf0dd8974c3ad78beffa995c596a76fb3e4cceab Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Fix QCommonStyle::subControlRect(SC_GroupBoxCheckBox)J-P Nurmi2013-10-291-1/+1
| | | | | | | | | Make sure the groupbox check indicator doesn't get placed in negative coordinates when font height is smaller than the indicator height. Task-number: QTBUG-33610 Change-Id: Ifad0016e9311f1212cccb6d5971343beb68517c4 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QWizard: provoke 'enum value not handled in switch' warnings in ↵Marc Mutz2013-10-281-1/+13
| | | | | | | | | | | object_name_for_button This is strictly speaking a behavior change, since we're no longer returning something for Stretch and NoButton, but - guessing here - that shouldn't matter. Yet, better safe than sorry, thus submitted as a separate patch. Change-Id: I20cb084147f8c9257ce37d1e87ea38febabec28d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QWizard: give all buttons an objectNameMarc Mutz2013-10-281-13/+16
| | | | | | | | | | | | Only Commit, Finish and Cancel didn't have an object name, yet. Also Extract Method on the switch statement, add a test, and use QStringBuilder. Task-number: QTBUG-29924 Reported-by: Leo Arias Change-Id: I8c29606bc53e9d4caab631da2089e971a9da2d75 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Remove sunken state for Android.BogDan Vatra2013-10-251-2/+9
| | | | | | | | | Only QLineEdit always sets the sunken state and on some Android devices (e.g HTC) the line edit is painted as it is pressed. Task-number: QTBUG-29565 Change-Id: I25031ffaadba85cae6b6ff17c0847cb706e23503 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: Fix the QSlider handler position.BogDan Vatra2013-10-251-4/+7
| | | | | Change-Id: I300f187a94d6c2b6b385c5a129150344f6b805ea Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* QFileDialog can delete files too, not just directoriesShawn Rutledge2013-10-231-0/+2
| | | | | | | | | After Ic12de12ec51c20de52d040514e90be5e783add43 this functionality was broken. Added an autotest. Task-number: QTBUG-34159 Change-Id: I8f41b7073dc57fea855ab87796f09e8a91520d13 Reviewed-by: David Faure <david.faure@kdab.com>
* Better QWindowContainer by not relying on native widgets.Gunnar Sletta2013-10-224-23/+172
| | | | | | | | | | | | | We change the behavior slightly from the initial implementation in 5.1. Forcing the use of native child widgets is causing massive performance issues so instead, we attach the embedded QWindow directly to the root window. The only exception is QScrollArea and QMdiArea which still enforces native windows for the entire parent chain to make clipping and stacking work. Task-number: QTBUG-34138 Change-Id: If713637bd4dce630552ace2f8ad6b2e86c063721 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: Add missing \since 5.2 to QSizePolicy::retainSizeWhenHiddenMarcel Krems2013-10-221-0/+2
| | | | | Change-Id: I461e8187810e564e06869df86b23cc40aeba72bd Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* don't bother defining QT_NO_DIRECTWRITE hereOswald Buddenhagen2013-10-181-4/+0
| | | | | | | | the relevant code moved to the windows platform plugin. Change-Id: I06f2efd1190ee7d1da1f48172ae879e5c06a945f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Clear qt_tablet_target in ~QWidgetWindow.Friedemann Kleint2013-10-182-0/+7
| | | | | | | Task-number: QTBUG-34007 Change-Id: If67563e5d9c4040256b58521773736e14db6fbaf Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Fix widgets link error on iOS (missing mac gesture recognizers).Friedemann Kleint2013-10-181-2/+2
| | | | | Change-Id: Iebea6b6e26e9aca9a64aecc9b125c48fe1cc7e43 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Rename private viewOptions to viewOptionsV1Samuel Gaist2013-10-176-22/+22
| | | | | | | | | | Renaming of the private implementation of viewOptions to viewOptionsV1 so that future updates of QStyleOptionViewItem can be easily integrated in the code with a simple search/replace. Task-number: QTBUG-1180 Change-Id: I18f876a435417717fa0d759bb302a7c6059daf80 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Move the viewOptions code back to public implementationSamuel Gaist2013-10-175-42/+26
| | | | | | | | | | | | | The code generating the QStyleOptionViewItem has been moved back to the public implementation and the private QAbstractItemView::viewOptions calling it (like the Qt 4 implementation does). This makes the item views behave properly again e.g. QListView drag & drop in Icon mode gets the correct options to draw the moving items Task-number: QTBUG-1180 Change-Id: I068861e1485252f12d73f9acaf12933d0ec84e2c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Properly paint QListView dragged item in icon modeSamuel Gaist2013-10-172-28/+17
| | | | | | | | | | | | | | | Currently, when dragging a QListView item in icon mode, only the item is moved and once out of the view port, the visual feedback is lost. This patch updates the QDrag pixmap to have a persistent view of what is moved. Task-number: QTBUG-1180 [ChangeLog][QtWidgets][QTBUG-1180] Dragging an item outside the QListView in icon mode doesn't lose the icon. Change-Id: I14f864a8f947997f3bdad1a05fabd200de026d66 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Implement native gestures on OS X.Morten Johan Sørvig2013-10-177-91/+413
| | | | | | | | | | | | | | | Add QWindowSystemInterface::GestureEvent and QNativeGestureEvent to QtGui. These events are copies of Qt4's QNativeGestureEvent, where it was an implementation detail of QGestureManager. Add gesture message handlers to QNSView and bring back the Mac gesture recognizers for QGestureManager. Task-number: QTBUG-28126 Change-Id: I1304e09e776fa7c44d133d54ca8b895ca2f544c5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* QGraphicsItemAnimation: save some string data (text size -= 1K)Marc Mutz2013-10-161-37/+26
| | | | | | | Also changed the 'step' range check to treat NaNs as invalid, too. Change-Id: I993c5efffcf7140fba8f80a7db499cd2335867e0 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Only emit messageChanged() if the message has actually changedAndy Shaw2013-10-151-2/+3
| | | | | | | | | This fixes QStatusBar so it is back to the original behavior of only emitting the signal when the message has changed. The intention of the code that caused this to break in the first place is kept intact. Change-Id: I2f57c2abec01246ed924626ad954ac9ff9889855 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QFileDialog: don't create widgets if the platform dialog will be usedShawn Rutledge2013-10-152-79/+193
| | | | | | | | | | | This is a performance and memory optimization which also fixes bugs that are related to creating widgets, file system models etc. despite using platform native dialogs. Similar to 785bc64f8e743ac269f15cbe7fecba93d3d507ac for QColorDialog. Task-number: QTBUG-33039 Change-Id: Ia1aa7ec1f43b47006b9ebd377aed15c958538a17 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Accessibility: simplify dockwidget accessibleFrederik Gladhorn2013-10-141-2/+8
| | | | | | | | | | | | | This patch merges the two classes that were used to make dock widgets accessible into one. The title bar does not need to be represented by its own accessible object. In addition the buttons on the toolbar are now labelled. Task-number: QTBUG-33946 Change-Id: Id90d8c09f15ed683e64dbe3f6ac55bca7a0b300f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Don't rely on the Qt version when reading a QHeaderView state streamAndy Shaw2013-10-121-4/+5
| | | | | | | | | | Since the datastream version is not set in previous versions of Qt when streaming the state of the QHeaderView then we cannot rely on this when adding new data to the state. Therefore we check if we read past the end before assigning to the new variable. Change-Id: I7128ffc91e47f9c8797cfa24d206a789d2814908 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Make QSystemTrayIcon::showMessage invokableAllan Sandfeld Jensen2013-10-112-2/+4
| | | | | | | | | | Qt WebKit's HTML5 web notifications rely on QSystemTrayIcon::showMessage to be invokable since the lower WebCore components can not link directly to QWidgets. Change-Id: I952de47ed8a90553a8f1ac30256d77ef6014da44 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-0885-425/+425
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>