summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/release' into stableSimon Hausmann2013-11-282-2/+8
|\ | | | | | | Change-Id: I860404a1ef18c88a968a9eded405bb67967047b9
| * Fix for co-existence of QtDeclarative and QtQmlSimon Hausmann2013-11-262-2/+8
| | | | | | | | | | | | | | | | | | | | | | As a follow-up to commit 2f87fde9bb4bad6787101c0d135419b350b201a5, we also need to change "hack" in the QGraphicsItem and QWidget destructor for early item destruction to support the _qml1 variant of the QObject destroyed callback. Task-number: QTBUG-35006 Change-Id: I65e37b1e9ddd8d14267aaba024408611b8cd3d77 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Fix coding style in QLabel example codehjk2013-11-271-8/+8
| | | | | | | | | | | | Change-Id: I13838c1759b14089ba9f4daf442048fb5c8da738 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-11-264-23/+11
|\| | | | | | | Change-Id: I83ff8f4d7dffd7385013a1bd8a1732a89ee20d56
| * Revert "Android: Use native platform menus."Eskil Abrahamsen Blomfeldt2013-11-251-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 98f0b4668999d677d8bf91d57ac095d96e7a661c. The native menu popup would never exit its event loop, because there's no listener for the closing of the menu. Since this is very last minute and the change is not ready, we revert it and use the widget menus instead. Change-Id: Ie9ae707300a265130a90d1ccb5f093f50cc0b2fb Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
| * Revert "Ensure Qt::WA_Mapped is set in case of obscured native windows."Tor Arne Vestbø2013-11-212-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Qt::WA_Mapped maps (sic) to windowHandle()->isExposed(), and we set/update it in QWidgetWindow::handleExposeEvent(). Setting it directly in show_sys shortcuts QPA and assumes showing a window is synchronous on all platforms, resulting in trying to flush the widget backingstore when the window was not exposed yet (due to discardSyncRequest starting to return false). This reverts commit 829b1d13b225e87b8a385397e2b53c7a9f8cda9e. Change-Id: I0bd700d4939bc69ba184d8586435b68ec3dd72fb Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * Allow platform to decide default behavior for show() based on window flagsTor Arne Vestbø2013-11-201-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ShowIsMaximized and ShowIsFullscreen style hints were not granular enough to build a default behavior from that would be correct for all platforms. The recent Android patch that excluded dialogs from being shown maximized (Ia249e93dbbea1) has now been moved into a platform override in the Android integration plugin, leaving other platforms to the default behavior of using the style-hints. We still special case popup-windows though, as that behavior has been there for a while. Task-number: QTBUG-34969 Change-Id: Id36346d71bfc46171383ffe334592ca0b94e456f Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Mac style: Fix pressed tab appearanceGabriel de Dietrich2013-11-251-1/+1
| | | | | | | | | | Change-Id: Ib2bfc5afcb4d1a9fa20f5b1ec90c4c239a97954e Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Mac style: Fix selected tab text color on 10.6Gabriel de Dietrich2013-11-251-3/+4
| | | | | | | | | | | | | | | | This is a regression introduced by 65b39b3cdcdfe175d80ccf9428168ed51be77fd8. Task-number: QTBUG-34540 Change-Id: I1f78337b13c806f6b6794b769cfe99206445ce7a Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Fix the ignored Qt::WA_StaticContents on WindowsChris Colbert2013-11-251-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This restores the ability from the Qt 4.x series to honor the static contents region in the backbuffer when resizing a widget. The fix only applies when running under Windows. Task-number: QTBUG-34799 [ChangeLog][QtWidgets][Windows] Update QWidgetBackingStore and QWindowsBackingStore to support Qt::WA_StaticContents QWidgetBackingStore::staticContents() was updated for windows to *not* unconditionally return false. It now returns true if it has a non-empty static widgets list. QWindowsBackingStore::resize(...) was updated to honor the provided static contents region. It now copies the static region into the new backbuffer in a manner similar to what was done in Qt4. The difference is that this version accounts for the possibility of the new buffer having a smaller region than the old buffer. In Qt4 the ::prepareBuffer method was only called when the buffer was resized larger. Change-Id: I135ff8fb16f52759089f1e7353426303c4504db3 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-11-225-5/+35
|\ \ | | | | | | | | | refs/staging/stable
| * | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-11-205-5/+35
| |\| | | | | | | | | | | | | | | | | | | Conflicts: configure Change-Id: I0d31f23483ea67c4cac5af16014366e1ba5ac093
| | * Fix crash when windowcontainer is used in a dockwidgetGunnar Sletta2013-11-203-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dockwidget's toplevel window would be a parent of the container's window when floating. When plugged back into the mainwindow the dockwidget's window is destroyed and the container's window along with it. Added a function toplevelAboutToBeDestroyed to unparent the containers window before this happens so parentWasChanged will work correctly. Change-Id: I06679cfb3a8fa3834c0db0be5973c012b8277275 Reviewed-by: Ulf Hermann <ulf.hermann@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| | * Ensure Qt::WA_Mapped is set in case of obscured native windows.Friedemann Kleint2013-11-202-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-33520 Change-Id: I51f9b4634be29fd32f4ad9cc8b5d3e10b19ea2f5 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| | * Android: Use native platform menus.BogDan Vatra2013-11-181-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an Android only patch, a proper implementation will be pushed soon to stable branch. Task-number: QTBUG-29462 Task-number: QTBUG-33588 Change-Id: I3447c523b4533a768d7f95e4ae60541b09a7944f Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | | Report input method hints for QGraphicsTextItemPaul Olav Tvete2013-11-211-1/+3
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-34893 Change-Id: Iabf3b8be4896dadf07e4440f2cffc40aede4a85b Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | | Remove QMacStyle titlebar height + 4 adjustment and consequencesShawn Rutledge2013-11-215-24/+0
|/ / | | | | | | | | | | | | | | | | | | This was a tweak to fix a bug in 2005 which has probably outlived its usefulness, plus an accumulation of workarounds on top. (started as 48b5266e8ff9b472a16290dd923fe24dd0b6989b in the historical repo) Task-number: QTBUG-34760 Change-Id: I2c01269e43636385ee5c89305c6b90f4a7f2c537 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-11-203-3/+21
|\ \ | | | | | | | | | refs/staging/stable
| * | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-11-183-3/+21
| |\| | | | | | | | | | Change-Id: Ie6d44caf1d630cb029178a1af40c637f24a25ee7
| | * Crash fix in QTreeView::sizeHintForColumn().Martin Pley2013-11-161-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vertical scrollbar may get out of sync. When this happens, the calculation of firstVisibleItem will retrun "-1". This must be handled in ::sizeHintForColumn(). Added an auto-test for the crashes. Task-number: QTBUG-34717 Change-Id: I867fd144ef3ce45e382337c5eafe345f573cd944 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
| | * Don't maximize dialogs.BogDan Vatra2013-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-34765 Change-Id: Ia249e93dbbea11f3c03881c5fb88396bfad0e8fa Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| | * QKeySequenceEdit: remove RESET function from keySequence Q_PROPERTYMarc Mutz2013-11-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A RESET function is only needed if the default value of the property cannot be set with the normal setter. This is not the case here, as clear() is the same as setKeySequence(QKeySequence()). Change-Id: Ib751677436ebdcec0a7951dceae1e0f0323500ff Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | When we get a WindowBlocked event then reset the qt_button_down valueAndy Shaw2013-11-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whenever a window gets blocked, then the qt_button_down variable should be reset as it is not going to receive the release event for the mouse. This fixes problems with the mouse cursor not being updated when moving over widgets (such as QLineEdit) after a dialog is shown in response to a press event. Change-Id: Idfd072eaf36f51b816a0b2a0391cdc447d7a5d9d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | Clear focus from active widget when windowcontainer gets focus.Gunnar Sletta2013-11-191-0/+5
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-31853 Change-Id: If0d29ee0a125464b32be99332502473b7c626bb0 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | | Widgets: Never revoke focus by click on focused widget.Christoph Schleifenbaum2013-11-181-0/+10
|/ / | | | | | | | | | | | | | | | | | | | | When clicking on a widget currently focused, w/o having Qt::ClickFocus set as focus policy, the focus should stay on the widget and not get propagated to the widget's parent. Task-number: QTBUG-34042 Change-Id: I53f1153829cc7228de02a90e38125b5cf4ee5008 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QHeaderView - do not ignore -1 as minimum section sizeThorbjørn Martsum2013-11-171-1/+1
| | | | | | | | | | | | | | | | | | We claim that -1 is a special automatic value, but calling setMinimumSectionSize with -1 is unfortunately ignored due a regression in 524c3e05e811d81fbcd71eedb377b7eaa0a21ef3 Change-Id: I7d7e5dbbf78e561849d2f2352c9edb2df36aa181 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Don't accept wheel events if sendEvent() returns false.Sérgio Martins2013-11-151-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise wheeling over disabled items won't let the wheel event propagate to the parent. An easy way to reproduce the problem is by having a flickable with some disabled item in it. Task-number: QTBUG-33477 Change-Id: Ib327cc34dd9f415617ffbc41064f689507446c05 Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | QFormLayout: Avoid assertion with negative spacings.Jan Arve Saether2013-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | It's not really clear if styles *must* return a non-negative value for QStyle::pixelMetric(PM_Layout{Vertical,Horizontal}Spacing), but both QBoxLayout and QGridLayout seems to be robust enough to handle this. They will simply make sure that the spacing is never negative. We therefore make QFormLayout equally robust. Task-number: QTBUG-34731 Change-Id: I62235bfcd8adf7757cf15bc9927b29650ae6459d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | QKeySequenceEdit: simplify clear()Marc Mutz2013-11-141-9/+1
| | | | | | | | | | | | | | | | | | As the test case shows, clear() is semantically equivalent to setKeySequence(QKeySequence()), so implement it that way. Change-Id: Id68edbbf85aac3bcff82c81310c38274ed8e6708 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Move MaxKeyCount from QKeySequenceEditPrivate to QKeySequencePrivateMarc Mutz2013-11-142-6/+7
|/ | | | | | | | | | | | | Adjust users and add a static_cast that MaxKeyCount be 4. That is instead of adjusting all the code to use MaxKeyCount instead, some of which cannot be thus changed (e.g. where using the QKeySequence(int, int, int, int) constructor). This was requested in the original review, but never implemented. Change-Id: I3812340890f4d75257139f04e73e83083ca09760 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* 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>