Commit Graph

24102 Commits

Author SHA1 Message Date
Joerg Bornemann
d4ebbac1b3 fix parsing of WinRT compiler options
Set defaults before parsing compiler options.
UsePrecompiledHeader, CompileAsWinRT and GenerateWindowsMetadata
options were overwritten after parsing the options.

Task-number: QTBUG-46978
Change-Id: I8c4e423cd13f575fa679b114108b693937908549
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-09-18 09:28:36 +00:00
Joni Poikelin
e3fa2cb660 Fix regression with QStandardPaths::standardLocations on Windows
Commit f3bc9f5c5c broke standardLocations
by replacing them with same paths as writeable locations would return.

Task-number: QTBUG-46279
Change-Id: I43150e3af13320a707c7882dd0f0cdcb2c6e8a70
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2015-09-17 12:43:58 +00:00
Oswald Buddenhagen
07d4113f8f buildsystem changelog for 5.5.1
Change-Id: I310f9eff657e9730830cd5c302bdfc46fe67febc
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-16 04:26:21 +00:00
Samuel Gaist
0de6c52bfe Fix QMYSQL plugin database connection setup check
Opening a connection to an e.g. inactive server will return true
regardless of the server accessibility.
This patch aims to fix the current checks done.

The first one is an allocation check which should only fail if there's
not enough memory but is currently wrote as if the connection failed
there.

The second check that is "failing" is the connection setup. The return
value should either be NULL or the same value provided as first
parameter. That is now verified.

[ChangeLog][QtSql][QSqlDatabase] Fixed a bug where opening a
connection to a MySQL database using the QMYSQL plugin would always
return true even if the server was unreachable. This bug could
also lead to crashes depending on the platform used.

Task-number: QTBUG-47784
Task-number: QTBUG-47452
Change-Id: I91651684b5a342eaa7305473e26d8371b35396c4
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2015-09-15 04:38:22 +00:00
Liang Qi
020ddba56e Revert "Cocoa: correct QDesktopWidget::availableGeometry()"
Wrong calculation of flip.

This reverts commit 1a5cc2a868.

Task-number: QTBUG-47030
Change-Id: Ide178eb5e027c4ecec1e3952c973fb64987eb7ce
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
2015-09-15 04:38:11 +00:00
Tuomas Heimonen
9f452719f3 tst_QUndoGroup, tst_QUndoStack Fixed flag QT_NO_PROCESS
Change-Id: I6c36475e343de72c954fcc917132977eb1f8d61a
Reviewed-by: Tuomas Heimonen <tuomas.heimonen@theqtcompany.com>
Reviewed-by: Marko Kangas <marko.kangas@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-09-14 06:26:39 +00:00
Émeric MASCHINO
deb6b5032c Fixed compilation errors in qatomic_ia64.h
QBasicAtomicOps<size>::testAndSetRelaxed(T &, T, T) and
QBasicAtomicOps<size>::testAndSetOrdered(T &, T, T) bodies don't match
any prototypes in qatomic_ia64.h: the optional parameter T *currentValue
is missing.

Task-number: QTBUG-48197
Change-Id: I0112c429b161b4a0ddb6e8a0400a436282ffb1c7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-12 16:09:27 +00:00
Oswald Buddenhagen
8ed2fcd366 Merge 5.5 into 5.5.1
Change-Id: I3a78e7228aa21b7c83cf7f07dc6e1c8ad0d0ebff
2015-09-11 22:22:47 +02:00
Thiago Macieira
6918c0a15b Add Qt 5.5.1 changelog with updated 5.7 future direction notice
We should carry this in all 5.5.x and 5.6.x releases, to make sure
everyone gets the message. But for this release, we need to note the
changes from what was announced for 5.5.0:

Clang 3.2 cannot compile std::atomic properly, so it will not be
supported. That means the minimum XCode version we'll require will be
5.1, which fortunately does not raise the minimum OS X version that can
compile Qt. See http://llvm.org/bugs/show_bug.cgi?id=12670 for more
information.

ICC 14.x and 15.x on Windows miscompiles pointer-to-members across DLL
boundaries, so signal-slot connections fail. See QTBUG-40281.

Change-Id: I42e7ef1a481840699a8dffff1400a4377fcf4589
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-09-11 11:29:42 +00:00
Gabriel de Dietrich
c12b5e0727 QCocoaMenu: Manually reposition popups
If the popup will show too close to the screen bottom,
we need to help Cocoa a bit. The horizontal positioning
hasn't shown any problems.

