Commit Graph

14930 Commits

Author SHA1 Message Date
Gatis Paeglis
f813a3e8ad Print warning when unable to query physical screen size
This warning was removed when re-factoring code in:
328f2f9c35

Change-Id: I5a9d7fbbf2b78e6e80a79478f4e9fb08ccaec431
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-10-10 12:48:30 +02:00
Laszlo Agocs
26c104d120 Add a warning when using QOpenGLWidget as a native child
Just like it is done for QQuickWidget.

Task-number: QTBUG-41779
Change-Id: I1b27c2ed34ecb2520edf82843b675dbf6b0eab8e
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-10-10 12:48:27 +02:00
Mikołaj Siedlarek
8fc34e42a8 Add information about unsupported SSL protocol when creating context.
When creating SSL context failed due to unsupported protocol being
demanded, no explanation was given. It's because
QSslContext::fromConfiguration() extracted explanation for error message
from OpenSSL, which at that point hasn't even been called yet. This
patch adds explicit message informing that an unsupported protocol was
chosen.

Task-number: QTBUG-41775
Change-Id: I9d2710da4ba314a16837a90afcdc5d9256179bef
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-10-10 10:17:12 +02:00
Mikołaj Siedlarek
9ddf2fb376 Prevent parsing of SSL certificates from 0-size buffers.
When QSslCertificatePrivate::certificatesFromDer() was passed count ==
-1 to extract unlimied number of certificates from buffer, it also tried
to parse the 0-sized fragment after the last certificate.  This has
caused d2i_X509() to report an error on latest OpenSSL.

Task-number: QTBUG-41774
Change-Id: Ifa36b7ac5b4236bd2fb53b9d7fe53c5db3cb078c
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-10-10 10:17:07 +02:00
Eskil Abrahamsen Blomfeldt
5f1f955524 Android: Fix memory leak in QClipboard::setMimeData()
The ownership of the object passed into QClipboard::setMimeData()
is documented to be transferred to the clipboard, but we never
deleted it, thus all these objects would leak.

[ChangeLog][Android] Fixed memory leak in QClipboard::setMimeData()

Change-Id: I43e6bad1071be5f56c219cb9341584edba54d2bd
Task-number: QTBUG-41852
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-10-10 10:13:53 +02:00
Eskil Abrahamsen Blomfeldt
e31a7e46ea Android: Support QClipboard::clear()
QClipboard::clear() is implemented by calling
QPlatformClipboard::setMimeData() with a null pointer. Since we
would do nothing in this case on Android, then the clear()
function would have no effect.

[ChangeLog][Android] Added support for QClipboard::clear()

Task-number: QTBUG-41854
Change-Id: Id569b102f2e561e46967b52f89d9b54031d92456
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-10-10 10:13:45 +02:00
Paul Olav Tvete
c712ec4543 Android: Thread fix/optimization
Do the cheap test before sending an expensive query that might
use a mutex.

Task-number: QTBUG-41369
Change-Id: I78f03c84e5bbf0492f1b7ea18d1baa752a1beff2
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-10-10 10:04:42 +02:00
Paul Olav Tvete
7755b4af41 Android: null pointer check
Task-number: QTBUG-41680
Change-Id: I740fb2a6df5613a8ee724b59dab08674a3337236
Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2014-10-10 10:04:34 +02:00
Christian Strømme
8d8000b5fe Android: Don't call requestLayout() when changing the geometry.
requestLayout() is already called when setLayoutParams() is called, so
calling it again is extremely wasteful.

Change-Id: Iddfb488830a6b7277a653a84ffacabf966baf0b5
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-10-09 22:57:19 +02:00
Alessandro Portale
106487387d Removing a few unneeded "? true : false"
Change-Id: Ib13f0ddd65fe78f5559f343f2fc30756b1d3ef76
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-10-09 09:43:26 +02:00
Marc Mutz
e5f528fb0e Don't stream QStringLiterals into QDebug
Normal (C) string literals do just as well and use more than twice
less space in the DATA section.

Change-Id: Iafb0682a362c41dfd5b4d8b9137d88014d7992a2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-09 09:42:27 +02:00
Marc Mutz
a5b647804b QFactoryLoader: de-duplicate two QStringLiterals
When seemingly identical QStringLiterals are used in different
functions, due to the use of lambdas and scoping, they produce
different lambda types and thus duplicated QStringLiteral data.

Fix by moving the QStringLiterals into inline functions and
calling those instead.

Change-Id: Ifaa124ec74e201ccc63fd9afce042f8b2ff22b9e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-09 09:42:17 +02:00
Marc Mutz
1cc06b2e94 Don't use QStringLiteral in startsWith/endsWidth
For QLatin1String, startsWith/endsWith is overloaded, 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 use QLatin1String instead.

Change-Id: I7eaf464c67b55116f970fe7f58a85f19ce4d254e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-09 09:42:11 +02:00
Marc Mutz
1a5c0b26d0 Don't use QStringLiteral in comparisons
For QLatin1String, operator== is overloaded, 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: I7af3bf3a67c55dae33ffaf9922d004fa168a3f9c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-09 09:42:00 +02:00
Marc Mutz
bf1df55846 Don't use QByteArrayLiteral in comparisons
For const char*s, operator== is overloaded, so comparing to a (C) string
literal is efficient, since qstrcmp doesn't require the length of the
strings to compare.

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

So, just compare with a (C) string literal instead.

