Commit Graph

20038 Commits

Author SHA1 Message Date
Oliver Wolff
365c6e81be WinRT: Fixed construction of QNativeSocketEngine without parent
Change-Id: If55a8049224a7dceca33a3cf3089d541a3a97b8e
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-09-03 09:33:23 +02:00
Jeremy Lainé
cd3dece750 ssl: common key parser support for encrypted keys
This adds the infrastructure for reading and writing encrypted private keys
when using non-OpenSSL backends. Each platform must provide its cryptographic
encrypt / decrypt functions.

As WinRT already uses the common parser, this commit includes an
implementation for that platform.

Done-with: Andrew Knight <andrew.knight@digia.com>
Task-number: QTBUG-40688
Change-Id: I0d153425ce63601ff03b784a111e13962061025f
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-09-02 23:16:25 +02:00
Friedemann Kleint
b17365cda9 Fix drawing of QLineEdit's actions when Qt::AA_UseHighDpiPixmaps is set.
Task-number: QTBUG-40525
Change-Id: Iff3c1e16d9c44e1d36b8f83ca96b48bff05ab1f0
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-09-02 22:57:24 +02:00
Paul Olav Tvete
d450eb5e6d Android: Guard against invalid surfaceID
Do not try to resize or destroy invalid surfaces.

This caused update problems with all GL apps after suspend,
since we would forget the dummy view that we always keep
around so we get proper transitions on shutdown.

Also make sure that we don't mess this up even if we try to destroy a
non-existing surface. This would have fixed the bug by itself, but
then we would still be stuck with the annoying warning message.

Task-number: QTBUG-41093
Change-Id: I83299e93eb9ac5357b98ca47014789b56c91b35a
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-09-02 22:00:02 +02:00
Andrew Knight
a8b243b42e windows: Allow selection of ANGLE's renderer
The default behavior of ANGLE is to use D3D11 before falling back to D3D9.
This change improves flexibility the platform plugin to explicitly create
a D3D11, D3D9, or D3D11 software (WARP) context by setting the
QT_ANGLE_PLATFORM to "d3d11", "d3d9", or "warp", respectively.

Task-number: QTBUG-41031
Change-Id: Ie1d399c1cb0e360e5b3a6d9f2a4b28745d86cc71
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-09-02 21:55:48 +02:00
Andrew Knight
efdabc4b0e Remove vestiges of d3dcompiler_qt
Change-Id: I2a233cb0bfec27a7535a31818568955f8bf85c15
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-02 21:55:41 +02:00
Marc Mutz
5b9e566b4d QImage: add a qMove()
The color table is passed by value (good for C++11), so when
the argument is assigned to the member variable, that's a good
spot for a move assignment.

However, the argument is also declared const.

The standard says that top-level const is ignored, but some
compilers (I know about SunCC) think differently, so we cannot
remove it.

Instead, we do a const_cast. It is well-defined: Even though
apparently the argument was declared as const, the standard
says the const is not there, and no sane compiler would put
the argument copy into read-only memory.

Add a reminder to remove the top-level const from the
signature come Qt 6.