Change-Id: I5f298529fbf4a902e39f686f368046a8d1c11760
Task-number: QTBUG-45063
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-09-11 10:39:12 +00:00
Laszlo Agocs
3f531512e8 Force GLES 2.0 on Android 4.2 devices reporting 3.0
Android does not support GLES 3.0 before 4.3 (API level 18). However some
4.2.2 devices are reported to return 3.0 in the version string and therefore
choose the GLES 3+ code paths in Qt. This blows up sooner or later because
the 3.0 specific functions are apparently not present at all.

Task-number: QTBUG-46831
Change-Id: Ic3eeb7c55829cf36c6d142c01ff8a1e18e9ecc1a
Reviewed-by: Kati Kankaanpaa <kati.kankaanpaa@theqtcompany.com>
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-09-10 14:31:43 +00:00
Alex Trotsenko
c86ca601ed Windows socket engine: do not discard datagram on critical failure
On some network conditions, WSARecvFrom() may return WSAECONNRESET
or WSAENETRESET error code to indicate that the connection has been
broken and should be reset. According to MSDN documentation,
WSAECONNRESET mean that the virtual circuit was reset by the remote
side executing a hard or abortive close. Also, it would indicate
that a previous send operation resulted in an ICMP "Port Unreachable"
message. For a datagram socket, WSAENETRESET indicates that the time
to live has expired.

Previously, hasPendingDatagram() discarded datagrams with these
errors and reported no data available. This behavior is incorrect
and can lead to infinite "freezing" of the socket.

This patch allows to handle these notifications as a result of the
readDatagram() call.

Task-number: QTBUG-46552
Change-Id: I7d84babe22d36736b928b4dd4841e30be53d16bd
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-10 12:51:06 +00:00
Alex Trotsenko
a6ec869211 Fix the spurious socket notifications under Windows
To handle network events, QEventDispatcherWin32 uses I/O model
based on notifications through the window message queue. Having
successfully posted notification of a particular event to an
application window, no further messages for that network event
will be posted to the application window until the application
makes the function call that implicitly re-enables notification
of that network event. With these semantics, an application need
not read all available data in response to an FD_READ message:
a single recv in response to each FD_READ message is appropriate.
If an application issues multiple recv calls in response to a
single FD_READ, it can receive multiple FD_READ messages
(including spurious).

To solve this issue, this patch always disables the notifier
after getting a notification, and re-enables it only when the
message queue is empty.

Task-number: QTBUG-46552
Change-Id: I05df67032911cd1f5927fa7912f7864bfbf8711e
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-10 12:51:02 +00:00
Alex Trotsenko
378e26dd14 QUdpSocket: avoid infinite read notifier blocking
There was a small amount of time between the last readDatagram() call
and disabling a read notifier in case the socket had a pending
datagram. If a new datagram arrived in this period, this qualified as
absence of a datagram reader. Do not change the read notifier state
because it is disabled on canReadNotification() entry and always enabled
by the datagram reader.

Thanks to Peter Seiderer, who investigated the same: "Querying
hasPendingDatagrams() for enabling/disabling setReadNotificationEnabled()
is racy (a new datagram could arrive after readDatagam() is called and
before hasPendingDatagrams() is checked). But for unbuffered sockets the
ReadNotification is already disabled before the readReady signal is
emitted and should be re-enabled when calling read() or readDatagram()
from the user."

However, this patch does not completely solve the problem under Windows,
as the socket notifier may emit spurious notifications.

Task-number: QTBUG-46552
Change-Id: If7295d53ae2c788c39e86303502f38135c4d6180
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-10 12:50:58 +00:00
Richard Moe Gustavsen
d75505facc iOS: silence compiler warning about unimplemented 'selectionRectsForRange'
Implement a dummy method to silence the compiler.
After testing, this method seems to never be called. Which is
good, since the current IM API in Qt have little to offer to resolve
what is being asked. Until a need arise, we just return
an empty array.

Change-Id: I573eb8205a7e635a46d487ae175fb46e3a602001
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-09-10 12:21:20 +00:00
Pasi Petäjäjärvi
4b2db07b42 Fix tst_QGuiApplication for embedded platforms using eglfs QPA
Disable input and cursor for QGuiApplication instances used in
autotest to initialize it properly.