Change-Id: Id3bfdc89558ba51911f6317a7a73c287f96e6f24
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-09 09:41:51 +02:00
Marc Mutz
05663e29d0 moc: don't use QByteArrayLiteral
The byte array literals are only used to append them to another
QByteArray, so they offer only the static size calculation as a
benefit.

However, there are several drawbacks:
- QByteArrayLiteral data cannot be shared the way string literals
  can be, not even within a single TU, and they add a few ints
  for the QByteArrayData header which cannot reside in BSS, but
  need to be stored in DATA.
- QByteArrayLiteral *does* allocate when the compiler doesn't
  support C++11 lambdas.
- QByteArrayLiteral, when not using RVO, litters the code with
  QByteArray dtor calls, which are not inline, and thus can't
  be optimized away.

In particular, when used like this, they do not prevent any
memory allocation (in fact, they might add some, absent lambdas).

So, just append (C) string literals.

Change-Id: Iee5dba8dd970c5cc6df116afc1f8709a62356b06
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-10-09 09:41:40 +02:00
Friedemann Kleint
4a2cf9ca41 Fix license text and URLs in QMessageBox::aboutQt().
Point to new qt.io site, adapt licensing text.

Task-number: QTBUG-41798
Change-Id: I492df6a842c2b31e44653fb4388408c209f24f1e
Reviewed-by: Sami Makkonen <sami.makkonen@digia.com>
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-10-09 09:32:18 +02:00
Marc Mutz
9b80ed9d56 QCss: mark many classes as movable
Most of these are held in QVectors, so let QVector use the
optimized reallocation strategy.

Change-Id: I6c2182465c283705bd5ec761e3d2d3d072bc6207
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-08 13:58:40 +02:00
Marc Mutz
9a5e4ada9c QCss: Move declaration of ValueExtractor
Move it to the end of the header, since it was sitting right
in the middle of AST struct definitions without being one
itself.

Change-Id: I017d6187324e91f2745629dbed4271064d4e59a8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-08 13:58:33 +02:00
Marc Mutz
3be9d6d116 QCss: unexport some classes
and export only the non-inline functions inside them.

Inline functions don't need exporting, and some compilers
are known to have problems inlining inline functions of
exported classes.

Change-Id: I843adc0ab493817e71f48ab87bfefb03d4ca918d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-08 13:58:27 +02:00
Richard Moe Gustavsen
707eb8d28d iOS: add system palette
Return a system palette that sets the correct
highligh (text selection) colors.

Change-Id: Ic0a18f931913f28bdc73d9ec4ae347fe38839f17
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-10-08 13:43:57 +02:00
Eskil Abrahamsen Blomfeldt
183d04de90 Add text ranges to QGlyphRunPrivate
This is an enabler for using the QGlyphRun in the selection
code of the scene graph node. In this case, we need to
know exactly which of the characters in the text are represented
by the glyph run, as a single range of text may result in
several glyph runs.

Change-Id: Ie8ec942693dceea45ab548f6cefc4f78e4c6d524
Task-number: QTBUG-41808
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-10-08 13:07:58 +02:00
Topi Reinio
a366b2bb54 qdoc: Fix generation of qhp sections for unsorted pages
If you had the following lines in .qdocconf:

    qhp.QtFoo.subprojects.examples.title      = Examples
    qhp.QtFoo.subprojects.examples.indexTitle = Qt Foo Examples
    qhp.QtFoo.subprojects.examples.selectors  = fake:example

The expected outcome is to see an unsorted list of examples. This
didn't work however, because QDoc assumed to find a chain of
\nextpage links for the indexTitle, and these are rarely used
in Qt documentation nowadays.

This commit ensures that all pages matching the defined selectors
will be listed under the section title, even when the sortPages flag
is not set.

Task-number: QTBUG-41737
Change-Id: I1e7e2a2953de949c9b52763165c406a64d1d46f7
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-10-08 12:47:19 +02:00
Jake Petroules
3b1de67fde Utilize Q_FORWARD_DECLARE_OBJC_CLASS in QCocoaFileDialogHelper.
Change-Id: I94ae91ac8fb625de4a328c6628ce0ab45919708f
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-10-08 02:29:54 +02:00
Thiago Macieira
50430a8392 Fix compilation of MIPS with Clang
Clang always sets __mips to 1, unlike GCC. To detect a higher MIPS arch,
we need to rely on the _MIPS_ARCH_MIPSxxx macros being defined -- or, in
this case, _MIPS_ARCH_MIPS1 not being defined.

Change-Id: Ib6846a6892a4c1e17e595a69305b7e46a5303ee7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Adrian Perez de Castro <aperez@igalia.com>
2014-10-07 22:30:21 +02:00
Dmitry Shachnev
3a25799413 Add Cinnamon to the list of Gtk+-based DEs
Change-Id: I6c2a374026fde30858f1a51f34fa195ef8f8fe37
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
2014-10-07 15:35:23 +02:00
Friedemann Kleint
a4aea7b578 MSVC: Restore 'public' accessibility of QVariant member functions.
The were made 'protected' as a side effect of a change enabling
support of template friends for MSVC. However, accessibility
is part of the MSVC's name mangling and thus BC was broken.