Change-Id: Iac18846ba669de0a30da620685ad1438c267e193
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-09-02 20:43:07 +02:00
Marc Mutz
b04c144297 QOpenGL2GradientCache::getBuffer: calculate hash value outside critical section
The code doesn't touch any member variables, so it doesn't need mutex
protection. Reducing the time spent under the mutex allows a higher
speedup (Amdahl's Law), so do it.

Also made the mutex locker const to indicate it is never unlock()ed
again.

Change-Id: Ic50b827c0e34d39cbddc7ec83675b568a9c33f6d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
2014-09-02 20:42:51 +02:00
Adam Strzelecki
1a9992c1f2 Fix bash syntax error in configure
Fixes missing space before `]` in test condition introduced in 8d57725338.

Change-Id: I741c291677f32056a0a0bec12cb4d9fd293a2021
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-09-02 20:37:27 +02:00
Tor Arne Vestbø
8a7fcf0a7d iOS: Don't store UIViewAnimationOptions value as UIViewAnimationCurve
We pull out the magic UIViewAnimationCurve of the keyboard animation
when the keyboard is about to show, but we need to defer the shifting
of the value 16 bits, as that turns it into a UIViewAnimationOptions,
which we can't store in a UIViewAnimationCurve member.

Change-Id: Id35dae1ec487951df749dfffb6118b572c28b103
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-02 16:13:18 +02:00
Tor Arne Vestbø
942c6910d1 iOS: Get rid of markedTextFormat global static variable in IME
Preperation for IME refactor.

Change-Id: I0832c174d05d019d69ef7c01c45aaedc6e4d9468
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-02 16:13:12 +02:00
Tor Arne Vestbø
fea21655a8 iOS: Add support for QWindow::setOpacity()
Change-Id: I027154aef35d219f08915e195f2baf8595ef7343
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-02 16:13:06 +02:00
Friedemann Kleint
552639c359 Windows XP, Vista styles: Share dynamically resolved theme functions.
Extract a struct containing the function pointers and derive
QWindowsXPStylePrivate from it, so that both styles can use them.
Remove duplicated variables.

Task-number: QTBUG-38858
Change-Id: I7c2c665b5930c56ffdf33c5185720f71517d146c
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-09-02 10:26:13 +02:00
Jeremy Lainé
31938846ae qasn1element: add QAsn1Element::toInteger
This change adds the ability to decode ASN.1 INTEGER fields,
provided they represent a positive number of less than 64-bit.

This is needed for PKCS#12 decoding.

Change-Id: Iafb76f22383278d6773b9e879a8f3ef43c8d2c8f
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-09-02 09:52:08 +02:00
Laszlo Agocs
b366d0d016 Make the EGL platform cursor reset the array buffer
Otherwise bad things happen if the application leaves a buffer bound.

[ChangeLog] The eglfs mouse cursor properly resets the array buffer
to prevent rendering issues. This, just like with vertex attributes and
textures, requires applications to be aware of such state changes in
swapBuffers().

Change-Id: I8b383cc867d8d0d0572773eacfa650e7b33b9680
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-09-02 09:47:55 +02:00
Maks Naumov
09754d218a QTextEngine: remove unnecessary assignment in LayoutData::reallocate()
Change-Id: I82e34d5525354fc20ca9aba6df3767e3fee51bf8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-09-02 08:05:10 +02:00
Marc Mutz
de068472f1 QIconLoader: enable an easy case of transactional processing
It's easy to do the work on the side and then commit. This is strongly
exception safe, but in Qt, we don't care. But transactional code, when
this easy to achieve, is also clearer.

Change-Id: I30f1badec7745d62a09af4eede234cb312b373aa
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-02 00:43:50 +02:00
Maks Naumov
97a32c8440 Fix radioButton height for Windows style
Change-Id: I755ed32f7458fec0fcbc5243d25fb1f6ecf46492
Task-number: QTBUG-32420
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
2014-09-02 00:27:03 +02:00
Andrew Knight
1cdcf64ad5 direct2d: Fix translucent/frameless window rendering
When using WA_TranslucentBackground/FramelessWindowHint, the backing
store must paint to an offscreen texture instead of the swap chain in
order to achieve the desired results. This texture is then presented to
the screen using UpdateLayeredWindowIndirect().

As the swap chain is not needed in this mode, its construction is skipped
if indirect rendering is active.

Furthermore, the layering options were updated to fix an issue with
transparent layers overpainting the background. The layer options were
switched to D2D1_LAYER_OPTIONS1_NONE, which appears to work for both
translucent and non-translucent rendering modes.

Task-number: QTBUG-40601
Change-Id: I656f7cdfb424d1eda6f82c2c69500e78d8c1726a
Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-01 18:08:43 +02:00
Andrew Knight
fc3acdd9d2 winrt: Fix mouse coordinates on high-DPI displays
The scale factor was only being applied to touch coordinates.

Change-Id: I7fc2793b1514c73986a574a95478306c1eb54c5e
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-09-01 18:08:27 +02:00
Laszlo Agocs
6ae01c72e1 Fix no-opengl build
Change-Id: I577bd5d10e52571c95c9e646327264cf95ac6eb1
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-01 14:29:36 +02:00
Andrew Knight
ffceaf6213 ANGLE: Fix -angle-d3d11 on MSVC2010
Allow the D3D11 renderer to build with the June 2010 DirectX SDK.

Change-Id: I2343acedab16845d6a0d4a53cf3145f583efc4a7
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-01 14:28:07 +02:00
Andrew Knight
552ac4bcb6 ANGLE: Don't directly link to DirectX 11
These libraries are dynamically loaded on desktop Windows.

Change-Id: I3a0d17a48a3bd4930690d20d387df0d92906662d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-01 14:28:06 +02:00
Laszlo Agocs
da2b3c4479 Prevent current context from becoming inconsistent upon create()
Platform plugins have a tendency to make the newly created native
context current with a temporary surface. This is usually needed to
query some information related to the new context. Afterwards most of
them just reset to having nothing current.

This has two issues:

It unexpectedly changes the current context/surface. A call into
QOpenGLContext::create() does not imply that the current context will
get changed. This is the minor issue and we could probably live with
it (at least if it had been documented).

However, the real issue is that QOpenGLContext::currentContext() will
become inconsistent: it will still report whatever was current before
the create() even though on the EGL/WGL/GLX level that's not the case
anymore.

To prevent all this confusion the platform plugins can easily be
changed to restore whatever context/surface was current before they
altered it.

Change-Id: I6a5b4597c86571327524ddb13e0d02538593cc7b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-09-01 14:10:12 +02:00
Tor Arne Vestbø
d06fb5609c iOS: Initialize QScreen properties before setting up root viewcontroller
Change-Id: I5fd899030b0557e9b0d96f2c065c8be5cfadd5de
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-09-01 13:19:07 +02:00
Friedemann Kleint
78ee759748 Windows QPA plugin: Streamline code to find window at a position.
Task-number: QTBUG-40815
Change-Id: I0efcc2cfcafdee04bda20afa88a7f6aaabd57210
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-01 13:08:41 +02:00
Allan Sandfeld Jensen
367680679a Fix advance of zero-width spaces in fonts that omits the glyph
Some fonts appear to include zero-width space in the CMAP table, but
not include an actual definitions of the glyph they point to. The
missing glyph causes a warning, but isn't handled making the character
end up being giving the same metrics as whatever character it came after.

This patch adds explicit handling of missing glyphs, and also caches
their missing state when caching is enabled.

Task-number: QTBUG-40912
Change-Id: I06fba9c01df59548e750e36babfdd5a6bafd6bd0
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
2014-09-01 12:25:56 +02:00
Maks Naumov
1812bb968c Remove superfluous "break" in QWindowsNativeFileDialogBase::setLabelText()
Change-Id: I889dfa00daf60e393e3d95ee2d0ecb73f7871e4c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-09-01 05:51:14 +02:00
Maks Naumov
8785cf3a01 Fix memset() for "alphaValues" in supportsSubPixelPositions()
Fix reversed memset arguments.

Change-Id: I1601fecb24068fa601e919a9fd8bb1e991ef70ec
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-08-31 23:05:16 +02:00
Maks Naumov
1c55481215 QDoc: fix Node::setPageType() when type name is "faq"
"HowToPage" has been verified above.

Change-Id: If8ca9b375029d5b018936b04a2a313cf5b8788b6
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-08-31 14:17:11 +02:00
Maks Naumov
8d9957c671 Avoid trying convert to RGB32(ARGB32) when image already RGB32 while writing XPM image
"sourceImage.format() != QImage::Format_RGB32 ||
sourceImage.format() != QImage::Format_ARGB32 ||
sourceImage.format() != QImage::Format_ARGB32_Premultiplied)"
This condition always "true".

