summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Avoid out of bounds memory reads when scaling imagesv4.8.6Lars Knoll2014-04-036-27/+45
| | | | | | | | | | | | | | | | | | The calculation of the width/height required for the scaling algorithm was prone to floating point rounding issues, where the lower value got rounded down, the higher one rounded up. This could lead to a situation where we iterated over one more line/pixel in the line than we have in the source image. Correct this by passing the dimension of the source image into the function and bounds checking the values before iterating. Backport of If44b2235a479224660d508a0504fec40d724763a from Qt 5 Task-number: QTBUG-35927 Change-Id: If145ee715a143b889538243f45227d8d78a0050f Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Pass events to QGestureManager from the main (GUI) thread only.Friedemann Kleint2014-03-281-9/+12
| | | | | | | | Task-number: QTBUG-20946 Change-Id: I964452c1e97bd3d3a521e33abeb2f7d8cdbc89a9 Reviewed-by: Andy Shaw <andy.shaw@digia.com> (cherry picked from qtbase/9b28ab3f38e21f2e1498dea5dd761d22d72fb1ac)
* printsupport: set duplex setting correctly to CUPS printerTeemu Katajisto2014-03-281-14/+14
| | | | | | | | | | If CUPS printer default is not DuplexNone then setting duplex to None for printer did not have any effect on duplex setting. (backported from qtbase/385e584926f2957d6e9ec4c2c4e89b37a5e0c80c) Change-Id: Ia72f599a9e5fa511b3214c6b8016e21f40409b86 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* QPrintDialog OSX: don't crash if ApplicationModal and no parentShawn Rutledge2014-03-281-1/+3
| | | | | | | | | | Task-number: QTBUG-32464 (backported from qtbase/03855decfcb4e05817424843564a4b66636bb347) Change-Id: I12892798419b2efcf404f972930562d50d045ea3 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* QPrintDialog: document the modality on OS X and WindowsShawn Rutledge2014-03-281-0/+4
| | | | | | | | | | | | You can't programmatically close the dialog because it's modal. Task-number: QTBUG-32464 (backported from qtbase/bd602a2dc4bc9491f80919b09a8990edb6fbee97) Change-Id: Ib7573b347b3f10914e60af05f95ed9f5763eadd8 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Updated year in copyright headerKai Koehne2014-03-261250-1251/+1251
| | | | | | | | | | | | | | | | | | 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>
* QPushButton: draw label using the stylesheet's font.Mitch Curtis2014-03-211-0/+8
| | | | | | | | | | | | The RenderRule for the stylesheet has the correct font information, it just wasn't being set on the painter that draws the label. This is a backport of the Qt 5 commit: 9ad768fd1999780df18551151b9d9fa9c354131c. Task-number: QTBUG-8990 Change-Id: I4857d6e17b62980782ca7bfdfd0a571a9950f635 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@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-204-7/+16
| | | | | | | | | | | | | | | 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>
* QWindowsXP/VistaStyle: Fix detection of item view delegate line edits.Friedemann Kleint2014-03-173-15/+17
| | | | | | | | | | | | | | The old code tried to check the 2nd parent for inheritance from QAbstractItemView. This also triggers for line edits on a QDialog parented on the item view. Introduce convenience function that checks for top levels in the chain. Task-number: QTBUG-37504 Change-Id: I932f8efdb4764e9b1eea84c802bf7e8718338e1d Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> (cherry picked from qtbase/176342e70a1ba7864a5b5dac14d12d4091ef5bd9)
* Windows: Restore maximized/full screen widgets to correct screen.Friedemann Kleint2014-03-131-4/+17
| | | | | | | | | | | | | | | | | | | | | Partially revert 54865d47cfd859a0e84ba8e1bbff3b56c93d4e0d and bring back parts from abba37cd0eff959edf2d011842cbf2b36cce8467 which failed some tests on other platforms and never made it in. Avoid setting a geometry on maximized windows since that leaves them in a broken state. Instead, if there is a need to restore maximized windows to a different screen, clear the maximized flag before applying the geometry. [ChangeLog][QWidget][Windows] QWidget::restoreGeometry() now restores maximized/full screen widgets to the correct screen. Task-number: QTBUG-21371 Task-number: QTBUG-4397 Change-Id: Ibd5b736e921f20d4b7365c06c6f9c5dd4469c781 Reviewed-by: Andy Shaw <andy.shaw@digia.com> (cherry picked from qtbase/ae4243df1e53b0aaeada708f6fa7979a0f0d216a)
* Fix a crash when reparenting widgets on Windows.Friedemann Kleint2014-03-131-4/+6
| | | | | | | | | | Introduced by a9edbeddafe5d8866192de44f4028d07bd93013a . Task-number: QTBUG-37346 Task-number: QTBUG-30276 Change-Id: I81e218839db50a88a8b149dd5481bfd0835284da Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Mac: Fix file dialog filters when filter doesn't start with '*'Eike Ziller2014-02-131-1/+2
| | | | | | | Task-number: QTBUG-17326 Change-Id: Ie32f2807e64aa9c90b2e7d75adcd2aef67649225 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* fix crash when using GTK 2.14 function in old gtkAndrey Volkov2014-02-131-1/+3
| | | | | | | | | | | | | | | | | | | This is additional fix for bug 23569. Previous fix (SHA1 7fcf1cf674d09d9dd1d41e2913252017f1d599ca) is not enough. QGtkStyle was still crashing with old gtk (< 2.14) in drawComplexControl () function. Bug was reproducible on CentOS 5.x and Red Hat 5.x. Current patch makes the same check as in commit mentioned but in another line of code. Task-number: QTBUG-23569 Change-Id: I261b61bc93ccaada879ed02ad4d0bef62935335b Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Harri Porten <porten@froglogic.com> (cherry picked from qtbase/7df3321f934e5bd618e2ad00bf801f2b7edd31df)
* Fix the Carbon buildAndy Shaw2014-02-111-0/+6
| | | | | | | | | The function does not exist when building for Carbon with the 10.5 SDK so since this means the function will effectively do nothing, so we just return false in this case. Change-Id: If41762a055ebeccfcfce751e164b6a6e7e1db437 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Fix compile for CarbonAndy Shaw2014-02-071-1/+2
| | | | | | | | Protect the usage of qt_mac_loadMenuNib so it is only used on Cocoa as this call is not used in Carbon code. Change-Id: I93b9b513dce934680e1d5e1fb26bf2a64e25c764 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Win: Fixed assert in QKeyMapperPrivate::possibleKeysOliver Wolff2014-02-051-1/+4
| | | | | | | | | Trying to detect key combinations for events that have an invalid virtual key will fail in any case and does not make sense. Task-number: QTBUG-36061 Change-Id: Ia30cb7bf6c7bae06eb84c23b356a53a2eb6e86aa Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* DontUseNativeDialog is not just for the Mac color dialogShawn Rutledge2014-02-051-2/+2
| | | | | | Task-number: QTBUG-14341 Change-Id: Id2e8df9277186427370fa2a89643995d79812704 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Windows: Do not try to update keymap on WM_IME_CHAR messagesOliver Wolff2014-01-311-2/+2
| | | | | | | | Task-number: QTBUG-35806 Change-Id: Ie1082353155aa7ee61f49f2fbcbfdb01d57e797c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> (cherry picked from commit 0c09d2ccb9b46138a908950d65a49aa58dd55062)
* QWindowVistaStyle: Always initialize text color of menu items.Friedemann Kleint2014-01-221-6/+4
| | | | | | | | | | [ChangeLog][QtWidgets][QMenu][Windows] Correctly use text color set by style sheet for menu items. Task-number: QTBUG-36142 Change-Id: I142f2fd82164771b45bf599a6afa1121fcfd2187 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> (cherry picked from qtbase/b152b425f74788b2f2845fb7d1a5032d86b8746d)
* QWindowsVistaStyle: Fixed position of menu gutter when using a custom widget ↵Friedemann Kleint2014-01-221-2/+4
| | | | | | | | | | | | | | | | | action. The gutter position was hardcoded to 28 which fits when drawing on the QMenu with a left margin of 3. It became offset when drawing on a custom widget with no margin. Calculate position relative to margin for left to right. [ChangeLog][QtWidgets][QMenu][Windows] Fixed position of menu gutter when using a custom widget action. Task-number: QTBUG-36218 Change-Id: Ibb34a9fba2bab7257482b80d2e51e76a9755345c Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> (cherry picked from qtbase/a5c288ea5675a382edf0b3ecae42f461a22a7303)
* QWizard: Fix frame when using Vista style/MSVC2012Friedemann Kleint2014-01-172-8/+32
| | | | | | | | | | | | | | Work around GetSystemMetrics() returning the wrong value using MSVC2012 and later. The special handling of Windows 8 and later is then no longer required. [ChangeLog][QtWidgets][QWizard] Fixed frame when using Vista style/MSVC2012. Task-number: QTBUG-36192 Change-Id: I39c2ab70a266f12cd65fa740b10b86edffa60417 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> (cherry picked from qtbase/852308114ff901b86cca99268f498fc1d56b622e)
* Correct wordwrapped text handling in QListView icon modeSamuel Gaist2014-01-152-1/+9
| | | | | | | | | | | | | | Currently a QListView with wordwrapping activated will wrap the text only to the width of the icon even if the grid size is bigger. With this patch the option rect is now updated to match the grid size if valid and the style uses it to determine the correct size when wrapping [ChangeLog][QtWidgets][QTBUG-4714] Use the grid size for wordwrapping when available in icon mode Task-number: QTBUG-4714 Change-Id: I2cb63809d3ee8bd262f38bc11de91df9ff5cf237 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> (cherry picked from qtbase/a761be2fb2191215426f904cb03df0e966214531)
* Avoid floating point exceptions in rasterizeLine.Gunnar Sletta2014-01-121-16/+45
| | | | | | | | | Task-number: QTBUG-16757 Change-Id: I3ef988f1e039c12529d62197d85a62f201e4ae12 Reviewed-by: Lars Knoll <lars.knoll@digia.com> (cherry picked from qtbase/85b4f0d2d3ffd326548ca8f0e15ac27f5fd8d77d) Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Fixed another assert in qwindowskeymapperOliver Wolff2014-01-101-2/+5
| | | | | | | | | | | When we get a WM_CHAR message we do not need to add anything to the key map as these messages already contain the character code in question. Task-number: QTBUG-35532 Change-Id: If73993cd873b7c616876b9ba52ceba6b27a6a7b1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> (cherry picked from commit 8e2f95e5a2ebc54c600d1db416b1dd84e433d115)
* Cocoa: fix a typo for F9 in key mappingLiang Qi2013-12-201-1/+1
| | | | | | Task-number: QTBUG-34820 Change-Id: I181f565a0b4f188f83cc821a019cf3781954cb02 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@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>
* Use qt_mac_effectiveview_for for setFocus_sysSamuel Gaist2013-12-051-1/+1
| | | | | | | | | | | | Currently setFocus_sys use qt_mac_nativeview_for to set the focus which triggers a bug rerouting the key events through NSMenu rather that directly to the correct widget. Get the effective id returns the correct widget. This changeset applies the patch proposed in the bug report Task-number: QTBUG-34371 Change-Id: I0831f41ca409ff309954bb45a50975dd4eb1406a Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Respect the custom paper size settings on MacAndy Shaw2013-12-042-23/+48
| | | | | | | | | | | | | | | When the user added a custom paper size then it would be silently ignored when printing on Mac. This now ensures that it is respected when appropriate. Manual cherry-pick from Qt 5: 26a0a3ed85008c3a0edae125fca48c7c36a7437f [ChangeLog][Platform Specific Changes][OS X][QtPrintSupport] Respect the custom paper size settings when printing. Task-number: QTBUG-34700 Change-Id: If2ff9b704a636c94510f826d300e53af99c8e7ab Reviewed-by: John Layt <jlayt@kde.org>
* QPrintDialog - Fix Windows Current Page option selectionJohn Layt2013-11-271-2/+4
| | | | | | | | | | | | In the Windows print dialog default the print range radio button selection to the QPrinter set value, but only if the option is enabled in the dialog. Task-number: QTBUG-32965 Change-Id: I1093ff9d55c0ec578fc2c112874662deb32e1b4d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> (cherry picked from qtbase/9927c1a2bbb372d0e557c58062e4ecda7a644aa1)
* Mac style: Fix selected tab text color on 10.6Gabriel de Dietrich2013-11-271-3/+4
| | | | | | | | This is a regression introduced by a1eaf0169f041f599895fac90570df601559a526. Task-number: QTBUG-34540 Change-Id: I3944a92f5119e0ec7c435b5b36ed4bc3d7361888 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fixed assert in Windows key handlingOliver Wolff2013-11-271-2/+8
| | | | | | | | | | | | | | | | | | | | | | Certain key sequences (like press alt, press left, release left, release alt) can cause an assert in qwindowskeymapper. This behavior was introduced in change I4f7709a90906b03f4504deea1ff5c361e9f94b3f (Fix virtual key mapping on MS Windows). The place that seems to cause the new behavior is changing the bitmask for obtaining the event's scancode. With the changed bitmask releasing the alt key in the given key sequence causes the WM_KEYUP event to trigger a WM_CHAR event which should not happen there. To be honest I don't know how having the extended bit inside the scancode fixes the behavior but it seems to do and I could not find another place which might cause the breakage. Task-number: QTBUG-35005 Change-Id: Ia18c2681ea311196441a5cd15017e220ac095674 (cherry picked from commit d4c548ce5c0bd8a70c82ed082bc69fd41e9c47ed) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Juan Luis Boya García <ntrrgc@gmail.com>
* Fix bug in updatePossibleKeyCodes() with dead keys and modifiersJuan Luis Boya García2013-11-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As it was until now, QWindowsKeyMapper::updatePossibleKeyCodes() tested using ToUnicode for which characters produce a key with every possible combination of modifiers. Calling ToUnicode with a dead key is dangerous, because MS Windows keeps it in the driver buffer, so if you call ToUnicode with acute key and then you press a, you get an á. To prevent this, updatePossibleKeyCodes() checked if the key that was being tested was a dead key. If true, it inserted an space and then repeated the key in order to reset the system internal buffers to the same state they were before the call. The problem with this is if the dead key is really two keys (like ^ or ´ in US International keyboard layout) and you press one of those keys without the modifier to make it a dead key (i.e. 6 in US International): Since updatePossibleKeyCodes() only tests for the key that was pressed it gets 6 is not a dead key, and thus it does not execute the workaround. Thus, the next time the user presses 'a' they get 'â' instead because updatePossibleKeyCodes() set the dead key on the keyboard buffer and did not run the workaround. This patch makes updatePossibleKeyCodes() run the workaround if any possible combination of modifiers with the key being examinated makes a dead key. Task-number: QTBUG-33591 Change-Id: I8c0b27586f7c62798986258b1b84aa90e4c5d64c (cherry picked from commit b98a031b813a83374897b23f4f7710a238f2e7b6) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Juan Luis Boya García <ntrrgc@gmail.com>
* Fix virtual key mapping on MS WindowsJuan Luis Boya García2013-11-251-25/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | In order to map MS Windows virtual keys to Qt keys without messing with dead keys now I use the built-in keyMap structure of QWindowsKeyMapper and assert every cell in the keymap is properly updated. In order to guarantee this even when the user changes the keyboard layout, WndProc now manages the WM_INPUTLANGCHANGE message, which is handled by QWindowsKeyMapper, resetting the layout structure. I don't fully understand yet some things about QWindowsKeyMapper, i.e. how QWindowsKeyMapper::updatePossibleKeyCodes workarounds the dead key issue with ToAscii; but it seems to work fine in all the tests I've done. Any further testing is highly appreciated, though. [ChangeLog][[QtGui][Platform Specific Changes][Windows] Fixed virtual key mapping on Windows. Task-number: QTBUG-33409 Task-number: QTBUG-8764 Task-number: QTBUG-10032 Change-Id: I4f7709a90906b03f4504deea1ff5c361e9f94b3f (cherry picked from commit f0d014a16b5c9b55245834459c46ea34d15d14be) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix MinGW-warnings about narrowing/invalid conversions.Friedemann Kleint2013-11-182-2/+2
| | | | | Change-Id: I9b49dd6d12a5e59c6f2674ab3c82a8a7ec583775 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* MinGW: Fix warnings about assigned but not used variables.Friedemann Kleint2013-11-183-9/+0
| | | | | Change-Id: I114483273db0f9ffe0527b4a3e4cd881375a3448 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* When reparenting a widget, children need to reregister as a drop siteAndy Shaw2013-11-151-1/+11
| | | | | | | | | | | If a widget is a drop site and an ancestor gets reparented then the widget needs to be reregistered as a drop site so that it is correctly associated with the new native parent widget. Task-number: QTBUG-30276 Change-Id: I440077e54f614d0bfbaef46104de6598411c986b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QWizard: provoke 'enum value not handled in switch' warnings in ↵Marc Mutz2013-11-151-1/+13
| | | | | | | | | | | | object_name_for_button This is strictly speaking a behavior change, since we're no longer returning something for Stretch and NoButton, but - guessing here - that shouldn't matter. Yet, better safe than sorry, thus submitted as a separate patch. Change-Id: I20cb084147f8c9257ce37d1e87ea38febabec28d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> (cherry picked from qtbase/269590516d89a35ea3121366f7d4bf43b0d391ca)
* QWizard: give all buttons an objectNameMarc Mutz2013-11-151-13/+16
| | | | | | | | | | | | | Only Commit, Finish and Cancel didn't have an object name, yet. Also Extract Method on the switch statement, add a test, and use QStringBuilder. Task-number: QTBUG-29924 Reported-by: Leo Arias Change-Id: I8c29606bc53e9d4caab631da2089e971a9da2d75 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> (cherry picked from qtbase/1ea191276ea49ce2334d21b1f4a2c66ee8889466)
* Optimize macDisplayColorSpaceMorten Johan Sørvig2013-11-145-18/+41
| | | | | | | | | | | | On 10.9, getting the display based on the rect is slow(er). Use a window -> color space cache instead of a display -> color space cache. Change-Id: If40a6d089019a54ceb724b8007adaffea89c96fb Task-number: QTBUG-34358 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Use the correct system font on OS X Mavericks.Jake Petroules2013-11-112-2/+10
| | | | | | | Task-number: QTBUG-32789 Change-Id: I7b1988d5f74e5becd2e02274fae4d2bcc8140901 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa File Dialog: Remove sandbox-ufriendly QDir::entryList() callGabriel de Dietrich2013-11-081-18/+48
| | | | | | | | | | | QDir::entryList() uses QDirIterator, which itself uses QFileSystemEngine, and whose backend uses POSIX API in a relatively liberal way. This is a backport of Qt 5's Ia872b9b1244f7b390d173a498011379b9309b3c6. Task-number: QTBUG-34012 Change-Id: I0a17359510e7623b4ee53dd86bb5bdc39785600e Reviewed-by: Morten Johan Sørvig <morten.sorvig@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>
* QPdfEngine - Remove Producer copyright noticeSamuel Gaist2013-11-041-1/+1
| | | | | | | | | | | | | | Remove the copyright notice from the PDF Producer field which could be misunderstood. Comparison to other PDF Producers shows no other company does this. Based on https://codereview.qt-project.org/#change,70182 Task-number: QTBUG-33853 Change-Id: I3a2820c1466963e7391b4a9a729c7261a3582e0b Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: John Layt <jlayt@kde.org>
* Keep web fontdata alive as long as CG uses itAllan Sandfeld Jensen2013-10-311-2/+10
| | | | | | | | | | | With OS X 10.9 font decoding appears to happen lazily, this means we have to ensure the data we provide CG is kept alive until CG dereferences it itself. Backport of 89ab2671051671ecf440ba480caf0b6b6768b1a9 Change-Id: I29d5bf9d6efac4668ea2c85fa5393ed1c1e621b5 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Revert "Return the correct system font on OS X Mavericks."Jake Petroules2013-10-301-7/+0
| | | | | | | | | This fix is broken and a working solution will replace it shortly. This reverts commit 7c4c43afb36449c9fb2d281327423df8eb916d64 Change-Id: I764e7da6e7a52916b87650483271d9aed099ed2b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Fix the assert failure in QShortcutMap::findGatis Paeglis2013-10-271-0/+3
| | | | | | | | | | | Don't send Qt::Key_unknown down the shortcut handling pipe, because unknown keys are not part of a shortcut sequence and results in an assert. Task-number: QTBUG-30871 Change-Id: Idd451fb793bd07124a96d75ed7b936f7ff584f28 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> (cherry picked from qtbase/c5a6b894e7484544c44a8a415a84e196c4b633c3)
* Fix misaligned selection region with text when centeredJonathan Liu2013-10-231-5/+14
| | | | | | | | | | | | | | If the text is centered, the x/y position in the selection QRectF may be a multiple of 0.5 which is rounded up. This rounding causes misalignment of the selection region with the text. The alignment is fixed by using qFloor on the x and y components. Task-number: QTBUG-34218 Task-number: QTBUG-34234 Change-Id: I4f2fadeb38602f62a93773c6e5faecf03b28069f Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> (cherry picked from qtbase/5d8a882c11201a29475c5ea71cfb76c9de6573f5)