Commit Graph

24182 Commits

Author SHA1 Message Date
Friedemann Kleint
3811307bf1 ANGLE/D3D11: Suppress keyboard handling of DXGI.
Set the DXGI_MWA_NO_ALT_ENTER to suppress the Alt-Enter shortcut
causing the window to become full screen.

Task-number: QTBUG-44904
Change-Id: Ia4156ddee37a8a3da6e9e3130022c63a674f4429
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-11-23 15:05:03 +00:00
Andy Shaw
a2f360360c If the paper value is greater than DMPAPER_LAST then it is a custom size
Ideally all printer drivers would add beyond DMPAPER_USER for their custom
sizes. However some printer drivers add beyond DMPAPER_LAST instead so we
need to check if the value is past DMPAPER_LAST and consider those as a
custom size.

Task-number: QTBUG-47272
Change-Id: I1bcb01c08fe605cc484769b0301cfcd7b8f66157
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-11-23 12:22:19 +00:00
Andy Shaw
b21c219811 Call setFocus() if it is a QAxHostWidget which is in a new active window
The change 8c0f47cfae17a39137dec47aa0b9f3f9bedad introduced a problem
where if the widget was being reparented had a valid HWND then it would
cause the focus to change inside the already active window. Therefore we
need to limit the times it does this to the case where we know it needs to
be done which is the ActiveQt case.

Change-Id: Ia85f5136661142b25952e0ebf66f8a43d9500d58
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2015-11-23 12:22:13 +00:00
Timur Pocheptsov
2010eff9d7 Secure Transport - make it work on OS X 10.7
SSLSetProtocolVersionMin/Max were introduced _only_ in 10.8 and
we need a workaround for 10.7 - use SSLSetProtocolVersion or SSLSetProtocolVersionEnabled.

Change-Id: I4b7ed9fda21e2c374a98fd777253280e8013ffde
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-11-23 10:47:29 +00:00
Timur Pocheptsov
7cfc24f72a Secure Transport backend - make it work on OS X 10.7
On OS X SSLCreateContext is quite recent - it requires OS X/SDK version
>= 10.8. Since SecureTransport back-end is the default one in Qt 5.6,
make it also work on OS X 10.7.

Change-Id: I364feff9dd95772fcea926494b2d4edaffd2dde1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-11-23 10:46:49 +00:00
Laszlo Agocs
5a48d1d164 Do not leak textures from the backing stores
Neither the default nor the eglfs-specific backingstore release the OpenGL textures
that are in use when render-to-texture widgets are involved.

The result can be fatal on embedded devices that run out of GPU memory at after showing
and closing dialogs and popups a certain number of times.

Task-number: QTBUG-49363
Task-number: QTBUG-49399
Change-Id: Ia7471b037f147bcca0a4f1db5808ca348e230547
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-11-23 08:31:53 +00:00
Richard Moe Gustavsen
fe4ab7edce iOS: always flush spontaneous key press events
When we changed sending key events through QPA instead of directly to
the focus object, we only flushed from deleteBackward (06be9f026). The
reason was to avoid unnecessary flushes, as this in general can be a
source to recursion problems.

It turns out that this is also needed when sending Qt::Key_Return. The
reason is that we sometimes resign first responder when the return key
is pressed, which will also change the focus object in Qt. And without
flushing the key event first, it will be processed after the change and
therefore end up at the wrong object.

It seems like the most sensible thing is to always flush upon receiving
spontaneous key/text events from iOS, which is also how it was before.

Task-number: QTBUG-49021
Change-Id: I44885a11275dee5039ef6a8abbcbdadc092695e7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-11-23 08:04:32 +00:00
Andrew McCann
bc7d0da741 OS X: Fix QStandardPaths::standardLocations()
Task-number: QTBUG-49443
Change-Id: I0699dfd3cb4c710ab96c324219444c6294c9d732
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
2015-11-22 20:40:15 +00:00
Alex Trotsenko
be2e993a9a Fix build with 'udpsocket' feature disabled
Wrap related code in QNativeSocketEngine and the tuiotouch
plugin in conditionals.