Task-number: QTBUG-41810
Change-Id: I5ce4c7010673c06d5b75219c89c7ebd337bac6c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-07 14:33:40 +02:00
Andy Shaw
9884ec73dd Clean up the CFTypes used in popuplateFamily
Change-Id: Iabe127486c77ebb2afe7fe13ecccd70252a79031
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-10-07 14:23:57 +02:00
Morten Johan Sørvig
a7f1eb4ab3 Correct devicePixelRatio for software OpenGL
[NSView setWantsBestResulutionOpenGLSurface] is a
hint and the driver may ignore it, for example when
using software OpenGL on a virtual machine.

In these cases devicePixelRatio() must return a value
corresponding to the actual OpenGL surface size. Use
[NSView convertSizeToBacking] which is one of the
recommended methods.

Task-number: QTBUG-41767
Change-Id: Ia79242219908a2454a83b44b6eb7463372764162
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-10-07 13:31:59 +02:00
Oswald Buddenhagen
a1d66c9aee Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4 2014-10-07 13:31:20 +02:00
Nico Vertriest
ded6514de8 Doc: deletion plugin-howtos.qdoc
Document is moved to qtdoc/doc/src/howtos
Including snippet files.

Task-number: QTBUG-38412
Change-Id: Iba15689ad63e17c370c21c9ee5a1fff40c79fcec
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-10-07 13:26:28 +02:00
J-P Nurmi
6cd1257757 Fix native GTK2 dialogs to receive focus
Task-number: QTBUG-41406
Change-Id: I00f317e5ef62f63c37e9610e1f8ea00af2740b99
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-10-06 23:17:11 +02:00
Giuseppe D'Angelo
ec68f67ee5 XCB: silence warnings about possibly undefined shifts
The code shifts "1" by a uint32 number. If that number is >= 32,
we're triggering undefined behavior, and Coverity rightfully complains
about that. Add some asserts to silence those warnings.

Change-Id: Ib91085a279b0a2b7ad37afad05ec1d764c0496b1
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-10-06 18:18:30 +02:00
Shawn Rutledge
bf28e2fc13 Do not re-create windows during application shutdown
Change 9c3a58a913 causes any window to
be re-created when the screen it is shown on is destroyed.  This
is for the use case of detaching one monitor while another remains.
In QWindow::setScreen(), if the screen is null, it will be set to
the primary screen.  However during application shutdown, it may be
that the primary screen has been destroyed before all the windows
are destroyed; so trying to set it anyway will cause a crash.
qtdeclarative/tests/auto/quick/qquickwindow was segfaulting,
especially when running testWindowVisibilityOrder by itself.

Change-Id: Ice6b30320ac563f0c70264aa5c57de21d2e4d56e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-06 16:01:11 +02:00
Eskil Abrahamsen Blomfeldt
d5db8dbfec Windows DirectWrite: Fix off-by-one in font descent
In cb8445f032 we removed the historical
+1 in font heights and the corresponding -1 in the descent measurement
for all font engines. But the change to the direct write font engine
was lost at some point during the transition to QPA, where we seem
to have integrated an older version of the source file.

[ChangeLog][Windows][Fonts] Fix off-by-one in font descent when using
the DirectWrite font engine.

Task-number: QTBUG-41783
Change-Id: Iffa24b5f2b4f6cc3a1f0034fdff63a1ee62ea9f7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-06 14:27:51 +02:00
Oswald Buddenhagen
f49d5b578c Merge remote-tracking branch 'origin/5.3' into 5.4
Change-Id: I132bb6cce68e9f8413200f7ee75586bd1cada38c
2014-10-06 11:59:47 +02:00
Laszlo Agocs
848e950252 Rename internal enum value to avoid clashing with Xlib
Change-Id: I4926d1f75ece220d28abf9f2e7081e41f0aaf339
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Martin Jansa <Martin.Jansa@gmail.com>
2014-10-05 22:51:43 +02:00
Alex Blasche
014ed987ac Fix QTextInlineObject class documentation
Change-Id: I10ac533c1ba7a8003b59b1617af98afbdd4ed17f
Task-number: QTBUG-39784
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2014-10-05 11:22:25 +02:00
Marc Mutz
100455d4c1 QSizePolicy: remove an outdated comment
The change asked for by the comment is apparently done.

Change-Id: I7ef2b58eb8c38192904e83b1c2386d3c762e0bed
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-10-04 14:10:54 +02:00
Marc Mutz
1adc586abd QBrush: be more robust in detach()
If detach() was called with a newStyle corresponding to a gradient,
but with d->style not a gradient, it would execute an invalid cast
and read invalid memory.

The reason this has not been seen in practice is that a non-gradient
brush instance can currently never become a gradient one. But that
may change when someone adds an operator=(QGradient), so in the
interest of robust code, add a check to verify the old style was a
gradient before accessing the corresponding member.

Change-Id: I216a144d31a9ed7145bcd829f3ae5f44a41672db
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-10-03 20:45:09 +02:00
Tor Arne Vestbø
613c2f92b8 iOS: Properly scope window deactivation on resignFirstResponder
We were missing brackets, but luckily the only result was that we
unconditionally flushed events through flushWindowSystemEvents.

Change-Id: If10bcc6a07501b9fb0db891e01b8ecc9d794ab30
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-10-03 14:20:59 +02:00
Eskil Abrahamsen Blomfeldt
2e365245c1 Android: Hide vkb when IM disabled for focus object
When the focus object changes to an object that does not have
IM enabled, we should hide the keyboard instead of resetting it.
This happens, for instance, if you change to a different tab in
an application while a text input in the previous tab had focus.
Previously the input panel would stay open and overlap part of the
new tab.

