summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* FocusAboutToChange event to be send before focus changesPekka Vuorela2012-03-224-29/+72
| | | | | | | | | | | | | | Focus change happen as: FocusAboutToChange event -> focus change -> FocusOut event -> FocusIn event. Input method need to have focus when calling commit(). Notification on focus about to be lost allows QWindow implementations to commit in time. Also changes QWidget documentation to match code reality. Change-Id: I17a8a374a33dd700909f79e370b42348869261a6 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Remove Q_WS_X11Frederik Gladhorn2012-03-211-6/+0
| | | | | | | The define is removed and only adds includes. Change-Id: Id6cc32aa22536f78bb5de10cb779a3168e79441a Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* Fix QWidgetTextController issue when used with QtQuick1 TextEditPekka Vuorela2012-03-211-2/+2
| | | | | | | | | Calling QInputMethod::invokeAction() was not checking for proper event type and was requiring context widget unnecessarily. Fixes some parts of QTBUG-24035 Change-Id: I51fe9ed02a018ced36319eb672a088503649b275 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* QHeaderView - minor fix to setDefaultSectionSizeThorbjørn Lund Martsum2012-03-201-2/+1
| | | | | | | | | | This fixes a situation where we (wrongly) assume that a section with size 0 is hidden. However a hidden section should be one that we have called hideSection (or setSectionHidden) on. Change-Id: Ic14eded2666022f27434dc55927323a74910549c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QHeaderView - minor fix to createSectionSpanThorbjørn Lund Martsum2012-03-201-1/+3
| | | | | | | | I am unsure if this is only theoretic - but if/when we have added sections here - we must ensure that we recalculate startpositions. Change-Id: I70bf55209f1a1a885cb49748b65218879bc68776 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix KDE palette.Olivier Goffart2012-03-201-5/+8
| | | | | | | | | | | | | | | | | | | | In QKdeTheme We want to load every color. Else, only the first color is loaded, and the rest of the palette is just black making the applications basicaly not usable. But KDE only put in its config files the colors that are different from the default colors. This is the reason why we need to resolve against the style's default palette. We need to make sure the resolve_mask is 0 for an empty palette, even before the application palette is set. This was not required in Qt4 because the system palette was initialized differently. I realize this will only work with QApplication (and not with a single QGuiApplication) but it was not working before either. Change-Id: Ifb3c2c1358ef6d83a1ca5aa8fac3d2d4ea712b94 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove QAccessibleEvent child parameter.Frederik Gladhorn2012-03-1922-79/+71
| | | | | | | | | This makes the api cleaner and generally the child should not be there. It is only sometimes more convenient not to create a QAccessibleInterface instance, so the functionallity is kept. Change-Id: I26018a6d3e0549f4d79856775b4167c5660e229d Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Accessibility: add text update eventsFrederik Gladhorn2012-03-195-10/+45
| | | | | Change-Id: Iece9d100b3f5a379d7d8e29dea67a10d0c918c06 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* QtWidgets: cleanup several Q3* itemsDebao Zhang2012-03-193-4/+2
| | | | | Change-Id: I0812cdd74f19b4c98336724ea722807d4c68cf7d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QWidget: update documents of mouseDoubleClickEvent()Debao Zhang2012-03-191-2/+3
| | | | | | | | | Double click behavior has been changed. see SHA: b371f3f943703840d0dfbe30505018bcca06e260 Change-Id: Ibd921d01fb25b8c31f75105a4ff63c42bf00c335 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Replace Q_WS_MAC with Q_OS_MAC in qshortcut.cppBradley T. Hughes2012-03-171-2/+3
| | | | | | | This re-enables shortcut context matching for menubar actions. Change-Id: I0d9f2b3d4316a4611afe96eb1a2cf29cb9e91851 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fix bug showing folder icons for filesArnt Witteveen2012-03-171-9/+10
| | | | | | | | | | | | | | | | | | | | Fix an issue where the cache was updated with the folder icon, even though this is never used from the cache. This caused files to sometimes be shown with a folder icon: If a folder has an extension (e.g. a folder named 'folder.ext'), this means the folder icon will be written to the cache for the 'ext' extension, and from that point on all .ext files will be shown with the folder icon. The fix is to not save an icon in the cache for those cases where it will not be used from the cache anyway, by using the same condition for updating the cache as for reading it (which is in line 8 of the same function). Change-Id: I9ce8fca0718b2b62b9390fa64989acd54952a88e Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Remove Q_WS_X11Frederik Gladhorn2012-03-151-4/+0
| | | | | | | The define is removed and only added an include. Change-Id: I85090023cb9eb33f83ccc7fe2ab69556b4ff89fb Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* QSystemTrayIcon/Win: Fix compilation on MinGWJonathan Liu2012-03-151-0/+1
| | | | | | | Define NOTIFYICON_VERSION_4 if it is not already defined. Change-Id: Ic432cbebf18f8b1e8b4727659dcedd7063e126ee Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix compiling with --no-accessibilityJerome Leclanche2012-03-154-2/+11
| | | | | | | | Adds missing QT_NO_ACCESSIBILITY checks where required to build without accessibility support. Change-Id: Id98ecdcb9b351289b21dc2d382100d0b63857db9 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Use pointers for QAccessibleEvent.Frederik Gladhorn2012-03-1522-83/+126
| | | | | | | | | At least on mac g++ badly wants to copy the event and cannot use the copy ctor. The sensible solution is thus to use pointers. This is in line with QCoreApplication::sendEvent. Change-Id: Icb58852be351ab04ffa17069989d7a07d4b377da Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Port QMacPrintEngine and QCoreGraphicsPaintEngine from Qt 4 to Qt 5Bradley T. Hughes2012-03-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Copy qprintengine_mac_p.h, qprintengine_mac.mm, qpaintengine_mac_p.h, and qpaintengine_mac.cpp (as qpaintengine_mac.mm) from src/gui/painting/ in the 4.8 branch of http://git.gitorious.org/qt/qt.git at commit e6bd33d4aef0e4538d7918e7ab130624c911b553. The following changes are necessary to port these files to the Qt 5 API: - The copyright notice on these files has been updated to match the header.LGPL template. - Fix #includes for qprintengine_mac* and qpaintengine_mac*, as some headers have moved in Qt 5. - Remove extern forward declarations for functions that no longer exist. - Remove friend declarations for classes/functions that are not part of the Cocoa platform plugin. - Remove QT_MAC_USE_COCOA blocks. Qt is always using Cocoa now, there is no need to keep the non-Cocoa code paths anymore. The QMacPrintEngine::shouldSuppressStatus() method was also removed, since it is no longer used. - Do not use Qt::UniteClip, it was removed in commit 01b72952c38b9193138eabdab6bdab632cd75ebd - Use QCocoaAutoReleasePool in qprintengine_mac.mm - Use QPlatformPrintSupport::convert*() functions in QMacPrintEngine, since we cannot use non-exported functions from QtPrintSupport in the Cocoa plugin. - Use qt_mac_image_to_cg_image() to convert QPixmap to CGImageRef. First convert QPixmap to QImage (cheap, since the Cocoa platform plugin uses QRasterPlatformPixmap), and then convert the QImage to CFImageRef using the existing helper function. - Copy qt_mac_cg_context() to the Cocoa platform plugin from qmacstyle_mac.mm, adding a note at each location about the duplication. - Add qt_mac_QRegionToHIMutableShape() helper. Adapt the Qt 4.x code for QRegion::toHIMutableShape(), and use this in QCoreGraphicsPaintEngine. - Add qt_mac_drawCGImage() and qt_mac_get_scalefactor() helper. These functions are copied directly from the 4.8 branch of http://git.gitorious.org/qt/qt.git at the same revision shown above. - Add qt_mac_create_imagemask() helper in qpaintengine_mac.cpp. This helper is based on the function with the same name from the 4.8 branch of http://git.gitorious.org/qt/qt.git at the same revision shown above. The correctness of the implementation has not yet been verified. Since these files use the QPrinter API from QtPrintSupport, the Cocoa plugin now needs to link to that library as well. Change-Id: I90b9bbe201327489ef9e1b3294e68e91ddda27bd Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* improve processing stylesheet propertiesMark Brand2012-03-151-25/+24
| | | | | | | | | | | | | | By scanning the properties in reverse order we don't have to save properties in the list only to remove them later when the occur again. It's also unnecessary to cache the values since they can be easily plucked out of decls. Various other tests can be done once per property instead of once per property occurence in decls. Change-Id: I81cf60c59efaeed57fc9c12df98279d6cae116cd Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: John Brooks <john.brooks@dereferenced.net>
* QTableView: call model->submit() on row changeMark Brand2012-03-151-0/+16
| | | | | | | | | QTreeView already does this in the exact same way. It's necessary to call submit() so edit strategy OnRowChange in QSqlTableModel will work as expected. Change-Id: Ib430143e8a71f3b0bcd842fcc772cc7ee4525f0a Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Cocoa: Improve basic window handling.Morten Johan Sorvig2012-03-141-4/+13
| | | | | | | | | | | | | | | | | | | | Refactor NSWindow creation into createNSWindow and setNSWindow. This is necessary to support QMacNativeWidget where we re-use an already created window. Implement popup window handling. Make sure the window is displayed correctly and closes when it should. Take control over window activation in order to prevent infinite loops involving the QtCreator "cmd-k" window. Activation events are for now not sent to popup-type windows. There is now a different set of test failures: add and remove some QEXPECT_FAILs. Change-Id: I229761b59f90c9815b968eacc2cbc9c20cc5047e Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* QStyleSheetStyle: Fix icon properties.Friedemann Kleint2012-03-141-2/+1
| | | | | | | | Convert icon structure returned by the CSS parser. Change-Id: I19b846c6cb0ec19045b6d07b3caa5ecfac75ca86 Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QHeaderView - documentation update. Prefer hideSection over 0-resize.Thorbjørn Lund Martsum2012-03-141-2/+4
| | | | | | | | There is a different behavior on 0 sections and hidden sections e.g with scrollbars. Normally people want to use hideSection. Change-Id: Id99de30ea46906bb4ef7720ed12d4ac9615c9743 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QHeaderView - renaming functions in Qt5Thorbjørn Lund Martsum2012-03-146-48/+117
| | | | | | | | | | | | | | This patch renames the functions in Qt5 according to the notes. It also renames resizeMode to be consistent. The old functions are both marked with both QT_DEPRECATED and '### Qt 6 - remove' All usage of the function within the qtbase are also changed to use the new functions. Change-Id: I9e05fa41d232e9ca43b945fcc949987017f3aedd Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Add two (forgotten) since 5.0Thorbjørn Lund Martsum2012-03-142-0/+4
| | | | | | | | | | | | SHA for QWidget::hasHeightForWidth change: 466107107a85e7211c4b7f77b36ec50625657061 SHA for QAbstractItemDelegate::destoryeditor change 15f253a46aa45e2a9fa1055799fa2768ba49b9a3 Change-Id: Ic7e38c15f62eef22ab95414fad6e7b6c9c7d4f59 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Windows: Fix QSpinBox background setting via stylesheetMiikka Heikkinen2012-03-132-4/+8
| | | | | | | | | | | | | | | | When using stylesheets, palette mask for drawing the background of line edit child of spinbox is already correctly resolved to style options in QStyleSheetStyle::drawPrimitive(), so we cannot simply ignore that mask and check the palette mask of the parent spinbox. Fixed by using a union mask of the parent spinbox palette and the palette supplied by style option instead of simply using the mask from parent spinbox. If either specifies custom base color, use that to paint the background of the spinbox's line edit. Task-number: QTBUG-24323 Change-Id: I1e738192db83b16d9bd48da54d29779e18788ef7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* improve declaration scopeMark Brand2012-03-131-1/+1
| | | | | Change-Id: Id8d8f4e59793ba5fc2d3afa31674009af73a59c9 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* use QStringLiteralMark Brand2012-03-131-1/+1
| | | | | Change-Id: I0f2b6ff758524e872d38dcbdc9335264431e3dc6 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* take opportunity to use constMark Brand2012-03-131-2/+2
| | | | | Change-Id: Ief12d4b55e1705c758dae8078cf52948fcd9565b Reviewed-by: Richard J. Moore <rich@kde.org>
* Move variant animation interpolators from QtWidgets to QtGuiCharles Yin2012-03-133-99/+0
| | | | | | | | There is no reason these interpolators need to stay in QtWidgets library. Change-Id: I27db49fea2cfd8f0ef417dc52edf66dd1835e7a1 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Implement QSystemTrayIcon for Windows.Friedemann Kleint2012-03-122-100/+136
| | | | | | | | | | | | No longer base the implementation on a QWidget which is not necessary when all that is required is a message window listening to task-tray messages. Export a service function creating a message window from the Windows native interface and use that. Task-number: QTBUG-20978 Change-Id: I01d0faeac777df4eee802c51d2bc722fce814080 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>