Commit Graph

21636 Commits

Author SHA1 Message Date
Samuel Gaist
6246e142a4 Improve QTextDocument::setPlainText/Html doc related to undo stack
This patch aims to improve the documentation of setPlainText/setHtml to
let the user know that the undo stack is cleared when both these
function are called.

Change-Id: I079f9f1dd407387941777ebbc7b5a7bc6dc005ec
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2015-02-05 23:56:30 +00:00
Samuel Gaist
dd4b09ae1a Fix QLineF Detailed Description
Currently angle() is used in place of angleTo() to describe the
difference with intersect. This patch fixes that.

Task-number: QTBUG-44309
Change-Id: Idfc521932247f76fe15fd980ff8e87e52feec1f1
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2015-02-05 23:35:25 +00:00
Shawn Rutledge
612953a626 xcb: delay showing tray icon window until it is embedded
Otherwise there is a race condition: when the tray implementation
gets around to embedding the window, if it was already shown,
it will be unmapped, embedded, and then remapped. Some tray
implementations will resize the tray icon to 1 pixel wide in
that case. We also never want to show a window that was intended
for the tray in any other location, so it's better that it remain
invisible until we are sure it is embedded.

Task-number: QTBUG-31762
Task-number: QTBUG-35658
Task-number: QTBUG-32811
Change-Id: Id324b0bfded0f8258ff1686a223cb2c069827d42
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-02-05 14:55:10 +00:00
Peter Hartmann
3c24dddaf9 SSL NPN negotiation: Do not abort on unmatched protocols
... but choose HTTP/1.1 and continue connecting anyhow. According to
the NPN spec, actually we should choose SPDY:

"In the event that the client doesn't support any of server's protocols,
or the server doesn't advertise any, it SHOULD select the first protocol
that it supports."

However, some tested servers did not advertise anything and did not
support SPDY, so blindly trying the newest protocol would fail. We are
conservative in that case and choose HTTP.

Task-number: QTBUG-40714
Change-Id: Ia8aaf01fea74e13d9e4416306f85f1890b25559e
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-02-05 14:07:19 +00:00
Friedemann Kleint
239f67f158 Do not close popup widgets when showing a widget embedded into QGraphicsView.
Disable top-level widget code path for embedded widget in the show
helper.

Task-number: QTBUG-43780
Change-Id: I574e07130e5e68a019a426cee3fde982f3883720
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-02-05 13:54:01 +00:00
Joerg Bornemann
df3ffeec15 QProcess/Win: fix sporadic crash
QProcessPrivate::_q_processDied() was potentially called twice if there
was a slot connected to readyRead() that called processEvents(), because
the processFinishedNotifier was still enabled when readyRead() was
emitted.
This led to a null pointer access in findExitCode.

Change-Id: I4b796b81f050dc46bb9469602984accaa6ebfa28
Task-number: QTBUG-33731
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-02-05 13:43:57 +00:00
Eskil Abrahamsen Blomfeldt
434868e9d3 REG: Fix misplaced outline drawn text with native rendering
Change c238d34137 was a refactoring
which slightly changed behavior. In the case of fetching the
alpha map's bounding box, before we would call loadGlyph()
even for the case of outline drawing, as the correct bounding
rect is still needed for this case. In loadGlyphFor() however,
0 was always returned for this case, as it was only used for
populating the cache.

The simple fix for this is to add a bool to loadGlyphFor() which
adapts the original behavior when set, similar to the
fetchMetricsOnly bool in the loadGlyph() functions.

Change-Id: I76296c8aaeddbdae9e4c27ed2b30b7d59ff0843b
Task-number: QTBUG-44273
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-02-05 05:46:10 +00:00
Kai Koehne
6a607aa7aa Do not specifically mention features supported since XP
We do not support Windows older versions in the first place ...

Change-Id: I2cd3135f1b7f2dac6929c07624ea9373f4ac0ff1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-02-04 23:12:25 +00:00
Antonio Lotti
dcedbce99a Windows : fix call to LookupAccountNameW
The call to LookupAccountNameW from advapi32 was rewritten following
the example:
http://msdn.microsoft.com/en-us/library/aa392742%28v=vs.85%29.aspx
This prevents the generation of a garbage pointer when accessing
QWindowsSystemProxy::init() for Qt compiled as 64bit library
with MinGW-w64.

