summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate QMainWindow::unifiedTitleAndToolBarOnMacChristoph Schleifenbaum2012-06-111-21/+2
| | | | | | | | | | | | | Update documentation. Implementation is left for now. There is currently no replacement; once we have that in place we'll update the docs agin to point to it. Change-Id: I8b4532702938398dc5b4eef5da2b3f9dfb68382f Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* QWizard/Win: Drag window on Vista with only left mouse buttonJonathan Liu2012-06-091-1/+1
| | | | | | | | The QWizard window should only be draggable using the left mouse button on Vista. Change-Id: Ie6ec118cbb48440c5dc6b84c4361119b1bbbd0cf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QWidget::destroy(): Release mouse and keyboard grab.Friedemann Kleint2012-06-091-0/+4
| | | | | | | | | This used to happen in the platform widget code. Task-number: QTBUG-26079 Change-Id: Id6de7473c2fa4381a39114d5122e06e3bde159fa Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Remove QFactoryInterface from style pluginsLars Knoll2012-06-083-23/+10
| | | | | | Change-Id: I5c41f1c8b91b5e1117b9163c137de4bf5f51099c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove unused variable inSetParentGirish Ramakrishnan2012-06-082-5/+0
| | | | | Change-Id: Ie65514209f14d8f8b2396c1d6e37cd8c3e4c0c1a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix crash in QTreeWidgetItem::sortChildren when adding new item.Markku Heikkila2012-06-081-0/+1
| | | | | | | | | | | | | | | | | | | This is a cherry-pick of 4f388c383e39b598d997e21bd9a4f16d89bd0625 from February Recursive call is caused if user code calls QtreeWidgetItem()::sortChildren and sorting is enbled in QTreeWidget. First call is from user code and second is caused by timer. When timer expires second call is made. This recursion is prevented with QTreeModel::SkipSorting skipSorting() in QTreeWidgetItem::sortChildren(); Task-number: QTBUG-20345 Change-Id: Ibf73e69274423f31397a9e391bfba7d5c4103a3c Reviewed-by: Markku Tapio Heikkilä <markku.heikkila@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix a crash when calling effectiveWinId() on parentless widgets.Friedemann Kleint2012-06-082-23/+9
| | | | | | | | | | Remove the assert as it also triggers when the widget is one that currently has no parent (setParent(0)). Check that the WinId is != 0 in the cursor code. Change-Id: I711fc600f1d803c8f01c15df87984e742a4c23d2 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Remove widgets lib dependency on platformsupport.Frederik Gladhorn2012-06-081-2/+4
| | | | | | | | Instead of the dependency add the one needed function as virtual to the QPlatformServices in QtGui. Change-Id: Ia4455f5ac88ec4d0480bd81635cebba62bbd8ac5 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Use QPointer instead of QWeakPointer.Stephen Kelly2012-06-0510-15/+15
| | | | | | | | The use of QWeakPointer for tracking QObject pointers is to be deprecated. Change-Id: If460ca7f515db77af24030152f4bd56e1a5fae7c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Avoid string-based lookup of signalsKent Hansen2012-06-051-2/+3
| | | | | | | Resolving signals by member function is preferable. Change-Id: I2a47a27bc780c4c3c29cf472f9f063c910e20c18 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Correctly locate files with relative pathsLars Knoll2012-06-051-0/+2
| | | | | | | | | | | | QUrl("relativefilename").toLocalFile() changed behavior and now returns an empty string if the scheme is not set. Setting the scheme to "file:" in setSource would however break some other assumptions in the code about relative url's. Task-number: QTBUG-22416 Change-Id: I1b3fcbef81f6e356935ec426903989e783ce9a78 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix parent-children relationship of QWidgetWindowsDebao Zhang2012-06-041-4/+5
| | | | | | | | | | | | For a native child widget, widget->nativeParentWidget()->windowHandle() should always equal to widget->windowHandle()->parent() Change-Id: I2560689d32b0cb2834ed33f96c1c70ef3c14342d Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* QWidgetWindow: Fix handleExposeEvent()Debao Zhang2012-06-041-1/+1
| | | | | | | | | | When the associated widget of QWidgetWindow is visible but its updates are not enabled, avoid marking the widget dirty. Task-number: QTBUG-25991 Change-Id: Ibeac4c0dfd3198a5174372331e50628b0d3a480d Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* QtWidgets: Make QWidgetWindow disappear when its associate QWidget hidesDebao Zhang2012-06-041-3/+2
| | | | | | | | Task-number: QTBUG-25980 Change-Id: I572eb9dd175121b1f1b6070e1849247000b48961 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Implement QWidgetPrivate::setWindowIcon_sys()Corentin Jabot2012-06-023-9/+7
| | | | | | | | | | * The widgets icon are correctly set, through the QPA plugins * Removing QTLWExtra::iconPixmap that was only used in some platforms in Qt 4.7, so if that wariable is still needed somewhere, it sould be declared in the concerned QPA plugins Change-Id: I85f50726cce3578b66c09c327767111f09935075 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Fix QApplicationPrivate::pickMouseReceiver() crashDebao Zhang2012-06-011-1/+1
| | | | | | | | | | | | | | When a widget associate with a QWidgetWindow received a mouse event, but another widget which is not a child of the widget has grabbed the mouse, the application will crash. As QWidget::mapFrom() only works when mapping from parent to child. This is the side effect of SHA: f6c107d799d14bbdb2cb71b8446483541bb0adb5 Task-number: QTBUG-25985 Change-Id: If2e6289e02d6d67c215694f2217221c9c7a0af46 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Dispatch tablet events to widgetsLaszlo Agocs2012-06-013-60/+38
| | | | | | | | Plus remove some platform-specific tablet leftovers from Qt4. Change-Id: I376abc38d1fe4c253d8803cf0ce007e2d6c298bf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove unused isGLWidget variable.Kim Motoyoshi Kalland2012-06-012-2/+0
| | | | | Change-Id: I9d1a0edfce3d13ed56916b7301098aa5fbe0bc40 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix QFileDialog crash on show with the GTK style.Morten Johan Sorvig2012-06-011-0/+4
| | | | | | | | Call createWinId on modal_widget to make sure it has a valid QWindow. Change-Id: Ieaec2bcaceb2ac28032cb42e5f8bcaf7a33828ca Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Remove all references to X11 session managementDonald Carr2012-06-011-2/+0
| | | | | | | | | There is no session management currently implemented for the xcb QPA backend. Update the build system to reflect this. Change-Id: I3486de5741f1fb7e09330ca142b8235a84d3b91d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fix compilation for QT_NO_CONTEXTMENU in QtWidgetsTasuku Suzuki2012-05-302-0/+6
| | | | | Change-Id: I05b23504549c0156ba5e72144674f843149932c0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Remove QUpdateEvent from the public headersLars Knoll2012-05-301-0/+19
| | | | | | | | | It's only used internally in qwidget, so it might as well live in qwidget_p.h. Task-number: QTBUG-25070, QTBUG-25373 Change-Id: I87770e0b49253b4bdebe90ce84dd42448d6175bd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix Qt 5 todo issues for QSizePolicy.Jan-Arve Saether2012-05-303-60/+68
| | | | | | | | | | | | | | * Merge the two public ctors. * Use bitflags instead of shifting bits (more readable). * Add autotest * Use int datatype for the "stretch setters". (values out of bounds are clamped) Streaming to QDataStream will still use the Qt 4 format. Task-number: QTBUG-25100 Change-Id: Iecb1e78cb12717e4d84448484c3ad8ca469d571a Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Fix some painting issues with native widgetsMiikka Heikkinen2012-05-294-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidgetPrivate::drawWidget was missing an important line about marking native widgets dirty compared to 4.8, which caused all other widgets besides the native one to not repaint unless window was resized in such a way that the widgets would get hidden and then re-exposed. The above didn't fix repainting issues when moving native widgets (e.g. widgets in QMdiArea subwindows or just calling QWidget::move()). Added setting widgets dirty to QWidgetWindow::handleExposeEvent to address this issue. If there is one native widget, Qt enforces that all widgets in same parent hierarchy are native - presumably to get overlapping widgets drawing correctly. However, qapplication_qpa.cpp set the attribute Qt::AA_DontCreateNativeWidgetSiblings for all applications, which caused only the parents of native windows be forced native, leading to drawing artifacts related to siblings of native widgets (e.g. overlapping QMdiArea subwindows). I don't see a reason for setting this flag indiscriminately for all applications, so removed it. Also added setting newly created QWindow visible if associated widget is already visible, which can happen if regular widgets are shown before the first native widget is shown and retroactively forces other widgets native. Task-number:QTBUG-25805 Change-Id: Ib133dae9b13cc6e7155e7cae00fc1339d3b5ae86 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QWidget::grab: Add a default value for the QRect parameter.Friedemann Kleint2012-05-292-5/+3
| | | | | | | | | | | | | | | The documentation is misleading in that a default-constructed rectangle that has size = 0 causes the entire widget to be painted; this happens only if the one of the size values is < 0. Add a default value such that size < 0 and the entire widget is painted based on the rationale that a size = 0 might be the result of some calculation and it would be unexpected to get a pixmap containing the entire widget in that case. Change-Id: I2a5fb38cd407b4b64348213101d8196b2c40ad9a Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QWidget::grab(): Do not call adjustSize() unconditionally.Friedemann Kleint2012-05-291-8/+5
| | | | | | | | | | | | | This breaks the combo dropdown animation on Windows as it uses special layout tricks and potentially other (unlaid-out) widgets. If the size is unknown, call prepareToRender instead. Reverts d6f971c8547d7f0619b63f7e07f1c292e811b45f. Change-Id: If44e2a7e7fb134c228674cf228bbee0d5520e04f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QtWidgets: remove \link usagesGiuseppe D'Angelo2012-05-2921-72/+92
| | | | | Change-Id: I9887a24485233f29d07054b3110d4db9e499b9f4 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Eliminate QTreeWidget drag crashJiewen Wang2012-05-281-1/+1
| | | | | | | | | | | | | In QTreeViewPrivate::adjustViewOptionsForIndex() wrong index had been used when referencing to array of viewItems. Variable row is set to the index of the QModelIndex, however it is not as same as the index in viewItems[] when there was hidden item in treeWidget. Index of viewItems[] should be used here. Unit test is added as well. Change-Id: Idc7eda979e7d09c5a07bd6dffd92b7abbac10e67 Task-Id: QTBUG-25333 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix compiler warnings when simply including qgraphicsscene.hSimon Hausmann2012-05-271-1/+2
| | | | | | | | | | | | | | Commit 02b80ebb52b957ae65cc23f5c9464633d9de868d marked itemAt(x, y) and itemAt(point) as deprecated, causing a warning when code calls the function. Unfortunately the itemAt(x, y) overload calls the itemAt(point) overload, causing a compiler warning even when not using any functions from qgraphicsscene.h at all. This commit fixes itemAt(x, y) to not call itemAt(point) but use the non-deprecated items() function directly. Change-Id: I9c4d3a070d65f3406cdab00345c56d4fc62e76c1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix To-Do's in QGraphicsScene.Gatis Paeglis2012-05-262-154/+22
| | | | | | | | | Mark obsolete functions with QT_DEPRECATED. Task-number: QTBUG-25092 Change-Id: I89d9e508479b75ad2d8bf131c69f6158b71fcda8 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix Qt 5 to-do's in QGraphicsProxyWidgetGatis Paeglis2012-05-265-74/+50
| | | | | | | | Task-number: QTBUG-25091 Change-Id: Ic4160f90f69167d40ee1e569562d25eb009615aa Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Itemviews: compile with QT_STRICT_ITERATORSThiago Macieira2012-05-263-5/+5
| | | | | | | Just a few mixed up iterators. Change-Id: I19f62457ee24bc844fadd182ba61866e259e9636 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Gestures & events: compile with QT_STRICT_ITERATORS.Thiago Macieira2012-05-252-22/+23
| | | | | | | | | | | There are a few mixed up iterators that needed cleaning up. We're missing a constUpperBound and constLowerBound function, though... This commit sneaks in one change to qtextformat related to QT_STRICT_ITERATORS but not to gestures and events. Change-Id: I8c7c840fb5f46c790adbf52952c6009c5b5f2f43 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* QStatusBar::showMessage will always take new timeoutJiewen Wang2012-05-251-2/+0
| | | | | | | | | | | There is a message check in QStatusBar::showMessage causing the call exits early if the new 'message' is the same as the current message. The check has been removed, and new timeout will always take effect. Unit test is added as well. Change-Id: I3a03c6842835824caba4adc37c3ed834952c4bb2 Task-Id: QTBUG-25492 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Fix warnings about unused variables.Friedemann Kleint2012-05-251-1/+1
| | | | | Change-Id: Ie95f032981d2ce68b1193725ab55ac207d187525 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* QTBUG-16850: QLineEdit::setSelection removes blank charactersTarja Sundqvist2012-05-251-1/+1
| | | | | | | | | Changed checking of the start position so that it does not call d->control->text() because this removes blank characters when an input mask is used. Thus the selection fails. Instead d->control->end() is used for checking the start position. Task-number: QTBUG-16850 Change-Id: I62992fb81bd47d432bade9f219782d48eb309956 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Fix comments to refer to the root, not the top level.Stephen Kelly2012-05-251-2/+2
| | | | | | Change-Id: If0fc8a18973a2fe15197437734f15f3d445d1b6c Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix some spelling errors.Stephen Kelly2012-05-251-8/+8
| | | | | | Change-Id: I1f730c843e77d68ab17715175af53da577cb3695 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QtWidgets: Fix QT_FLUSH_UPDATE for Windows.Friedemann Kleint2012-05-241-10/+22
| | | | | Change-Id: I09fd1ca6e7691b326760b83aad612e9a26717379 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* QPA: Refactor QFileDialogPrivate::qt_clean_filter_list for QPASean Harmer2012-05-242-19/+2
| | | | | | | | | | Allows QFileDialog and QPA plugins to access this helper function. Needed by the Cocoa and QNX plugins. This commit fixes up the Cocoa plugin. The QNX support will be in a follow-up commit. Change-Id: I8dd08a9f3dc27d85edd0dc9dad9629406c1e677a Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fix compiler warnings in QtGui, QtWidgets.Friedemann Kleint2012-05-232-4/+3
| | | | | | | | - Unused variables. - Deprecated headers. Change-Id: I8fb5d5f2cc02aca145a8c857358527592b7491ec Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Don't use deprecated QPixmap::grabWindow(),grabWidget().Debao Zhang2012-05-231-3/+4
| | | | | Change-Id: I5d0ffb17d60ad53822d537b9c736307486823d45 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* move inputMethodQuery() to public in subclasses of QWidgetTasuku Suzuki2012-05-233-3/+4
| | | | | | | QWidget::inputMethodQuery() is public. Change-Id: I6d290e911854937f32fa6984329b56571feb6872 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Fixed QLineEdit::inputMethodQuery() for Qt::ImHintsTasuku Suzuki2012-05-231-1/+1
| | | | | | | It should return QWidget::inputMethodHints() instead of QVariant() Change-Id: I01f5de8f2087ac67d125f54f08abed523653eb92 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Fix QtWidgets compilation for -qconfig largeTasuku Suzuki2012-05-233-0/+14
| | | | | Change-Id: I90ea78944546e93debb41c901d9f128a7b29b1f4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* QWidgetWindow: handle ShortcutOverride eventsBradley T. Hughes2012-05-221-0/+1
| | | | | | | | | ShortcutOverride events sent to the QWindow should be handled by the QWidget. Change-Id: Icec504db1066871b02dec639e4c1c624b0afeaa8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* QCssParser: Remove temporary structure storing QIcon data.Friedemann Kleint2012-05-211-18/+5
| | | | | | | | | This is no longer needed after QIcon moved to QtGui. It is a revert of 5a0eb4e768435b9ce32b074e620fca33be4df2fb, compile fixes and uncommenting of commented-out code. Change-Id: I6cfe6d2582b3e37161862a28e55cc3b010e18a8b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Don't create QBackingStore for QDesktopWidgetGirish Ramakrishnan2012-05-211-1/+1
| | | | | | | | | | QDesktopWidget doesn't need a backing store since it cannot be painted on. Since the QDesktopWidget is always created, this change avoids any resources created in the QPlatformBackingStore contructor. Change-Id: I33679c98363f9c0d7ea64d9c5e27327679ad92a0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Move rarely used QObjectPrivate data to extraDataMartin Jones2012-05-211-2/+2
| | | | | | | | | | | Move runningTimers, eventFilters and objectName data members to ExtraData. Saves 12 bytes per QObject for 95% of use cases (QObjectPrivate goes from 76B -> 64B). Change-Id: I5648c89f65a7be3ea51bd703ee8a9dcff6222c3c Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QPA menu abstraction, originally based on Morten's workJames Turner2012-05-197-231/+120
| | | | | | | | | | Create a QPA abstraction for native menus, derived from the Cocoa support in 4.8, but with the expectation to support other platforms too. Update the QtWidget QMenu and QMenuBar code to maintain their QPA equivalents if they exist. Change-Id: Id605de3da8811dc832bf48b35f9107778ad320ff Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>