summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/quiview_textinput.mm
Commit message (Collapse)AuthorAgeFilesLines
* iOS: fix crash in auto correction when using unknown font familyRichard Moe Gustavsen2014-04-161-0/+2
| | | | | | | | | | | | If QFont reports a family name that cannot be used to instanciate a UIFont, we end up trying to insert a nil object to an NSDictionary. This will raise an exception. This patch will check that we have a valid UIFont before using it. Task-number: QTBUG-38018 Change-Id: Id8a2e4afea8c915ff43a7e4680304ba19328f9c2 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* iOS: send a Qt::Key_Return when the user hits done/enterRichard Moe Gustavsen2014-03-211-2/+11
| | | | | | | | | | We need to send key events when the user hits enter, otherwise there is no way to know when the user has 'confirmed' the text he wrote. This is on par with how it's done for the Android port. Change-Id: I585d4198de24b0d251e5e0dd2956ce81b6483f82 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: return correct uiview for IM rectanglesRichard Moe Gustavsen2014-02-061-0/+12
| | | | | | | | | | | UITextView has a property for specifying which UIView the CGRects you return should be aligned with. This makes a difference for widgets when not using alien, since then the view that draws the text will usually not be the same as the view that backs the top level QWindow. Change-Id: I240d63c98544c39308cd91465ee84351e7d7d1f4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: be more specific about IM callbacks to iOSRichard Moe Gustavsen2014-02-061-11/+16
| | | | | | | | | No need to call textWillChange all the time if the text is really not changing. And report that selectionWillChange when Qt reports that it has changed. Change-Id: I7bd9f540cd9302c37888926a6152b803cc871ccb Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: return styling hints for text correction pop-upsRichard Moe Gustavsen2014-02-061-0/+18
| | | | | | | | | | By returning the font used at the cursor position, the correction pop-up will be resized to match the point size, and the text marking will get correct height. Change-Id: I362579b793794835323bb9ceb5ddb4655526f392 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: send backspace events directlyRichard Moe Gustavsen2014-02-061-5/+7
| | | | | | | | | | | | | For legacy reasons, we send IM events to the focus object directly instead of through QPA. To be consistent, and to ensure that IM and key events end up at the same object in the same order, we need to send key events directly to the focus object as well. We should consider fixing up QPA to support IM events better, but this will do for now. Change-Id: I8a18a1f7b7295e5c64a109fb98eee928fae06a0f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: send IM events instead of fake key eventsRichard Moe Gustavsen2014-02-061-12/+9
| | | | | | | | | | | | | | | Sending faked key events is not such a good idea, since: 1. We don't get key events on iOS, but text events 2. We cannot determine correct key code or modifiers, nor do we want to fake modifer press/release etc. 3. Android uses IM for all text input So it seems that the correct solution is to avoid sending key events in the first place. This will also bring the iOS port on par with the Android port. Change-Id: Ibac1d335184e62eb4185cfd4218a0ec73dffb2c4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: add spell checking supportRichard Moe Gustavsen2014-02-061-0/+2
| | | | | | | | | We don't have a separate enum just for spell checking in Qt, but Qt::ImhNoPredicitiveText should cover it. So use it to enable/disable both spell checking and auto completion. Change-Id: I7ad661cb7d720988f13bc1ed940573006c0ce229 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: implement support for input methodsRichard Moe Gustavsen2014-02-061-0/+382
| | | | | | | | This change will add support for input methods, word completion, spell checking and related functionality. Change-Id: I41d4de1cab521c679d414cfc7c1a2d0f9c1fcaaf Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: move key/text input into separate categoryRichard Moe Gustavsen2014-02-061-0/+139
Change-Id: I62c588226b307d51f7f88b1cc0c1e00c0d0f14c6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>