summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Add Q_DECL_OVERRIDE to accessibility classesFrederik Gladhorn2013-10-051-18/+18
| | | | | | | | This actually shows two completely unused functions in QAccessibleTabBar (fixed in follow up patch). Change-Id: If6f464c022617b2ee1db654936e3ff9931103eb6 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Update QSessionManager and related classes documentationSamuel Gaist2013-10-021-1/+1
| | | | | | | | | | Update the Qt 4 documentation of QSessionManager to reflect the changes in Qt 5 Task-number: QTBUG-33528 Change-Id: I74286134155efc2781f9f6fc505fb6cf736d814e Reviewed-by: Martin Smith <martin.smith@digia.com>
* Fix race condition in ~QFileInfoGathererFrederik Gladhorn2013-10-021-0/+2
| | | | | | | | | | | | | | | | tst_qfilesystemmodel was hanging regularly. In QFileInfoGatherer::~QFileInfoGatherer() it would be stuck on wait() and in QFileInfoGatherer::run() it would be at condition.wait(&mutex); It looks like while abort was set to true, the while in run() had just entered so that it would wait for condition indefinitely. Task-number: QTBUG-29403 Change-Id: If6cebbc98ec7f54fbdf347804780bbfc5e177b3b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* QMessageBox - make detail text work on set after showThorbjørn Martsum2013-09-301-1/+3
| | | | | | | | | | Our manual test reveals that a setting a detailed text after it is shown does not work. This patch fixes that minor issue. Change-Id: I4930880def2d8361d247e943e1a848dd49ca3882 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QMacNativeWidget: Background should be transparentGabriel de Dietrich2013-09-261-0/+1
| | | | | | | Cocoa will draw it for us. Change-Id: I73c124749658ae76c97afe95b81b78c7ff15c378 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Mac: QWizard default background pixmap works againLiang Qi2013-09-261-29/+20
| | | | | | | | Task-number: QTBUG-26722 Change-Id: I579111b5d34f8e3cdc6bb016d9c0e42ec3ffb8c9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Stephen Chu <stephen@ju-ju.com>
* QKeySequenceEdit: cleanup unused member variableJ-P Nurmi2013-09-262-3/+1
| | | | | Change-Id: Ib1197aee7589be0afd0c639b362bf1c3fceffeb4 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Add shortcutsOverride in QLineEdit for used shortcutsDavid Edmundson2013-09-241-1/+3
| | | | | | | | | | | QLineEdit uses shortcuts to QKeySequence::DeleteCompleteLine and QKeySequence::MoveToEndOfLine These shortcuts were not in the overrideShortcuts which can cause erratic behavior. Change-Id: I69e2b00e38d3f0e48a20f91f08a22b3fae9b7c48 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Windows: Increase the max length of a system tray tooltip.Sérgio Martins2013-09-241-1/+1
| | | | | | | | | It's 128 on Qt4, so lets maintain that limit. On older Windows versions (< WIN2K) 64 will be used. Change-Id: I96156c6f142e6e095227cc5a13f2b653408df968 Task-number: QTBUG-33461 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Add QKeySequenceEditIvan Komissarov2013-09-244-0/+507
| | | | | Change-Id: I497309d3e6cbf38b298afb5ff3cb1ed6a0e82000 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Remove some qBinaryFind usages from QtWidgetsGiuseppe D'Angelo2013-09-232-7/+5
| | | | | | | | This is done per the mailing list discussion at http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I7e4a5a4010b0ded59dbe2cacc6afe23ae4121bfe Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* QFileSystemModel: Fix build when QT_NO_FILESYSTEMWATCHER is definedAndrew Knight2013-09-231-2/+45
| | | | | | | | This class already has some guards for QT_NO_FILESYSTEMWATCHER; implement the rest. Change-Id: I97072c9cd1debb726f9d10ff49ff0c01bbb9bc6e Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* De-inline virtuals of some non-exported private classes in QtGuiThiago Macieira2013-09-232-4/+14
| | | | | | | | | | This is to work around a bug in GCC 4.7's link-time optimiser. Without it, linking QtOpenGL and QtPrintSupport fails because the compiler generates the code for the virtuals, including the virtual table, but not the methods. Change-Id: Idcecd51c32e6228e0eefe67f1bd630ea1f5d5da7 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Port QMacCocoaViewContainer to Qt 5.Morten Johan Sørvig2013-09-233-29/+52
| | | | | | | Includes example. Change-Id: Ifdda5c535d0ec41694712405d921b2c32cb8dfc8 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>