[ChangeLog][Android] Hide input panel when focus changes to an
object that does not accept input.

Change-Id: I4009d203559582fa02c15fdc1a3f009396af2531
Task-number: QTBUG-32399
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-10-03 14:00:30 +02:00
BogDan Vatra
27f5efb895 Fix the text field alignment.
All Android styled controls must use AndroidControl methods.

Task-number: QTBUG-41722
Change-Id: I594829bfed8468888738b39450fe94af35f14d7a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2014-10-03 13:55:57 +02:00
Topi Reinio
0edf68120b Doc: Clarify QBitArray::fill() documentation
Fix a minor mistake in the the function parameter documentation,
and add a code snippet.

Task-number: QTBUG-39782
Change-Id: Ia5d88a983ad683ae5bde9f332d51adc4afda77a8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-10-03 13:32:58 +02:00
Laszlo Agocs
1a801e0eef Pass a sized format when creating multisampled renderbuffers on ES
Task-number: QTBUG-40921
Change-Id: I96b05442dd5928992dab06553b3d41feca89084d
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-10-03 12:07:11 +02:00
Marc Mutz
0f9148ac9b QRegion: fix a valgrind warning
When:
 - i == 0 (at end of current POINTBLOCK),
 - numFullPtBlocks == 1 (only one more POINTBLOCK left) and
 - iCurPtBlock == 0 (last block contains no points),
Valgrind rightfully complained about an invalid read:

 Conditional jump or move depends on uninitialised value(s)
    at 0x517B08B: PolygonRegion(QPoint const*, int, int) (qregion.cpp:3480)

Fixed by setting 'next' to nullptr when !numFullPtBlocks OR !iCurPtBlock.

Change-Id: If5225fdfa66f2910a8aafb675cd02b40c0a81ad9
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-10-02 20:57:19 +02:00
Timur Pocheptsov
11c1fe13b8 QMacStyle: Fix QToolButton appearance on Yosemite
On Yosemite checkable toolbuttons look differently
when highlighted - this modification tries to imitate such look
without pixmaps we used on OS X >= 10.5 && < 10.10.

Change-Id: I0fcdff42a67fa6d5188c9dc64401f0f27ae60b5d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-10-02 18:58:02 +02:00
Allan Sandfeld Jensen
9af1d11fcf Remove wrong unneeded definition in qopenglextensions_p.h
The types are already defined by qopengl.h, and the GLchar could be
incorrectly defined in the Qt namespace for GLES2 namespaced builds.

Change-Id: Ia2052599538af51fdadc434935d51bbfe8437453
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-10-02 14:05:46 +02:00
Tor Arne Vestbø
231a4a1101 iOS: Move statusbar visibility handling to QIOSViewController
It doesn't belong in QIOScreen, and simplifies the flow when changing
the focus window or the window state of the focus window. Both will
result in calling updateProperties on the view-controller, which will
re-configure the statusbar visibility and hide/show it as appropriate,
before triggering a re-layout of its own view, which will in turn
trigger an update of the screen properties based on the new statusbar
state, before re-layouting of QWindow based on the new screen state.

Change-Id: I89077a3fb5f843949ce833e4e727d2c753ea2eb6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-10-02 13:58:01 +02:00
Venu
c027175021 Revert "Don't generate documentation for classes which are not available"
This reverts commit dbbb4d1654.

This change should enable QDoc to generate documentation for the
Mac-specific widgets, QMacCocoaViewContainer and QMacNativeWidget.

Change-Id: If0dd6530906e3e13921384372badc73ba4727b9d
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-10-02 13:57:34 +02:00
Venu
e453de98f6 Doc: Removed a few references to the outdated features
OpenVG support and the -graphicssystem command-line option
is not available since Qt 5.0.

Change-Id: I19c89cd3bb2c4a2215cdfae9fd783dece637b30f
Task-number: QTBUG-41265
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-10-02 13:56:56 +02:00
Alex Blasche
9c464c3bf4 Update the signal and slots docs
This lifts the documentation into a more recent context. One might
argue that Qt is a little bit older too.

Change-Id: I3e85f21bbad1179136629c2025e3499481fc8334
Task-number: QTBUG-16809
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-10-02 12:03:26 +02:00
Friedemann Kleint
24edd8afdc Windows: Transform regions of window masks correctly.
Add missing transformation for first rectangle of a region
consisting of multiple rectangles.

Task-number: QTBUG-41300
Change-Id: I1a25c422c93ceade79de79d5c49891e0a7211943
Reviewed-by: MihailNaydenov <garfieldhq@yahoo.com>
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-02 10:00:58 +02:00
Kai Koehne
97a65e1980 Warn when loading opengl32sw.dll fails
Print a warning when the developer/user has explicitly
requested the software backend, but loading openglsw.dll fails.

Change-Id: I8b1f079538ac70ceacbf1a397a276659c760a4cc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-10-02 09:16:44 +02:00
Eskil Abrahamsen Blomfeldt
538248d930 Android: Don't include Apache code under LGPLv2 license
The code which extracts style assets for the Android style
is licensed under the Apache license, which is not compatible
with LGPLv2.1. It is, however, compatible with LGPLv3. This
means that the Android platform plugin cannot be LGPLv2.1
as long as this code is included.

