summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
...
* Mac: Fix rendering of non-int sized fonts.Eike Ziller2012-06-202-17/+24
| | | | | | | | | Scrolling happens in integer steps, so it's necessary to use a fractional correction value. Task-number: QTCREATORBUG-7127 Change-Id: I6eccba6532f95aa4bf9270bdaec4b57280dc8e3d Reviewed-by: Matthias Ettrich <matthias.ettrich@nokia.com>
* Merge "Merge branch 'buildsystem'" into refs/staging/masterOswald Buddenhagen2012-06-201-12/+12
|\
| * fix misnomer: qt_module.prf => qt_build_config.prfOswald Buddenhagen2012-06-191-1/+1
| | | | | | | | | | | | qt_module suggests to be congruent to qt_plugin. Change-Id: I629530bcbe2ba6c0adbdc11a275119c8aff0c953
| * automatically add QT_BUILD_FOO_LIB to DEFINESOswald Buddenhagen2012-06-191-1/+1
| | | | | | | | | | Change-Id: I35d9861e48469eb5cc8824e361450684047e6559 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
| * clean up projects from QPRO_PWD nonsense, etc.Oswald Buddenhagen2012-06-191-1/+0
| | | | | | | | | | Change-Id: I4c41aedf5bfb37e31ad202cacd2312b0bdb168e2 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
| * auto-generate QMAKE_PKGCONFIG_REQUIRES and QMAKE_PKGCONFIG_DESCRIPTIONOswald Buddenhagen2012-06-191-2/+0
| | | | | | | | | | | | | | less boilerplate, more accuracy Change-Id: I6cc2abd50eafb4901d987c122f10a62ec9ea9da3 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
| * move QMAKE_PKGCONFIG_VARIABLES stuff out of qt_module_config.prfOswald Buddenhagen2012-06-191-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | this only needs to be set in one module each - the one which provides the relevant tool. this is moderately source-incompatible, in that a package which queries a given variable from the wrong library won't get the path it looks for any more. as it's likely that everyone was using QtCore as a reference anyway, this will only affect uic - which is in the new QtWidgets library, to which people need to adjust anyway. Change-Id: If05d3c33fda6cd12466e261391b825c59651d3e4 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
| * auto-generate module prisOswald Buddenhagen2012-06-191-4/+2
| | | | | | | | | | Change-Id: I654428771034221ccf424be34d5d9c7764daf3b4 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
| * automatically add the version header to HEADERSOswald Buddenhagen2012-06-191-2/+0
| | | | | | | | | | Change-Id: I7c2e1d852ebdbc5cca7a3a31ab2b4c9ab9faffd9 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
| * make qt_module_config.prf install the module pri fileOswald Buddenhagen2012-06-191-1/+1
| | | | | | | | | | | | | | | | | | absorb module.prf into qt_installs.prf, as that's where it belongs. add qt_install_module option and automatically set it in qt_module_config. make qt_installs use that option. Change-Id: I860616f3a29a456f7b88ddaffa09375400c8911e Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
| * move moc, rcc and uic CONFIG additions to the respective qt modulesOswald Buddenhagen2012-06-191-1/+1
| | | | | | | | | | | | | | they don't belong into the global scope Change-Id: I27a3de5f706392b3c4a84035521bc3b4e4055740 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
| * remove last traces of qbase.pri, qt_targets.pri and qt_installs.priOswald Buddenhagen2012-06-191-1/+1
| | | | | | | | | | | | | | qt_module_config.prf, qt_targets.prf and qt_installs.prf replace them Change-Id: I6fc670ce8540dbd9ddaec1632d486e43a7ebf14b Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* | Accessibility: Do not automatically add controllersFrederik Gladhorn2012-06-201-19/+0
| | | | | | | | | | | | | | | | | | | | | | While I do like the idea, it currently relies on every QWidget having QAccessibleWidget as a11y representation. This crashes for example when using the itemviews and asking them for relations. Change-Id: Ie15a78dae620eefb97c646b9e802b13bdf864650 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* | Windows: Fix MinGW warnings.Friedemann Kleint2012-06-202-7/+11
|/ | | | | | | | | | | - Missing initializers for structs - Missing enumeration value - Mixing enumeration/ints in operator ? Change-Id: I149ab01ad2ebd04f89e5c699905d5ba724828e0f Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Clean up a partially scrolled QRollEffect widgetMiikka Heikkinen2012-06-181-1/+1
| | | | | | | | | If the associated widget pointer got zeroed while QRollEffect was scrolling, the partially scrolled QRollEffect widget remained on screen indefinitely as 'done' was never set to true. Change-Id: If1567ea740e81b5501137d10db471ca97d295ed8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix: Widgets that become top-level widgets may crash the applicationBerthold Krevert2012-06-152-3/+6
| | | | | | | | | | | | | | | | | You can reproduce the bug with the QMainWindow demo application: Just dock the toolbar on the left side, then try to drag the bar back to the top and observe that the application crashes. This happens, because the toolbar becomes a top-level widget during the dragging action and therefore some data structures like a window are created. After the toolbar has been docked, it loses its top-level state and the window object is destroyed. The same is not true for the backing store structure, which still keeps a pointer to the destroyed window. When the toolbar is dragged the next time, a new window object is created, but the backing store tries to access the deleted one. Crash occurs. Change-Id: I0d1ffc04c19ec14654ceb62a0d3cf7cf65cb952d Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Do not redefine NIN_KEYSELECT if already definedJonathan Liu2012-06-151-1/+4
| | | | | | | NIN_KEYSELECT is already defined for MinGW-w64. Change-Id: Ieab9f883cf1680f792d085e254916d51602ce701 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Speedup for QAbstractItemViewPrivate::delegateForIndexABBAPOH2012-06-141-4/+11
| | | | | | | | This fix prevents copying of a QPointer on a stack and adding/removing QMetaObject guards Change-Id: I844c10cede1536a14ad7cd9f007470966619d6d6 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix QListView::scrollTo() when there are hidden rowsJani Honkonen2012-06-141-1/+6
| | | | | | | | | | | | | | | | | This is a cherry-pick of b0601630dd0ddabfaa3b97d042ee02b981d95988 from February QListView does not consider hidden rows when scrolling to an item. If there are hidden rows (or columns) before the selected item then the visual index of an item is not the same as the row index from the model. So scrolling will be off by the number of hidden rows before the selected item. Added a autotest for this also. Task-number: QTBUG-21115 Change-Id: I01b097bce7f163cdb480a71b763c060cc006fdc7 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Introduce QPA API for size grip handling.Friedemann Kleint2012-06-141-71/+27
| | | | | | | | | | - Introduce API to do size grip handling (mouse press and move). - Move Windows code to Windows plugin. - Move X11 code to XCB plugin and activate it. Change-Id: I2f61d6ddc1fa07447e668554d41ecc820efca23f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QtWidgets: Fix warnings about deprecated QGraphicsView functions.Friedemann Kleint2012-06-144-5/+5
| | | | | | | | Warnings introduced by d76de69b4b60e7e13d5b0602768702e4bf219804 . Change-Id: I613500074a2318a617f18d5b887840ecc3408237 Reviewed-by: Gatis Paeglis <gatis.paeglis@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* AbstractItemView editorForIndex/indexForEditor speedupABBAPOH2012-06-131-0/+8
| | | | | | | | | | Frequent calls to editorForIndex/indexForEditor are very slow because of an implicit conversion from QModelIndex to QPersistentModelIndex. This fix allows to avoid unnecessary conversions when there are no open editors (most common case) Change-Id: Ic072880c9f33a43a20b2a61a42c3ba215c5c33cb Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Send key events to pop-up widget in case there is one.Friedemann Kleint2012-06-133-4/+10
| | | | | | | | | | Make QApplicationPrivate::inPopupMode() static for convenience. Task-number: QTBUG-26095 Change-Id: I98dc1e40d357592b790cd51d7aca60c2be9f380f Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Fix Qt5 To-Do's in QGraphicsItemGatis Paeglis2012-06-122-59/+21
| | | | | | | | | - Merge isObscured() - Deprecate and inline obsolete methods - Correct outdated documentation Change-Id: I4eb29df78785794c6d134bf9c2f5e0f3c3d6a29f Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fix QTreeView header re-ordering bug on Mac OS.Chris Meyer2012-06-121-0/+7
| | | | | | | | | | | | | | | | | | | | | This is a cherry-pick of 0ba850c7a2dbccb8dd6aa1664679bda6cce95065 When the mouse button is released at the end of a drag, Cocoa may simulate an extra mouse moved event. However, the state of the buttons when this event is generated is already 'no button'. This leads to some failsafe code canceling out of the drag state and when the actual mouse release event is finally processed, the header drag state has already been exited and the header drag fails. This patch disables the failsafe code on Cocoa and makes header dragging work when the mouse goes outside the bounds of the header view. Task-number: QTBUG-14179 Change-Id: Ia9fd1ac79f9e7b4b90d3e160298c53d65fb171d3 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QWizard/Win: Handle hit testing correctly for Vista styleJonathan Liu2012-06-121-39/+50
| | | | | | | | | | | | | | | Clicking the area just below the close button when Aero is enabled reveals duplicate caption buttons. DwmDefWindowProc returns hit results for DWM caption buttons but DefWindowProc may also return hit results for non-DWM caption buttons. To resolve this issue, if DefWindowProc returns a window button hit result then we just use HTCLIENT (the client area) as the hit result instead. Change-Id: Ia741ce4f9aa944109d8de54c2f84009f5ea1883f Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Only quit if there are no visible widgets or windows.Stephen Kelly2012-06-121-1/+1
| | | | | | | | | | | | | | We need to let the QGuiApplication determine whether quitting is appropriate based on whether there are visible top level QWindows after the last top-level QWidget was closed. This solves the issue raised here: http://thread.gmane.org/gmane.comp.lib.qt.user/1880 The transientParent is the QWindow equivalent of parentWidget on QWidget, so the test in QGuiApplication::shouldQuit is similar to the one in QApplication::shouldQuit. Change-Id: I500eff8d5887f24415180134b3a4be3c630a896f Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Use a QVector<int> instead of a QSet<int> in itemviews/models.Stephen Kelly2012-06-1212-22/+22
| | | | | | | | | | | | | | The QSet<int> is a more expensive container to use and create, so it should be avoided. This is source incompatible compared to earlier Qt 5 for QAbstractItemView subclasses which reimplement dataChanged, but this patch changes nothing compared to already-present SiC compared to Qt 4. Change-Id: Id95391dfd62a0a7f487a8765790b007badefb937 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* 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>