Task-number: QTBUG-39874
Task-number: QTBUG-38145
Change-Id: I620b2fa64941f84838f9a386851480285336e8d1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-02-04 23:08:33 +00:00
Marc Mutz
83a3292342 QPair: work around std::move not being constexpr in C++11
Use a static_cast instead. This is not 100% equivalent,
since it's missing remove_reference<>, which we don't want
to depend on and whose emulation in qtypetraits.h is missing
rvalue support.

That will be fixed in dev.

Change-Id: Ib03754c81c904932943d3a5415b54ff107f4719d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-02-04 18:38:52 +00:00
Friedemann Kleint
2e1a76a594 Streamline code in QDesktopWidget.
Task-number: QTBUG-44070
Task-number: QTBUG-44213
Change-Id: Icbf0547eb521b9f3fcc725066ee4903226ecc630
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-04 14:04:16 +00:00
Friedemann Kleint
b1b262559c QWindowsXPStylePrivate::buffer(): Improve warnings.
Task-number: QTBUG-44282
Change-Id: If617db5c6eae410042394f20855892a2c564e808
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-04 14:04:07 +00:00
Friedemann Kleint
276de71be7 Handle failure of Windows XP theme painting functions for PE_FrameWindow.
QWindowsXPStylePrivate::buffer() can fail due to CreateDIBSection()
failing for large sizes. Introduce a bool return for the
QWindowsXPStylePrivate::drawBackground() helpers and fall back to
QWindowsStyle:::drawPrimitive() should that happen for PE_FrameWindow
in QWindowsXPStyle::drawPrimitive().

Task-number: QTBUG-44282
Change-Id: I122d84576455bbad8e6639022da5bf64f79aed3a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-04 11:15:25 +00:00
Dyami Caliri
a2bcf43eb9 Set dpr of QImage in QOpenGLWidget grabFramebuffer
The QImage returned from grabFramebuffer should have the dpr of the
source.

Change-Id: Iafeabc1ab4e032fc28b73307104917ba3e898ad5
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-02-03 15:38:47 +00:00
Allan Sandfeld Jensen
5bd41b850f Correct inplace conversion methods from RGBA8888 formats
The methods for inplace conversion from RGBA to ARGB was misplaced by
one step causing conversion to RGB16 to get an invalid method.

Change-Id: I3b2b4cffe993705c48613eec7d9b7c6213f57fc2
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-02-03 14:21:29 +00:00
Morten Johan Sørvig
1b329bfc79 Cocoa: Don't crash on no target window.
findEventTargetWindow() will return 0 if m_window is
a top-level window with Qt::WindowTransparentForInput
set.

Change-Id: I413dabf2a8993b0522653c4e586bb304b642f3ed
Task-number: QTBUG-44013
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-02-03 14:16:41 +00:00
Oswald Buddenhagen
3fc27e7835 fix env variable setup on unix for testcases when DESTDIR is set
prepend the 'cd' command only after prepending the variables, as
otherwise they'd apply to the cd command only.

Task-number: QTBUG-44183
Change-Id: Ibf96a16ce2c9cd9c0e80ca3cd5433e64ec19b136
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2015-02-03 14:13:19 +00:00
BogDan Vatra
cc4c684e03 Overwrite QMAKE_DEFAULT_XXXDIRS values.
If we set ANDROID_NDK_PLATFORM env variable, QMAKE_DEFAULT_XXXDIRS still contains
old ANDROID_PLATFORM, so we need to overwrite it.

Change-Id: I917e24caa11bd589966b3fb11be3a9f3c4370b3e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-02-03 10:14:57 +00:00
Joni Poikelin
f562244f33 Fix argv parameter to main() on Windows
Task-number: QTBUG-44050
Change-Id: I5b7ddec9d66158d8075ab091b01e883520e5414e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-02-03 09:45:11 +00:00
Albert Astals Cid
9718cb330c CMake: Fix QObject::connect failing on ARM
We need PIE, doesn't matter if reduce_relocations is used or not