To minimize licensing confusion, we default to only providing
LGPLv3 for Android. If you want to build a LGPLv2.1-compatible
library, you can add -no-android-style-assets to the
configuration. This will in turn enable the LGPLv2.1 in
the configure output, and it will disable the extraction
code in the platform plugin.

Running the Android style with an LGPLv2.1-compatible platform
plugin will work, but it will look horrible.

[ChangeLog][Android] Default open-source license for
Qt for Android is now LGPLv3. For compatibility with the LGPLv2.1
license, add "-no-android-style-assets" to your configuration.

Change-Id: I6c7b52140f38138520871fa7c69debbb4ee90e6c
Task-number: QTBUG-41365
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-10-02 05:59:17 +02:00
BogDan Vatra
3b577dfe79 Use PopupMenu when possible.
On API-11+ we are going to use PopupMenu instead of ContextMenu to show
context menus. A PopupMenu displays a Menu in a modal popup window
anchored to a View. The popup will appear below the anchor view if there
is room, or above it if there is not.

Task-number: QTBUG-39736
Change-Id: Ie412ab0935b868348ce5c8bb0bf53571ffefd582
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-10-01 20:10:58 +02:00
Kai Koehne
7ca54ce5d9 Avoid naming clashes with QStringLiteral local variable
MSVC 2013 complains about the use of 's' if a variable 's' is already
defined in the context:

error C2373: 's' : redefinition; different type modifiers
error C3493: 's' cannot be implicitly captured because no default capture
mode has been specified

This looks like a compiler bug. Anyhow, it's easy to avoid the clash in
most cases by using a more distinctive name ...

Task-number: QTBUG-41706
Change-Id: Iaff1b6d37897fa8cf9e4913effa0498f9fd7bb07
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-01 17:06:02 +02:00
Gabriel de Dietrich
8ee9774e67 Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4 2014-10-01 16:21:12 +02:00
Kai Koehne
d78fb442d7 Logging: Disable tracking of debug source info for release builds
Tracking the file, line, function means the information has to be stored
in the binaries, enlarging the size. It also might be a surprise to some
commercial customers that their internal file & function names are
'leaked'. Therefore we enable it for debug builds only.

[ChangeLog][QtCore][Logging] File, line, function information are not
recorded anymore for logging statements in release builds. Set
QT_MESSAGELOGCONTEXT explicitly to enable recording in all configurations.

Change-Id: I454bdb42bcf5b5a8de6507f29f2a61109dca9b91
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-10-01 16:06:27 +02:00
Joerg Bornemann
377ef06aef Doc: fix misleading documentation of QProcess::set[Process]Environment
The example suggested that QProcess searches the PATH variable to find
the executable for the child process. That's not true. The environment
that's passed with setProcessEnvironment is just passed to the child
process. Removed the misleading example and fixed the function's
description.

Task-number: QTBUG-7321
Change-Id: I8ac4b6b02002eb0a99686f09bcf45f9bc677c8e2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-10-01 15:31:45 +02:00
Allan Sandfeld Jensen
0175ad4d3f Fix regression in metric calculation of text with mnemonics
Even when we do not intend to display the text, we still need to go
through the processing of mnemonics to remove them from the text.

Instead of capping the max underlines to 0, the TextDontPrint option now
just saves adding the underline formats.

Task-number: QTBUG-41593
Change-Id: I67790650dbed0092de2c63e5d5a9349dc02d5846
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-10-01 15:30:43 +02:00
Leonard Lee
f5f300ba82 Fix hangs on QFileSystemWatcher.
QFileSystemWatcher hangs at a mutex or semaphore when adding network
paths on OS X system.

There is an else block that does not increment the 'it' iterator
with ++it; inside the QFseventsFileSystemWatcherEngine::checkDir() call.

Change-Id: I6c250c7f3d25399c3a0a58ce864e9466320b166b
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2014-09-30 21:55:18 +02:00
Jerome Pasion
7696d20f75 Doc: Adding API reference section in Qt Platform Headers page.
-better visibility to the page.

Change-Id: Ibc1a9991fa7a8fda04827607edfd258e4595ad7e
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-09-30 21:00:50 +02:00
Allan Sandfeld Jensen
56f3eb299c Extend QOpenGLVertexArrayObjectHelper to support glIsVertexArrays
This is needed for dynamicgl support in QtWebKit.

Change-Id: I4d1769394ccdeaf449cac4f002c03ca8013f62f6
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-09-30 19:59:23 +02:00
Oswald Buddenhagen
be1635e2d6 Don't dpi-scale -1 pixel metrics
It may be rounded down to 0, thus losing its magic value.

Task-number: QTBUG-41324
Change-Id: I5a5b98bb24bd0478c10940a90a7dc691e2663f4d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-09-30 18:33:16 +02:00
Laszlo Agocs
684990d148 kms: Support QOpenGLWidget and QQuickWidget
Also fixes the handling of shareContext() for contexts and format() for windows
and makes QOffscreenSurface working.

Change-Id: I3c3374a9de14a5b8428de3e11d9d7e1285c5b9c7
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-09-30 18:23:08 +02:00
Laszlo Agocs
3a2fdc48ad kms: Support non-64x64 cursors
Task-number: QTBUG-41477
Change-Id: I10a519d8560c909e87ba2f673d2da4106ce93b71
Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-09-30 18:23:04 +02:00
Dyami Caliri
138e14d7bb Accessibility: Fix crash with invalid QAccessibleInterface
Windows accessibility can crash if it handles an event with an invalid
QAccessibleInterface pointer (one whose object has been deleted).

