summaryrefslogtreecommitdiff
path: root/src/gui/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headersAkseli Salovaara2015-03-31159-2067/+2067
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I7e3e96183e073877b46bc8071b2ccae19e69426b Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* QLineEdit: Disable standard key 'cut' when there is no selection.Dyami Caliri2014-09-291-1/+1
| | | | | | | | (cherry-picked from qtbase/0aa84a619ea0a7c85a1ed48ed28817d4c7e40b33) Task-number: QTBUG-40477 Change-Id: I48aa7ecc4ee8a8e4e9feaf9b6cba5109d2d1f725 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Replace all ocurrences of NSApp with [NSApplication sharedApplication].Jake Petroules2014-09-012-6/+6
| | | | | | | | | | The former returns an id and the latter returns an NSApplication*. This gives us the benefits of static typing and resolves a build error on OS X 10.10. Task-number: QTBUG-39644 Change-Id: I62939b168f391beb846f8a1c5ae789e45bceb858 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* QMdiArea: Ignore events of other instances in the event filter.Friedemann Kleint2014-05-061-0/+3
| | | | | | | | | | | | This caused for example the variable QMdiAreaPrivate::isSubWindowsTiled being cleared from another instance, which resulted in odd resizing behavior. Task-number: QTBUG-31448 Change-Id: I880f7e415d6654e52499df1bfaf99f2c55d86320 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com> (cherry picked from qtbase/9e2c4bc67f30eb1e8d776afe3a092d5994aaab38)
* Fix crash when trying to place toolbar into zero-height window.Friedemann Kleint2014-04-103-20/+32
| | | | | | | | | | Change QToolBarAreaLayout::item() to return a pointer and check return values in plug(). Task-number: QTBUG-37183 Change-Id: I7029eb9739cbe603460e87d3e5493f116bdb3a89 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> (cherry picked from qtbase/e38ad9455099a83e2a8619f19ca949bc64ae6f82)
* Updated year in copyright headerKai Koehne2014-03-26159-159/+159
| | | | | | | | | | | | | | | | | | find . -path '*/3rdparty/*' -prune -o -type f -print | xargs -L1 sed -i -E 's/Copyright(.*) 2013 Digia/Copyright\1 2014 Digia/g' Manually patched files: demos/spectrum/3rdparty/fftreal/fftreal_wrapper.h demos/spectrum/3rdparty/fftreal/fftreal_wrapper.cpp src/3rdparty/s60/eiksoftkeyimage.h tools/qdoc3/test/qt-project.qdocconf tests/auto/qsharedpointer/nontracked.h tests/auto/qsharedpointer/nontracked.cpp Change-Id: I3f9074923b4d6bd4666258ab04f01476cc6e901c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QMenu: Sloppy menu selection should allow hovering separatorsGabriel de Dietrich2014-03-201-0/+1
| | | | | | | | | | | | | | | Setting the current action to 0 clears the sloppy region and closes the submenu if we hover a separator on the way to the submenu popup. Now, we choose not to while the sloppy delay timer is running. This is a backport of I9d1b1358fe64c259dc47f35db8fc8f2b19a73153 from qt/qtbase. Task-number: QTBUG-20094 Change-Id: If4b3cff05a9bcb41cee3e49490d4cc5fc3595821 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QMenu: Enable sloppy submenu mouse navigationGabriel de Dietrich2014-03-201-2/+8
| | | | | | | | | | | | | | | Since we're in the 21st century, we set QCommonStyle to return true to the SH_Menu_SloppySubMenus style hint. This unlocks all the logic already available in QMenu. This is a backport of I134c87e348d98d1f46055e0bfef2b4a4a3d2993a from qt/qtbase and includes some previous enhancements. Task-number: QTBUG-20094 [ChangeLog][QtWidgets][QMenu] Enable sloppy submenu mouse navigation Change-Id: If4141a3d849123850e40af92ac5aede9ed767bdf Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QMenuPrivate: Make sloppyDelayTimer non-staticGabriel de Dietrich2014-03-202-7/+6
| | | | | | | | | | | | | | | Keeping the timer static would trigger warnings when enabling SH_Menu_SloppySubMenus in QCommonStyle in a forthcoming patch. This would happen if we opened a second level submenu quickly enough and get the mouse event handler to reset the timer its parent menu started. This is a backport of Ia768603b40b219f87138c60a595c65ef408761ae from qt/qtbase. Change-Id: Ia7e9a94b3445d9362a60a36d5e4dda878ab0f7a5 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QSpinBox: fix cursor jumping around when pressing up/down keysPekka Vuorela2013-12-171-4/+8
| | | | | | | | | | | | | | | | | | | | Backport of: Make QLineEdit unit test pass again Widget failed to update cursor position if selection remained the same, but changed direction, and did not emit selectionChanged if change resulted from input method event. Bisected to fix Task-number: QTBUG-15116 a regression introduced in fb7d86cf. Change-Id: I6a4ae48d41efa5e126980749f89982f92e3ec499 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> (cherry picked from qtbase/1189ebff320b8dd03637947c92df6e3ef84a3c06) Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Clean up a partially scrolled QRollEffect widgetMiikka Heikkinen2013-12-091-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> (cherry picked from qtbase/486601fbc4a7e9eaeb5df5bb3966c3aec31d8d65) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Correct QToolBar layout on retina displays.Morten Johan Sørvig2013-11-051-0/+5
| | | | | | | | | | QStyleOptionToolButton::iconSize will be 2x on retina displays. The layout size should not be 2x however, that causes excessive spacing in the toolbar. Task-number: QTBUG-34484 Change-Id: I48cf47044af5b76f39e08c1d580034b84ef2755d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Consider virtual screen when determining dock widget visibility.Friedemann Kleint2013-07-131-2/+5
| | | | | | | | Task-number: QTBUG-32260 Change-Id: I8b28e3869a6e3b1ed12a311dfa0100979098fc4b Reviewed-by: Andy Shaw <andy.shaw@digia.com> (cherry picked from qtbase/6c37fb70d695df001999c78a27ca50d6d2ac6517)
* Recognize separator item in QMenu.Leonard Lee2013-06-171-2/+2
| | | | | | | | | | | | The mouse over event on upper level menu separator should automatically close the sub menu listing. Manual test is not needed for this commit since it is easy to test it against common examples. Task-number: QTBUG-31664 Change-Id: I6632d0bce27ca064ddfdd05743df969b3e6e02ee (cherry-picked from qtbase/f730cd7542548d7d5fb7cd25f631e471697960c8) Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QDockWidget: Keep position when undocking.Friedemann Kleint2013-06-141-0/+3
| | | | | | | | | Initialize undockedGeometry to roughly the current position. Task-number: QTBUG-31044 Change-Id: I03cbe280d1215bb58ab721b60e29b45359cde76d Reviewed-by: Andy Shaw <andy.shaw@digia.com> (cherry picked from qtbase/0d459619a902e547d8c74745453b3bdb8f67a660)
* Fix warning about narrowing inside {}Olivier Goffart2013-04-231-2/+2
| | | | | | | | | | | | Such as qdialogbuttonbox.cpp:259:1: warning: narrowing conversion of ‘2147483650u’ from ‘unsigned int’ to ‘const int’ inside { } [-Wnarrowing] Cherry-picked from qtbase/e1d53553259e7edefb2a76712fd6a1ddc072d22d. Change-Id: I7fa4b80cc21d5f4765c229f62ff977e7b9076e99 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Prevent recursions when triggering menus in QToolButtonFrederik Gladhorn2013-04-171-0/+3
| | | | | | | | | | | | With a global shortcut set it would be possible to let the button re-open the menu again and again, each time spinning an event loop. Backport of f5ea183cc6a6cd66fb3f804041fc112687e0a060 from qtbase Task-number: QTBUG-30399 Change-Id: If7eddc115c77fef3df3e751fd72e7414cedaf272 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* QMdi: Don't emit subWindowActivated during StyleChange handling.David Faure2013-03-281-1/+7
| | | | | | | | | | | | | | | The handling of StyleChange de-maximizes the child window temporarily, which was emitting subWindowActivated. This would crash lokalize, because deactivating a window means deleting the widgets associated with it, and style-change handling is done in QApplication by looping over QApplication::allWidgets, which would then contain dangling pointers. Full valgrind log at https://bugs.kde.org/show_bug.cgi?id=271494#c7 Change-Id: I256da214bf00fd7925dcee67b4f0414e57fc453b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> (cherry picked from qtbase/a6e5ccbe223c5a606e15556e8708e863442d9f72)
* Fix text issue with Hiragana characters when stylesheet is applied.Mitch Curtis2013-02-211-0/+6
| | | | | | | | | | | | | | | | | | | When typing into a QTextEdit or QLineEdit with a Japanese IME on Windows, some characters have both a black foreground and background and hence cannot be seen. This patch fixes the issue by setting the appropriate colors for the text in these scenarios. The change also fixes a similar situation with QSyntaxHighlighter and Hiragana, where the background and foreground colors were the same. Now it will use underlining to highlight the text (like WordPad does, for example). Task-number: QTBUG-29442 Change-Id: I364d327a8f6573a73b227b79cc5f570cd02611c9 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Titta Heikkala <titta.heikkala@digia.com> Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Fix TextInput test failures.Andrew den Exter2013-01-231-0/+2
| | | | | | | | | | | | | | | | emitCursorPositionChanged won't emit cursorPositionChanged if the cursor position hasn't changed but that doesn't mean the micro focus hasn't changed, so emit updateMicroFocus changed when cursorPositionChanged isn't. Task-number: QTBUG-21017 Task-number: QTBUG-21011 Task-number: QTBUG-20719 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> (cherry picked from commit 6e0e834e0398192a6da11d1e1bca6b74769fb75d) Change-Id: Ia0d244eea051f2a870a084742c4c22f5a45a87bc Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Use a UUID for the NSToolbar in unified title and toolbar.Jake Petroules2013-01-151-1/+2
| | | | | | | | | | | | | | | | | When two NSToolbars in an application share the same identifier, Cocoa tries to synchronize their state (item position, view mode, etc.), and this behvavior interferes with and crashes Qt applications in certain cases when toggling the unified toolbar on and off. Therefore it is necessary to use a unique identifier for each native toolbar created. Does not affect Qt 5. This functionality has been removed and an equivalent will be provided by QtMacExtras which uses a completely different approach, though I7d5c8d58e45a504480a1ce67065add15cb35ad8f could be considered Qt 5's rough equivalent to this. Task-number: QTBUG-19207 Change-Id: I9030d56941d12a2c1f7a328337bf986f1b51eeb8 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* QMenu: Fix nested popup when keyboard shortcut is usedOrgad Shaneh2013-01-141-1/+1
| | | | | | | | | | Task-number: QTBUG-20403 Change-Id: I2a5fe00dd16e9dc1ec0d742a8f48083fc2954996 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com> (cherry picked from qtbase/b6963f109ad54c6f03b3391d57db9a536d49ba7d)
* Update copyright year in Digia's license headersSergio Ahumada2013-01-13159-159/+159
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* QMenu: Do not set snapToMouse if a caused-widget exists.Friedemann Kleint2012-12-191-1/+1
| | | | | | | | | | | | | When clicking at the bottom-right corner of a menu in a menu bar, it appears at the wrong position. Add test and stabilize RTL-tests by making sure the layout direction is cleared should they fail. Task-number: QTBUG-28031 Task-number: QTBUG-2596 Change-Id: Ibc5ae916388753908e9f3ee98e8859faaa0c8723 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> (cherry picked from qtbase/bf178c77dda1db56ae698c1d31a6e3f685f4830f)
* Fix conflict between QMainWindow::restoreState, QWidget::setStylesheet.Mitch Curtis2012-11-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | If QMainWindow::restoreState() then QWidget::setStylesheet() were called before the QMainWindow is shown, the size of QDockWidget can not be restored. QWidget::setStylesheet() will generate QEvent::StyleChange event, which will cause the function QDockAreaLayout::fitLayout() to be called before the layout of MainWindow is activated. Although the state info has been stored in a QMainWindowLayoutState variable by QMainWindow::restoreState(), but QMainWindowLayout::setGeometry() still isn't called at present. So QDockAreaLayout::fitLayout() will force the size of dockwidgets and centralwidget to be calculated using the wrong geometry, which will break the state restored by QMainWindow::restoreState(). This is a side effect of 692e9103ebb85b90e79377206d5d03b704d43d42. This patch is a backport of d2f65aa470fe30849a01380e4a50e8a4ebbce07e. Task-number: QTBUG-15080 Change-Id: I5b912e80e99b1f8b7a6f2a9a3e541fac3455c3db Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Debao Zhang <hello@debao.me>
* When clicking on a menu item which has a sub menu it should not closeAndy Shaw2012-11-151-0/+3
| | | | | | | | | If you clicked on a menu with a submenu then it should do nothing as this is what the native behaviour is on Mac. Task-number: QTBUG-10706 Change-Id: I7c8898b4b35a8189e1a8270d8a528eb56c81aed7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Fix scrolldown arrow not showing on popup for QMenuMiikka Heikkinen2012-11-141-2/+4
| | | | | | | | | | | | | | | | | Scrolldown arrow was not shown when a taller than screen QMenu was opened because the check to draw it used the size that was already adjusted to the screen. Fixed by using the actual menu size in the check. Also fixed the case where the menu was scrolled, closed, and reopened, in which case the size hint would return incorrect cached value. This led to scrolldown arrow not being shown in case the menu was previously fully scrolled down. Task-number: QTBUG-27445 Change-Id: Icd8d774071662a9317b3ac53cb05b31cadba96ff Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> (cherry picked from qt5/qtbase commit fe8eb057fa05433e96de21df34871647f421f962))
* Don't use Cocoa code unconditionallyAndy Shaw2012-11-141-0/+2
| | | | | | | | | | | The Cocoa code should only be used if QT_MAC_USE_COCOA is defined, this was causing problems in Carbon with menus which are now resolved. Task-number: QTBUG-27960 Change-Id: I60186d69a869def4b2f03f1b0fdde82208fcfbe5 Reviewed-by: Pasi Matilainen <pasi.matilainen@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Fix submenu navigation.Friedemann Kleint2012-11-071-0/+10
| | | | | | | | | | | | | | | Bring back code that was removed in Qt 4: 60324267fbb8a8554e62aaf9ef01360709292320 for QTBUG-7411 . This code reselects the submenu action of a currently opened popup when the mouse is moved to the submenu crossing other actions. In addition, make sure it only triggers when the reason is not keyboard selection. Task-number: QTBUG-20094 Change-Id: Ibb73f83e86635083aad8b1e79fc0fdd512c65754 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> (cherry picked from qtbase/0a91c9df01ec8f0c4aef9ce6e5e9bc3804fb80c2)
* Fixed crash on destruction of animating QDockWidget in a QMainWindowRohan McGovern2012-10-302-2/+5
| | | | | | | | | | | | | | | | | | | | | It doesn't make sense to hold an unguarded pointer to a QPropertyAnimation while assigning ownership of that animation to the animated widget. Destruction of the widget while the animation is in progress causes the animation pointer to become dangling; then the widget is removed from the containing QMainWindowLayout, which attempts to abort the animation, dereferencing the invalid pointer. The crash can be reproduced sometimes with tst_QDockWidget::taskQTBUG_2940_resizeAfterUndocking (which is in Qt4 only). (cherry-picked from qtbase 33214af3784feacb2d5188bbf07da92f45f582f9) Change-Id: Ia886f64fdb6720914a46bc7f32c71cf4fc81c28d Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fix a regression with regards to hfw behavior in QStackedWidgetJan Arve Saether2012-10-181-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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"); Change-Id: I0196a9e8e3ef3a36ce0e1a2929dfd58edeb93c69 Task-id: QTBUG-24758 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* QComboBox: mention insert policy in context of editable propertyMark Brand2012-10-171-1/+4
| | | | | | | | | This makes it a little bit easier for the reader to discover what editable combo boxes are about. Change-Id: I60ce571f01e32d4cacb4718b42a8e12884bd1c13 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> (cherry picked from qt5/qtbase commit a5e7c2802af59d4940e3479288cb9346205b984c)
* QComboBox::currentText: correct documentationMark Brand2012-10-171-3/+6
| | | | | | | | | | | | | | The documentation previously neglected the fact that the current text can be provided by the embedded QLineEdit if the combo box is editable even if there is no selected item. Change-Id: If40868c1633af7ce81b437d29e1da3fd4fefafb0 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Adam Light <aclight@gmail.com> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl> (cherry picked from qt5/qtbase commit 8d56ed85bdce40bca7b8457527103988efb3afcd) Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Clean up whitespaceJan-Arve Saether2012-10-121-34/+34
| | | | | Change-Id: Id1e293352d90a151e31ba73168400aacebc588dc Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Update the state of native menus correctly on MacPasi Matilainen2012-10-023-12/+7
| | | | | | | | | | | | | | | | | | | | | The state of native menus is currently updated in two incompatible ways on Mac, either by updating the state of native menu items in a native menu (when setEnabled is called) or the state of the native menu item containing the native menu (when the menus are initialized and when a modal dialog is opened/closed). This causes various problems, e.g. inability to enable a menu that was disabled before menu initialization or menus getting enabled incorrectly after a modal dialog is closed. Fix by always setting the state of the native menu item that contains the native menu. Also, autoenable is active for the main menu, resulting in unnecessary menu validation calls, so turn it off. Task-number: QTBUG-25544 Task-number: QTBUG-26399 Task-number: QTBUG-7538 Change-Id: Iab335af633604e7b3017eaa55464d1b8fdd7b821 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Fix issue with mispositioned family name i QFontComboBoxEskil Abrahamsen Blomfeldt2012-10-011-1/+12
| | | | | | | | | | | | | | | | | | | Mac OS X 10.7 comes with the family of Stix fonts, some of which exposed an ugly layout bug in the QFontComboBox because the ascent/descent ratio is very large due to a very high ascent, so centering the text vertically might cause most of the text to be clipped away. The solution is to detect when the ascent is larger than the height of the destination rectangle (hence a large part of the characters will be clipped) and use the actual bounding rect for centralizing instead. Since this only happens for a very few of the fonts, the overhead of getting the bounding rect should be tolerable. Task-number: QTBUG-26691 Change-Id: I4f1a9b3c63138fde4dfdfa99d8581458c59b7ff6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix g++/MinGW compiler warnings.Friedemann Kleint2012-09-291-1/+0
| | | | | | | | | | - Assigned/Unused variables. - Unsigned comparison >= 0 is always true. - Constructor initialization order. - Signed/Unsigned comparisons. Change-Id: I1f9edab0506573420ed0bf3055252ba48625c8eb Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-29159-3816/+3816
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* [QTBUG-27308][QTBUG-21534] Don't mouse-wheel-scroll QScrollBar when disabledMarc Mutz2012-09-281-0/+2
| | | | | | | | | | | | | | | | The Qt 5 fix (aec5b76) doesn't apply here, because it introduces a new symbol that might break forward compatibility if code compiled against a newer Qt 4.8 is run against an older Qt 4.8, and QScrollBar::wheelEvent() ends up being devirtualised. So copy the guard clause from QWidget::event() here. Task-number: QTBUG-27308 Reported-by: chenjiexin Task-number: QTBUG-21534 Reported-by: Martin Koller Change-Id: I5d2f823c65bae8cff33bac320c37e6496b14646c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Prevent a crash when a merged action is removedAndy Shaw2012-09-111-0/+10
| | | | | | | | | If a merged action is removed then a crash can occur if it is readded later. Task-number: QTBUG-24917 Change-Id: I43dcde3f40950fafc33d976e861a90fe1c38d061 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Make QStatusBar text available via accessibility.Tilman Sauerbeck2012-08-231-0/+10
| | | | | Change-Id: Iec3efb4b91bdba33fe93b928ff2349440e15aa35 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Fix undo and redo in QLineEdit when in password modeJani Honkonen2012-08-222-2/+24
| | | | | | | | | | | | | There are some security issues with undo/redo. User should not be able to get the erased password back in any situation. Therefore redo must be disabled completely and undo is limited only for erasing previously entered text. Backported from Qt5 SHA1: 121062d8848986dcfaf421388a5603b3b48a1e58 Task-number: QTBUG-14226 Change-Id: Ia712f95e8a2e45537a95d48b70686a1a8dd95da2 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Implement QAccessibleLineEdit::characterRect()Jan-Arve Saether2012-08-161-0/+1
| | | | | | | | | It was probably not implemented because it needed to access private APIs. However, accessing those from this a11y plugin is unproblematic. Change-Id: Icadad45a83daa60e2fbc4cab17b91c84c3f36a7f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Fix for restoring dockwidget's size when it gets dragged.Mikko Knuutila2012-08-161-6/+24
| | | | | | | | | When user drags a dockwidget out of the docking area, restore widget's previous floating size and center it's titlebar under the mouse. Task-number: QTBUG-2940 Change-Id: I004de36d649abc4c32420bdd46bb6c810ef98c64 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* make currentText the USER property for QComboBoxMark Brand2012-08-131-2/+2
| | | | | | | | | | | | | | | | QItemDelegate takes the USER property as the value to be set using model->setData(). The text is what is expected. follow-up to b1b87a73012342dc1619a8e907ea9954d59ca564 which in Qt 4.8.0 broke the interaction between QComboBox and QItemDelegate used by QDataWidgetMapper and item views. Task-number: QTBUG-26501 Cherry-picked from qt5/qtbase 816c5540179362500dfc175b77f05abf3ef25233 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Change-Id: Ie9c228f2aa47f194467419398b37d05d98a70a1b Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Update contact information in license headers.Sergio Ahumada2012-08-01159-318/+318
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@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> (cherry picked from commit 006b620ef9390e9396c69db74e31785b04a5d2d6) Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Doc: Fix typoSergio Ahumada2012-07-161-1/+1
| | | | | | Task-number: QTBUG-23657 Change-Id: I1a931c92fb07806c80353b4c17ee86a0c09f8ad8 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Fix infinite recursion while dragging toolbar of QMainWindow.Markku Heikkila2012-06-251-2/+3
| | | | | | | | | Prevent recursion in QMainWindowLayout::endSeparatorMove(). Task-number: QTBUG-21378 Change-Id: Ie40005a35918d4da7ef911f8c3b1d1c3b5cf4fd2 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Mac: Fix rendering of non-int sized fonts.Eike Ziller2012-06-192-17/+24
| | | | | | | | | Scrolling happens in integer steps, so it's necessary to use a fractional correction value. Task-number: QTCREATORBUG-7127 Change-Id: I1b027d2482b7daac83ddc8cac64d2a4449de257c Reviewed-by: Matthias Ettrich <matthias.ettrich@nokia.com>