Change-Id: I67b3dfac135985a75bcd697b4c1a84ec3c0b66f5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
2014-08-31 14:16:40 +02:00
Daniel Teske
e5f3a25253 IBus Input Method: Check in commit whether we need to commit
Task-number: QTBUG-40755
Change-Id: I283d48cc6d4390a02d0df63ac6e38fa5f73a0ec0
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
2014-08-31 11:48:51 +02:00
Thiago Macieira
8d57725338 Add a note to the configure about the use of journald and slog2
Change-Id: I790807d286fc89f6cca890342d15d0ed044163a5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-08-30 22:22:43 +02:00
Thiago Macieira
bdcd636dcb Fix headercheck failure introduced by 67c83f329e
That commit exposed part of qfunctions_winrt.h for non-WinRT use
(Windows 8) without wrapping with Q_OS_WIN. That meant the headercheck
pass failed to compile when outside of Windows.

Change-Id: Ie731cce21e5102f5e5879b147b7738a7d0a91ecd
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-08-30 22:20:35 +02:00
Jerome Pasion
694aae7923 Doc: Fixed typo "lamda".
Change-Id: I17a3b324927407b64cabc39a0b90f0ab2e0676be
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2014-08-30 17:47:12 +02:00
Jeremy Lainé
5c3a499c9f ssl: disable (broken) i/o on DER encoded keys
QSslKey currently has methods which supposedly allow decoding and
encoding private keys as DER protected by a passphrase. This is
broken by design as explained in QTBUG-41038, as storing the encrypted
DER data alone makes no sense: such a file lacks the necessary
information about the encryption algorithm and initialization vector.

This change:

- explicitly stops using the passphrase when decoding DER in the
  constructor. The behavior is unchanged, it is not possible to
  read the encrypted DER alone.

- refuses to honor the passphrase to DER encode a private key. The toDer
  method now outputs an empty QByteArray instead of garbage.

Task-number: QTBUG-41038
Change-Id: I4281050cf1104f12d154db201a173633bfe22bd9
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-08-30 17:36:23 +02:00
Jeremy Lainé
2fd0afc1f8 ssl: add a test for 3DES encrypted keys
This adds a test for 3DES encrypted keys in addition to the
current DES encrypted keys.

Change-Id: I229e3ef710e9ee23efa2a3275b89d958491de4a2
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-08-30 17:24:05 +02:00
Andrew Knight
74a7f13ac1 winrt: Implement missing SSL socket methods
Move from a stub to a functional SSL socket implementation.