Task-number: QTBUG-41597
Change-Id: Iba099f7cb732fd00f18f04bd951c6cdd94785871
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-09-30 16:17:10 +02:00
Topi Reinio
4b128309a3 qdoc: Restore navigation bar titles for QML, QML basic types
Re-add the name of a QML type/QML basic type to the navigation
bar.

Change-Id: Ia0ced775099f1ed4071ae9a922d808b9114c10ea
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-09-30 14:08:24 +02:00
Nico Vertriest
54853c5f66 Doc: Use title case in section1 titles
Using Python script title-cased.py

Task-number: QTBUG-41250
Change-Id: I00d3d7a0b30db7304a7904efd6d63abd9a7b493b
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-09-30 13:52:51 +02:00
hjk
eda8af2a69 Make QAccessible compile with -Werror
GCC was bailing out when attempting to merge this into the dev
branch due to the use of "potentially uninitialized values".

Change-Id: Id2fc4a123a4b180b9ab439429a0d20245c7ee41b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-09-30 10:33:07 +02:00
Friedemann Kleint
289b4ed705 QMdiArea: Fix positioning of cascaded sub windows.
Take PM_FocusFrameVMargin into account.

Task-number: QTBUG-35146
Change-Id: I1499790537ddf9fbb912ab764b7d049ee11af95d
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-09-30 10:32:52 +02:00
MihailNaydenov
c55324aee0 Additional support for devicePixelRatio in CE_MenuItem’s icon painting
FusionStyle and MacStyle have this already, the change just brings it to the others.

Task-number: QTBUG-40277
Change-Id: I08dc80771b9cd0ab47179e1994ab6510b022eade
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-09-30 10:32:34 +02:00
Eskil Abrahamsen Blomfeldt
27bc4c4ce5 QPlainTextEdit: Fix crash on complex undo w/full width selection
Say you have a document of two blocks of text.

When you select a block of text in the document and then replace this
with a new empty block (by pressing enter) and then subsequently
undo this action, the following three steps are performed as a
chain of undo commands:

1. Remove the empty block at the beginning of the document
2. Insert a new empty block at the beginning of the document
3. Insert the text back into the first block

Since a block is removed and inserted in the same go, both blocks
require a relayout, since the accumulated change spans both blocks.
However, in QPlainTextDocumentLayout we would only look at the max
of either removed chars or added chars. This would match the text
length of the first block at this point, so we would only relayout
that block. However, since we are also removing characters, the
actual accumulated change to the document is larger. We should
relayout any block touched by the sum of the added and removed
character counts.

Missing this, the paint event would later query
block.layout()->lineForTextPosition(0) which would give an invalid
line despite the fact that the block.length() > 0. This caused
a crash in the paint event when the full width selection was
turned on.

Note that the logic here was only recently updated to include the
removed characters at all in the logic, by the SHA1:
2983cb9531.

[ChangeLog][QPlainTextEdit] Fixed a crash when using full width
selections and issuing a complex undo command chain which removes
and inserts an empty block in one go.

Task-number: QTBUG-36415
Change-Id: Iafe8a69e455e0c713a48714f10f0cace69c84f51
Reviewed-by: Axel Rasmussen <axel.rasmussen1@gmail.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-09-30 10:21:39 +02:00
Ulf Hermann
38c4ccbfe6 Handle PPK_CustomBase in QWin32PrintEngine::property
If we leave out the default so that the compiler catches missing enum
values we should actually handle them all ...

Change-Id: Ieb4992dec84ce847e48ab3c4a94bd8825a148706
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-09-30 09:45:07 +02:00
Laszlo Agocs
90ce9701d0 Fix losing dirty state when calling update() from paintGL()
When the paint for the QOpenGLWidget was in invoked on the
fast path, where only that widget was dirty, the resetWidget
call after sending the paint event removed the widget from the
dirty list, making it impossible to schedule an update during the
event handling. The correct way is to clean the list and then send
the paint events.

Change-Id: Icdad5686ded7944fd1c8af56496f725e163a60e6
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-09-30 09:38:38 +02:00
Friedemann Kleint
5d36c74cb6 uic: Add QOpenGLWidget.
Change-Id: I02cb6bd4a038b865fa414fa557b12e369685248f
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-09-29 20:53:26 +02:00
Marc Mutz
d93e4eff50 Make QRegion::shared_empty const
Continuing the trend of QString, QVector, etc.

Change-Id: I8f53d4abfa0dd941bfdfd3c1a9049a42dbf92691
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-09-29 20:13:18 +02:00
Alexander Volkov
2045a657da xcb: Fix detecting the fullscreen state from _NET_WM_STATE flags
A fullscreen window can have maximized flags being set so first check
the NetWmStateFullScreen flag.

Change-Id: Ia802abf3cfa4c784baa2d55088e3f53310f0362e
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-09-29 20:05:11 +02:00
Sérgio Martins
e297d72fa6 Fix build when using -Werror
"accessible/qaccessible.cpp:2154:43: error: 'type' may be used uninitialized in this function [-Werror=maybe-uninitialized]"
Compiler doesn't seem very smart, all enumerators are handled in the switch already.

Observed on android's gcc and gcc-4.7 on GNU/Linux