Change-Id: I78dc9b776269c082c20f244a51f858289129275d
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-09-10 06:29:11 +00:00
Tuomas Heimonen
c258422cf9 tst_QProcess_and_GuiEventLoop: Added flag QT_NO_PROCESS
Change-Id: I895b9c12de8734c20ec87ac30a9a9cca8f4242d7
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-09 07:15:15 +00:00
Lorn Potter
1b29ef627c Fix hang in qnam when disconnecting
Generate error for network requests when connection gets disconnected.
Documentation states that QNAM requests will fail if network is not
accessible, so we need to track session state.

Task-number: QTBUG-47482
Change-Id: I2c2d348637f72b2a908b438a66aa543a878de1e5
Reviewed-by: Timo Jyrinki <timo.jyrinki@canonical.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-09-07 21:45:50 +00:00
Jonathan Meier
d05bb9ffb0 Fix qmake messing up headers of generated Visual Studio solution files
While generating Visual Studio 2015 solution files for a project using
the subdirs template qmake writes out both the header for version 2015
and version 2013. The problem is a case fall-through.

Task-number: QTBUG-48110
Change-Id: Ib6ddc1ceb306be9b3098d7b7c66a8ffabbd86481
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-07 08:56:34 +00:00
Frederik Gladhorn
0552331d0e Do not install headers for private classes
When merging the accessibility plugin into the widgets library, the
headers were just moved. They should have gotten the _p at that time.

Task-number: QTBUG-47569
Change-Id: I0a2290dae3a8187596e9d7541ccf69beeb603296
Reviewed-by: Dimitar Dobrev
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-07 08:36:08 +00:00
Leena Miettinen
0e895c47b0 Doc: Update links to Qt Creator Manual
We're now at 3.5 level:

- Fixed changed filenames and topic titles
- Removed links to obsolete pages
- Added links to new pages

Task-number: QTBUG-47901
Change-Id: I3393555c86bf3cf58770f230e7a9c7fd7e258476
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-09-07 07:33:07 +00:00
Liang Qi
1a5cc2a868 Cocoa: correct QDesktopWidget::availableGeometry()
Since 10.9, System Preferences->Mission Control->Displays have separate
Spaces settings needs to be followed.

Task-number: QTBUG-47030
Change-Id: I1c1cf326246bd5609090ce5ac3212d963d562593
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
2015-09-07 06:14:02 +00:00
Kari Pihkala
6413ceeccf Fix default hotspot of a hidpi QCursor
The hotspot is defined in device independent coordinates, so
the default coordinates need to be divided by device pixel ratio.

Also, modify the scaling of cursor's pixmap to use SmoothTransformation to
generate cleaner looking lodpi cursors from hidpi cursors.

Change-Id: Ia938fd1e476e19e796f30712e23b06a5efed9964
Task-number: QTBUG-34116
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
2015-09-06 23:19:03 +00:00
BogDan Vatra
cb12da0387 Android: Don't use predictive text when selecting file names
Using predictive text will not refresh the selected files until a 
word is completed or the keyboard is hidden.

Task-number: QTBUG-44337
Change-Id: I9e9f1e760fe5d5a69abd6e112af55b217ae6a16d
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2015-09-06 05:26:42 +00:00
David Faure
750509c3d1 Fix compilation with QNETWORKACCESSHTTPBACKEND_DEBUG enabled
Change-Id: I868e8ecdff6a503ee891a257121bf14a7da77fec
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-09-04 20:00:27 +00:00
David Faure
5e41f4137d QMimeDatabase: warn instead of asserting on bad magic.
An invalid mime magic definition could lead to an assert. Replaced with
a qWarning. Move all checking to the QMimeMagicRule constructor, and do
keep invalid rules since they are need to parse child rules.

