summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* widgets: Fix painting to a fully transparent top level widgetHolger Hans Peter Freyther2012-04-152-2/+13
| | | | | | | | | | | | | | | | | | | | | | QWS used to have a line to change the composite mode from SourceOver to Source for the top level widget. This wasn't used with QPA and I removed the internal DontSetCompositionMode in qtbase. It turns out that the QWS way is the most efficient one to initialize the background of the widget. The alternative is to have the QPlatformBackingStore::beginPaint always clear the entire to be painted area and then paint the background of the widget. The difference of painting each pixel once or twice is noticable on embedded platforms and in the range of one to two fps. Reproduce the issue with: echo "QWidget {background: transparent}" > style.css ./examples/widgets/wiggly/wiggly -stylesheet style.css Task-number: QTBUG-24526 Change-Id: Ica4c980bb3bf6eb87ddb5b510ac7493292d01543 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Now QSplitter can have 0-pixel handleABBAPOH2012-04-152-5/+5
| | | | | | Change-Id: Iad920ffcd5d7f4c01504d41d1740f130b7aa53dd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Update accessibility selections in QTextControl.Frederik Gladhorn2012-04-141-3/+17
| | | | | | | | Forwardport from Qt 4. Change-Id: Iae0c2792b64b8ec2736a9ff621cf7c313a394093 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com> (cherry picked from commit d5649547d641b9c5af3c3f814caf8e1ab5bf9f47)
* replace hardcoded values with a surrogate handling methodsKonstantin Ritt2012-04-131-4/+4
| | | | | | Change-Id: Ib41e08d835f2e8ca2e32b4025c6f5a99840f2e27 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Merge the two overloads of QButtonGroup::addButton().Jason McDonald2012-04-133-23/+7
| | | | | | | | This change is source-compatible, but binary-incompatible. Task-number: QTBUG-25101 Change-Id: If67aec2ca8dd54ad9315f6497c2dafbbbc0b775f Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix MinGW warning about qDebug() formats.Friedemann Kleint2012-04-131-1/+1
| | | | | Change-Id: I927d17240a7cc7b88814601b0711aa46ca166ff9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove hasDirtyFromPreviousSync from backingstore.Girish Ramakrishnan2012-04-122-9/+2
| | | | | | | It's always false (used to be some qws specific variable). Change-Id: I3dc185dba4c778797f180410ce8d293336ecfd9c Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* remove references to qws from backingstoreGirish Ramakrishnan2012-04-122-56/+1
| | | | | | | | The backingstore code is already hard to read as-is. Let's simplify things by removing qws code. Change-Id: Ibefd3ea17d29970d1f7348461959fdc5b01c1f42 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove redundant platformNativeInterface()Girish Ramakrishnan2012-04-122-8/+0
| | | | | | | platformNativeInterface() is already defined in QGuiApplication. Change-Id: Ice720fb6f7e4b01c4627219d66a5a3c8980a79a5 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove QWidget::setWindowHandleGirish Ramakrishnan2012-04-121-1/+0
| | | | | | | | It's unused. The window (QWidgetWindow) is created and managed implicitly by QWidget. Change-Id: I28ee3f120a99c877f318e1abd7d73c9f3e542d03 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove a Qt 5 to-do comment that will not be addressed.Jason McDonald2012-04-121-1/+0
| | | | | | Task-number: QTBUG-25102 Change-Id: I3fe1878adcf17cb95209df271d062e126e32a8fd Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove Qt 5 to-do comment that will not be addressed.Jason McDonald2012-04-121-1/+0
| | | | | | Task-number: QTBUG-25093 Change-Id: Ib78cffe06f721371ff5c16e24db3abae6dcd4984 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* qss: fix parsing of icon style hintsGirish Ramakrishnan2012-04-121-3/+2
| | | | | | | | | Use cssIconValueToIcon (see 5a0eb4e768435b9ce32b074e620fca33be4df2fb) to retrieve the QIcon value from the css parser. Task-number: QTBUG-25120 Change-Id: Ie7c6691514a4b35d416ca09ccf7966689de831c1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Compute overshoot condition before snap pointsAlberto Mardegan2012-04-121-10/+10
| | | | | | | | Snap points are not needed if the overshoot condition is met; therefore, move the overshoot handling before the computation of snap points. Change-Id: I37556b10c1b1124eaed53b0f2a330085acf70776 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fix QScroller diagonal scrollingAlberto Mardegan2012-04-122-25/+43
| | | | | | | | | | | | Compute the time needed for the scrolling operation before computing the movement on the X and Y components. This ensures (except when overshooting or snapping to snap points) that the scrolling on the X and Y components takes the same time. That is, scrolling occurs always along a straight line. Task-number: QTBUG-23227 Change-Id: Ic3b78b8611dbcbf19711c3dd96485a0d53accaed Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fixes a regression; missing cursor blink when input mask is set.Andreas Aardal Hanssen2012-04-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | I can't say for sure why q*linecontrol passes an empty rect to the updateNeeded() signal when an input mask is set; presumably the empty rect at some point has meant "full update", but there are a few problems with this. Surely a full update is wrong, even if the semantics have been lost in translation somewhere (likely the qlinecontrol refactoring). This fix ensures that empty rects from updateNeeded() are interpreted as a request to update the whole widget. A further improvement would be to ensure the line control doesn't request a full update when an input mask is set. The cursor is usually wider when a mask is set but because of QLineEdit::paintEvent()'s implementation, there is currently a mismatch between the cursor width as seen by q*linecontrol and what is actually drawn, which causes rendering artifacts if updateNeeded() sends the cursorRect(). Since QLineEdit and Q*LineControl aren't actively developed, it's best to keep this fix minimal, although the performance cost of updating the whole line edit when an input mask is set is unfortunate. Task-number: QTBUG-7174 Change-Id: Ie51e015d760915e07b0220b770f04fc958d93a12 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Remove Qt 5 to-do comment that will not be addressed.Jason McDonald2012-04-121-1/+0
| | | | | | | | | The suggested behavioural change had the potential to break existing code, so the change won't be made for Qt 5. Task-number: QTBUG-25119 Change-Id: Ie03271d12b21a800c998e073eeb9ca1cd03ffe19 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove Qt 5 to-do comments from qgraphicslayoutitem.h.Jason McDonald2012-04-111-2/+1
| | | | | | | | | | Neither of these comments will be actioned for Qt 5: the first because would be source-incompatible with Qt 4, the second becuase it would be a significant behavioural change. Task-number: QTBUG-25090 Change-Id: I5f8f7cce3007c3188b2f0184138fa8e55a165654 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Propagate window state changes to QWidget.Friedemann Kleint2012-04-111-3/+31
| | | | | | | | | Apply the state in QWidgetWindow and send an event to the widget unless the code is triggered by QWidget::setWindowState(). Change-Id: Ibf2f4e730384e41636841b9216eecfdff35b7bcb Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QWidget: allow modal top-levels to have WA_DontShowOnScreenBradley T. Hughes2012-04-111-7/+22
| | | | | | | | | | | If a modal top-level widget has WA_DontShowOnScreen set, we need to call QGuiApplicationPrivate::showModalWindow() and hideModalWindow() ourselves, since we will not be calling QWindow::setVisible() (which would normally do the call for us). Change-Id: I1b22dd177c5956a2290f3ee031c95ab50d88f153 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Implement window modality in QtGuiBradley T. Hughes2012-04-114-144/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindow already has windowModality() and setWindowModality() as part of its API from commit 516f4e283ba4626d7239630397ef867ab0366071. Platform plugins can use this already to setup modality hints on windows that they create, but it's not enough to implement modality fully. QGuiApplication gets a modalWindow() static method, which is similar to QApplication::activeModalWidget() in that it returns the last modal window to be shown. The modal window "stack" moves from QApplicationPrivate to QGuiApplicationPrivate. The enterModal*() and leaveModal*() functions in QApplicationPrivate are removed and replaced by QGuiApplicationPrivate::showModalWindow() and hideModalWindow(), which are called by QWindow::setVisible() just before calling QPlatformWindow::setVisible(). The virtual QGuiApplicationPrivate::isWindowBlocked() will tell us if a window is blocked by a modal window (and tell which modal window for any interested callers). The default implementation works on the QWindow level. QApplicationPrivate reimplements isWindowBlocked() and adds popup and WA_GroupLeader support. QGuiApplication uses the state set from isWindowBlocked() to block user-input events: mouse press, mouse move, mouse release, wheel, key presses, key releases, enter/leave events, close events, and touch begin, update, and end events. Note also that the modality helper functions in QtWidgets and QApplicationPrivate are left in place and working as they always have. The behavior of QWidget in the presence of modal windows/dialogs should not change. Change-Id: I2c89e6026d40160387787a6e009ae1fdc12dfd69 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Modified project files to be iOS compatible.Qt4iOS2012-04-111-1/+1
| | | | | | | | Removed some MacOS source code files from iOS build. Use unix standard paths for now (iOS-specific implementation will come later). Change-Id: I8b2731b431b3a379a1ec4ec07d227e886209e3e9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* QHeaderView - remove some (nearly) unused span functionsThorbjørn Lund Martsum2012-04-112-21/+2
| | | | | | | | | | | This removes a couple of functions. Two of them are unused and the last one has its (now) very simple implementation inlined in the only caller. The last function was called something with spans and we would like to get away from using the word 'span' since we no longer uses spans. Change-Id: Icef95166289d52bd958400cba70daceb6fa75913 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QHeaderView - rename many spans classes and variablesThorbjørn Lund Martsum2012-04-112-94/+97
| | | | | | | | | | | | | In (SHA) b800d8b94a7861ecf8853621f6556fca186fb5b7 the span model was replaced with a plain section model. The code however still has variables and classes called someting with spans which would be confusing for possible new readers of the code. This patch cleans up most of it. It only renames classes,functions and variables (and not any semantics or the public API). Change-Id: I6ceb068c7317223f0d8e37f8032197f518d0174c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Made qt_accStripAmp handle "&&"José Millán Soto2012-04-111-12/+29
| | | | | | | | | | | | | | Changed qt_accStripAmp implementation to handle texts which contains pairs of ampersands representing a single ampersand. In order to do that, a new static function called qt_accAmpIndex was created. This function is based on the code of qt_accHotKey, which was changed to use qt_accAmpIndex. Change-Id: Idcc5d07581d7fb3251c30399b189740ca8071104 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> (cherry picked from commit f864f8f79b88bbc3cc9007d2a92b08ca4b5cb871)
* Bump some Qt 5 to-do's to Qt 6.Jason McDonald2012-04-105-7/+7
| | | | | | | | | | Source-incompatible changes are no longer desirable for Qt 5, so these items must wait until at least Qt 6. Task-number: QTBUG-23524 Change-Id: I0b9ae5f6f3a792e0169a4b0d3aefbdcb744acd2f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Windows Vista: Fix painting of item view items.Friedemann Kleint2012-04-042-15/+46
| | | | | | | | | The old QWidget-based treeViewHelper() function silently failed since the widget no longer had a HWND. Use a native Window handle instead. Change-Id: I6902677c565bb165f29b9d1c6fd0d28d9870d567 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Windows: Replace QString keys of XP themes by an enumeration.Friedemann Kleint2012-04-043-141/+254
| | | | | Change-Id: I5323e9ed5bc3fe73f278d167acae6fa744b0a299 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Remove duplicate non-const methods from QProgressBar.Jason McDonald2012-04-032-8/+6
| | | | | | Task-number: QTBUG-23524 Change-Id: I80f7eecb9f892fcd026b3c3f9159958fc99cfe23 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix warnings about unused variables.Friedemann Kleint2012-04-032-7/+4
| | | | | | | | Fix MSVC warnings about unused q, d where only static functions are used. Change-Id: I239d6fc3c851b0a62434cb09fc0e1967f2e6d031 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove redundant virtual method reimplementations from QToolBar.Jason McDonald2012-04-022-18/+0
| | | | | | Task-number: QTBUG-23524 Change-Id: Ib682d2e2c2ea1078524e2c90cdb10bfec113d259 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Testability for password mask delayPekka Vuorela2012-04-013-1/+18
| | | | | | | | Unit test to override mask delay value so running it is not dependent on platform style hint. Change-Id: Ic5cc12d32cf97e64729b3af54250bdc05c0c95ad Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Fix inputMask accessor of QLineControl.Friedemann Kleint2012-03-311-1/+12
| | | | | | | | Do not append blank character if it is the default. Task-number: QTBUG-20834 Change-Id: I17f6ac4058f295f25ff49f33c41bd9ee40b75811 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Documentation cleanupDebao Zhang2012-03-315-65/+0
| | | | | | | They are comments of Qt3 support members which have been removed already. Change-Id: I4b3dfaac1e5e1c3c13b83e41d0505dd16a4b6a8e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix QWheelEvent::angleDelta() returning QPoint().Marcel Krems2012-03-301-1/+1
| | | | | | Change-Id: I29460bd5a3f485dcd460edc52239d748e7faf6e0 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Cocoa: Fix combo box flicker on show.Morten Sorvig2012-03-301-3/+3
| | | | | | | | Replace Q_WS_MAC -> Q_OS_MAC, restore Qt 4 behavior that does not disable updates on first show. Change-Id: Ibc7f58add2a44c95879bd3c4772cea36dd7905fa Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Plug memory leak when gestures are grabbed but never triggeredAndy Shaw2012-03-301-93/+91
| | | | | | | | | | | | | When a gesture is grabbed by QAbstractScrollArea but never triggered then the deletion of the QAbstractScrollArea would mean that the gesture created for it would not be deleted. This ensures that it always deletes the gestures waiting to be deleted even if no gesture event is triggered Task-number: QTBUG-25011 Change-Id: I36118b82baaa60ac4e014896159060e1af76b2d2 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Use "qt-project.org" instead of "trolltech" in the resource systemhjk2012-03-287-160/+160
| | | | | | | Task-number: QTBUG-23272 Change-Id: Idcdb9620910577b3c0fc9a792a0446665bd2eab6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove Qt5 TODO to change QListView semantics.Stephen Kelly2012-03-281-2/+0
| | | | | | | | | | | | | | The comment was written before Qt5 was planned, so it might have seemed like a good idea to change the semantic with Qt 5.0. However, as Qt5 is intended to be close to Qt4 in behaviour, this isn't really a 5.0 change. It can be done any time, but only optionally and while retaining backwards compatibility. Change-Id: I8c5c497d13a7ec6574e1cdb6bd411e8b28db876b Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fix keyboard navigation order for buttons with RTL layoutOrgad Shaneh2012-03-271-4/+12
| | | | | | | | | On RTL layout, right key should move to previous button, and left key should move to next button. Task-number: QTBUG-15790 Change-Id: If0753f9082b3a3624b95276840f5f3799b5e14bf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Reverted use of tentative commit use in QWidget editorsPekka Vuorela2012-03-278-62/+19
| | | | | | | | | Feature to be reimplemented simplified. Cases when input method needs to be reset with possibility to commit use QInputMethod::commit() again. Change-Id: Ibfe7aecc0799e7a76c7ac4f5d860971cfe6e97ca Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Password editor mask delay stylable by platform pluginPekka Vuorela2012-03-262-30/+4
| | | | | | | | | Replaced hard coding as QT_GUI_PASSWORD_ECHO_DELAY with a style hint. Change-Id: I0b78ebad723dbe19d9b9496583203e31545874e2 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix QGuiApplication::keyboardModifiers()Bradley T. Hughes2012-03-261-21/+1
| | | | | | | | | Make sure that the keybaord modifiers are maintained properly when handling window system events. Change-Id: Ie75cbe5eb509c29e3d2291694f2de509fbf3098a Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Make sure windows send accessibility activated updates.Frederik Gladhorn2012-03-242-2/+10
| | | | | | | | Both QWindow and QWidgetWindow should update with the active state signal. Change-Id: I0219f803aa0fb109765f0faa0aedb120c2a439f0 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Added QAccessibleGroupBoxFrederik Gladhorn2012-03-241-0/+6
| | | | | | | | | | | | | | | Added a new accessible interface for QGroupBox, as QAccessibleDisplay is not good enough when the QGroupBox is checkable. AccessibleFactory was modified to return a QAccessibleGroupBox when the accessible interface of a QGroupBox is requested. Created tst_QAccessibility::groupBoxTest Port to Qt5 of the patch by José Millán Soto <fid@gpul.org> Change-Id: I6c23dcf5562b3ea269b04102e78463b65827188a Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com> (cherry picked from commit c03ceb203c65d9e3485fad848bfc0c4b6ee3e9aa)
* Fix warnings in qtbase.Friedemann Kleint2012-03-242-1/+1
| | | | | Change-Id: I981e08872440e35eb9bfad32b20543cfce8439c9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Implement QSystemTrayIcon for X11.Friedemann Kleint2012-03-233-273/+153
| | | | | | | Reimplement using a QWidget. Use X Change-Id: I7f8326598fb7210d59bc1d682cdada4526d5b6dd Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fixed QLineEdit to emit selectionChangedPekka Vuorela2012-03-231-0/+2
| | | | | | | Was not emitted when removed by input method event. Change-Id: Ia2c0dcb09d42826188d4612f4c1705a41874a31d Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Deprecate QApplication::setGraphicsSystemDonald Carr2012-03-221-2/+3
| | | | | | | | | | | | The QApplication::setGraphicsSystem() call is entirely vestigial after the QPA rearchitecting of Qt. Deprecate it to give people a heads up that their original intent no longer has any impact on their application. Change-Id: I21838431db1057f7f7858b4a434ae0eebd2317de Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix QSysInfo::WindowsVersion checking (QSysInfo::WV_NT_based is a mask)Joerg Bornemann2012-03-226-10/+10
| | | | | | | | Manual merge of the original fix 1ef309e9 in the Qt 4.8 repo. Task-number: QTBUG-20480 Change-Id: Id08500c2dd16965af3942e65cff1f4afa24180b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>