Change-Id: I30b4660c18992158457cada01b5916aa4feae4ff
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-09-29 18:24:01 +02:00
Thiago Macieira
cc50651cce Update the detection of when to log to stderr
On Windows, the detection changes only by inserting the use of the
environment variable before the existing tests and removing the check on
stderr.

This commit adds logic similar to Windows's: if the application has a
controlling TTY, we'll use stderr. Otherwise, we'll use the system log.
This is technically a change in behavior: previously, we would always
use the system log, unless the environment variable told us not to.

In practice, the behavior doesn't really change: Android and BlackBerry
and systemd-spawned applications are launched with no controlling TTY,
so logging will go to their logging systems.

[ChangeLog][Important behavior changes][Logging (including qDebug and
qWarning)] Log output will now go to the system log (if support for it
was compiled into Qt) if the application has no controlling terminal or
console window. Set QT_LOGGING_TO_CONSOLE to 1 to force logging to go to
stderr.

Task-number: QTCREATORBUG-12564
Change-Id: I043c5c4f47c15f26d4f4a5cf43df466ea38cdbc7
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-09-29 17:42:25 +02:00
Andrew Knight
85062a3028 Revert "winrt: Remove depth/stencil from the default window format"
This reverts commit 636d2e3402.

The issue was caused by a bug in ANGLE, not a lack of hardware support.

Change-Id: If2a66cd023dc7f2329dc2812169042487eecd428
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
2014-09-29 16:09:35 +02:00
Andrew Knight
311157c3c6 ANGLE: Upgrade to 2.1~abce76206141
Upgrade to address issues discovered since the last upgrade.

Patch notes:
0000-General-fixes-for-ANGLE-2.1.patch
  added removal of the unused third-party tracing functions

0003-Fix-compilation-with-MinGW-gcc-64-bit.patch
  removed as it is no longer needed

0011-ANGLE-Fix-compilation-error-on-MinGW-caused-by-trace.patch
  removed as it is no longer needed

0016-ANGLE-Fix-compilation-with-MinGW-D3D11.patch
  now supports MinGW 64-bit

[ChangeLog][Third-party libraries] ANGLE updated to 2.1~f8602ad91e4f

Task-number: QTBUG-40649
Task-number: QTBUG-40658
Task-number: QTBUG-41031
Task-number: QTBUG-41081
Task-number: QTBUG-41308
Task-number: QTBUG-41563
Change-Id: I9f776c8d5cb94ddb12d608a8d5630bfc54437bea
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-09-29 16:09:29 +02:00
Richard Moe Gustavsen
9af7104359 cocoa: override new QPlatformMenu::popup() function
Having two versions of popup, one that takes a point and one that
takes a target rect, causes problems for client code if they use
the 'target rect' version since not all platforms override that
function.

So this patch will change the remaining platform that override
QPlatformmenu into using the new 'target rect' version.
Calling the old version that takes a point will still work, since
the base version will then convert the point into a zero-sized rect, and
forward the call to the 'target rect' version instead.

Change-Id: Icc8531d79270a4f24ec08b8ed95b18ed3db1ad4d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-09-29 16:01:06 +02:00
hjk
1e1f5833b1 Do not use Q_COMPILER_CLASS_ENUM for gcc 4.4
It breaks the compiler self-test:

tst_compiler.cpp:754: error: no matching function for call to ‘qCompare(tst_Compiler::cxx11_class_enum()::X&, tst_Compiler::cxx11_class_enum()::X, const char [2], const char [13], const char [17], int)’

We not should assume it is safe to use, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064 and
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37946.

Change-Id: I72c9c56e3e4f62bdfdfa133b6b0a2e610b5331c8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-09-29 15:14:04 +02:00
Alexander Volkov
382b7afbe2 xcb: Fix logic for minimized state
_NET_WM_STATE message can be received by a window in the minimized state.
Don't change the window state in this case.

Task-number: QTBUG-31117
Task-number: QTBUG-39376
Task-number: QTBUG-34430
Change-Id: Ic77a345e442891972b692803fab1e2f6aef30433
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-09-29 14:26:26 +02:00
Gabriel de Dietrich
ee6e9cbf36 QMacStyle: Generalize Cocoa control rendering
So far, we were restricted by the values of ThemeButtonKind, which
consist mostly of buttons. We want to generalize to other kind of
controls when the time arrives. Already, QPushButton with pull-
down menu is not possible to get from that enum, while its easy to
get from NSPopupButton.

Task-number: QTBUG-40833
Change-Id: I244c42c42ab595f4790050eb15ade70443e155b2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-09-29 13:39:06 +02:00
Gabriel de Dietrich
996054f5e6 QCocoaMenu: Keep a reference to the containing menu item
This allows the menu to tell its containing item the menu got
deleted. This removes the need to reset the COCOA_MENU_ANCESTOR
property value, which would crash since QCocoaMenuItem::m_menu
would be a dangling pointer.

Task-number: QTBUG-41587
Change-Id: Ia3408ef85cf823bfddbc2c41d6534e43bf14ed29
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-09-29 13:38:57 +02:00
Gabriel de Dietrich
8ab25620d3 Merge remote-tracking branch 'origin/5.3' into 5.4
Conflicts:
	src/network/socket/qnativesocketengine_unix.cpp
	src/widgets/kernel/qwidget_qpa.cpp