Change-Id: Ic6861b1c6a9e041fa8a50f96149f7280473a9fba
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-11-14 09:42:49 +00:00
Adam Strzelecki
9daef8a54c QComboBox: Disable wheel events on OS X & iOS
This is follow-up for QTabBar fix ea47d152b3.

In native OS X applications using mouse wheel on combo boxes have absolutely no
effect. We should bring the same behavior to Qt based OS X apps too, as users
are complaining of unexpected behavior, eg. randomly switching Qt Creator
sidebar mode when scrolling file list and moving mouse pointer little bit
above. Moreover inertial mouse behavior on OS X makes combo box usually move
several indexes, rather than single one on slight finger slide.

This also applies to iOS apps so the change affects all Apple platforms.

Task-number: QTBUG-10707
Change-Id: I6582265039198707ad8c2f54de96ee2a0b0e0b47
Reviewed-by: Adam Strzelecki <ono@java.pl>
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
2015-11-09 03:51:32 +00:00
Konstantin Ritt
cd0a125123 Minor optimization to QWidgetPrivate::naturalWidgetFont()
When inheritedMask is 0, the font inherits just everything; in this case
`inheritedFont.resolve(baseFont)` could be replaced with `baseFont`.

Change-Id: Ic3ed8ef174493544ada32037e7bdded46eb4bd43
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-11-05 20:53:33 +00:00
Thiago Macieira
110a8c339f Remove qatomic_mips.h: the 3-operand testAndSet is broken
The "previous" value is always 1 when the compare-and-swap succeeded,
instead of the previous value.

Instead of fixing this, let's just remove this file a bit earlier than
the rest. All of them will be removed in Qt 5.7 anyway, so let's leave
MIPS atomics to the compiler.

Task-number: QTBUG-49168
Change-Id: Idba8c29717f34c70a58fffff14133304595165f5
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
2015-11-05 16:54:16 +00:00
Ulf Hermann
7aba75ffc5 Don't let closed http sockets pass as valid connections
A QAbstractSocket can be close()'d at any time, independently of its
current connection state. being closed means that we cannot use it to
read or write data, but internally it might still have some data to
send or receive, for example to an http server. We can even get a
connected() signal after close()'ing the socket.

We need to catch this condition and mark any pending data not yet
written to the socket for resending.

(cherry picked from commit 0df5d07929)
Task-number: QTBUG-48326
Change-Id: I67d9ad36f7288c9c6bef51aa6253d7b187737601
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
2015-11-05 08:40:57 +00:00
Marc Mutz
c69f75426d QStyleOption*V<N>: mark as \obsolete
Change-Id: I6e4857bcfa7792bec4d38f6c65bfec15a52b4d30
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-11-05 05:39:10 +00:00
Marc Mutz
c78fec01f8 [docs] QStyle: remove remaining references to QStyleOption*V<N>
They are all obsolete since Qt 5.0.

Change-Id: Ief9111057137c3bd091630430a23681095b73510
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
2015-11-05 05:39:03 +00:00
Joni Poikelin
d894cfa863 Fix QImage::setDotsPerMeterX/Y for images with some orientations
Rotation of images with orientation of 90 and 270 degrees dropped DPM
values from rotated image.

Task-number: QTBUG-49220
Change-Id: I9c23153c49dd63b5f6958fdde72f466873b0a407
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
2015-11-05 05:33:37 +00:00
Liang Qi
6ed957fd7f fix MinGW ANGLE build
glslang_tab.cpp was not created in the right subdirectory.
This amends commit 69167189.

Change-Id: I031499baa53b72a1923883c58eb5ddfc2a02789a
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-03 13:46:03 +00:00
Joerg Bornemann
dfaffcbf2a QWindowsPipeReader: fix occasional "Unknown error 995"
After canceling the asynchronous read operation, the
notified() slot receives ERROR_OPERATION_ABORTED.
We must not handle this situation as an error.

This amends commit 5ce567c5.

Task-number: QTBUG-48336
Change-Id: Iff948ceb3ad1f805a9de8c188fbc39ed4c76ba82
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-02 12:38:50 +00:00
Dyami Caliri
5a7f69f824 Fix Vista style compilation with QT_NO_ACCESSIBILITY
A recent change uses an accessibility function even if accessibility
is disabled.