Unit test added, with QTest::ignoreMessage when using the XML backend
(there's no warning from update-mime-database when using the cache).
Also make it easier to add more shared mime info files for tests.

Task-number: QTBUG-44319
Done-with: Eike Ziller <eike.ziller@theqtcompany.com>
Change-Id: Ie39a160a106b650cdcee88778fa7eff9e932a988
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-04 20:00:22 +00:00
David Faure
880a8aa7e9 QMimeType: add KDAB copyright to the code I contributed a lot to.
Change-Id: I794259f28c7adbaad3cfb40f92a0ad2dc512e5b4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-04 20:00:18 +00:00
David Edmundson
1a0384cb15 Support device pixel ratio in QWidget graphic effects
Change-Id: Ie20bd30328ae353ace82fbeee5808546f0568703
Reviewed-by: Christoph Cullmann <cullmann@kde.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-09-04 12:40:41 +00:00
Richard Moe Gustavsen
feff56827b iOS: filter responder actions from menu sync
Follow up from b494d85. We need to filter the responder
actions after a sync as well, otherwise they will be
added back if a menu item e.g changes text.

Change-Id: I2ecbcc292400ada97a8e29d4b97f087349d8a061
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-09-04 11:35:29 +00:00
Richard Moe Gustavsen
d4799d0238 iOS: compose key events from QKeySequences
Instead of hard-coding the key and modifier that should trigger a
shortcut, we read it out from the QKeySequence that corresponds to
a StandardKey instead.

Change-Id: I6325534d3ff91c788d7e660d9009954e437b8534
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-09-04 11:35:20 +00:00
Nico Vertriest
69e1b1de93 Doc: System Tray Icon example
Moved from qtsvg to qtbase

Task-number: QTBUG-47201
Change-Id: Iab185ea2e270893c0937d1ff87fdb544d226d603
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-09-04 11:01:48 +00:00
David Faure
ee8c09f7c2 qprintdialog_unix: small optimization, no need to extract a substring
Change-Id: Ie5fdfd6aa3866c14b6fbfabf4533327f5c73c5a3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-09-04 09:43:35 +00:00
Louai Al-Khanji
5919edc523 forkfd: fix _POSIX_SPAWN feature check
Change-Id: Ia44edbac3a1bd2da92ee8c92956abfe49d8763b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-04 08:59:35 +00:00
Nico Vertriest
9588e1bba3 Doc: Corrected link issues in qtbase
Task-number: QTBUG-43810
Change-Id: I0a019becc53b222cb6a7df1fafdccd57aca5b598
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-09-04 08:41:18 +00:00
Nico Vertriest
dfb55da5d6 Doc: Added enums in qnamespace.qdoc
Task-number: QTBUG-43810
Change-Id: Ib756382833fabecaae2526a413d046646f3e443e
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-09-04 07:51:00 +00:00
Nico Vertriest
97de58db67 Doc: Added link to Declarative State Machine Framework
Added link in C++ documentation

Task-number: QTBUG-46285
Change-Id: I0f330829f7df713d4f5292b2a300c5c9d3732bda
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2015-09-04 07:50:47 +00:00
Andy Shaw
fbd0e4489c Copy the state to the picture paintengine when updating the state
When the state of the paint changes then the one used for the picture
paintengine needs to be kept in sync. Otherwise the rendering will be
incorrect.

Task-number: QTBUG-43145
Change-Id: Ia55a4e940d109bedb7c2eff4d985d3b212da75a4
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-09-03 13:00:15 +00:00
Oliver Wolff
1840cc982a WinRT: Unregister callbacks when socket engine is destroyed
Change-Id: I66e8fff2556ce23a66db1148bdb68e9a448227b2
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-09-03 12:13:45 +00:00
Oliver Wolff
d8130786b6 WinRT: Do not try to read from TCP inputstream in case of UDP
Change-Id: I2cdf0f4c7642c420ccec0a3f6e05a1c5bc7da020
Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-09-03 12:13:43 +00:00
Oliver Wolff
055cbaafd6 Fixed connectToHost
connectToHost is not meant to be synchronous, but waitForWrite
is used internally to wait for the connection to be established.
Thus the same logic that is used in the callback has to be applied
in there.

Task-number: QTBUG-46339
Change-Id: Ia1fb5c1ae609a9942ff4d8fe2f5fab2ef572da0c
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-09-03 12:13:41 +00:00
Morten Johan Sørvig
111ee58c06 Prevent QGestureManager crash.
Use QPointer to prevent dereferencing stale pointers
stored in m_gestureTargets.

Add null pointer tests in addition to the Q_ASSERTs
on the pointers returned by m_gestureTargets.value().
The intention is to assert in debug mode but keep
going in release mode.

Change-Id: Icdef8cc02040bddc88f4bcb268e9ca0ac252557d
Task-number: QTBUG-46264
Reviewed-by: Pawel Kurdybacha <pawel.kurdybacha@gmail.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-09-02 07:28:18 +00:00
Alexander Soplyakov
6f9e845d9b Make tooltips transparent for mouse events.
This behavior is important because controls (widgets) 
under tooltips don't receive mouse events and don't 
update their state if it is really needed.

[ChangeLog][QtWidgets][Important behavior changes] 
Tooltips on OS X are now transparent for mouse events.

Change-Id: I06403db7b66c87fe53debb033f8a74aa1c93e26a
Task-number: QTBUG-46379
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-09-02 07:20:34 +00:00
Shawn Rutledge
b39c9011db QDBusPlatformMenu and Item: remove stored pointers when deleted
Prevents memory leak and later access of dangling pointers.

Change-Id: I6a1da1ec191ad5fa880c5884c37fd5582215e825
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-09-02 06:34:57 +00:00
Richard Moe Gustavsen
21e1354d42 iOS: handle all directions when calculating positionFromPosition
The method is currently a bit buggy, since it does not take
UITextLayoutDirectionUp and UITextLayoutDirectionDown into account.

This patch is mostly for fixing something "just in case", since
we so far have not seen UIKit calling this method for those
directions unless a hardware keyboard is connected. And in
that case, we anyway override IM navigation by dealing
with the arrow keys explicit.

Since IM in Qt does not support getting the position above
or below the current position, we just return the current
position, making it a no-op.

Change-Id: I4bcb9e2a00ab4e3d785058d7ff7f4855142dabbc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-09-01 08:58:41 +00:00
Kai Koehne
97b525e3be Doc: Improve documentation for QAuthenticator
Make it explicit what 'isNull()' is really about. and
mention which data type is in the QVariant stored in
the options.

Fix the links to the Options section in the summary:
So far they where pointing to the options() method.

Fix capitalization and trailing dots.

Change-Id: I030c0a273e784b28d642ae40b28e36b0d406c920
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-09-01 08:53:27 +00:00
Richard Moe Gustavsen
b494d859a7 iOS: filter first responder actions from edit menu
UIResponderStandardEditActions found in first responder will be prepended to
the edit menu automatically (or e.g made available as buttons on the virtual
keyboard). So we filter them out to avoid duplicates, and let first responder
handle the actions instead. In case of QIOSTextResponder, edit actions will be
converted to key events that ends up triggering the shortcuts of the filtered
menu items.

Change-Id: I046c6cc5b358d8a6f7623e10579e2dcd92f75139
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-09-01 08:49:41 +00:00
Richard Moe Gustavsen
163158bf4f iOS: store shortcut sequence in menu item
Change-Id: I4c99516fb98ce0da84b8690cc4c1fd71c0db9dca
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-09-01 08:49:37 +00:00
Richard Moe Gustavsen
af5b62844c iOS: add undo/redo support
Enable the undo/redo buttons on the keyboard, as well as the
Cmd-Z/Cmd-Shift-Z shortcuts.

For UIKit to support this, we need to add undo actions to
first responders undo manager. Since we don't know if Qt
has anything to undo/redo, we just enable the shortcuts
all the time. To do that, we trick NSUndoManager to always
have both an undo operation and a redo operation in the
stack.

Change-Id: I3294a962cc24f56585e7e515856142f3dda56d0a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-09-01 08:49:26 +00:00
Richard Moe Gustavsen
dbb24ce477 iOS: listen for standard text edit shortcuts
Catch the missing shortcuts sent by UIKit, and forward
them to Qt as key events so that the app can respond to them.

Change-Id: If63c4b05466e64843982fce32fbd594d2a0ef312
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-09-01 08:49:22 +00:00
Richard Moe Gustavsen
82538aebe4 iOS: send arrow keys to Qt to handle cursor movement
Controlling cursor position through input methods in Qt is very
limited. You cannot e.g move the cursor vertically, or select text
that spans several paragraphs. The reason for the latter is that Qt
works with input methods on a per-paragraph basis, which effectively locks
UIKit to only being able to move the cursor and select text within a single
paragraph.

Fixing up input methods to support more advanced navigation means changing the
whole design (working on a whole document, instead of per paragraph), and is
out of scope.

Instead we choose to listen for arrow keys and forward them to Qt in the
same fashing as we already do for backspace and enter. This will make the
iOS port on-par with the other platforms, which also sends control characters
like these on the side of IM events.

Note that registering shortcuts and overriding default IM navigation behavior
will only take effect when a hardware keyboard is connected. Only then will
[UIresponder keyCommands] be called from UIKit.

Change-Id: I634205e0578447c4aa6e9fdff342ee3b281901ea
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-09-01 08:49:19 +00:00