Change-Id: I9a359b9d4443a6059980cd4c48058132ec4267fe
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-02-03 08:49:15 +00:00
Arnaud Bienner
cd7a36d341 QHeaderView: check that length is correct and fix restoring Qt4 state.
When multiple sections were grouped together, sectionItem.size was the total size of grouped sections, not the size of one section.
Length is supposed to be equal to the section items length, but the state saved might be corrupted.

Task-number: QTBUG-40462
Change-Id: I401a1583dd30880ccf5b4c105a237d6563f212e8
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2015-02-03 08:45:33 +00:00
Friedemann Kleint
b85b78f17d Suppress Ctrl/Ctrl+Shift keypresses in line/text edits.
Ctrl/Ctrl+Shift should not cause any characters to be input
(as opposed to AltGr(Alt+Ctrl) as used on German keyboards).

Extend the tests in QLineEdit and QPlainTextEdit to
check the modifiers, remove test from QTextEdit
since it is handled by QWidgetTextControl.

Task-number: QTBUG-35734
Change-Id: Ie0004fac68cf840c68247f27547e84b021355cd2
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2015-02-03 06:24:11 +00:00
Friedemann Kleint
912f1ebaad Windows: Pass geometry in device-independent pixel when determining screen.
Fixes the emission of QWindow::screenChanged() when running with
QT_DEVICE_PIXEL_RATIO != 1.
QPlatformScreen::screenForGeometry() takes device-independent pixel.

Task-number: QTBUG-44070
Change-Id: I963ecf62743d06784d62bc2f467e09fe5474e57f
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-02-03 05:58:00 +00:00
Friedemann Kleint
eb92a531c0 QWindowContainer: Restrict check for negative position to child windows.
Otherwise, the code triggers for top level windows in setups with
multimonitors where the primary screen is on the right and the left
monitor has negative coordinates.

Task-number: QTBUG-43879
Task-number: QTBUG-38475
Change-Id: Ied3ee6dc59bd784e11db22031d2090cc6f42ef8b
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2015-02-03 05:56:07 +00:00
Friedemann Kleint
c88e354993 Windows: Rewrite font database to use delayed population.
Task-number: QTBUG-43774
Change-Id: I3b0b0ead0953b3b88a6d0092c694a2a00f70acf7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-02-03 05:53:02 +00:00
Dyami Caliri
10c62c894c CoreWLan: properly wait for scan thread to finish
Terminating the scan thread is leading to crashes. So was the previous
solution to use wait(5000), since the scan thread may take longer than
that.

Task-number: QTBUG-36000
Change-Id: I5c37ba5ba3f5c156fca30f3dacaa998c15f76be8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-02-03 03:35:11 +00:00
Daiwei Li
c96b5d2b06 Cocoa: Keep menu invisible when adding it to a menubar
In MenuBar.qml, it's possible for __isNative to be set
after visible on a child QQuickMenu. In that case, the qcocoamenu.mm
will have set submenu to nil, only to be overridden in insertNativeMenu
when __isNative is set.

Change-Id: Id3c6bca03f937528d05b166cbd6a6d1011db43e8
Task-number: QTBUG-44168
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-02-03 00:30:16 +00:00
Friedemann Kleint
392d8b5a75 Windows: Fix screen changed emission for programmatic moves.
Assign geometry in setGeometryDp() only when minimized as otherwise the
variable will be set by the handling of the resize event triggered by
setGeometry_sys()handleGeometryChange(). As it is, it suppresses
the emission of screen change signals for programmatic move operations
since the move is not detected.

Change-Id: I5cd32bb16fd41dd720c16ddf84b88df642677af7
Task-number: QTBUG-44070
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-02 23:09:07 +00:00
Friedemann Kleint
ec71482374 Add qopenglconfig test.
Add some parts of the qtdiag tool as a qtbase test to output the
graphics configuration to the CI log and to verify that Open GL can be
initialized for platforms on which the qopengl test is marked as
insignificant (for example, ANGLE).

