summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Do not call markDirty() for hidden widgets.Samuel Rødal2012-08-061-1/+1
| | | | | | | | | | Fixed crash when resizing a scroll area with a native viewport (typically a QGLWidget) causes the scroll bars to get hidden, while there are still expose events in the queue for the scroll bar widget. Task-number: QTBUG-26746 Change-Id: Ia77c8eb32a6730670333120af3f9a772c64807f1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Revert "Move QWindowSystemInterface out of qpa."Paul Olav Tvete2012-08-032-4/+4
| | | | | | | | | | | | | | This reverts commit 784a877d3cd9a1a75aca9c83146389503a966071. Conflicts: src/plugins/platforms/cocoa/qcocoawindow.mm src/testlib/qtestkeyboard.h src/testlib/qtestmouse.h src/testlib/qtesttouch.h Change-Id: Iebfed179b3eb7f30e4c95edcae5a8ad6fd50330e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove the obsolete scene argument for constructors of graphics itemsLars Knoll2012-08-035-322/+80
| | | | | | | | | The argument has been obsoleted and not documented since 2007. Get rid of it now before Qt 5.0 Task-number: QTBUG-25089 Change-Id: I91a5508a5e1606f5b5c289501295c67be4abe6a0 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* fix a few qdoc command typosJeremy Katz2012-08-011-1/+1
| | | | | Change-Id: I5eb3a6d2bb7939f001f1fcb836660dd46a47c350 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* change \img to \image in docsJeremy Katz2012-08-0117-33/+33
| | | | | | | | \img was a macro defined in macros.qdocconf. This collection of macros is being phased out. Use the full command instead. Change-Id: Ia55212f87bb46349d61359d40568e0aa33882596 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* replace \key and \gui qdoc commands with \uicontrolJeremy Katz2012-08-0114-79/+79
| | | | | Change-Id: I0753305d4fe1ea20417f451766101da1247dfeeb Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Avoid qobject_castKent Hansen2012-08-011-1/+2
| | | | | | | | | | | | This is slightly faster, and also avoids accessing the object's meta object that would cause any lazily created meta objects (e.g., for QML) from being built. This is just a port of commit a5972f8ec32631e70578c64e9d6c063b3c47f0f5 (which fixed QGuiApplication, but not QApplication). Change-Id: I0d5080495aa4fd4486db297968c4d06bbfacf89b Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* fix QWidget::activateWindow for child widgetsJoerg Bornemann2012-07-311-2/+4
| | | | | | | For child widgets we must use the windowHandle of the toplevel widget. Change-Id: If7bad8ed4bba694806a2c8b77bae3d25cc200b8b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Describe an example usage of stretch in QSizePolicy documentation.Mitch Curtis2012-07-271-0/+11
| | | | | | | | | | | Martin Pejcoch suggested QSizePolicy's setVerticalStretch and setHorizontalStretch functions be better documented. This change gives sample usages. Task-number: QTBUG-18373 Change-Id: I54da8605f5e9e5f405c145b78865402baf78eee7 Reviewed-by: Martin Pejcoch <martin.pejcoch@nokia.com> Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* Fix position of mouse events generated from touch events.Andrew den Exter2012-07-261-1/+1
| | | | | | | | | | | In touch event terminology the global position is the screenPos, scenePos is the windowPos. Fixes a tst_qdeclarativepincharea test failure in qtquick1. Change-Id: Ie98fe12be8cbedc9b019913b066e7c4bce75278d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
* Fixup the plugin documentationLars Knoll2012-07-263-16/+17
| | | | | | | | | | Move the plugin howto from qtdoc to corelib where it belongs. Fix the snippets and remove all remaining references to Q_EXPORT_PLUGIN Task-number: QTBUG-26237 Change-Id: I43dce2ffa42193b7a992fa1a0f2fcb2f633037b2 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Fix some typos.Frederik Schwarzer2012-07-262-2/+2
| | | | | | | Change-Id: I3c3c96fbbc19e2a69ac2f22618f15f5262718e50 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* De-inline QItemEditorCreatorBase destructor.Stephen Kelly2012-07-252-1/+5
| | | | | | | | Virtual destructors on public exported API should not be inline. Change-Id: I05bff0412ac97d2d8bd3cf8944f4fff2cb619f54 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove Qt5 to-do remarkGatis Paeglis2012-07-251-1/+1
| | | | | | | | | Removing Qt5 to-do remark since GraphicsView is considered done and this change is not performance critical. Task-number: QTBUG-25089 Change-Id: Ib6e59290a628d27d7e623d221e7100f2e11d13f9 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Create IMPORTED CMake targets for executables.Stephen Kelly2012-07-252-3/+11
| | | | | | | | | | | Although IMPORTED executables are not extra special, this is more future-proof in terms of both future CMake features and future our needs - it is possible that we would want to add a property to an executable at TARGET scope, which would not be possible if it is just a path. Change-Id: I649c601e004b21603c5fa97de0b7c397813ed68d Reviewed-by: Brad King <brad.king@kitware.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QtWidgets: use nullary version of qRegisterMetaType<T>("T")Marc Mutz2012-07-251-1/+1
| | | | | | | | | | | | | | | | | | | Using qRegisterMetaType<T>() has the advantage that multiple calls during a program run are much more efficient, since an inlined atomic is used to store the result. It also ensures that Q_DECLARE_METATYPE(T) has been used, whereas qRegisterMetaType<T>("T") will happily register anything. Had to add Q_DECLARE_METATYPE to QFileInfo, for QList<QPair<QString,QFileInfo>> of QFileSystemModel to work with the partial specialisations of Q_DECLARE_METATYPE for QList, QPair. In order to synchronize this change with other modules that did their own Q_DECLARE_METATYPE(QFileInfo), a sync macro is defined that can be tested in other modules, and will later be removed again. Change-Id: I3004664e07e64cd885d5a03a57ff4e4379804aec Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix typo in QMdiArea docsAli Akhtarzada2012-07-251-1/+1
| | | | | | Task-number: QTBUG-26498 Change-Id: I2c7b7a67c732eb58f1ffc2a137a675ac63dc6597 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* Document emission of commitDataRequest() signal in QApplication doc.Mitch Curtis2012-07-251-0/+4
| | | | | | | | | | It is currently not clear that QApplication::commitData() emits the commitDataRequest() signal. Users should know this if they plan to override the default implementation. Task-number: QTBUG-23117 Change-Id: I418af4b83795d53c9d86a2ac620c0f7c5bb9ada3 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* Correct reference to nonexistent Qt::QA_Window flag in documenation.Mitch Curtis2012-07-251-4/+4
| | | | | | | | Should be Qt::Window. Task-number: QTBUG-22725 Change-Id: I150e77dec9c93035e01cf2e6be68a54bb4b122b2 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* Fix error in sample code on the Layout Management page.Mitch Curtis2012-07-251-2/+2
| | | | | | | | | | Incorrect return type in a sample class (CardLayout) function. Although the function is never called, the return type should be int, not QLayoutItem*. Task-number: QTBUG-25602 Change-Id: I05ebd07a35b6db62b8c12255186f9d9487da79f6 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* Remove obsolete or commented use of Q_DECLARE_METATYPE.Stephen Kelly2012-07-241-2/+0
| | | | | Change-Id: I15bc845801b9f84a9252a0092fbd69f0e1b3f4ea Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove obsolete TODO.Stephen Kelly2012-07-241-1/+0
| | | | | | | This will probably not be done in time for Qt 4.7. Change-Id: Ie9112cee021e31849f5b43eefb8eb57537d01a2d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Propagate synthesized mouse events in parallel (lock-step) with touchKevin Ottens2012-07-242-0/+91
| | | | | | | | | | | | | | | | | | | | This patch implement the equivalent of 468626e99a90d6ac21cb311cde05c658ccb3b781 in qtdeclarative but for QtWidgets. If a widget doesn't accept a touch event, then QApplication gives it another try by synthesizing a corresponding mouse event. This way QtQuick and QtWidget behave in a similar way, removing the need for platform backends to try to emulate a mouse event from a touch event unconditionally. Also add relevant unit tests and adjust old QApplication ones. Change-Id: Iddbf6d756c4b52931a9d1c314b50d7a31dbcdee9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QAbstractItemView: don't qRegisterMetaType<QModelIndex>Marc Mutz2012-07-241-1/+0
| | | | | | | | | | QModelIndex is a build-in type nowadays and doesn't need to be registered anymore. Also remove them from the tests. Change-Id: I47029972651c045c880cee86fb292116a29493d5 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Correct QLineEdit::inputMask documentation.Mitch Curtis2012-07-231-2/+1
| | | | | | | | | | | | | | | The documentation says: "Unset the mask and return to normal QLineEdit operation by passing an empty string ("") or just calling setInputMask() with no arguments." However, the parameter for setInputMask is a const QString&, so calling it with no arguments will result in a compile error. The documentation should not advise calling setInputMask() without arguments. Change-Id: Icd8e063dcd3d745bd4bf0c6851a38f63481957ae Task-number: QTBUG-24803 Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* QStyleFactory: remove unused typedef (GCC 4.8 warning)Marc Mutz2012-07-231-1/+0
| | | | | | Change-Id: I50ef91f4df3cdf1ae039dce269e37185eece6b8d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QTBUG-26296, dock widget movingJames Turner2012-07-232-10/+3
| | | | | | | | | | | | | | | Cocoa lacked implementation of FrameStrut events, and also frameMargins on QPlatformWindow. Fix both of these issues. Unfortunately QDockWidget also contains a tangle of #ifdef MAC behaviour which I am unclear about. What's included here disables some logic on Mac that seems definitely wrong - while moving a window on Mac we now generate NonClientArea events (as intended, I believe), but this should not cause dock-widget dragging to end. Note the window titlebar is the only frame-strut/non-client area on Mac (as far as I can see) Task-number: QTBUG-26296 Change-Id: Id0c6e954db64b9f9f71d16355cb92922877e5ebe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Move QWindowSystemInterface out of qpa.Stephen Kelly2012-07-192-4/+4
| | | | | | | | Public QtTest headers require it, so all unit tests would have to use private Qt headers otherwise, which is not practical. Change-Id: I5d4466ec30b6a57ebdfc34413e716e657eb51368 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Fix rendering glitches when using native widgets in MDI subwindowsMiikka Heikkinen2012-07-182-4/+3
| | | | | | | | | | | | | | | | | | | | When mixing native and regular widgets in same QMdiArea, some subwindows didn't properly get set native. This was because when a native parentless widget was given a parent, it wouldn't enforce native window on the new parent and its ancestors. This happened because window flags were adjusted too late in relation to createWinId() call in setParent_sys(). Fixed by moving the createWinId() call to its proper place. Also removed some old Q_WS_* ifdeffing in QWidget::setParent() that masked some native enforcement code. Additionally removed few QEXPECT_FAILs from QWidget autotest now that those cases work correctly. Task-number: QTBUG-26424 Change-Id: Ib6f9d0531e5c7299e2c307734d49c81f1ffa9713 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Widgets: Fix duplicated line in QMdiAreaSergio Ahumada2012-07-181-1/+1
| | | | | | | | Replace duplicated line MaximizeAction with RestoreAction Task-number: QTBUG-17428 Change-Id: I5120afeed6715d28045f3eee01f26ee482f02ed1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix widget animations.Friedemann Kleint2012-07-172-28/+14
| | | | | | | | | - Update opacity. - Change Q_WS_WIN to Q_OS_WIN. Task-number: QTBUG-25436 Change-Id: I76c1e4668dc2ee4f4d861da320c10aa05e57e804 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* QWidget::showFullScreen fixed for widgets with valid size hintJoerg Bornemann2012-07-161-0/+4
| | | | | | | | | | Ensure the initial size is valid, since we store it as normalGeometry below. Task-number: QTBUG-26226 Change-Id: I3a55c389a48504699942930063089c80657687a0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Remove #ifdef Q_WS_ / include / #endif conditionals.Friedemann Kleint2012-07-164-16/+0
| | | | | Change-Id: I734490ddcb5501e620370e50ef06180ab5e23393 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix applicationName() being empty in QApplication.David Faure2012-07-162-8/+0
| | | | | | | | | | | | | | | A virtual method was reimplemented to return an always-empty string, probably a leftover from a refactoring. This fix showed that tst_qwidget_window was buggy: between Qt4 and Qt5, a "Before" became "After", which made "Before" unused, and was masking the fact that the app name was empty by default. In addition, the earlier Qt5 change that made the app name default to argv[0] now requires updating this test, now that it's actually working. Change-Id: I5360026821a9b95bedd0ff09dba3d51a22e542b7 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Doc: Fix typoSergio Ahumada2012-07-161-1/+1
| | | | | | Task-number: QTBUG-23657 Change-Id: I3115f45f743da5699aa13f31a0f2de013d428aba Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Remove QToolButton's protected constructorIvan Komissarov2012-07-162-10/+0
| | | | | | | | | | As long as QToolButtonPrivate is declared in .cpp file, this constructor is useless. Change-Id: Ibbeaf291b88b3b203e5107e0227d68e65cbb9eee Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jeremy Katz <jeremy.katz@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix QSplashScreen on X11.Friedemann Kleint2012-07-161-6/+33
| | | | | | | Use code from QTestLib to wait for the Window to show up. Change-Id: Ib674f3eb7a6c32cad1d502caefe7d4b073754e73 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Use DropShadow from QPlatformTheme everywhere in qwhatsthis.cpp.Friedemann Kleint2012-07-161-15/+9
| | | | | Change-Id: Ib8281d44e2d4b51aba13417c26247d3e19b1b2f8 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Replace some Q_WS_X11 by check for platform's name.Friedemann Kleint2012-07-163-15/+10
| | | | | Change-Id: I33d7ce31e01c355e0d9e05c98d6a84ea4f6d5bbd Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* doc/snippets: normalize signals/slotsMarc Mutz2012-07-136-14/+14
| | | | | | | | | | | | | There's one in corelib that has a comment // slower due to signature normalization at runtime I obviously didn't change that one. This is the result of running util/normalize --modify from Qt 4.7 with manual review. Change-Id: I0ffb2305800a9cb746b7f8a4eb710702d64f1b92 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QtWidgets: normalize signals/slotsMarc Mutz2012-07-131-1/+1
| | | | | | | | | | This is the result of running util/normalize --modify from Qt 4.7 with manual review. Change-Id: I024d48cd111ab89f3fe83d9df51b188c9ad5023c Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Debao Zhang <dbzhang800@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Mac: Fix crash on Mac OS 10.6 with new scrollbars.Christoph Schleifenbaum2012-07-131-10/+14
| | | | | | | | | | Add missing runtime for OS X version in constructor. This ended up in a crash when starting a version compiled on 10.7 on 10.6. Change-Id: I25c5562ee905317554e79d83a2f5236ce9e2a145 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Fix some spelling errorsSergio Ahumada2012-07-113-4/+4
| | | | | | Change-Id: I19d3b2e9a5180b13deb828b55195404ef20be295 Reviewed-by: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Add stylehint to use querying RTL keyboard support.Friedemann Kleint2012-07-112-20/+4
| | | | | Change-Id: Ic58ed7cb64cc7fe60b4d431e9f29e389c62265fc Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Clear qt_button_down widget when starting a drag.Friedemann Kleint2012-07-112-0/+12
| | | | | | | | | Prevent pickMouseReceiver() from using the widget from which the drag was started. Task-number: QTBUG-26145 Change-Id: I65d4c295a894193e41c676fb9fd1f7113c2631b5 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Don't set the resize and move flags when activating fullscreen modeThomas McGuire2012-07-111-0/+8
| | | | | | | | | This fixes tst_QWidget::movedAndResizedAttributes() for platforms that don't have support for QPlatformWindow::setWindowState(). Change-Id: Id0f123d11b08a75c0c131080d509e6b23b281600 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Fix showNormal() and friends for platforms with fullscreen hintThomas McGuire2012-07-102-4/+4
| | | | | | | | | | | | Don't call show() inside of QWidget, as that might make the window fullscreen due to QStyleHints::showIsFullScreen(). This regression was introduced earlier when QWidget::show() gained support for the hint. No auto test caught the problem, as the affected platforms (EGL and QNX) are not CI-tested. Change-Id: I647c2362ac5b53ced562f1d77848552cc122fba0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* fix "paintEngine: Should no longer be called" warnings on WindowsJoerg Bornemann2012-07-091-1/+1
| | | | | | Change-Id: Idece743d1f28f1c579d823123b6814fae786b58b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Remove Library dependency on SettingsTasuku Suzuki2012-07-091-2/+2
| | | | | | | | made QLibraryInfo available with QT_NO_SETTINGS. QKdeTheme is removed when QT_NO_SETTINGS is defined. Change-Id: I63d619bb305e6c23985d9ea50c72d39a697b7a4b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* fix fullscreen state in QWidgetWindow::handleWindowStateChangedEventJoerg Bornemann2012-07-091-2/+0
| | | | | | | | | A widget can be Qt::WindowMaximized and Qt::WindowFullScreen at the same time. See tst_qwidget::windowState. Task-number: QTBUG-26420 Change-Id: I89d6edb857f41cda911152244cf23d36dfd1cdce Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>