Change-Id: Ibf9afbb90120772065743b2f9dd3615e4e6a2f37
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-10-30 16:42:25 +00:00
Friedemann Kleint
7daae2c2c7 Windows: Delay-initialize pluggable touch devices.
Move touch device initialization code to QWindowsContext and
replace the assert on the touch device in QWindowsMouseHandler
by a call to the initTouch().

Task-number: QTBUG-48849
Change-Id: If8573b8283ef94e7fd015f6edc626e3c8cc0b139
Reviewed-by: Joni Poikelin <joni.poikelin@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-10-28 09:23:46 +00:00
Andy Shaw
a91c40868b Check if the session is valid before connecting to it
Since there are circumstances where the session is not yet created after
start() is called then we should check if the session is valid before
connecting to it.

Change-Id: I94236f76e4be2433a8c96eb91ce2d4b4d42f2fd9
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-10-27 18:00:22 +00:00
Andy Shaw
95b1982e47 Return early if there is no text at the offset
Change-Id: I9d0b1e6e054a48bac34fb4e51b656c475f5638b4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-10-27 18:00:14 +00:00
Dmitry Shachnev
08be8691f7 Fix QStorageInfo on BSD4 systems
- On NetBSD, the defines were not properly defined;
- On all other BSD systems, we use statfs which does not have f_frsize
  member, revert to using f_bsize there.

Task-number: QTBUG-48267
Change-Id: Ia1ed484ac61a615fcbb5b45affb516b5e86a64b0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-10-27 17:59:44 +00:00
Joerg Bornemann
691671893a fix race in ANGLE build
The flex and bison rules generated the same files for debug and release.
This conflicts in parallel builds, e.g. when using jom.

Task-number: QTBUG-49003
Change-Id: I6f64760d83292e8bfad6fd0b4f8fbdd386e2213b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-10-27 17:02:47 +00:00
Martin Koller
2f7d3cf559 Android: auto-detect MIME type for local files to make openUrl work
[ChangeLog][QtCore][Android]
Fixed the opening of a local file using QDesktopServices::openUrl().

For a local file to be viewed with
QDesktopServices::openUrl(), Android needs to be given
the MIME type otherwise it does not start an Intent to view the file.

Task-number: QTBUG-45585
Change-Id: Ifcfce4bff35011f205cfadbdb2b37a1780dac87d
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2015-10-26 11:35:15 +00:00
Joerg Bornemann
c20f92a0fa fix growth of event queue in QWinOverlappedIoNotifier::waitFor*
Do not emit _q_notified when we're in a wait function. Otherwise,
the queued signals could pile up in the event queue.

Task-number: QTBUG-48653
Change-Id: I071863e2356e17c7004e3b7ca359967cb115e343
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-10-26 11:02:27 +00:00
Dmitry Shachnev
b7c4f15d67 Undef HAVE_WAITID if needed constants are not defined
That is the case on Hurd, where the code currently breaks because Hurd
does not have WEXITED or WNOWAIT defined.

Change-Id: I4b13633612b1168d36c949d9e8b35bc05bca7d5c
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-10-26 10:48:12 +00:00
Andy Shaw
3890988bb6 Add support for -Zc:throwingNew option to vcxproj generation for 2015
Task-number: QTBUG-48898
Change-Id: I56abae0cbc56e07fd9bb554b84927c327c1b3232
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-10-23 13:03:12 +00:00
Topi Reinio
b29d18f736 Doc: Edit description of QSslSocket::AddCaCertificates()
The QSslSocket::addCaCertificates() variant that takes a path
argument uses QSslCertificate::fromPath() in its implementation.
Edit the description of the former to match that of the latter.

Fix minor issues in QSslCertificate::fromPath() documentation;
add a missing word, limit code snippet line width.

Task-number: QTBUG-47359
Change-Id: Ibead74c998503e60a67d0b8eb551536bd20feff8
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-10-23 12:38:09 +00:00
Friedemann Kleint
13b1c23f8b QLineEdit: Fix visibility handling of side widgets.
Compare against isVisibleTo() in QLineEditIconButton::actionEvent()
so that action events received before show() are handled correctly.