This implementation has some limitations. Due to the way the native
SSL upgrade works, it is not possible to ignore SSL errors after the
handshake has begun. The user must set the ignore flags before
connecting to the host.

Due to missing implementation in the underlying native socket, the
synchronous methods (waitForConnected(), waitForDisconnected()) are not
functional either. Users must rely on the asynchronous methods instead.
This is not a problem in the general case, as HTTP(S) is not affected.

SSL server sockets are not supported by the native API, so it is not
possible to bind an SSL server socket.

Change-Id: Id0b323f273892580b294aa5a6ff601a8241470df
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
2014-08-30 08:21:10 +02:00
Oliver Wolff
5328ec7e10 winrt: complete QSslCertificate implementation
The native handle and import functions are now available for use in other
parts of the winrt backend.

Change-Id: I07e6f95b3411c3dc7c1a7a164544b18e5e435d01
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-08-30 08:20:51 +02:00
Jeremy Lainé
6a4cb8d62b ssl: Add common key parser for backends
This internal implementation of QSslKey can be used when OpenSSL is not
available. Encrypted keys are not supported, as the cryptography must
be supplied by a separate library.

With this commit, WinRT is migrated to the new implementation,
but qsslkey_winrt.cpp is left in place so that the missing crypto
implementation can be added later. This also means most of the expected
failures for that platform can be removed from the autotest.

Change-Id: I24a3ad1053bb72311613b28b3ae845aa1645a321
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-08-29 23:18:22 +02:00
Friedemann Kleint
def5a56b03 Add Q_ENUMS to QStyle's enumerations.
This makes it significantly easier to obtain debug output
for style functionality.

Task-number: QTBUG-38858
Change-Id: I19edc834a55fa369b6830abeb4697ae5e5ded995
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-29 16:34:06 +02:00
Friedemann Kleint
83dab766fc Windows: Fix QPlatformCursor::pos()/setPos() for DPR scaling.
Task-number: QTBUG-38858
Change-Id: Ibb0355ae19a382e4eb3805fe6d6afab2a2a603e6
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-08-29 09:51:48 +02:00
Lars Knoll
1d66c9eba8 Fix nativeRead() for maxlen greater than UINT_MAX
Don't truncate the maxlen to a DWORD. Instead read all
data incrementally up t maxlen.

Task-number: QTBUG-27796

Change-Id: I21c34d11046f1106244dcd77420cc472e7240e68
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-08-29 09:32:30 +02:00
Christoph Schleifenbaum
fc4993be1f QListView: Catch stack overflow on mutual scrollbar calculation.
Task-number: QTBUG-39902
Change-Id: Ie850371098070e8ce485d5cb122aa89c18d97359
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-29 07:26:29 +02:00
Topi Reinio
e4a778d9c2 qdoc: Use qdoc error logging for warnings related to index files
Make the warnings that are displayed during the reading of index
files and dependencies more consistent by using QDoc's error
logging functions.

This means that warnings are not generated in prepare phase,
but they are generated for projects that call qdoc directly,
running prepare and generate phases in one go.

Change-Id: I645c3feb1cbf471fd3ca6034f94e7dc1ea35b875
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-08-29 00:22:03 +02:00
Friedemann Kleint
1b32e8d7d4 Windows: Detect Surface Pro 2 tablets.
Task-number: QTBUG-39571
Change-Id: I9cb7fe2dee9a0701912ea639cdcc66a198e5b65c
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-08-28 16:43:30 +02:00
Friedemann Kleint
0aa84a619e QLineEdit: Disable standard key 'cut' when there is no selection.
Task-number: QTBUG-40477
Change-Id: I0741a1a769c9e7e0d19e8aec231acc29461d44ea
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-28 16:19:36 +02:00
Robin Burchell
9b599c6cea tst_qstatusbar: Allow a little more leeway in timer checking.
Timer granularity means that sometimes this won't wait the full timeout before
vanishing the message. Add some extra tolerance so we don't unnecessarily fail
integrations.

Change-Id: I203ac16cda7bd1f0437dd3febc0509c17e86c25a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-28 13:59:37 +02:00
Samuel Gaist
6f52256dc2 Doc: properties, add missing parenthesis
Change-Id: I97b5a96b29416ca7af145edb1a6a96595c9524da
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-08-28 13:55:28 +02:00
Jeremy Lainé
d4dc3159c7 Check certificate nullity instead of handle
This changes tests which use QSslCertificate::handle() to determine
if a certificate is null to use QSslCertificate::isNull() instead.

This is required for non-OpenSSL backends which do not actually
expose a private handle.

Change-Id: I9523ba0dd00d47ba337b543ad34840125db99bfb
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-08-28 13:33:46 +02:00