summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'release' into stableSergio Ahumada2013-08-151-2/+1
|\ | | | | | | | | | | | | Conflicts: src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp Change-Id: I1a92b0c0dc1f7bad947a54fdd3ea7cfd6a5a7694
| * Avoid a potential crash in unignoredChildrenJan Arve Saether2013-08-091-2/+1
| | | | | | | | | | | | | | | | | | | | This doesn't actually fix the source of the problem, but its harmless. This was reproduced with tst_qcolumnview and voiceover enabled Task-number: QTBUG-32440 Change-Id: Iad27884e1ca9194f911271c16908ef358e4b1875 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Cocoa: bugfix mouse wheel + modifier keys not workingRichard Moe Gustavsen2013-08-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | To avoid using modifier keys when releasing a two-finger mouse wheel flick on a trackpad, we listen to event phases. But for a normal mouse, a separate phase NSEventPhaseNone is given. Ensure that we still send modifier keys when that state is reported. Task-number: QTBUG-32098 Change-Id: Ib840dd661b7842ae49127e5a8d42e3666ae2da4e Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Cocoa: Set window title after setting window flags if window has borderDaiwei Li2013-08-151-0/+3
| | | | | | | | | | | | | | | | | | | | A QWindow should keep its title after removing and restoring the frame, so set it if we are setting window flags that include a frame. Task-number: QTBUG-32978 Change-Id: I0fe1b651eac05a210b06ec4f7f6fb78f2536834d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Fix QKeyEvent::isAutoRepeat on MacGatis Paeglis2013-08-141-1/+1
| | | | | | | | | | | | Task-number: QTBUG-21500 Change-Id: Ifed85ddcdecd30453207728b0f376baa2abf6e66 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Cocoa: Allow to hide menu items in menubarGabriel de Dietrich2013-08-133-8/+15
| | | | | | | | | | | | | | Task-number: QTBUG-32899 Change-Id: I423ac2d636306303d39e973f19032c9004957095 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Merge branch 'release' into stableSergio Ahumada2013-08-091-4/+1
|\| | | | | | | Change-Id: I5e94c4f01564df633c9925561ebb0b553bd31a2e
| * Don't release the printer after using it to change a propertyAndy Shaw2013-08-081-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | The printer should not be released after changing a property on it as it is still needed by QPrinter elsewhere. It is released as appropriate automatically already. Task-number: QTBUG-32831 Change-Id: Idb2d98b25b62f343015a0a0fb3c9a0d506546132 Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | [Mac] Fix modifier reporting issue in the key eventsGatis Paeglis2013-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | This issue was introduced when porting key handling code from Qt4 to Qt5. To conform to the implementation of QKeyEvent::modifiers() we have to invert modifier state logic before sending them as QKeyEvents. Task-number: QTBUG-31332 Change-Id: I3bb41169f8ab2a4b0a13a224bb461d2792d3a65f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* | OSX: do not force a plain window to be on the same level as its parentShawn Rutledge2013-08-021-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | 2af0a778f464980594c36098e4a8ba4448edfd29 the fix for QTBUG-27410 caused this Designer bug. Doing the automatic level escalation only for "special" windows and avoiding it for plain Qt::Window type windows is one way of fixing the Designer problem. Task-number: QTBUG-31779 Change-Id: I1da5454f31111f36480fac3b53be6d5f0ce40047 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Cocoa: Make sure that resizeEvent is invoked after calling resizeNils Jeisecke2013-07-301-2/+5
|/ | | | | | | | | | | | | | | The QWindow::resizeEvent documentation states that resizeEvent is invoked after the windowing system has acknowledged a setGeometry() or resize() request. The Cocoa plugin however did set the platform window geometry immediately so that the qnsview's updateGeometry returned too early. Task-number: QTBUG-32706 Change-Id: I1f359ab368833d174ab6740f4467b0848c290f13 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* OSX: Disable window restoration for the Mac font panelLiang Qi2013-07-171-0/+5
| | | | | | | | | | | because if it is automatically restored it's out of the application's control, so the user's interaction will be ignored. Change I8ce3cd94f5ae81d7877a346743ca4e0e188baa02 did this for normal windows by default, but the dialog helpers generate windows which aren't affected by that. Change-Id: I819d7ab4e51e90783d55cee0676dbc33b38c5b00 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Remove qWarning() in qt_mac_image_to_cgimage()Ivan Komissarov2013-07-031-4/+1
| | | | | | | Change-Id: I839aa44735910012bf57daa9c8b55c5e6def3cd2 Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* Cocoa: fix shared color panel usageJ-P Nurmi2013-07-032-122/+144
| | | | | | Task-number: QTBUG-31819 Change-Id: I60162f4c4af8aaae02ba7be11b2793ad29c5e2b5 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Avoid warnings when fetching file icons without a CGContextRefGabriel de Dietrich2013-07-021-1/+2
| | | | | | | | | | | | This can happen when instantiating a QFileIconProvider and no suitable graphics context is available (e.g., when only using a QQuickView). The proper, longer (5.2) term solution would be to have the platform theme return a QIcon with a NSImage icon provider. Task-number: QTBUG-31908 Change-Id: Ibfdb51e0a7dd2c33761a463f4eb6619f0aca19f0 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Cocoa: Re-establish platform menu QObject hierarchyGabriel de Dietrich2013-07-021-0/+2
| | | | | | | | This amends commit 119882714f87ffeb6945fdb2d02997ae125ff50c. Change-Id: Ifb105596af5b00b04344cb665b3e68292c9187ae Reviewed-by: Romain Perier <romain.perier@gmail.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Cocoa: Let Cocoa pick the right pixmap for menu item iconsGabriel de Dietrich2013-07-013-1/+21
| | | | | | | | | Task-number: QTBUG-31477 Change-Id: Iac2d13b68d36c691b60685b69cd390958c35fae3 Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Cocoa: Simplify qt_mac_cgimage_to_nsimage codeGabriel de Dietrich2013-07-011-10/+1
| | | | | | | | Since 10.6, NSImage has a sensible contructor for that. Change-Id: Ie753135ebb37630c1a70c395689bf85d4a4a01de Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-281-1/+5
|\ | | | | | | Change-Id: I53112e20a65b7d706755b4a22622979f3b91a2c2
| * Mac OSX: get the correct key code when the control key is pressedShawn Rutledge2013-06-261-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The control key results in modifiers having Qt::MetaModifier, and then the correct character is found in charactersIgnoringModifiers. The rest of the time, [nsevent characters] seems to be correct. If we use charactersIgnoringModifiers too much of the time, then the keycode will be wrong in some cases even though typing is still possible. Task-number: QTBUG-29005 Task-number: QTBUG-31811 Task-number: QTBUG-31977 Change-Id: Ib23b89f03bc9a61fe6d177320fa603c05649e979 Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Cocoa: Don't update the menubar when popups are shownGabriel de Dietrich2013-06-271-0/+5
| | | | | | | | | | | | | | | | Task-number: QTBUG-31532 Change-Id: I86084cb96bd1dd253b3e2e4413c06de053b95b3b Reviewed-by: Romain Perier <romain.perier@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Mac/XCB/Windows: Fix initial setting of window icons.Friedemann Kleint2013-06-261-0/+2
| | | | | | | | | | | | | | | | | | | | Setting an icon on a QWindow before creating the platform window did not have any effect. Task-number: QTBUG-31961 Change-Id: I8e58a3b239c8bc69af58f765e7826337463d2201 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-06-251-6/+10
|\ \ | | | | | | | | | refs/staging/stable
| * | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-201-6/+10
| |\| | | | | | | | | | Change-Id: I94bb158562ae6b80a87b40139d7302ea7b9b9aa8
| | * OSX: Disable window restoration for the Mac color panelShawn Rutledge2013-06-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | because if it is automatically restored it's out of the application's control, so the user's interaction will be ignored. Change I8ce3cd94f5ae81d7877a346743ca4e0e188baa02 did this for normal windows by default, but the dialog helpers generate windows which aren't affected by that. Task-number: QTBUG-31750 Change-Id: I636bd87b664a489a2dc8693dad5370a715b1cf7b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| | * Cocoa color dialog cannot be modal, but should show anywayShawn Rutledge2013-06-151-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Silently failing doesn't seem the right way to handle this. Updated docs for DontUseNativeDialog option: it's not just for the Mac anymore. Ensure that the Qt dialog and Mac panel will never be shown at the same time. Change-Id: Ia9e80754df6c7622d9039c8dd050ac4de771a030 Task-number: QTBUG-29161 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| | * OSX color dialog can be accepted repeatedlyShawn Rutledge2013-06-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | QNSColorPanelDelegate::finishOffWithCode sets mResultSet = true and it needs to be set false again the next time the dialog is shown. Task-number: QTBUG-31566 Change-Id: If1d4bb9d4e76273c6423f5bf2ae37790e8a9704e Reviewed-by: Liang Qi <liang.qi@digia.com>
* | | Mac Accessibility: unify child functionsFrederik Gladhorn2013-06-244-37/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Both ways of getting the children are the same for nsview and qcocoaaccessibleelement. Factor out a function. Change-Id: I4be091c6acde0de519a358f879c24eae04ec4c8d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | | Fix typo QCocoaAccessibilityFrederik Gladhorn2013-06-233-10/+10
| | | | | | | | | | | | | | | Change-Id: Ib3fe4e30097af9c5c577757594196710c0998184 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | | Remove NSPICTPboardType from pasteboard types.Morten Johan Sørvig2013-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | NSPICTPboardType is deprecated. Mac OS will translate pasted images of that type to a different image format. Change-Id: Id7a68509615816a852abf1c11a70f0f0c862f0f2 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Mac Accessibility: skip invisible childrenFrederik Gladhorn2013-06-212-0/+6
|/ / | | | | | | | | Change-Id: I6c3da526ecef60447a658b6b5501282729e9c6f5 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Cocoa save file dialog behavior fixSamuel Gaist2013-06-161-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | Currently, in save mode, if selectFile has not been called, the native cocoa file dialog puts the folder name in the line edit. This patch restores the old behavior where the line edit is presented empty to the user. Task-number: QTBUG-31619 Change-Id: I938eb6d968e0e2c343e70bc19f29663e112d0496 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* | Fix for OS X QFileDialog showing bundle as directorySamuel Gaist2013-06-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Also check if the selectedFile is a bundle to correctly set currentDir. Patch for Qt 4.8 has been submitted Task-number: QTBUG-31562 Change-Id: I72b0e8484b3c3a610932c03cd7fdab4ddee70277 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-127-14/+51
|\| | | | | | | Change-Id: If29ca1b27da4592d40a7678837c359f75dac1209
| * Cocoa: Make QWidget::showNormal() work on minimized windowsGabriel de Dietrich2013-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Cocoa sets the NSWindow hidden when it's minimized, and we don't propagate that further to QWindow or QWidget (QWidget's 'visible' documentation is quite ambiguous about that state). The obvious fix is to check for QWindow's visibility. However, this might need to be corrected later if we truly want the visible state to be in sync. Task-number: QTBUG-31117 Change-Id: I457452eff75e6ea746a0ef5351104f8bbb65f98b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| * Cocoa: Make sure internal minimized state is up to dateGabriel de Dietrich2013-06-122-14/+17
| | | | | | | | | | | | | | | | Refactors some code from previous changes addressing the same issue for maximized and fullscreen states. Change-Id: I8a27274a90e6610b424ea7af3269369a1d724c48 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| * Cocoa: Update window state when maximizing from the title barGabriel de Dietrich2013-06-124-0/+20
| | | | | | | | | | | | | | | | There's no NSWindow notification we can listen to, but we can override behavior from its delegate. Change-Id: I61cebf4119f83c770fe4e7f45ff0d4e8bf9d0df9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| * Cocoa: Make sure we update internal window fullscreen stateGabriel de Dietrich2013-06-123-4/+17
| | | | | | | | | | | | | | | | | | | | | | We update the internal/synched state by assigning it its QWindow's state. Since that one is not a flag, it can only be in one state at a time, meaning that we may lose the maximized state (but we've been losing it for some time). Task-number: QTBUG-30139 Change-Id: Idf30713c6ae912cafe3bbdd7be18214cf4de34f7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| * Cocoa: Remove compilation warningGabriel de Dietrich2013-06-121-0/+1
| | | | | | | | | | Change-Id: Ib530e7ef4643de07aec91c4af0de8bbedef9882a Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| * Fix issue when QKeyEvent::text() was returning empty stringGatis Paeglis2013-06-101-5/+5
| | | | | | | | | | | | | | | | | | | | | | The code that sets 'text' variable was executed only for KeyPress events. This patch moves 'text' initialization higher up where it will be run for both - KeyPress and KeyRelease events. Task-number: QTBUG-31285 Change-Id: I140de9ef5d29beedad276d348bed964ecdf46f9d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | Fix leak in QCocoaDrag.Ivan Komissarov2013-06-111-1/+3
| | | | | | | | | | Change-Id: I2961d08f95c68446a2893721dc79ba56bf98c0de Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-104-22/+66
|\| | | | | | | Change-Id: I89c251999ae2a82522b40471fd13f2e06b00ece8
| * Cocoa:Fixed crash when sharing QMenu between two QMenuBar instancesRomain Perier2013-06-074-22/+66
| | | | | | | | | | | | | | | | | | | | | | Don't insert a NSMenuItem into a NSMenu if this one already belongs to another NSMenu, this is forbidden in the Cocoa framework and raises an Exception. The solution consists in tagging the menu as sharable and moving it from one menubar to another when the window gets focus. Task-number: QTBUG-31342 Change-Id: Ic3bfadd4704f363ac26122ae15547543a0f6d44d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Cocoa Accessibility: fix ignoring of objectsFrederik Gladhorn2013-06-072-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Mac it's expected that some elements are filtered out of the a11y hierarchy. We do this with the shouldBeIgnored function. The problem is that we would ignore some objects and then return them in the child attribute function. This is inconsistent and leads to voice over not working. For example having a plain QWidget with other widgets as children would cut off all of these widgets, since the plain QWidget would be ignored. Change-Id: I5f6c26b272e5ca57d59c1ed1ef47e9a2b1181295 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Fix themeHint typo in qcocoatheme: PasswordMaskDelay should be ↵Daiwei Li2013-06-061-1/+1
| | | | | | | | | | | | | | | | | | PasswordMaskCharacter Task-number: QTBUG-31498 Change-Id: Ie6b1b0a2238923e37d52fa2e90782e874bb224b4 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-06-037-33/+24
|\| | | | | | | refs/staging/stable
| * Use [NSEvent characters] to retrieve the input character.Gatis Paeglis2013-05-301-14/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is how it was done in Qt 4. An issue with the current approach was that it did not consider modifiers when setting a Qt::Key_* value, which would assign the same Qt keycode for: a = a(65) Alt + a = ā(65) [here it should return a unicode value for 'ā'] This is inconsistent with the other platform plugins. Also in the combination with a dead keys it was returning nothing in the output. Task-number: QTBUG-29005 (cherry picked from commit 6730413fcac1d7eb39af3683b87f965c5823cb6c) Change-Id: Ic28eb55b3a9798ecb6012cc2e3fb18589b8b0392 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * Move QBasicDrag and QSimpleDrag to QtGui.Samuel Rødal2013-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | These are useful as default implementations of QPlatformIntegration::drag(), instead of having it return 0 which will lead to crashes in Qt Quick 2 and widgets applications that use drag and drop. Task-number: QTBUG-31288 Change-Id: I70efa139306ced5d879def0f74e3a72d3bcd64f7 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * QMenu: Remove last references to QMacWindowFaderGabriel de Dietrich2013-05-302-15/+3
| | | | | | | | | | | | | | | | | | It was never ported to Qt 5, and 10.7 has simple API for that. Task-number: QTBUG-31336 Change-Id: Ie00c4ed3af9cd098c9e63eba1c654f1801aa83aa Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * Cocoa: Allow delayed title setting in menu itemsGabriel de Dietrich2013-05-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | This is what happens in uic generated code. Therefore, we should not mark an item as text-synced until it's got its text set. Task-number: QTBUG-31378 Change-Id: I7bb7db8abad922b50546c7669d285369ebf01394 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>