summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Fix crash in QPlainTextEdit when using large fontsEskil Abrahamsen Blomfeldt2009-10-061-0/+3
| | | | | | | | | | When using very large fonts, sometimes the scrollbar of the QPlainTextEdit will allow you to do scroll down past the end of the document, in which case the currentBlock in hitTest() is inValid() which caused an assert in currentBlock.next(). Task-number: QT-938 Reviewed-by: mae
* Fix QTextEdit pageUp/Down key handling in read-only modemae2009-10-051-21/+28
| | | | | | | | | QTextControl has two independent interaction flags TextEditable and TextSelectableByKeyboard, i.e. the latter can also apply in read-only mode. This used to be handled incorrectly in QTextEdit. Reviewed-by: con
* Fix QPlainTextEdit pageUp/Down key handling in read-only modemae2009-10-051-22/+29
| | | | | | | | | QTextControl has two independent interaction flags TextEditable and TextSelectableByKeyboard, i.e. the latter can also apply in read-only mode. This used to be handled incorrectly in QPlainTextEdit. Reviewed-by: con
* Fix a compilation warning on Mac OS XBenjamin Poulain2009-10-051-1/+4
| | | | The variable updatesEnabled is not used on Mac OS X.
* Fixed a crash in menus on Symbian.axis2009-10-052-5/+9
| | | | | | | | | | | | | | | | | | | | The reason for the crash was the following: When we make menu entries in Qt, we assign each item an arbitrary command ID. This is because Symbian usually puts the items in a resource file and refers to them by ID, but we need to be dynamic. These command IDs are also assigned to cascading menu items (sub menus). When we then get a callback in RestoreMenuL with one of submenu IDs, we used to ask Symbian to construct the menu items for them, but Symbian doesn't know about them. Fixed by avoiding call into S60 code if the ID belongs to Qt. Also put a cap on the number of menu items. It's very unlikely that anyone will reach it, but it's better to have an actual check. Task: QT-646 AutoTest: Manual testing went fine RevBy: mread
* Added some comments.axis2009-10-051-1/+1
|
* Fixed indentation.axis2009-10-051-3/+3
|
* Moved non-public functions out of public header file.axis2009-10-052-8/+5
| | | | RevBy: Trust me
* Disable etched text on rich text labelsJens Bache-Wiig2009-10-051-2/+4
| | | | | | | | | | | | | When rendering etched text on disabled rich text labels we would previously draw distorted links. This is basically because anything that did not render with the text foreground role would be drawn twice as a shadow. Since there is no way to properly render this text etched we will rather disable it completely when the label uses rich text. Task-number: QTBUG-4543 Reviewed-by: Simon Hausmann
* Mac: bugfix 45f095b8970dc3c1b6f6e97fa2323654ba848288Richard Moe Gustavsen2009-10-021-9/+16
| | | | | | Seems like I forgot to handle page scrolls. Also did a small optimization (see also 45f095b8970dc3c1b6f6e97fa2323654ba848288)
* Mac: update/small fix to 45f095b8970dc3c1b6f6e97fa2323654ba848288Richard Moe Gustavsen2009-10-022-12/+14
| | | | | | | | It turns out that we need to let singleStep keep its value in qtextedit so that pushing the up/down buttons on the slider works as they should. Moreover, overriding the behaviour in abstract slider also makes QGraphicsView work out of the box. Also added in the test fix suggested by Olivier.
* Clear text selection in QLabel when it is losing focusmae2009-10-021-1/+12
| | | | | | | The change implements the same logic for QLabel which QLineEdit (and implicitely QSpinBox and QComboBox) already had. Reviewed-by: Simon Hausmann
* Fix: Abstract slider does not understand wheel events properlyRichard Moe Gustavsen2009-10-013-23/+22
| | | | | | | | | | | A wheel event contain delta values that describe the rotation angle the wheel was rotated (in 1/8 of a degree). For some mouse devices (thinking of mac mighty mouse/trackpad) the resolution is better than the standard 15 degrees. The Qt docs describe how to deal with this. But abstract scrollbar does did follow this recipe, but it does now with this patch. Reb-By: prasanth
* Fix regression in Command link button font sizeJens Bache-Wiig2009-09-091-8/+19
| | | | | | | | | | | | | Since vista style polish sets the font on polish, the check for WA_SetFont will succeed, hence we never set the actual font. I replaced the check with a full resolve. However since the resolve would clear the resolve_mask, from the widget font it has to be restored manually so that QPainter:setFont can resolve it later. Task-number: QTBUG-4646 Reviewed-by: trond
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Jani Hautakangas2009-09-301-2/+2
|\
| * Fix typo.Alexis Menard2009-09-291-2/+2
| | | | | | | | Reviewed-by: TrustMe
* | Symbian specific fixes to QComboBoxJani Hautakangas2009-09-301-7/+3
|/ | | | | | | | Fixes QComboBox edit field geometry in s60style Fixes softkey crash when setting a custom itemview to QComboBox Fixes Symbian keyboard input interval in tst_QComboBox::virtualAutocompletion() Reviewed-by: Sami Merila
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Sami Merilä2009-09-281-5/+15
|\
| * Impossible to interact with the year on QCalendarWidget on GraphicsViewThierry Bastian2009-09-281-5/+15
| | | | | | | | | | | | | | | | | | The problem is that it is using mapToGlobal to translate a mouse position andthat doesn't work well when the widget is mebedded inside graphics view. Task-number: QT-2218 Reviewed-by: Bjoern Erik Nilsen
* | Triggering softkey action for disbled widget causes a crash.Sami Merilä2009-09-281-0/+1
|/ | | | | | | | | | Softkey actions need to copy enable state from action widget to prevent crash when action is triggered and action widget is disabled. OPEN: dynamically setting enable state for softkey actions. Task-number: QT-2117 Reviewed-by: Jason Barron
* Merge commit 'origin/4.5' into 4.6Andreas Aardal Hanssen2009-09-282-211/+5
|\ | | | | | | | | | | | | | | | | Reviewed-by: Joao Conflicts: src/gui/graphicsview/qgraphicsview.cpp src/gui/widgets/qspinbox.cpp tests/auto/qgraphicsview/tst_qgraphicsview.cpp
| * Doc: fixed typo in QTabBar::tabRect() docsStian Sandvik Thomassen2009-09-281-1/+1
| |
| * Fixes a crash in QDoubleSpinBoxJoão Abecasis2009-09-251-210/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing dubious intermediate detection code that also had a buffer overflow. The results were inconsistent and not dependable on. Processing was inefficient and end value to user experience dubious. Test cases that abused the former behaviour were changed to consider input in an Intermediate where it was previously considered Invalid. With this change, user input will mostly be considered in an intermediate state, until it is effectively validated. Task-number: 255019 Reviewed-by: Anders Bakken
* | ifdefs to allow compilation with QT_NO_MAINWINDOW and QT_NO_TOOLBARJeremy Katz2009-09-251-0/+2
| | | | | | | | Reviewed-by: Paul
* | Missing mouse release event on toolbars on Mac OS XPrasanth Ullattil2009-09-221-0/+2
| | | | | | | | | | | | | | The mouse move events were eaten regardless of the dragging state. Task-number: 238004 Reviewed-by: Thierry
* | Prevented export of some internal functions.axis2009-09-222-4/+4
| | | | | | | | | | | | These should not be exported anymore after commit c13b97f2. RevBy: Jason Barron
* | Remove key accelerators from Softkeys and Menus in S60.Sami Merilä2009-09-221-21/+3
| | | | | | | | | | | | | | | | | | In S60 softkeys and menu items do not support key accelerators (i.e. CTRL+X). Therefore, removing the accelerator characters from both softkey and menu item texts. Related to task QT-1505 "Make Qt dialogs look native" Reviewed by Jason Barron
* | Ensure that the menu only shows when clicking on the menu buttonAndy Shaw2009-09-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | In Qt 3 clicking on the toolbutton would not popup the menu, only when clicking on the arrow for the menu popup would this appear if the toolbutton had MenuPopup mode set. When a Q3ActionGroup is used and added to a toolbar then it will give a toolbutton with such a button. This patch fixes the behaviour so that only clicking on the arrow button will cause the menu to appear in this mode. Reviewed-by: Thierry
* | Get menubars working again with new softkey API.Jason Barron2009-09-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an unfortunate workaround to get the menu bars working again. Previously we used the soft key role to determine what action command we should use for the softkey. Now we only use the role to determine the position (as we should) and ideally the command would be determined by checking if the action has a menu() and then forcing the command to EAknSoftkeyOptions. This would have enabled any softkey with a menu to work, but unfortunately this would require considerable effort in the menu implementation and time is short. So the workaround is to abuse object name to tell the softkey system that this key is special and should get EAknSoftkeyOptions. Reviewed-by: Alessandro Portale
* | Introduce MenuSoftKey as a standard key to the internal enum.Jason Barron2009-09-211-1/+1
| | | | | | | | | | | | | | | | QMainWindow was using the 'Done' standard softkey to represent the action for the menu bar, but that was obviously wrong and pointed out that one of hte needed standard softkeys was needed. Reviewed-by: Alessandro Portale
* | Simplify the soft key roles of QAction.Jason Barron2009-09-214-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously there were many options here that were inherited from the Qtopia implementation. It was not clear to developers which value they actually should use. A good example was the 'Next' value. In a typical wizard application, next would be on the right and 'Previous' would be on the left. However, it is also common to have 'Next' on the left and have 'Cancel' on the right. Basically what people really wanted was a way to explicitly set the right and left soft keys, but since this relies on form factor and is wrong if the screen is rotated, we choose positive and negative actions as the values for these such that they still make sense when the screen is rotated. Also this helps people who don't know if a particular action should be on the left or right, but they *do* know if their action has destructive characterisitics (negative). As a convenience for widgets in Qt that use softkeys, we create a standard softkey enumeration. That maps the actions to the correct role and has default text. Reviewed-by: Alessandro Portale
* | Change QDialogButtonBox to use the new soft key API.Jason Barron2009-09-211-106/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplifies the implementation of the soft keys. Introduce a hash for storing the mapping between the buttons and the actions that they represent. This allows for easy translation of the strings when the language changes. Use setFixedSize instead of hide to make the buttons invisible. This allows us to put some code in the handling of the show event and add the actions here. This should be fairly safe since even if we get multiple show events, it is still safe to add the same action again. Reviewed-by: Alessandro Portale
* | Give the soft key functionality it's own macro.Jason Barron2009-09-213-8/+8
| | | | | | | | | | | | | | | | | | Re-using QT_KEYPAD_NAVIGATION for soft keys is wrong since the two are independant concepts. This puts everything in a new macro called QT_SOFTKEYS_ENABLED. This will also insulate the embedded customers who use keypad navigation from the soft key changes. Reviewed-by: Alessandro Portale
* | Refactor soft keys implementation.Jason Barron2009-09-219-236/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Alessandro Portale Squashed commit of the following: commit dae5eda6996d48c12c4a5efd3f6042eb293bacbf Author: Jason Barron <jbarron@trolltech.com> Date: Fri Sep 18 10:32:26 2009 +0200 Only update soft keys when KEYPAD_NAVIGATION is enabled. For 4.6, let's just call these functions when keypad navigation is defined to minimize the impact on other platforms. They should probably get thier own define some day. commit 30a730553531f0f138de5eddb30413936a34fa36 Author: Jason Barron <jbarron@trolltech.com> Date: Fri Sep 18 10:30:23 2009 +0200 Add/remove the menu bar action when menu bar is added/removed. commit a83343a2870b34c228c8bc5e6274607b0e97baf6 Author: Jason Barron <jbarron@trolltech.com> Date: Fri Sep 18 10:28:55 2009 +0200 Compile fix for other platforms commit 39c9e3a0a1d3d62bf6ebd3212cfd2a81b86b9b2a Author: Jason Barron <jbarron@trolltech.com> Date: Thu Sep 17 21:37:59 2009 +0200 Fix 'softkeys' example after API re-factoring. Clean up this example and use the simplified soft key API. Now the actions are only allocated in the constructor and dynamically updated by calling addAction and removeAction. commit 314e45c33f40552db74e61755c2a3b0f8c77a41a Author: Jason Barron <jbarron@trolltech.com> Date: Thu Sep 17 21:30:32 2009 +0200 Re-factor and simplify the soft keys API. Several things here: - Move all the logic into QSoftKeyManager - Move the files into 'kernel' since it is not a widget - Remove QWidget::setSoftKey*(). Use addAction/removeAction instead - Made soft keys update on focus, window activation, and action changes. - Fixed several memory leaks where QAction's were created too often - QAction ownership pushed out to widget's - Added Select/Cancel soft keys for comboboxes and menus to be more consistent to platform look-and-feel. commit fb4c240d970262e9872dc5737df6808879143c75 Author: Jason Barron <jbarron@trolltech.com> Date: Mon Sep 7 15:49:31 2009 +0200 Merge the Symbian implementation with the other platforms nativeMenuBar It seems this has been refactored to share more code across the various platforms that support native menubars so the Symbian code can be mostly removed. commit aa55e4bcd1f009ab35c9519e18aa325fd212dd23 Author: Jason Barron <jbarron@trolltech.com> Date: Wed Aug 26 17:00:34 2009 +0200 Change filenames and move softkey stuff from 'widgets' to 'kernel'. This thing isn't a widget and therefore should not be in the 'widgets' subdirectory of gui. Also rename the files in preparation for refactoring and extending.
* | S60 native looking dialog support.Sami Merilä2009-09-211-0/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Related to QTSSIXTY-63 "Make Qt dialogs look native" S60 dialog support: * Positioning according S60 rules: - in portrait dialogs at the bottom of the screen, - in landscape positioned in the center of the screen [unless device supports bottom softkeys], so that softkeys are not covered by the dialog * If dialog shows extension, then dialog is re-positioned * Dialog size: - in portrait screen wide dialog, height can change - in landscape width is the same size as width in portrait (some dialogs are maximized) * No push buttons or DialogButtonBoxes in internal qt dialogs (QWizard, QInputDialog, QFileDialog, QFontDialog, QColorDialog, QProgressDialog, QErrorMessage, QMessageBox), instead signals are remapped to softkeys. * Globally, dialogbuttonboxes are converted automatically to softkeys. OPEN: * Needs to be re-factored slightly after softkey API refactoring is finished. BUGS: QWizard layout switch is wonky - dialog is not re-sized correctly. QFontDialog will not fit into device screen (too much widgets in it). Some effort needed to be make it smaller. Cannot set one softkey at the time softkeys => Options menu and right softkey cannot be set separately [SoftKey re-factoring will help] Dialogs cannot get touch events to softkeys [SoftKey re-factoring will help] Reviewed-by: Alessandro Portale Reviewed-by: Jason Barron Reviewed-by: mread Reviewed-by: Shane Kearns
* | Making Keypad Navigation more usableAlessandro Portale2009-09-194-10/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All changes of this commit are #ifdef'ed in QT_KEYPAD_NAVIGATION. Most desktop Qts won't notice any change. Navigating between QWidgets was not alwys a pleasure on keypad devices. This commit fixes the navigation behavior for some widgets, mostly itemviews. Furthermore, it adds a 'directional' navigation mode. Until now, the existing keypad navigation used the tab order do go back and forth between widgets. The new mode is supposed to provide a more intuitive navigation. It is the new default mode on Symbian. Screens (and their resolutions) become bigger, and also low resolution screens can be used in landscape mode. That's why the directional mode was requested. Another popular request was to put some more convenience into QSlider: If a (horizontal) slider has focus and the user presses left/right, the value of the slider may directing change without being selected (edit mode). This commit also adds the manual test 'keypadnavigation'. Reviewed-by: Shane Kearns
* | Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt into 4.6Simon Hausmann2009-09-182-2/+18
|\ \ | |/
| * Application crashes when a menu is inserted twice on a menubar (Cocoa).Prasanth Ullattil2009-09-182-2/+18
| | | | | | | | | | | | | | | | | | Cocoa does not allow NSMenu to have multiple supermenu's. If a menu is added again as submenu, Qt will now disable the menu item or the menu will not be added at all if it is added again to the menubar. Task-number: 258822 Reviewed-by: MortenS
| * Update license headers again.Jason McDonald2009-09-08152-608/+608
| | | | | | | | Reviewed-by: Trust Me
* | Doc: Made the QDockWidget::windowTitle property non-internal.David Boddie2009-09-161-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Fix QLineEdit drag'n'dropAlan Alpert2009-09-151-1/+0
| | | | | | | | | | | | | | QLineEdit shouldn't have been moving the text cursor while dragging. Task-number: 260457 Reviewed-by: mbm
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Alan Alpert2009-09-152-2/+9
|\ \
| * | Fixed QLineEdit to pass the tst_QLineEdit::displayText() autotest.Kim Motoyoshi Kalland2009-09-152-2/+9
| | | | | | | | | | | | | | | | | | Fetch the correct password character from the style. Reviewed-by: Olivier
* | | Fix QLineEdit::setPaletteAlan Alpert2009-09-152-1/+18
|/ / | | | | | | | | | | | | QLineControl has a separate palette that wasn't getting updated. Task-number: 261239 Reviewed-by: mbm
* | Remove spurious, wrong semi-colonThiago Macieira2009-09-141-1/+1
| | | | | | | | | | | | There should be no semi-colon after Q_DISABLE_COPY. Reviewed-By: Trust Me
* | Fix closing the menu of a QMenuBar with the mouseOlivier Goffart2009-09-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ammend commit 41dbc4406 and 21cf7b4c431742 We do not always get the mouseReleaseEvent (because the popups grabs the mouse. So set mouseDown to false in the mouseMoveEvent if no buttons are pressed. We also need to call setCurrentAction(0) in the case we are hovering on the empty area with no popup open. (in otder to remove the highlight) The code is now much closer to the code before the two previous commit Reviewed-by: Prasanth
* | Fix QMenuBar hover effect.Olivier Goffart2009-09-141-3/+1
| | | | | | | | | | | | | | Regression introduced by commit 21cf7b4c431742 Task-number: 261199 Reviewed-by: Prasanth
* | Removed some superfluous semicolonsAlessandro Portale2009-09-092-3/+3
| | | | | | | | Reviewed-by: TrustMe
* | QMenubar could popup a menu when undocking a toolbarThierry Bastian2009-09-091-5/+6
| | | | | | | | | | | | | | | | | | This is due to the fact that it receives a mousemoveevent. But as it doesn't receive a mousepress event, we can detect whether it should popup or not. Task-number: 260873 Reviewed-by: prasanth
* | Fix a possible crash when deleting the QMainWindow layoutThierry Bastian2009-09-091-1/+2
| | | | | | | | | | | | | | | | It can happen that an item is still a gap and could then be deleted twice. We now check that to avoid double deletion. Note: it doesn't fix the bug but avoids the crash. Task-number: 260873