Change-Id: I6f1aa320d5ca66cd92d601a95885aeaab0abb191
2014-09-29 13:38:11 +02:00
Oliver Wolff
dfe853bff9 Windows: Fix call of ToUnicode
ToUnicode sometimes gives wrong results if it is used with a
keyboard buffer containing the ctrl modifier. Special cases
containing alt and control might trigger the third assignment
of a key, but if no alt modifier is used for the key event,
we temporarily disable the control modifier in order to obtain
the character with ToUnicode.

Task-number: QTBUG-35734
Change-Id: Ifd88c640541b42fa65ee1dc9b55af3386714b0b8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-29 07:26:46 +02:00
Vladimir
8456adf0ee Fix font enumeration, with the same family name, on Windows.
Function EnumFontFamiliesEx with parameters (lfCharSet = DEFAULT_CHARSET, lfFaceName = '\0') enumerates only first installed font from many with same family name.
This patch calls EnumFontFamiliesEx twice:
 1. Without family name to enumerate families;
 2. With family name to enumerate fonts with same family.

Task-number: QTBUG-40828
Change-Id: Ic36a24a9e70f735a7324c05fe4b70f7c7e5710d0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
2014-09-28 16:41:05 +02:00
Marc Mutz
15fc84c48b QSslCertificate: fold a string literal correctly
Change-Id: I8f812002302d3b74af252fa66e9e13154bbf80e1
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-09-28 16:32:09 +02:00
Thiago Macieira
fa91bb9a02 Don't check for EINTR after calling QT_READ / QT_WRITE
On Unix, those functions are already #define'd to qt_safe_read and
qt_safe_write, which do the necessary EINTR handling. On Windows, EINTR
cannot happen.

Change-Id: I50c46472c04bd90a0bac51c725cc86311ae905c8
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-09-28 01:28:52 +02:00
Thiago Macieira
0c32af08a6 Fix handling of IPv6 addresses in QUrl::fromUserInput
IPv6 addresses can start with ":", for which QDir::isAbsolute() would
always return true (QResourceFileEngine::isRelativePath() returns
constant false) and would trip the calculation for local files.

Similarly, IPv6 addresses can start with strings that look like Windows
drives: "a:", "b:", "c:", "d:", "e:" and "f:" (though not today, as
those address blocks are unassigned). Since a valid IPv6 address will
definitely require at least one more colon and Windows file names cannot
contain ':', there's no ambiguity: a valid IPv6 address is never a valid
file on Windows.

This resolves the ambiguity in favor of IPv6 for Unix filenames (which
can contain a colon) and in case of an URL containing scheme, relative
path and no authority ("dead:beef::" for example could have been parsed
as scheme() == "dead" and path() == "beef::").

Task-number: QTBUG-41089
Change-Id: Id9119af1acf8a75a786519af3b48b4ca3dbf3719
Reviewed-by: David Faure <david.faure@kdab.com>
2014-09-28 01:28:29 +02:00
Christian Strømme
10a0f93c86 Android: Add function to change the stacking order in the layout.
This change enables us to reorder the stacking order used by the
layout. This is necessary if we want to influence the drawing order.

Lowering or raising views are done separately for native views and
Qt surface views, that is, the two different view "types" are moved
relative to other views of the same type and Native views are always
placed on top.

Change-Id: I01cbb88f8efee08877b5972cf330fd25266a2aa9
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-09-26 23:45:13 +02:00
Christian Strømme
afece6e496 Android: Add findClass() function to the QJNIEnvironmentPrivate class.
The static QJNIEnvironmentPrivate::findClass() function exposes the
cache and the class finding code in qjni.

Change-Id: I42043dc993cf9cace042faf763f2a647ba79d97f
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-09-26 23:45:00 +02:00
Christian Strømme
8b0d9a16db Android: Improve the foreign-window implementation
Adds:
- Improved geometry calculations (e.g, inside a parent)
- Change visibility
- proper stacking order. Native views now reserve the top of the stack
  to ensure that they stay visible.
- React to application state changes.

Change-Id: I35de0396937fff37ffcd272c9a7d8e9873a91dfb
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-09-26 23:44:42 +02:00
Giuseppe D'Angelo
5222abfdf5 Uic: fix a leak
There are a couple of code paths in which we return from a function
without freeing the memory pointed by a local pointer.

For the sake of not over-modifying the code, I chose not to turn
"ui" into a scoped pointer.

Change-Id: I0b23944f7526d250c1ebeca0bae9bdc36dceceed
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-09-26 21:14:49 +02:00
Andrew Knight
a1dea3a62c direct2d: Optimize dashed line drawing
This introduces a combined brush/dash pattern which can be used to
perform faster dashed straight-line drawing. The dash pattern is
prerendered to a tiled bitmap brush, resulting in a significant speedup
for lines with many elements.

As the result of non-rectilinear lines may lose quality compared to the
native dashed renderer, the slow/high quality codepath can be activated
by setting the QPainter::HighQualityAntialiasing render hint.

Task-number: QTBUG-40604
Change-Id: I771e9a81c042b4d8b6891dc9280932696e5a0694
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-26 07:32:33 +02:00
Louai Al-Khanji
3bcbff57e1 direct2d: Fix composition mode support
When the composition mode changes to a mode which is not supported by
Direct2D's primitive blending, the rendering follows the emulated (slow)
code path using rasterFill(). This allows the direct2d paint engine to
handle all composition modes supported by QImage.

Task-number: QTBUG-40602
Change-Id: I0ac0b5c89aab2483cb2ef7768d6dec8e16913249
Done-with: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-09-26 07:32:29 +02:00