Added link in C++ documentation
Task-number: QTBUG-46285
Change-Id: I0f330829f7df713d4f5292b2a300c5c9d3732bda
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
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>
Change-Id: I2cdf0f4c7642c420ccec0a3f6e05a1c5bc7da020
Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
So far we have chosen to send key events directly to the focus
object since we do already do that for IM events. But Qt expects key
events (especially control keys) to be sendt through QPA.
This means that key events can end up somewhere else than at the focus
object, which is expected and needed if shortcut propagation is to
work.
Change-Id: I160bf3309572719eda352cdb11b46c4b5a455e0d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
For ascii formatted files, the handler would not stop processing on a
premature EOF, but instead continue to fill the whole image memory
area byte by byte. This could lead to unexpected CPU exhaustion in the
case of a small image file declaring huge image dimensions, but having
no content.
Instead, check for EOF for each scanline and quit processing if found.
Change-Id: I8dbcd7eb34553873e49706d61b5752f22e04eb6a
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
At the edge of the view, a line segment could end up as not producing
any pixels even if not clipped by the floating-point clip
routine. Make sure the starting point for the next line is still
updated correctly for any significant segment lengths.
Change-Id: I381a4efb81ce6006f3da4c67abf279aea79e4663
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
If Qt is not running its own event loop (e.g. if Qt is a plugin running
in a non-Qt host application with its own event loop, a call to
sendPostedEvents() should process all events by default, and not depend
on the flags passed to the last call to processEvents()
We also modify sendPostedEvents() to call its base implementation instead
of directly calling QCoreApplication::sendPostedEvents(). (The behavior of
the base implementation is the same, so no behavior change there).
This also adds a test for QWindow event handling without Qts event loop is
running. This is a black box test, just to ensure that basic functionality
is working. It can be extended later.
Task-number: QTBUG-45956
Change-Id: I7d688c0c6dec5f133fb495f07526debdde5389af
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
An assumption we do for the QIOSDesktopManagerView is that it should always
cover the whole UIWindow. To achieve that, we override setFrame to be stop
any attempt from UIKit to make our view smaller, e.g. when the statusbar
changes height.
In case the view is not a direct child of the window, we need to take
any transformations into account when computing the new frame. This
happens e.g. during presentation of other view-controllers, where our
view is temporarily reparented into a UITransitionView that may have
a transform set.
Task-number: QTBUG-47506
Change-Id: I388143f2cbb566541ffb1068443ce21e62ea2b42
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
GLIBC does not provide kinfo_getproc, so we need to call sysctl manually.
Change-Id: I3bf22959ff74b3b6c34b5360738e52086a3ff1b4
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
WinCE headers do not have this type.
Task-number: QTBUG-47964
Change-Id: I5573eaf754b825774576c55b7cb4acfbd9e8d8dd
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
When using for example alt-tab in Qt Creator, the list of recent documents
is kept open as long as alt is pressed. The new
tryHandleShortcutOverrideEvent(QWindow *w, QKeyEvent *ev) function failed
to record the modifier state (contrary to the other overloads).
Change-Id: Ia0fc5d1ff486aa5aac7e25b41acb972dcb6dbf7d
Task-number: QTBUG-47122
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Removed a test in QStringAlgorithms trimmed_helper. That test is not
needed because both null / empty QStrings are already handled by the
previous test, other cases are handled just fine by the general case.
Change-Id: I26db1142a656a7d06dfdd6b3b8f8a3ee6ca22302
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Commit 916dfcb8 introduced a regression where QNSView
would hold a copy if the backing store QImage, which
would cause a detach and deep copy if/when the image
was painted on while the copy was held.
Revert back to the previous share-by-pointer scheme.
Make sure the following bugs stays fixed:
QTBUG-38377
QTBUG-42206
QTBUG-44313
Change-Id: Ib8049051d51947113f23b66ee61dc34c22388914
Task-number: QTBUG-46959
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Get a couple of fixes for important bugs (1667, 1672).
The WinCE build patch has also been merged upstream,
so remove it from our tree.
Change-Id: I933c2d824612a70d7bc52648df5f5c481ae066d7
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Release drop target after CoLockObjectExternal() to prevent
a potential access violation.
Change-Id: I2c3bde9f8008b1d567544596f56ebfd61fe6ad86
Task-number: QTBUG-47737
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Amend change b55f88caba by splitting
out the enabling into a separate function and call that when
QWindowsInputContext::update() is triggered to reflect updates
of the microfocus in QGraphicsView or item view widgets.
Task-number: QTBUG-47679
Task-number: QTBUG-47705
Task-number: QTBUG-40691
Change-Id: I84a6647944f1aaedcd72d7060cc90e29a177f577
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Depending on the orientation, UIKit might shrink either the width or the height
of the view to fit the status bar. Since we anyway want the view to fill the whole
window, we simply ignore this, and use the bounds of the whole window directly.
Task-number: QTBUG-47506
Change-Id: I73294e5792f8d98fb0c0b0a42198207baca08e3c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Caught being detached a few thousand times per second.
Change-Id: I6dd5fd69d7d4f32048cdb7e4ac707f24df6c15f8
(cherry picked from commit 2a81516835)
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
The limitation is already mentioned in the class documentation, but
IMO is severe enough to be highlighted in the documentation of the
respective methods, too.
Change-Id: I16c68eb41ab9d3a7698d7ef06f747cfd98a8aaff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Effectively revert 9150563940 for
QTBUG-11463 (offering only CF_DIB5 for images of format ARGB32) and
4018cd3529 for QTBUG-46848 adding support
for "PNG".
The changes broke pasting images into MS Office since it can only handle
plain CF_DIB and gets confused if "PNG" is returned as available format.
Task-number: QTBUG-47656
Task-number: QTBUG-11463
Task-number: QTBUG-46848
Change-Id: I9b641b4b912b7b16a2f58bc84fa09c28a64e91c8
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
The _q_readyRead can also be called from readMoreLater() because we implemented
it so that bandwidth limited reading can be implemented.
This can lead to a race condition if the socket is closing at the specific moment
and then deadlock the channel: It will stay unusable with a zombie request.
The fix in QHttpProtocolaHandler checks if there is actually bytes available to read
from the socket and only then continue.
The fix in the HTTP channel needs to be done to properly finish the reply in
cases of a server replying with HTTP/1.0 or "Connection: close".
The delayed incovation of _q_receiveReply will properly finish up the reply.
Change-Id: I19ce2ae595f91d56386cc7406ccacc9935672b6b
Reviewed-by: Richard J. Moore <rich@kde.org>
For BITFIELDS compressed images, the image data may be preceded by
bitmask fields. The file positioning code that should make sure those
were read correctly was erroneously included in the block of code that
was moved in 6f1b82fccd.
Task-number: QTBUG-45559
Task-number: QTBUG-40890
Done-with: Eirik Aavitsland
Change-Id: Id2b3ce078f67ac6ebf75ab0cc463dc719af83393
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
QDateTime::addSecs needs to do something similar, but not identical
because it needs the number of days too. And then there are daylight
savings transitions...
Task-number: QTBUG-47717
Change-Id: I7de033f80b0e4431b7f1ffff13f976f4f5e5a059
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
It was a regression: drawing applications which can handle both mouse
and tablet events should not need to wait to see whether a mouse event
will be followed by a corresponding tablet event. The tablet event is
preferred because it has all the tablet parameters (pressure etc.)
Also, show the timestamp of each mouse event in the log message,
which helps to verify the correspondence.
Task-number: QTBUG-47702
Change-Id: I9e832c19de935ec1243138eb4c1484284f61cbfc
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Playing with the offset argument of pcre_exec is not equivalent to
adjusting the pointer to the subject string. In particular, PCRE
can go behind the offset to check for lookbehinds or "transition"
metacharacters (\b, \B, etc.).
This made the code that deals with QStringRefs not matching in behavior
with the corresponding code dealing with QStrings. For instance,
QString subject("Miss");
QRegularExpression re("(?<=M)iss");
re.match(subject.mid(1)); // doesn't match
re.match(subject.midRef(1)); // matches!!!
Instead, actually adjust the pointer to the subject string so that
the behavior is identical. A broken test that relied on the
equivalence is also removed.
Change-Id: If96333241ef59621d7f5a6a170ebd0a186844874
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Valid characters are (A-Z,a-z,0-9,-,.).
It is unlikely that we will see anything more exotic
than '_' in bundle/library names, go ahead and replace
that character only.
Task-number: QTBUG-46824
Change-Id: Ia97b7cd6247f40a970b4919363ffb66fb347186c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
unlike everywhere else in this file, destdir is not pre-quoted here.
Task-number: QTBUG-47775
Change-Id: Ia5b0c56bbdd3eb095f81b0f615d68a338ffa52c5
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Ensure QAction::setVisible() is
handled and reposition if visibility changes.
Task-number: QTBUG-39660
Change-Id: I14f0659aedc8dc89ddef3159d3a500b40b1563ff
Reviewed-by: David Faure <david.faure@kdab.com>
The way of searching a shortcut match for a key without the keypad
modifier introduced in 547a1bea49 is
not correct. QKeyEvent::setModifiers() doesn't change native scan code
so we get the incorrect QKeyEvent object which is eventually passed to
the implementation of QPlatformIntegration::possibleKeys().
And then QPlatformIntegration::possibleKeys() returns the same result
as for the original QKeyEvent object.
So to fix it we have to remove Qt::KeypadModifier from keys after
calling the implementation of QPlatformIntegration::possibleKeys(),
as it was before 547a1bea49.
Task-number: QTBUG-33093
Task-number: QTBUG-44577
Change-Id: I5b33c9b6cf2c06b133166a31eba9aff9181c9483
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Older VMware virtual machines do not like the #line statements. These
were introduced in 5.5.0, meaning that when upgrading from 5.4 in such
a VM, shader compilation via QOpenGLShaderProgram stops working. This
should be avoided.
Task-number: QTBUG-47598
Change-Id: I8cccd76119350e7ce40da96d24a7a6e9eb399052
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>