Fix a regression introduced by change
4dccb2ca67 for handling action
events causing side widgets to overlap when added before the widget was
shown. Use QAction::isVisible() to determine visibility.

Task-number: QTBUG-48806
Task-number: QTBUG-48899
Task-number: QTBUG-39660
Change-Id: I7a39a3b9a094f2c74cde09544f1158deb2b81cf2
Reviewed-by: David Faure <david.faure@kdab.com>
2015-10-22 18:04:18 +00:00
Caroline Chao
344b19f8e9 Tests: Use blacklist for tst_NetworkSelfTest::ftpProxyServer()
Remove the insignificant_tests CONFIG option in favor of a BLACKLIST
file. The test blacklisted have been found using CI builds logs.

Change-Id: Iac07316862cff9b5085dacdf9f35e691cff09384
Task-number: QTBUG-27571
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-10-22 13:45:09 +00:00
Tim Blechmann
14709d097f Fix QCFSocketNotifier in namespaced Qt builds
Without QT_BEGIN/END_NAMESPACE, the qt_mac_socket_callback is not resolved as
a friend function of QCFSocketNotifier, which is required due to access to
private members of QCFSocketNotifier.

Change-Id: Ief89e18f8b4f7fc4cb013a33959db1dd90eb9efe
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-10-19 16:42:47 +00:00
Christian Strømme
75efe9a0f3 Android: Remove unused forward declaration.
Change-Id: I7c81a542df2a47754c2972a1811c020cd12e2dc2
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2015-10-19 11:47:50 +00:00
Christian Strømme
28b57f0e95 Android: Don't show the VK when the state is set to HIDDEN by the user.
Don't call showSoftInput() if the state is set to _HIDDEN or
_ALWAYS_HIDDEN by the user.

Task-number: QTBUG-46528
Change-Id: I5dbaf612cf4f339c5288d6d3292c27cc6217f3af
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2015-10-19 11:47:44 +00:00
Christian Strømme
1811e31cdb Android: Improve the way we update layout params for native views.
Removing and adding a view each time the layout parameters changes is
triggering unnecessary layout updates. The affect of this is not very
visible since there are few views in the layout, but the procedure is
never the less wasteful.

Change-Id: I2540ab519b12c6d3e10457e2e518b439118b966d
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2015-10-19 11:47:38 +00:00
Albert Astals Cid
5afc431323 Use Node::name if Node::logicalModuleName is empty for qml modules
Change-Id: I55693a4f34f0a89ceb326b5eb4b229dd3f91c172
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-10-16 11:24:29 +00:00
Yoann Lopes
a7297ed85b Fix gstreamer configuration test.
Don't use gst_is_initialized(). It was added in 0.10.31, but we don't
actually require that version.

Change-Id: If5d662e18511cf636861bf93eeccc1f5b69e26f1
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-10-13 08:59:04 +00:00
Liang Qi
07800a9727 Merge "Merge remote-tracking branch 'origin/5.5.1' into 5.5" into refs/staging/5.5 2015-10-13 11:14:37 +00:00
Liang Qi
57fead6100 Merge remote-tracking branch 'origin/5.5.1' into 5.5
Change-Id: I2942591e1c1ca86ce0f6476e0a5c3033cdf861ee
2015-10-13 10:09:20 +02:00
Alex Trotsenko
0872156559 QAbstractSocket: fix writing to socket in HostLookup state
After calling connectToHost(), the socket enters HostLookup state. At this
stage, the socket engine was not created yet, and writing to the socket
should result in either data buffering or an error. So, add a check for
d->socketEngine to prevent a crash on unbuffered sockets.

Task-number: QTBUG-48356
Change-Id: I15ea9ce7de97ce6d7e13e358eca5350745b556bb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-10-13 05:20:08 +00:00
Giuseppe D'Angelo
a2f6ece27f QLockFile: fix errno handling
In case of a lock failure, we potentially pollute the errno value
before printing it. Also, switch to qt_error_string, as strerror
is not reentrant.

