summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Clean up and extend QAccessible::State.Frederik Gladhorn2012-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | The state should contain useful and clear information. Some of the old enum/bitfield members were not really clear. Make them follow Qt terminology and shift the burden of interpreting them to the bridge. Apart from the previous commit changing from enum to bitfield, these flags have changed names: unavailable -> disabled mixed -> checkStateMixed protected -> passwordEdit (in the last commit) floating is completely removed, even MSAA documentation states it is unsupported. Some new states have been added. Documentation added. Change-Id: I152256e77a061f28ee5780f527524c80a2c7e333 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Added application flags to translate between touch and mouse events.Samuel Rødal2012-01-131-34/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current way we do it of having the platform or touch plugin send both mouse and touch events is not ideal. There's no good way to write an application that works sanely both on a touch-only device and on a desktop except by restricting yourself to only handling mouse events. If you try to handle touch events you don't get any events at all on desktop, and if you try to handle both, you end up getting duplicate events on touch devices. Instead, we should get rid of the code in the plugins that automatically sends mouse events translated from touch events. This change enables that by making the behaviour fully configurable in QtGui. Two new application attributes are added to explicitly say whether unhandled touch events should be sent as synthesized mouse events and vice versa, and no duplicates are automatically sent as the current situation. Synthesized mouse events are enabled by default. We also get rid of the QTouchEvent::TouchPoint::Primary flag, which was only used to signal that the windowing system automatically generated mouse events for that touch point. Now we only generate mouse events from the first touch point in the list. Change-Id: I8e20f3480407ca8c31b42de0a4d2b319e1346b65 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@nokia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Fix compilation of Qt itself with QT_NO_DEBUG_STREAMDavid Faure2012-01-121-0/+2
| | | | | | | Change-Id: I07087dff0f109347ea80434f17eeb7cc1c13114c Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Remove QAccessibleEventFrederik Gladhorn2012-01-123-29/+0
| | | | | | | It was unused and I don't quite understand its purpose any more. Change-Id: I5c946a1644fd64508cb4aad78320ae96fd935d31 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Make QFtp private.Jonas M. Gastal2012-01-121-3/+2
| | | | | | | | | All references to QFtp in documentation have been removed, QFtp's documentaiton was marked internal. The QFtp example was removed. Task-number: QTBUG-23199 Change-Id: Ifff83cac069fb350e8ebeae63e605850e65c0c30 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* QTreeView: fix crash when starting a drag with hidden columns.David Faure2012-01-121-4/+12
| | | | | | | | | | | | Crash was introduced by d639105759491 (pre-Qt-4.8 only) Task-number: QTBUG-15834 Merge-request: MR-2725 (cherry picked from qt4 commit fd25323de7b5d5f3e0ffb1bd81ea4d251e071566) Change-Id: I59959d3ba4c9bcb0d39bdbe58432817bbbfdd9f1 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Set missing flags in the option when rendering QTreeView drag pixmapDavid Faure2012-01-124-39/+82
| | | | | | | | | | | | | | | | QAbstractItemViewPrivate::renderToPixmap was not setting all the flags that the normal QTreeView painting sets: option.showDecorationSelected, option.viewItemPosition (so the drag pixmap looked wrong on Windows 7, with rects around each cell), and then the unittest also discovered that State_Children/State_Sibling wasn't set either. Task-number: QTBUG-15834 Merge-request: 2517 (cherry picked from Qt4 commit d63910575949106f84dacf04abaa14fc866aa66b) Change-Id: I0a5014d960543c3ed8fea73d6df578e7e521b0e0 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Ensure proper locking in QFileInfoGathererBradley T. Hughes2012-01-121-2/+3
| | | | | | | | | | | | | | The mutex is used to protect the QFileSystemWatcher instance created by QFileInfoGatherer, except when calling getFileInfos(). Add a locker before using QFileSystemWatcher in this function. Note: it appears that QFileInfoGatherer is misusing QFileSystemWatcher by calling it from multiple threads. QFileSystemWatcher is an event driven class, and as such, not thread-safe. So far, no problems have been reported related to this, so I've left the code as-is. Change-Id: Ib1429d9399e37120acf8e8d3b989b83c4ce24203 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Docs: Forward-ported typo and link fixes from Qt 4.8Janne Anttila2012-01-112-3/+3
| | | | | | | | | | | | | This commit brings already accepted doc fixes to Qt5. Task-number: QTBUG-9224 Task-number: QTBUG-13442 Task-number: QTBUG-19858 Task-number: QTBUG-21447 Change-Id: I2ebc7c3e74427545367bdcec51e9e710a4925747 Merge-request: 1402 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* QStyleHelper: Base DPI-calculation on QScreen.Friedemann Kleint2012-01-111-20/+3
| | | | | | | | | | | | | | | - Use qt_defaultDpiX() to obtain the resolution, which obtains it from QScreen. This implies that for X11, which previously used a hardcoded default of 96 DPI, the real resolution will be used (typically 75). - Since many tests (layouts, graphicsview) contain test data for 96 DPI, add an attribute to QCoreApplication making it possible to set the resolution to 96 DPI for testing. Change-Id: I77c8233a96b0d75de07406f58d48886a89c3de06 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove unused QT_NO_TEXTSTREAM.David Faure2012-01-112-4/+0
| | | | | | | | It was checked in a few places, but it didn't actually remove QTextStream, so it was pretty useless. Change-Id: I8eaf28893cd6c7acbe1c0b69d58de90742aee755 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Make QAccessibleInterface::indexOfChild() 0-based.Frederik Gladhorn2012-01-111-8/+8
| | | | | | | Makes the code nicer and more consistent with the rest of the world. Change-Id: I5ba0ee39f5b0afd1a079a3cea9990d123955ed3f Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Introduce a QVariant themeHint() to QPlatformTheme.Friedemann Kleint2012-01-113-34/+11
| | | | | | | Start on removing platform-specific code from QtWidgets. Change-Id: Ic2163a0ce6f2db2151cdf7ca93766b2d861eeb55 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Improve Accessibility documentation 2.Frederik Gladhorn2012-01-101-0/+9
| | | | | | | More cleanup, make sure links work. Change-Id: If72f9cfc0d44aa1fb261be2aace8ddd457295993 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Fix QWidget::saveGeometry().Friedemann Kleint2012-01-101-0/+3
| | | | | | | Bring back code that was accidentally removed. Change-Id: Ie1a4d22caa206bc8bb8e678879935e79009e9622 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Rename internal method check to doCheckStephen Kelly2012-01-102-18/+6
| | | | | | | | | | | Mac OSX has a check macro in /usr/include/AssertMacros.h which can conflict with this API if used together. http://boost.2283326.n4.nabble.com/Boost-with-Darwin-Mac-gcc-4-0-1-td2580330.html Change-Id: I93ddd08fa2b51b198bbc02ce501d79ed97a32c34 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix a crash in QDialog.Friedemann Kleint2012-01-101-2/+2
| | | | | | | Call d->helperDone before deleting 'this'. Change-Id: I06224f4d3a868dccd505b1f1d3ed56af6f339ba3 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Reimplement QVariant to QDebug streaming.Jędrzej Nowacki2012-01-101-1/+18
| | | | | | | New implementation fixes some commented code marked as FIXME. Change-Id: If8f5bebedd65bcf8f839d804c2022ca79ef82ddf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Platform style hints: Introduce keyboard repeat rate.Friedemann Kleint2012-01-101-10/+2
| | | | | Change-Id: I556c2ecec7d5368122875a659af3ae7db88aa481 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Accessiblity State as bit field.Frederik Gladhorn2012-01-101-10/+10
| | | | | | | | | | | We would like to add more flags that will be over the 32 bit boundary. On Windows enums don't seem to digest values >32 bit. This patch changes the state flags to be a bit field instead. The windows part of the patch was written by Jan-Arve Sæther. Change-Id: I2d1d87807f920ce4d4a5c7bfea8b1122ed44eb08 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Update year in Nokia copyright headers.Jason McDonald2012-01-104-4/+4
| | | | | | | | The previous change missed some headers from years prior to 2011, and a few new files were merged after the previous change. Change-Id: Ib7d1a2b7062228c2a5373da64242b2ee1f0981e1 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Implement QDebug stream operators for builtin classesJędrzej Nowacki2012-01-104-0/+26
| | | | | | | | | | | QDebug stream operator was added for: QPixmap, QImage, QUuid, QBitArray, QLocale, QRegExp, QCursor, QPalette, QTextFormat, QTextLength, QIcon and QSizePolicy Change-Id: Ibcf5c9b599ba322d53cb106d8e5e157427ebe757 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Update the lastPosition with the full current positionAllan Sandfeld Jensen2012-01-091-4/+2
| | | | | | | | | | By only updating parts of the lastPosition the axislock got confused, since the direction would be calculated from a mix of delta-movement and movements since touch begin. Task-Number: QTBUG-23530 Change-Id: I6b886d4819b963aba18bb86154df172070399206 Reviewed-by: Robert Griebl <robert.griebl@nokia.com>
* Fix constness of QGraphicsSceneBspTreeIndex::bspTreeDepth()Stephen Kelly2012-01-092-2/+2
| | | | | | Change-Id: I8298afc9c493a1e9c6e49cc36a97184a50709558 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Fix constness of QShortcut::context()Stephen Kelly2012-01-092-3/+3
| | | | | Change-Id: Ic819c9b70fb2d6732f3fdc1d151a9adda571211b Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Improve Accessibility documentation.Frederik Gladhorn2012-01-091-0/+2
| | | | | Change-Id: Ifb70d9c6d7b3096e0188e8454191786375296647 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* Remove unused touch-related code in QApplicationPrivate headerLaszlo Agocs2012-01-091-156/+0
| | | | | | | | | For X11 and Windows the touch handling code lives in the platform plug-ins. The RX71 code is replaced by the generic evdev touch support provided by the touchscreen plug-in. Change-Id: I12c9fd3be8b466565cac7abebbb70805f1e28b5f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove docs for removed functions.Frederik Gladhorn2012-01-092-147/+0
| | | | | Change-Id: I33346d0a2b324afe4b85b1792854b586aa7685ba Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Remove the Q_TYPENAME define.Stephen Kelly2012-01-082-4/+4
| | | | | | | | | | | | | It is mostly not used (most places in Qt use typename directly), so is already not very useful. For example typename is used in: QDataStream& operator<<(QDataStream& s, const QVector<T>& v) Change-Id: I85337ad7d8d4ebbb424bfa2ab9a356456ff3e90f Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Move keyboard locale and input direction to QInputPanelPekka Vuorela2012-01-071-1/+2
| | | | | | | | | | Deprecated QGuiApplication::keyboardInputLocale() and keyboardInputDirection(), introduced QInputPanel::locale() and inputDirection(). Change-Id: Ic48c77f10821a949751c73c73f22bd78e2192b9c Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove all references to QAccessible:: {Child|Ancestor|Sibling}Jan-Arve Saether2012-01-061-134/+0
| | | | | | | | | | | These are deprecated in favor of QAccessibleInterface::child() and QAccessibleInterface::parent() QAccessible::Sibling can be done with a combination of those two. This is handled by the bridges, if required. Change-Id: I2e2a6eb2a982e7c9001a393d69f0c5f1ae9c0970 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Add roles to the dataChanged slots in views.Stephen Kelly2012-01-068-14/+14
| | | | | | | | | | | | | | | | This is a source incompatible change. This is for consistency with the signal for the lifetime of Qt5. I could imagine people trying to override a virtual function (in a new class while using the Qt5 library) with the arguments of the signal and have that fail due to the arguments not being correct. It also allows ignoring dataChange events when they are known not to be for roles which are relevant to particular views or delegates. Change-Id: Ica191835125c1c8fdaf665debb62d635e81700dc Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix documentation.Frederik Gladhorn2012-01-062-40/+0
| | | | | Change-Id: Id54263f408e29ed3b9d06712e39759485a42b869 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Remove qdoc for code that no longer exists.Frederik Gladhorn2012-01-063-201/+0
| | | | | Change-Id: I82d4ba930335a03181aa20c9e4cb060ca8b35b9a Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Remove docs for functions that no longer exist.Frederik Gladhorn2012-01-061-382/+0
| | | | | Change-Id: Id79d3eeab85b156348054c727ea1897ac3e5842b Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Add the roles to the dataChanged slot.Stephen Kelly2012-01-062-7/+7
| | | | | | | | This will allow the possibility of ignoring dataChange signals for roles which are not interesting to particular widgets. Change-Id: Ia7dcebd875f7b9fa90aa5e9bff7ef5ca9f381d55 Reviewed-by: David Faure <faure@kde.org>
* Removed QApplication::setInputContext()Pekka Vuorela2012-01-054-15/+16
| | | | | | | | Obsoleted by platform input context. Setting a custom QInputContext wouldn't work properly anymore. Change-Id: I966573a82fdd7530544878513a655eae7b3ad67b Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Removed Qt::ImhMultiLinePekka Vuorela2012-01-051-1/+0
| | | | | | | | | | | Multi line information does not really work that well as input method hint. Application developer is the one setting value for the hint, and thus would be responsible for always having right value for multi line. Change-Id: I6102be95549f6f6d4da40845f52d5c873cd46a47 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Avoid redefining the lastWindowClosed() signal.Robin Burchell2012-01-051-1/+0
| | | | | | | | This prevents things like the following (from qmlviewer): QMetaObject::indexOfSignal: signal lastWindowClosed() from QGuiApplication redefined in QApplication Change-Id: I4b30235e379aedaa913ea30f05daac7079f285e9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-05522-523/+523
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QApplication: Remove unused variable causing a compiler warning.Friedemann Kleint2012-01-051-3/+0
| | | | | Change-Id: I418ac16a2b3e119569512e38d3f00fb493b769d1 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Refactor QVariant handlers.Jędrzej Nowacki2012-01-041-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | QVariant implementation is based on delegation to a handler. The handler has rather simple construction, it is a set of function that implements a switch statement over known types and redirects calls to a right method of an encapsulated types instance. Unfortunately after qt modularization project, it is not easy to use types directly from different modules, as they can be undefined or completely unaccessible. Which means that each module has to implement own handler to cooperate correctly with QVariant. We can suspect that list of modules known to QVariant will grow and it is not limited to GUI, Widgets and Core, therefore it would be nice to have an unified, from performance and source code point of view, way of working with handlers. This patch is an attempt to cleanup handlers. Keynotes: - Each handler is working only on types defined in the same module - Core handler implements handling of primitive types too - Custom types have an own handler - Each handler is independent which means that dispatch between handlers is done on QVariant level - Handlers might be registered / unregistered using same interface Change-Id: Ib096df65e2c4ce464bc7a684aade5af7d1264c24 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QLineEdit to use Qt::ImhSensitiveData input hint on password echo modesPekka Vuorela2012-01-031-2/+2
| | | | | Change-Id: I6922e41e7e57563f1190f46e0890b71e5c4b7ef4 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Send ApplicationActivate and ApplicationDeactivate from QtGui.Samuel Rødal2012-01-021-14/+0
| | | | | | | | | | Instead of only from QApplication in QtWidgets, as we need these events for example in QDeclarativeApplication. Task-number: QTBUG-21573 Task-number: QTBUG-23331 Change-Id: I0c960bd1c7911d306d274a6e9a1838f158235ed0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
* Replace a pseudo-virtual slot with a virtual method.Stephen Kelly2011-12-272-3/+2
| | | | | | Change-Id: I5d0e1e54e0d3d441b71b7594bc14e872512cc937 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Finish removing Qt3 supportBradley T. Hughes2011-12-231-1/+1
| | | | | | | | | | | | | | | | Remove the (-no)-qt3support options from configure, and remove the last remaining references to Qt3Support, QT3_SUPPORT, and QEvent::ChildInserted. The compatibilityChildInsertEvents() tests in tst_QObject and tst_QWidget have been renamed to childEvents(), which is a more appropriate name. Change-Id: Id0b45e9b177efcc8dceee8c9ed8afafedeeace2f Reviewed-by: Kai Koehne <kai.koehne@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Enable Mac style on Mac OS X.Morten Johan Sorvig2011-12-2213-318/+406
| | | | | | | | | | | | | Add styles/qmacstyle_mac back to the build, modify qstylefactory to load it on Q_OS_MAC. Move helper functions from platforms/mac to qmacstyle_mac.mm. QMacStyle should now be self- contained and not rely on anything from platforms/mac. Change-Id: I68fe40bb7f88c01269968bffd9579b7f3b932d4c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Convert macros to functions.Stephen Kelly2011-12-211-2/+3
| | | | | | Change-Id: I43f4188d1c33cd5a07eb7a12bf3343af7e6a211f Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Port to list(APPEND)Stephen Kelly2011-12-211-1/+1
| | | | | | Change-Id: I198622270324eea62dd5ad6343fdf7c89e736e6c Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix style in cmake macros files.Stephen Kelly2011-12-211-20/+19
| | | | | | Change-Id: I2806ce63f5948dde9c582740bc2f070900987fb5 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>