This warning was removed when re-factoring code in:
328f2f9c35
Change-Id: I5a9d7fbbf2b78e6e80a79478f4e9fb08ccaec431
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Commit 4f21eb03 utterly broke the project file generation for
VS 2008. The introduced filterByName convenience methods looks for
filter names like "Generated Files", but the code path for
VS <= 2008 used filter names like "GeneratedFiles".
The generated projects were valid but empty.
This commit ensures that both VS generators use the same filter
names.
Task-number: QTBUG-41821
Change-Id: I828fa911bae8d835b073a4c2260316127cc72cda
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Commit 4f21eb03 broke the generation of non-flat vcxprojs.
XTreeNode passes filter names to outputFileConfigs that have
the source subdirectory suffixed (e.g. "Generated Files\subdir").
That's why the original code tested the filter names with
QString::startsWith.
I've changed the signature of outputFileConfigs to take a filterId
parameter which contains the unaltered filter name (e.g.
"Generated Files") that will determine the correct filter.
Task-number: QTBUG-41746
Change-Id: If33428526a098f433cd6ceb8ab6608bd9f94ef17
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
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>
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>
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>
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>
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>
Since commit cd1dff75, we use QMAKE_LFLAGS_CONSOLE when linking DLLs that
are built with CONFIG+=console. Thus, we must not pass options that are
specific to linking executables.
[ChangeLog][qmake] WinCE makespecs must not add /ENTRY: to
QMAKE_LFLAGS_CONSOLE and more. The flag is hard-coded in console.prf now.
This is a side effect of making it possible to specify a subsystem for
DLLs.
Change-Id: Ib481fd45b12140f9f05bf123db7152a3ddf0fa04
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
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>
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>
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>
[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>
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>
Pass QMAKE_LFLAGS_WINDOWS and QMAKE_LFLAGS_CONSOLE to QMAKE_FLAGS
regardless of the project template.
The /SUBSYSTEM linker switch is not exclusively meant for executables
but can also be applied when linking dynamic libraries.
This is needed when building DLLs for Windows XP with VS >= 2012.
Task-number: QTBUG-41504
Change-Id: I5966cba1b6756e15275fa5d7fdbc42b99c95c07b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Fixup after d44781730c, which would override whatever the user passed
on the command line.
Change-Id: If4d260801866ff53de3e6dfd6d37016fd8453d8d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
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>
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>
The change asked for by the comment is apparently done.
Change-Id: I7ef2b58eb8c38192904e83b1c2386d3c762e0bed
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
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>
- Ensure top level widgets are cleaned up.
- Place wizards beside each other for comparison.
- Use classic style on Windows to avoid interference by Vista style.
Change-Id: I223a40ea14eefe65dc2e9e8ddee44b0f0c806e3d
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Apparently, this causes problems with the completer due
to the fact that it matches the root drive "C:\" on Windows.
Task-number: QTBUG-41681
Change-Id: Iaf96675067e22e679371139a1a2fbf011a5edbdc
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
When the UISupportedInterfaceOrientations key is missing, iOS will start
up the application in the orientation defined by UIInterfaceOrientation,
and if that key is also missing, it will default to portrait orientation.
Unfortunately, when the application has finished launching on an iPad,
there is no way to re-evaluate the current device orientation unless the
user actively rotates the device, so for example if the device is physically
in landscape orientation, and the application is started up in portrait,
the application will not auto-rotate to landscape after starting up.
It would seem that [UIViewController attemptRotationToDeviceOrientation]
would be the right API to do this, but even after telling the device
to beginGeneratingDeviceOrientationNotifications the device orientation
will still match the startup orientation until the device is physically
rotated. For iPod/iPhones this is not an issue, as the OS will update
the device orientation after startup. Presumably the difference in
behavior between the two device classes is due to the iPad supporting
any orientation for the application grid.
Since we would prefer the application to either start up in the right
orientation directly, or at least rotate to it after startup, and the
latter can't be done, we apply UIInterfaceOrientationMaskAll to the
Info.plist file. This also has the benefit that the application will
show any splash screens in the right orientation.
Change-Id: If0421bc7b82b7f14a510fa1f34eac4f6407f570f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>