Change-Id: I952aac14204637155726bcefc0ed8a21d7fcd501
Reviewed-by: David Faure <david.faure@kdab.com>
2015-10-12 15:09:53 +00:00
Christoph Schleifenbaum
0cfdfcc82e QListView: Use correct available size when calculating scrollbars.
Calculation was working as long as one didn't use per pixel scrolling.

Task-number: QTBUG-48579
Change-Id: Ie02e28b008c5c81ed45d7dd17fed96148c23b598
Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2015-10-12 08:41:06 +00:00
Andy Shaw
eb149ec95c Offscreen: Protect against the QT_NO_CURSOR define for changeCursor
If QT_NO_CURSOR is defined then changeCursor() is not implemented in
QPlatformCursor which means that it isn't really being overridden in the
offscreen plugin. Therefore the same define is checked for to prevent a
compiler from having a problem with it.

Change-Id: Id7c104292354cb7462b3161602fc8d382a6dd390
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-11 19:12:02 +00:00
Alex Trotsenko
6542161d5c Fix spurious socket notifications on OS X and iOS
Core Foundation Framework forwards notifications about socket activity
through a callback function which called from the run loop.

The default behavior of Core Foundation is to automatically re-enable the
read callback after each notification, and we explicitly enabled the same
behavior for the write callback.

With this behavior, if the client did multiple recv() calls in response to
the first notification in a series of read notifications, the client would
still get the QSocketNotifier notifications for the data that was already
read.

To get rid of these extra notifications, we disable automatically re-enabling
the callbacks, and then manually enable them on each run loop pass.

Task-number: QTBUG-48556
Change-Id: I0b060222b787f45600be0cb7da85d04aef415e57
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-10-09 13:00:58 +00:00
Marc Mutz
c87bb03e5e QDebug: add missing docs for op<<(Container)
Change-Id: I9f89d8e792bf0d432a0b2522f26026c6ad81e2f4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-10-07 19:00:41 +00:00
Samuel Gaist
decc546368 Doc: remove unused code from OpenGL Window example
Change-Id: Ifb2c7206dee55102eba91b4c30543f3ac4838259
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-10-07 10:56:04 +00:00
Alex Trotsenko
da104e7db0 Revert "Fix the spurious socket notifications on OS X"
This reverts commit b8e0f7cfc6.
Needs a more testing.

Change-Id: Iff0b2741922cfa8f16fbc3f4ce0f83869d6cd8b6
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-10-06 08:32:58 +00:00
Samuel Nevala
44f323e500 ANGLE: Fix D3D feature level detection.
Commit 7943d4f tried to fix this with a switch/case, but the feature
levels need to be in descending order so this failed. So, follow the
same style used for feature levels 10/11.

Change-Id: Ia1c22981bf8b99eb53df13833aba452482398295
Task-number: QTBUG-38481
Task-number: QTBUG-48571
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-10-02 12:51:33 +00:00
Alex Trotsenko
b8e0f7cfc6 Fix the spurious socket notifications on OS X
Core Foundation Framework forwards notifications about socket activity
through a callback function which called from the run loop. Previous
implementation sets kCFSocketReadCallBack, kCFSocketWriteCallBack to be
automatically re-enabled after they are triggered. With these semantics,
an application need not read all available data in response to a read
notification: a single recv in response to each read notification is
appropriate. If an application issues multiple recv calls in response to
a single notification, it can receive spurious notifications.

To solve this issue, this patch disables automatically reenabling callback
feature. Now, callback gets called exactly once, and is not called again
until manually re-enabled by calling CFSocketEnableCallBacks() just before
entering to wait for the new events.

Task-number: QTBUG-48556
Change-Id: Ia3393c2026230c7b3397cc614758dec1d432535f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-10-02 10:16:53 +00:00
Friedemann Kleint
a5f470240f qprintengine_win.cpp: Check access to members of DOCINFO in warning.
DOCINFO::lpszOutput can be 0.

Task-number: QTBUG-48203
Change-Id: Ia3940b5b3200143d8d50caa8f4f44c4b22bfff75
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2015-09-29 12:11:34 +00:00