Change-Id: Id445e57928e0307ad38cd433c52a62501f1097c6
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-02-02 23:05:41 +00:00
Dyami Caliri
2a27fc41a4 Fix QGraphicsWidget window frame section logic
CppCat detected duplicate sub-expressions in the code that checked for
BottomLeftSection and BottomRightSection. It was fairly obvious to
see what the values should be.

Change-Id: Id45ca5bbd26c92b800c60867fef5170578216eee
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2015-02-02 21:38:23 +00:00
Dyami Caliri
2b99491692 Fix leaks in OS X bundle detection
There were several leaked CFStringRefs in the new OS X bundle detection
code that is part of QFileSystemEngine.

Change-Id: Id0817e9692da411c7eb8287b9bf71b99ae28f960
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2015-02-02 21:38:12 +00:00
Marc Mutz
46d3c25980 Partially revert "QFixed: fix undefined behavior"
This partially reverts commit 1755038134,
which did not only fix undefined (signed left-shift), but also
implementation-defined (signed right-shift) behavior. It turned out
that code depends on a particular implementation behavior (logical
instead of arithmetic right-shift), and needs to be fixed first.

Change-Id: I9ba32d06f127d17d05e0c6f6eac3d26268587bca
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-02 16:43:16 +00:00
Marc Mutz
a776e4cf78 uic: don't use QStringLiteral in comparisons
(this is committing the new output of generate_ui from qttools)

For QLatin1String, operator== is overloaded, even for QStringRef,
so comparing to a latin-1 (C) string literal is efficient,
since strlen() is comparatively fast.

OTOH, QStringLiteral, when not using RVO, litters the code with
QString dtor calls, which are not inline. Worse, absent lambdas,
it even allocates memory.

So, just compare using QLatin1String instead.

Change-Id: I5035d259085c21689ab0f62fd49819ab5223ffe8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-02 16:43:07 +00:00
Marc Mutz
ee973083cf uic: update sources from current generate_ui
Change-Id: I3b64fa94bd5904feeed753d34e80f4fc0611725e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-02-02 16:43:01 +00:00
Mitch Curtis
8cb611be7b Add some punctuation to QTextCursor's detailed description.
Change-Id: I3b3eab74888f283a9890321fadcae67c09c24b61
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-02-02 15:34:10 +00:00
Stephan Binner
f8c8c79029 Fix build of egl integration
Add missing includes and reorder includes to avoid X defines breakage

Change-Id: Iaf95ae2488df3d3301436262ed79f7091b4be0a9
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-02-02 15:01:09 +00:00
Maurice Kalinowski
8c3ae221e6 WinRT: Gracefully exit an application
While it is not recommended by Microsoft to manually exit an
application, currently applications just hang when exiting main().

Instead when QCoreApplication::exit() is called use the CoreApplication
to properly invoke native Exit() and let the application completely shut
down.

Add a warning to notify developer about this non-standard behavior, as
usually the system is supposed to take care of suspending and closing.

Certification still passes for Windows RT and Windows Phone.

Task-number: QTBUG-43862
Change-Id: Ia34443ea75daaaeca0bee2a0c9fcc568c0659262
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-02-02 10:26:47 +00:00
Kai Koehne
5f6bbce4be Fix memory leak in qSetMessagePattern
We were leaking memory in case setPattern was called multiple
times

Task-number: QTBUG-43893
Change-Id: Icd9c214edea064aeaeb6f92a9c62836238ccd344
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-02-02 10:26:42 +00:00
Allan Sandfeld Jensen
8e0f56280a Fix Qt over VNC with broken VisualInfo
It appears some VNC servers reports incorrect masks in their visuals.
This patch recognizes this unlikely set of masks and interprets it as
RGB16 which VNC expects.

Task-number: QTBUG-44147
Change-Id: Ia374edcd5f0a5ce0188157ac1d328f888cfa260c
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-02-02 10:26:37 +00:00
Maurice Kalinowski
012a7ab912 WinRT: Fix access to style hint instead of theme hint
You need to specify explicitly the styleHint enum instead of the
theming one, which is where we want to forward to.

This caused all clicks to be ignored in case there is a listener to
pressAndHold as the hold period is reduced to 0 milliseconds.

