summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Do not hide fullscreen widgets having a 0x0 geometryOliver Wolff2012-11-221-1/+1
| | | | | | | | | | | | It is possible that the widget which is to be shown full screen has a 0x0 geometry if an empty layout with 0 margin is set there. In that case the widget should not be hidden. Task-number: QTBUG-27602 Change-Id: I87fd20cc3a5bac89ceccdf639780c4bc721ce860 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Handle Qt::WA_MacSmallSize in QApplication::font(const QWidget *).Friedemann Kleint2012-11-201-0/+8
| | | | | | | | Task-number: QTBUG-27669 Task-number: QTBUG-27665 Change-Id: Id7eb8092076a57a755a53d1eb5c46d706756ca81 Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Accept subsequent drag moves in QWidgetWindow if enter was accepted.Friedemann Kleint2012-11-161-0/+4
| | | | | | | | Add handling similar to QGuiApplicationPrivate::processDrag. Task-number: QTBUG-28008 Change-Id: I516531da242471cdfbb59418d0052b25f799f373 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Disable static contents optimization for now.Samuel Rødal2012-11-151-1/+1
| | | | | | | | | | Since none of the platform backingstore implementations currently implement this, skip trying to use the optimization for now to avoid graphical glitches. Task-number: QTBUG-27971 Change-Id: Ic6d263bb552ef0b4786910d71f965d26d810b7eb Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Change to enter/leave policy while grabbing.Miikka Heikkinen2012-11-151-7/+0
| | | | | | | | | | | | | | | | | | | | | Sending enter and leave events to other windows than the grabbing window is not logical. The policy should be that only the grabbing window receives enter and leave events. Changed the documentation accordingly and provided the necessary changes to Windows implementation. Also removed explicit leave event generation for widgets when popup is opened as that is now redundant. tst_QWidget::underMouse() test was changed to behave according to new logic. Task-number: QTBUG-27871 Change-Id: I127fb8685b4a4206d1a319f42cba491ec02bc8ca Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Send enter to the child at the position of the QEnterEvent.Friedemann Kleint2012-11-141-2/+4
| | | | | | | | | | | | | This was apparently done so in each of the widget_<platform>.cpp in Qt 4.8. This then causes the cursor to be updated in dispatchEnterLeave() on Windows and Linux. Task-number: QTBUG-27871 Task-number: QTBUG-27585 Task-number: QTBUG-26424 Change-Id: Idf14cd96ccb36f7c2607853ed8b0024c36a5413c Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* QWidget: Move break statement to the right placeGabriel de Dietrich2012-11-121-1/+1
| | | | | | | | An InputMethodQuery event should NOT be transformed into a PolishRequest if the receiving widget has no WA_InputMethodEnabled attribute set. Change-Id: I0727c600f1eb68087cb9fbc25f6458aca5417693 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Add a QEnterEvent containing the mouse position.Friedemann Kleint2012-11-105-21/+32
| | | | | | | | | | | | | Enter handling requires knowledge of the mouse position. Extend the enter handling of QWindowSystemInterface to receive the position (implemented for Windows, XCB and Mac), passing it on to QEnterEvent. Dispatch QEnterEvent from widgets code. Change-Id: I49c07d2b1f46310c877017dd55d4cd7d636bdbce Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix TapAndHoldGesture (others) for QWidgetsRafael Roquetto2012-11-081-0/+8
| | | | | | | | | | | | | | | | | | | | | After the migration to QPA, touch events usually have a QWindow as a receiver, unlike Qt4 where receivers were QWidgets. This broke QGestureManager and gestures such as the TapAndHoldGesture, because QGestureManager::filterEvent(QWidget *, QEvent *) was never called. Since the receivers are now of QWindow type, QGestureManager::filterEvent(QObject *, QEvent *) gets called instead, always returning false. This has several side effects, one of them was causing the TapAndHold gesture to time out, because it never got a TouchEnd event (and thus it thought that the touch was still going on, even though it was not). This patch ensures that if a gesture event is meant to be delivered to a QWidget, the right event filter method is called. Change-Id: I1df5f763fe6c4d8db0058adbd17d23d70b4988fe Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
* Do not call QWidget::show/hideEvent twiceOliver Wolff2012-11-081-0/+6
| | | | | | | | | | | | | | | | | | | | | While handling events for Widgets and Windows in QWidgetWindow::event makes sense for other events, it causes QWidget::show/hideEvent to be called twice when handled like "the rest". Having that as one case here seems to be the cleanest solution. Removing the call to showEvent from QWidgetPrivate::show_helper (as proposed in the bug report) causes autotests to fail and thus is not a viable option. Additionally the expected result for the task221221 test for QDoubleSpinBox was reverted to the Qt4 value as Qt4 behaviour was restored. Task-number: QTBUG-27199 Task-number: QTBUG-26424 Task-number: QTBUG-22565 Change-Id: I0ac42b09b1a7618de042d27aa5dd1b3d9f30f552 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Rename all QWindow properties that have "window" in themShawn Rutledge2012-11-072-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | windowTitle, windowModality, windowIcon and so on are named that way to be similar to the ones in QWidget. However QQuickWindow inherits all of the declared properties, and we would like to have shorter property names in QML. If you are working with a Window then it's obvious the title property is the window title. Unfortunately, there must be patches in many other modules which depend on this one. In order to avoid the need to merge them all at the same time, there is also patch https://codereview.qt-project.org/#change,39001 which temporarily adds backwards-compatible accessors, which can be removed after the other modules are able to build without them. We should not rename windowState to state, because in QML, state usually drives the state machine for animation transitions etc. (although QWindow is not an Item, a user might get confused about it). Related patches are https://codereview.qt-project.org/#change,39001 https://codereview.qt-project.org/#change,37764 https://codereview.qt-project.org/#change,37765 https://codereview.qt-project.org/#change,37766 https://codereview.qt-project.org/#change,37762 Change-Id: Ie4424ec15fbdef6b29b137f90a2ae33f173edd21 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix excess enter events when showing modal dialog on button pressMiikka Heikkinen2012-11-071-0/+6
| | | | | | | | | | | | | | | | QApplicationPrivate::leaveAfterRelease was not properly cleared when mouse event handling was interrupted by a modal dialog, which caused every mouse move over the modal dialog to trigger enter event to the widget under cursor. Fixed by clearing QApplicationPrivate::leaveAfterRelease if mouse event without any buttons pressed is handled. Task-number: QTBUG-27643 Change-Id: I4f31daa656bc643c88e5338282a671ae2077e255 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix inconsistent leave/enter events for main window when popup is openMiikka Heikkinen2012-11-061-1/+5
| | | | | | | | | | | | | Changed the platform leave event handling logic in QWidgetWindow to match platform leave event handling logic in Qt4, where last mouse receiver is used as leave target only if last mouse receiver wasn't a native window itself. In that case it is assumed to get leave event of its own when relevant. Task-number: QTBUG-27639 Change-Id: Id6edcd29754a15c959f18ab38b20d66e5d446510 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* De-inline some destructors in QtWidgetsMarc Mutz2012-11-064-0/+53
| | | | | | | | | | | | | | | | | | | | | | Destructors should be out-of-line so that the compiler doesn't generate one per translation unit. Apart from creating more work for the compiler, it can also lead to duplicated vtables if the dtor is the first virtual function (reimplementation), and all other virtuals are inline, too. Duplicate vtables then break RTTI. In addition, having virtual dtors de-inlined allows us to add code to them in a BC way. As a final argument, this change may lead to less code app-side, since a sequence of cross-DLL calls (to member variable dtors) is replaced by a single cross-DLL call to the new out-of-line dtor. Change-Id: Ifb8c4aa992c75d61ba9ac8de5ab41d1e96b0a0b1 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* QtWidgets: add some explicitMarc Mutz2012-11-051-5/+6
| | | | | | | Change-Id: I0650db3d47b506c67074c526ab9857f8159fd599 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Send leave to most recently entered window when modal dialog is shown.Miikka Heikkinen2012-10-301-0/+1
| | | | | | | | | | | | | | | If a modal dialog was shown as a response to button click, the button retained its hover highlight, because it didn't get leave event. Fixed by tracking the most recently entered window and sending a leave to it when modal dialog is shown that blocks it. Also modified tst_QGuiApplication::modalWindow() autotest to check for enters and leaves. Task-number: QTBUG-27644 Change-Id: I387647e18a762a39d523e3df31221b9583a39f9d Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Do the actual removal of the Soft Keys API and related codeJan Arve Saether2012-10-299-578/+1
| | | | | | | | | | | | | | | | | | | In addition to the actual removal of the softkeys API in QAction, this commit removes some enums related to the softkeys feature: Qt::WA_MergeSoftkeys Qt::WA_MergeSoftkeysRecursively It also removes some "zombie" enums: Qt::WindowSoftkeysVisibleHint = 0x40000000, Qt::WindowSoftkeysRespondHint = 0x80000000, (The only implementation that used these were removed when qapplication_s60.cpp and qwidget_s60.cpp were removed.) Change-Id: Ib6fc6d543def4757383d5f19256199d9d190c614 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fix enter/leave event generation between native widgets when grabbing.Miikka Heikkinen2012-10-261-3/+8
| | | | | | | | | | | Removed enter/leave event generation when moving between between related windows in QWidgetWindow (i.e. native widgets) while some widget was explicitly grabbing the mouse input. This makes enter/leave event generation identical to non-native widgets. Task-number: QTBUG-27551 Change-Id: I4996007bd7922e073a2957ad267a6373e8f3fecc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Remove stale QT_MODULE() usage casesKonstantin Ritt2012-10-251-1/+0
| | | | | | | As of Qt5, this macro is defined to be empty; simply get rid of these leftovers. Change-Id: I167ccb4c9e92ec9b5e4faeb02bf9c5ef5d982b50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix: don't override the new non-cosmetic default pen in qwidgetaavit2012-10-251-1/+1
| | | | | | | | | | | | | As QWidget initializes any painter created in paintevent handler to have the pen color of the palette's foreground, setting it to 0 width, i.e. cosmetic, it negated the effect of the recent change to default 1-width non-cosmetic, ref. I04d910e9700baf7f13a8aac07a3633014bb9283e This caused scaled painting with default pen on QImage and QWidget to yield different results. Change-Id: I930b64bf7c0a8c84b9ea3edb49adc813370fed0e Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Add ContextMenu event to QWindowSystemInterfaceMiikka Heikkinen2012-10-252-1/+37
| | | | | | | | | | | | | Context menu key wasn't working, as QPA had no handling for it. Added ContextMenu event to QWindowSystemInterface and proper handling to QGuiApplication and QWidgetWindow. Also provide Windows implementation. Task-number: QTBUG-27648 Change-Id: I7ce71ec4b5cdcc7be758e67f9faf6d863f7b19be Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Remove softkey API, it was only implemented for Symbian.Jan Arve Saether2012-10-222-4/+12
| | | | | | | | | | | | | | It is only removed from the documentation for now (I think this should go in the beta 2). That should liberate us to be able to change the API if needed for other platforms that might need a soft keys API. Once this goes in, the plan is to do the actual cleanup. Change-Id: I9a7a3eb45597cd013fe3c4bd479ad08a25ef0b9b Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove Cleanlooks and PlastiqueJens Bache-Wiig2012-10-221-1/+1
| | | | | | | | | We have a new style Fusion that will replace these styles. They will be moved to a separate module rather than included in platforms that do not need them. Change-Id: I51ebbcad5406e99130e5b12e62ba624d1489088c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Delete QWhatsThis() and QToolTip()Marc Mutz2012-10-223-7/+2
| | | | | | | | | | | | | | | These classes are not supposed to be instantiated. QToolTip() already was declared, but not implemented. This patch just adds Q_DECL_EQ_DELETE for better diagnostics on C++11. QWhatsThis() was implemented, but appears to be unused. Since it was private to begin with, successfully compiling QtWidgets is a sufficient test. Change-Id: I698ece8f0eebbcdac7be98456dd42197b758a825 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix excess enter/leave event generation for native widgetsMiikka Heikkinen2012-10-191-2/+25
| | | | | | | | | | | | | | | | | | | | | | Native widgets have a native window each, so QPA plugin sends enter and leave events for associated QWindow whenever mouse cursor moves from one widget to another. QWidgetWindow had no context to interpret these events as moves from one widget to another, since they were sent separately. This resulted in leaves and enters for each widget in parent chain, when only the bottom child should have gotten them. Fixed by peeking into window system message queue when handling leave in QWidgetWindow and retrieving the entered window from queued enter event. Also provided a convenience function that QPA plugin can use to ensure both leave and enter events are in the event queue when moving from one QWindow to another. Task-number: QTBUG-27550 Change-Id: I74fec0ac90f6848495c2392c5f7e41624ad8aea2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Bring back Mac dependent code in QBoxLayout, QGridLayoutGabriel de Dietrich2012-10-182-3/+3
| | | | | | | | | We also made an accessibility auto-test more stable, so that it would not be influenced by this patch. Task-number: QTCREATORBUG-7966 Change-Id: I6ce4e2361c8847aee5dd1cf5664c29cd2d83e38d Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* QPlatformWindow: change API for QPlatformWindow::setWindowStateRichard Moe Gustavsen2012-10-172-75/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation requests the platform window to set the window state if it can, and return the actual window state back. The problem with this approach is that the platform window is created as late as possible, so a call to QWindow::setWindowState would in many (most?) cases never be forwarded to the platform window (instead, the platform window is responsible to check the current window state upon creation). As such, the window state might be left unsynched with the platform window. This patch suggests removing the return value from QPlatformWindow::setWindowState. This will at least be consistent, so that setting/getting state would produce the same result independent of delayed window creation. If needed, we can later add new API to QPlatformIntegration or QPlatformWindow for querying supported/actual window state. Change-Id: Ie43f56169656854a765ce88b47a808f8f3d51bb4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Bring back MacSizeChange eventGabriel de Dietrich2012-10-172-4/+24
| | | | | | | | | | This ensures WA_MacNormalSize & Co. work (almost) properly. Task-number: QTCREATORBUG-7966 Change-Id: Ib03b5c0f163409e2bc387f6cf9b56c72c43caec7 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix setting custom cursor for widgets and windows before showing themMiikka Heikkinen2012-10-161-0/+3
| | | | | | | | | | | | If custom cursor was set before the window was created, it didn't actually get set, and in some cases even caused a crash. Fixed by making sure the cursor is correct when showing widget/window. Task-number: QTBUG-27535 Change-Id: I3bc946a9c406c96af5b86869a3a54893f8980aba Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Improve Qt::WA_UnderMouse accuracyMiikka Heikkinen2012-10-151-0/+7
| | | | | | | | | | | | | | | | Qt::WA_UnderMouse is set/cleared when widgets get enter/leave events. When there is a popup active, Qt::WA_UnderMouse should always report false, but this was not happening, because existing state was not cleared when popup was opened. Dispatch a leave event for last mouse receiver when a popup is opened to update the Qt::WA_UnderMouse state. This is roughly equivalent to what happens on Qt4. Task-number: QTBUG-27478 Change-Id: I7739e75727213e748ab2f42f1027d32325d89fb0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Do not accept key events if a widget is disabledOliver Wolff2012-10-131-1/+3
| | | | | | | | | | | | | | | The disabled state was handled in qapplication_xxx.cpp before. As the platform integration only knows about windows and not widgets the state check is now done in qwidget. This commit just adds key events to the list of events which are ignored if the widget is disabled. This list also contains mouse events for example. Task-number: QTBUG-27417 Change-Id: I55949e1c1aaa992ba71df51c5b5e8177ec6f1e86 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix a regression with regards to hfw behavior in QStackedWidgetJan Arve Saether2012-10-101-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a regression because we made QStackedWidget actually support heightForWidth in 4.8. This was done with change 4780f94e391b5e881497c5228661dead42c821fa. The problem was that heightForWidth was not calculated correctly because some of the pages were hidden. The hidden pages were actually not contributing to the hfw of the QStackedWidget at all. This again caused the QStackedWidget to change its heightForWidth() value when the current tab changed, which again could cause "jumps" in the UI when switching tabs (as demonstrated in the task). The problem was that the patch relied on calling QWidgetItem::heightForWidth(), and this function would return -1 if the widget was hidden. However, QWidget::heightForWidth() does not have this magic and returns the proper hfw value regardless of its visibility. One could argue about the correctness of this patch, but since QStackedLayout::sizeHint() disregards QWidgetItem::sizeHint() (it asks the widget directly), we do the same in QStackedLayoutHFW::heightForWidth() for consistency. In addition, QStackedLayout enforces that only widgets can be added to it, and you cannot add your own QLayoutItem subclasses to it: qWarning("QStackedLayout::addItem: Only widgets can be added"); Task-id: QTBUG-24758 Change-Id: I349cf8f4215e4581ea237ef773d53dcdf3db176b Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Avoid warnings about an unreachable codeKonstantin Ritt2012-10-101-1/+0
| | | | | Change-Id: I57c2967db4c1bd2c39ecb3eac9b18eb7455c6a50 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Mac: Bring back "Text boxes and list only" tab navigationGabriel de Dietrich2012-10-101-2/+8
| | | | | | | | | | | | | Added ThemeHint::TabAllWidgets as a mean to access that platform specific bool. The default implementation returns always true when querying QPlatformTheme::themeHint(). Several auto-tests had to be updated to reflect for qt_tab_all_widgets' type change. One XFAIL removed from tst_QApplication::focusChanged(). Task-number: QTBUG-24372 Change-Id: Ie1f0486c19898fe54c53aa4a27e378485075e512 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Don't try to emit focusObjectChanged if window pointer is zeroMiikka Heikkinen2012-10-101-2/+4
| | | | | | Task-number: QTBUG-27414 Change-Id: I75ad662e0a66d61b49d55d084f29cefc98221b7f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Add QEvent::StyleAnimationUpdate: style animation target should updateJ-P Nurmi2012-10-091-0/+3
| | | | | | | | | The event will be sent from the upcoming style animations. This change merely introduces the new event type and makes both QWidget and QGraphicsWidget call update() upon receiving the event. Change-Id: I69bb4d05bacb22f7e3a2512cae68848801e4f4d7 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QApplication::palette missing Q_NO_USING_KEYWORD implementationThiago A. Correa2012-10-081-0/+4
| | | | | | | | | | Added inline implementation of QApplication::palette when Q_NO_USING_KEYWORD is defined. Task-number: QTBUG-27393 Change-Id: I833efb950a579db28fcb243c931c9e22b28ec431 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Show widget cursor after restoring last override cursorMiikka Heikkinen2012-10-041-7/+2
| | | | | | | | | | | | | | | | qwidget_qpa.cpp was setting cursor directly to platform window, so QWindow didn't actually know what cursor was supposed to be shown. Since QWindow now supports setting cursor and has override cursor handling there, set cursor via QWindow instead of platform window. Also changed QGuiApplication override cursor handling so that it will query the cursor from QWindow if there is no override cursor. With these changes, widget's custom cursor will be properly shown when final override cursor is restored. Task-number: QTBUG-24674 Change-Id: I2d2bb1027779256f9d6de560b6533f45e205ffe9 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* fix QWidget::setWindowFilePath on Mac OSJoerg Bornemann2012-10-023-3/+13
| | | | | | | | Task-number: QTBUG-27299 Change-Id: I4dddbb9690aac327ad33477d8cea9afa84d10eb3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Fix drag and drop with native widgetsjian liang2012-09-271-4/+4
| | | | | | | | | | | | | | | Task-number: QTBUG-27336 Don't check 'widget != m_widget' in QWidgetWindow::handleDragEnterMoveEvent() since the current window's parent widget may be the actual drop target. I replace it with a check '!widget->isWindow()' to prevent we pass through a top level window. I also change 'widget->mapFrom(m_widget, event->pos())' to 'widget->mapFromGlobal(m_widget->mapToGlobal(event->pos()))' since m_widget may not be widget's parent. Change-Id: Ia4f10f85ccdf1e27223ddc51afabd98b5d16f2fb Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* use QLatin1String::size() in qt_setWindowTitle_helperHelperJoerg Bornemann2012-09-271-4/+2
| | | | | Change-Id: I0c8193a7c6bf8b5f894da3e20af3c4d23e0b593a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Remove CDE and Motif styles from qtbaseJens Bache-Wiig2012-09-271-2/+2
| | | | | | | | | | | | | | | | | It is time to clean up some of our legacy code. These styles have not been actively maintained for a long time and I think it is safe to say that they should no longer belong as part of the default distribution of Qt. We dont support any platforms based on CDE with our source packages. Note that even if we are removing these styles from the default distribution of Qt, applications that depend on them will still be able to bundle the existing (and unmodified) styles along with their own source code as we are not breaking compatibility. Change-Id: I1709630c20ba8e8088cd01628628d86856db57a4 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* [docs] QApplication: fix keyboardInputDirection() docsMarc Mutz2012-09-261-9/+1
| | | | | | | | There were two documentation blocks: the first had the wrong class name, the second was duplicate. Change-Id: I241b3e6567376a46a6270837cce4aa380a6c8c49 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Remove duplicate words and punctuation from documentation.Mitch Curtis2012-09-262-3/+3
| | | | | Change-Id: I5550c62d412510bc2c5acceb2cae7d2f2ef6a8d3 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Redirect keyboard/mouse grab to the widget parent window.Friedemann Kleint2012-09-221-19/+22
| | | | | | | | | | | | Use the native parent's window if the widget in question does not have one. This should be in line with Qt 4.8 using effectiveWinId(). Remove redundant code in grabMouse(QCursor). Change-Id: Id6ab192e739221fe89f865f4d2f7a6d4671a190b Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2264-1517/+1517
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Documentation fixes.Frederik Gladhorn2012-09-213-43/+0
| | | | | Change-Id: I2e234ec4307bbe39359cdfa8b13e86661dad43b6 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Fix mapping to/from global coordinates for child/embedded windows.Miikka Heikkinen2012-09-181-0/+8
| | | | | | | | | | | | | | | | | | | | | QWidget's mapToGlobal() and mapFromGlobal() functions assumed that if the widget reports it's a window or if it has no parent widget, it must be a top level window whose coordinates are in global coordinates. This is not true for child QWindows or embedded native windows (QAxWidgets). Changed the logic for mapping coordinates to use equivalent methods from QWindow if widget has a window handle, and changed QWindow's methods to map coordinates using native methods if window is embedded. Also fixed newly failing accessibility autotest. The geometry related failures there popped up because now the position of the rect returned by accessible interface is actually correct while widget geometry still reports position 0,0 before widget has shown up. Task-number: QTBUG-26436 Change-Id: I658fafd0ce01eb1604ba255efeeba3073ca0189f Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Close popups when switching applications on Windows.Friedemann Kleint2012-09-111-2/+16
| | | | | | | | | | | Bring back code from 4.8 (Note that ALT-TAB is not received as key event). Task-number: QTBUG-27146 Change-Id: I6dd2e9c88fdc4c89d26dfaa8ab47deb2be451f25 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Streamline forwarding of blocked events.Friedemann Kleint2012-09-111-12/+10
| | | | | | | | | Do not send to layouts, invoke modalWidget() only once. Task-number: QTBUG-27039 Change-Id: I96db02c8da544d0961c8ab25505926ac6f699342 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: hjk <qthjk@ovi.com>