Task-number: QTBUG-44196
Change-Id: I30d1771b91b5fa358e896e8441ade965543d4613
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Andrew Knight <qt@panimo.net>
2015-02-02 10:26:33 +00:00
Allan Sandfeld Jensen
2e2df81537 Only use Xft font settings as defaults, and let fontconfig override
On a GNOME or UNITY desktop, Qt will currently read font-settings from
Xft and use those ignoring any fontconfig instructions. This patch
changes the behavior so the Xft settings are only used as default, but
any explicit overrides by fontconfig will take precedence.

Task-number: QTBUG-43660
Change-Id: Ie10d5828cbfdd95fe5364c63a625d455d9213936
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-02-02 09:09:30 +00:00
Joerg Bornemann
b9ae324dc9 fix fallback architecture for MSVC
Use x86 for a 32 bit build of qmake and x86_64 for 64 bit.
This is needed for shells that do not set VCINSTALLDIR.

Change-Id: I0843c1a590161669530b99f45ab59d523e6596c3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-01-29 09:30:20 +00:00
Thiago Macieira
8172fe4647 Correct the version of ICC that has the constexpr bug fixed
01fc82e357 updated the code for ICC 15,
but it needs to be 15.0.1

Change-Id: Iba8d819ab9174d9dac07ffff13bbc26b9be46d53
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-01-29 09:30:12 +00:00
Andreas Holzammer
4b707d3bde WINCE: Fix special case for toplevel
It looks like that WindowFromPoint does not
return same handle each time, hence
he then is in a endless loop. We don't need
to look for a child in a loop here for
Windows Embedded Compact.

Task-number: QTBUG-44073
Change-Id: Ic42d56616b29f293d187111588fde3947c15659c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-29 09:30:05 +00:00
Friedemann Kleint
03a40d3a46 Revert "Windows: Fix call of ToUnicode"
This reverts commit dfe853bff9.

When using cyrillic or other keyboard layouts, standard shortcuts
like CTRL-C are still supposed to work as if the US keyboard layout
were in effect.

Task-number: QTBUG-44021
Task-number: QTBUG-35734
Change-Id: If6cd96a1e03e62900b293f8e304e523460e85810
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-01-29 09:29:56 +00:00
Frederik Gladhorn
55162dae7e Merge remote-tracking branch 'origin/5.4.1' into 5.4
Change-Id: Idadb5639da6e55e7ac8cc30eedf76d147d8d5d23
2015-01-29 10:05:01 +01:00
Shawn Rutledge
6430d6e3ec Use qt.io rather than qt-project.org for network tests
Mainly because of a change in certificates which is causing failing
tests.  This patch is cherry-picked from
https://codereview.qt-project.org/104619/

Change-Id: I8304e5ac4107428a250b71be5df7b5399a811017
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-01-28 11:10:19 +00:00
Friedemann Kleint
44ab91aaa1 Windows/ANGLE: Fix initialization of contexts.
Immediately try to initialize a context obtained by
eglGetPlatformDisplayEXT() and clear display in case it fails,
falling back to eglGetDisplay().

Change-Id: Ia6c1c6da4daff6651153c854eda4fb8749bdc526
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-01-28 11:09:39 +00:00
Thiago Macieira
817800ad39 Fix QXmlStreamReader parsing of files containing NULs
Due to a flaw in the internal API, QXmlStreamReader's internal buffering
would mistake a NUL byte in the input stream for EOF during parsing, but
wouldn't set atEnd == true because it hadn't yet processed all bytes.
This resulted in an infinite loop in QXmlStreamReaderPrivate::parse.

So, instead of returning zero (false) to indicate EOF, return -1 (but in
unsigned form, ~0, to avoid ICC warnings of change of sign). In turn,
this required enlarging a few variables to avoid ~0U becoming 0xffff,
which is a valid QChar (could happen if the input is a QString, not a
QIODevice).

Task-number: QTBUG-43513
Change-Id: If5badcfd3e4176b79517da1fd108e0abb93a3fd1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-01-24 18:35:22 +01:00
Marc Mutz
3527fd62c2 src/gui/painting/painting.pri: add missing qfixed_p.h
Change-Id: Iba176345ec9448c936cd89b06ea24272df94fc1f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-24 11:11:40 +01:00